From 0a43ea82f3f6aab15e6b13dc29eeb65391c4d256 Mon Sep 17 00:00:00 2001 From: GaugeK Date: Fri, 21 Aug 2020 14:01:36 +1000 Subject: [PATCH 1/3] Don't report terminal as tmux --- fet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fet.sh b/fet.sh index b880d3d..df6efb4 100755 --- a/fet.sh +++ b/fet.sh @@ -33,7 +33,7 @@ if [ -e /proc/$$/comm ]; then # get name of binary read -r name < "/proc/$ppid/comm" case $name in - *sh|"${0##*/}") ;; # skip shells + *sh|"${0##*/}"|tmux*) ;; # skip shells *[Ll]ogin*|*init*) break;; # exit when the top is reached *) term="$name" # anything else can be assumed to be the terminal esac From c158f06c4de7fc386897b2b09722b4219453e680 Mon Sep 17 00:00:00 2001 From: GaugeK Date: Sat, 22 Aug 2020 03:43:35 +1000 Subject: [PATCH 2/3] replace *box* with *box when detecting WM so it doesn't match virtualbox's driver --- fet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fet.sh b/fet.sh index df6efb4..30707fa 100755 --- a/fet.sh +++ b/fet.sh @@ -47,7 +47,7 @@ if [ -e /proc/$$/comm ]; then for i in /proc/*/comm; do read -r c < "$i" case $c in - awesome|xmonad|qtile|i3*|*box*|*wm*) wm="$c"; break;; + awesome|xmonad|qtile|i3*|box*|*wm*) wm="$c"; break;; esac done From f139798f1647e8c933009285cd375a4ea1fca6d7 Mon Sep 17 00:00:00 2001 From: GaugeK Date: Sat, 22 Aug 2020 04:14:55 +1000 Subject: [PATCH 3/3] Remove faulty tmux support Tmux's PPid is the 1, so skipping that makes the term your init --- fet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fet.sh b/fet.sh index 30707fa..51319ee 100755 --- a/fet.sh +++ b/fet.sh @@ -33,7 +33,7 @@ if [ -e /proc/$$/comm ]; then # get name of binary read -r name < "/proc/$ppid/comm" case $name in - *sh|"${0##*/}"|tmux*) ;; # skip shells + *sh|"${0##*/}") ;; # skip shells *[Ll]ogin*|*init*) break;; # exit when the top is reached *) term="$name" # anything else can be assumed to be the terminal esac