From 402217d114a54a36b561f71be8354eee96629557 Mon Sep 17 00:00:00 2001 From: GaugeK Date: Sat, 22 Aug 2020 15:34:37 +1000 Subject: [PATCH] don't check if DE variables exist before setting them, fix location of terminal comment --- fet.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fet.sh b/fet.sh index e3c5f3d..9a5e002 100755 --- a/fet.sh +++ b/fet.sh @@ -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