Merge pull request #16 from mfs/fix-xmonad

Detect xmonad.
This commit is contained in:
gk authored and GitHub committed 2020-08-22 04:40:24 +10:00
commit ce60c65e85
1 file changed
+2 -2
+2 -2
View File
@@ -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|screen) ;; # skip shells
*[Ll]ogin*|*init*) break;; # exit when the top is reached
*) term="$name" # anything else can be assumed to be the terminal
esac
@@ -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