Skip to content

Instantly share code, notes, and snippets.

@jadedgnome
Created August 9, 2014 19:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jadedgnome/af1c1baaab8d0532e3b6 to your computer and use it in GitHub Desktop.
Save jadedgnome/af1c1baaab8d0532e3b6 to your computer and use it in GitHub Desktop.
script to stop uTox from dying when I close it
#!/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