aboutsummaryrefslogtreecommitdiffstats
path: root/xpybar/config/myscroll.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--xpybar/config/myscroll.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/xpybar/config/myscroll.py b/xpybar/config/myscroll.py
new file mode 100644
index 0000000..c5ef807
--- /dev/null
+++ b/xpybar/config/myscroll.py
@@ -0,0 +1,12 @@
+# -*- python -*-
+from common import *
+
+class MyScroll(Entry):
+ def function(self):
+ return '↓↑'
+
+ def action(self, col, button, x, y):
+ if button in (LEFT_BUTTON, RIGHT_BUTTON, SCROLL_UP, SCROLL_DOWN):
+ G.groupi = (G.groupi + (+1 if button in (LEFT_BUTTON, SCROLL_DOWN) else -1)) % len(G.groups)
+ G.group = G.groups[G.groupi]
+ self.invalidate()