don't check if DE variables exist before setting them, fix location of terminal comment

This commit is contained in:
GaugeK committed 2020-08-22 15:34:37 +10:00
1 parent 293b388623
commit 402217d114
1 file changed
+6 -4
+6 -4
View File
@@ -13,10 +13,9 @@ eq() { # equals | [ a = b ] with globbing
esac;! :
}
## Terminal
[ "$XDG_CURRENT_DESKTOP" ] && wm="$XDG_CURRENT_DESKTOP"
[ "$DESKTOP_SESSION" ] && wm="$DESKTOP_SESSION"
## DE
wm="$XDG_CURRENT_DESKTOP"
wm="$DESKTOP_SESSION"
## Distro
# freedesktop.org/software/systemd/man/os-release.html
@@ -27,6 +26,7 @@ for os in /etc/os-release /usr/lib/os-release; do
done
if [ -e /proc/$$/comm ]; then
## Terminal
while [ ! "$term" ]; do
# loop over lines in /proc/pid/status until it reaches PPid
# then save that to a variable and exit the file
@@ -194,6 +194,8 @@ elif v=/System/Library/CoreServices/SystemVersion.plist; [ -f "$v" ]; then
done < "$v"
fi
eq "$0" "*fetish" && printf 'Step on me daddy\n' && exit
## GTK
while read -r line; do
eq "$line" "gtk-theme*" && gtk="${line##*=}" && break