Created
February 1, 2012 22:02
-
-
Save AeroNotix/1719751 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
program_dict = {'firefox-aurora': False, | |
'emacs': False, | |
'thunderbird': False, | |
'urxvt': False, | |
'skype': False} | |
@hook.subscribe.client_new | |
def dialogs(window): | |
windowtype = window.window.get_wm_class() | |
try: | |
if program_dict[windowtype]: | |
pass | |
except KeyError: | |
return | |
if windowtype: | |
if windowtype[0] == 'firefox-aurora': | |
window.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') | |
program_dict[windowtype] = True | |
for key in program_dict: | |
lazy.spawn(key) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment