Fix post install

This commit is contained in:
Ximi1970
2020-11-22 20:15:28 +01:00
parent 92de63a88d
commit 009cf68a65
3 changed files with 65 additions and 57 deletions

View File

@@ -280,6 +280,14 @@ sudo pacman -S systray-x
sudo pacman -S systray-x-gnome
```
##### Activation
Use `Tweaks` to activate the gnome shell extension `Kstatusnotifieritem/appindicator support` or reboot the system.
``` bash
sudo pacman -S gnome-tweaks
```
###### XFCE / Others (non-KDE, non-GNOME)
```bash

View File

@@ -26,6 +26,7 @@ provides=(
)
source=($pkgname-$pkgver.tar.xz)
sha256sums=(SKIP)
install=systray-x-gnome.install
build() {
cd $pkgname-$pkgver
@@ -55,60 +56,3 @@ package() {
mkdir -p "${pkgdir}"/usr/lib/thunderbird/distribution/extensions
cp -f ${pkgname}-${pkgver}/systray-x@Ximi1970.xpi "${pkgdir}"/usr/lib//thunderbird/distribution/extensions/systray-x@Ximi1970.xpi
}
post_install() {
PROF_DIR="/etc/dconf/profile"
PROF_FILE="user"
if [ -f ${PROF_DIR}/${PROF_FILE} ] ; then
#
# Edit user file
#
grep -q "user-db:user" ${PROF_DIR}/${PROF_FILE}
if [ "$?" = "1" ] ; then
echo "user-db:user" >> ${PROF_DIR}/${PROF_FILE}
fi
grep -q "system-db:local" ${PROF_DIR}/${PROF_FILE}
if [ "$?" = "1" ] ; then
echo "system-db:local" >> ${PROF_DIR}/${PROF_FILE}
fi
else
#
# Generate user file
#
mkdir -p ${PROF_DIR}
cat >${PROF_DIR}/${PROF_FILE} <<EOF
user-db:user
system-db:local
EOF
fi
EXTENSION="appindicatorsupport@rgcjonas.gmail.com"
CONF_DIR="/etc/dconf/db/local.d"
CONF_FILE="00-extensions"
if [ -f ${CONF_DIR}/${CONF_FILE} ] ; then
#
# Edit extensions file
#
grep -q ${EXTENSION} ${CONF_DIR}/${CONF_FILE}
if [ "$?" == "1" ] ; then
sed -i -e "s/\(enabled-extensions=\[.*\)\]/\1, '${EXTENSION}'\]/" ${CONF_DIR}/${CONF_FILE}
fi
else
#
# Generate extensions file
#
mkdir -p ${CONF_DIR}
cat >${CONF_DIR}/${CONF_FILE} <<EOF
[org/gnome/shell]
# List all extensions that you want to have enabled for all users
enabled-extensions=['appindicatorsupport@rgcjonas.gmail.com']
EOF
fi
#
if [ -x /usr/bin/dconf ] ; then
dconf update
fi
}

56
dist/arch/gnome/systray-x-gnome.install vendored Normal file
View File

@@ -0,0 +1,56 @@
post_install() {
PROF_DIR="/etc/dconf/profile"
PROF_FILE="user"
if [ -f ${PROF_DIR}/${PROF_FILE} ] ; then
#
# Edit user file
#
grep -q "user-db:user" ${PROF_DIR}/${PROF_FILE}
if [ "$?" = "1" ] ; then
echo "user-db:user" >> ${PROF_DIR}/${PROF_FILE}
fi
grep -q "system-db:local" ${PROF_DIR}/${PROF_FILE}
if [ "$?" = "1" ] ; then
echo "system-db:local" >> ${PROF_DIR}/${PROF_FILE}
fi
else
#
# Generate user file
#
mkdir -p ${PROF_DIR}
cat >${PROF_DIR}/${PROF_FILE} <<EOF
user-db:user
system-db:local
EOF
fi
EXTENSION="appindicatorsupport@rgcjonas.gmail.com"
CONF_DIR="/etc/dconf/db/local.d"
CONF_FILE="00-extensions"
if [ -f ${CONF_DIR}/${CONF_FILE} ] ; then
#
# Edit extensions file
#
grep -q ${EXTENSION} ${CONF_DIR}/${CONF_FILE}
if [ "$?" == "1" ] ; then
sed -i -e "s/\(enabled-extensions=\[.*\)\]/\1, '${EXTENSION}'\]/" ${CONF_DIR}/${CONF_FILE}
fi
else
#
# Generate extensions file
#
mkdir -p ${CONF_DIR}
cat >${CONF_DIR}/${CONF_FILE} <<EOF
[org/gnome/shell]
# List all extensions that you want to have enabled for all users
enabled-extensions=['appindicatorsupport@rgcjonas.gmail.com']
EOF
fi
#
if [ -x /usr/bin/dconf ] ; then
dconf update
fi
}