Created
February 1, 2012 21:31
-
-
Save AeroNotix/1719590 to your computer and use it in GitHub Desktop.
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
FIREFOX = False | |
EMACS = False | |
THUNDERBIRD = False | |
TERMINAL = False | |
SKYPE = False | |
@hook.subscribe.client_new | |
def dialogs(window): | |
windowtype = window.window.get_wm_class() | |
if globals()[windowtype]: | |
return | |
if windowtype: | |
if windowtype[0] == 'firefox-window': | |
aurora.togroup('Home') | |
if windowtype[0] == 'emacs': | |
window.togroup('emacs') | |
if windowtype[0] == 'thunderbird': | |
window.togroup('mail') | |
if windowtype[0] == 'urxvt': | |
window.togroup('terminal') | |
if windowtype[0] == 'skype': | |
window.togroup('skype') | |
globals()[windowtype] = True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment