Friday, June 5, 2009

Create Keyboard Shortcut to Kill/Open avant-window-navigator when playing games

I really like compiz and awn (avant window navigator), but awn causes me a problem when playing games; they just keep flickering till I get mad, so everytime I start a game I have to manually close awn and after finishing playing I have to open it again, so I created the following bash script and assigned it to a keyboard shortcut (using Ubuntu Tweak software):

ps -ef | egrep "avant|awn" | awk '{print $2}' | xargs kill -9

You can use the "man command_name" to get the description of each of the above commands. I then assigned another key to open "avant-window-navigator".

This way even if I forget to close it manually, I can just press the keyboard shortcut and it works like a charm!

No comments: