Created
August 9, 2014 19:06
-
-
Save jadedgnome/af1c1baaab8d0532e3b6 to your computer and use it in GitHub Desktop.
script to stop uTox from dying when I close it
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ORIGINALLY FROM : http://pastebin.mozilla.org/5879198 | |
# http://www.reddit.com/r/linux/comments/2czjru/skype_for_linux_redesign_is_ugly_but_functional/cjkl0cl | |
for i in `wmctrl -l | grep uTox | awk '{ print $1 }'` | |
do | |
wmctrl -i -r $i -b remove,hidden,skip_taskbar | |
done | |
while true | |
do | |
sleep 1 | |
pidof utox > /dev/null | |
if [[ "$?" != "0" ]] | |
then | |
break | |
fi | |
done | |
utox &> /dev/null & | |
while true | |
do | |
sleep 0.01 | |
wmctrl -l | grep uTox > /dev/null | |
if [[ "$?" == "0" ]] | |
then | |
break | |
fi | |
done | |
for i in `wmctrl -l | grep uTox | awk '{ print $1 }'` | |
do | |
wmctrl -i -r $i -b add,hidden,skip_taskbar | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment