Created
March 24, 2012 16:10
-
-
Save tych0/2184681 to your computer and use it in GitHub Desktop.
Run arbitrary python codeon keypress
This file contains hidden or 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
diff --git a/libqtile/manager.py b/libqtile/manager.py | |
index 69f1c61..8034430 100644 | |
--- a/libqtile/manager.py | |
+++ b/libqtile/manager.py | |
@@ -1597,6 +1597,12 @@ class Qtile(command.CommandObject): | |
""" | |
return "OK" | |
+ def cmd_run(self, closure): | |
+ """ | |
+ Run closure with the qtile object as a single argument. | |
+ """ | |
+ return closure(self) | |
+ | |
def cmd_sync(self): | |
""" | |
Sync the X display. Should only be used for development. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment