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!

Advertisements

About SoCRaT

Research Support and Infrastructure Engineer, OSS & Linux Geek
This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s