summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2023-05-22 10:54:02 +0200
committerSébastien Dailly <sebastien@dailly.me>2023-05-22 10:54:02 +0200
commit7357e1f9671cbaef34fc934ce52b78f25c74f34e (patch)
treeb078ffea38f63487f61b772cda9c457df24a197d
parent597b007333d8ec0d9cfd29e6941fcbe57379108a (diff)
Update the irssi layout in the same way as firefox
-rw-r--r--src/macros/5-irssi.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/macros/5-irssi.py b/src/macros/5-irssi.py
index bcf5d81..6eb70e2 100644
--- a/src/macros/5-irssi.py
+++ b/src/macros/5-irssi.py
@@ -31,15 +31,20 @@ def wc(macropad, key, pressed):
]
)
-def next_one(macropad, key, pressed):
- Action().key(pressed, [Keycode.ALT, Keycode.A])
+def key(code):
+ def action(macropad, key, pressed):
+ Action().key(pressed, code)
+ return action
+
def build_application():
configuration = skeleton.Configuration("Irssi")
configuration.visible = True
- configuration.registerKey(0, "next.", next_one, 0x000200)
+ configuration.registerKey(0, "next.", key( [Keycode.ALT, Keycode.A]), 0x000200)
configuration.registerKey(2, "/wc", wc, 0x020000)
+ configuration.registerKey(3, "<", key([Keycode.CONTROL, Keycode.P]), 0x050505)
+ configuration.registerKey(5, ">", key([Keycode.CONTROL, Keycode.N]), 0x050505)
return configuration