]> gitweb.fluxo.info Git - rhatto/dotfiles/xsession.git/commitdiff
Simplify powerline-awesome instance management
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 3 Oct 2017 14:50:49 +0000 (11:50 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 3 Oct 2017 14:50:49 +0000 (11:50 -0300)
xsessionrc.dot.link

index e9e7e2836843b9902118d84f8c0af9e22321f7cc..4f9134018e0d97f3c5b0173e4eeba1b80db27383 100755 (executable)
@@ -138,13 +138,7 @@ fi
 
 # Kill any previous powerline-awesome instance
 # A window manager like Awesome may later start a new instance so it can appear at the wibar
-#POWERLINE_PID="`ps -ax -o pid,command | grep 'powerline-awesome.py' | grep -v grep | awk '{ print $1 }'`"
-#POWERLINE_PID="`ps -x -o pid,command | grep '^/usr/bin/python /usr/share/powerline/bindings/awesome/powerline-awesome.py' | cut -d ' ' -f 1`"
-POWERLINE_PID="`pidof -x /usr/share/powerline/bindings/awesome/powerline-awesome.py`"
-if [ ! -z "$POWERLINE_PID" ]; then
-  kill $POWERLINE_PID
-fi
-unset POWERLINE_PID
+kill `pidof -x /usr/share/powerline/bindings/awesome/powerline-awesome.py` > /dev/null 2>&1
 
 # Custom SSH_ASKPASS config
 # See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=606934