From b515e0e9d17ad95b90b9c2040456fcb512e2daad Mon Sep 17 00:00:00 2001 From: Jiri Kalvoda <jirikalvoda@kam.mff.cuni.cz> Date: Sat, 3 Feb 2024 23:24:48 +0100 Subject: [PATCH] KEYMAP fullsecrren + show statusbar --- keymap-python/actions.py | 8 ++++++++ keymap-python/i3.py | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/keymap-python/actions.py b/keymap-python/actions.py index a2f96a8..7966b9c 100644 --- a/keymap-python/actions.py +++ b/keymap-python/actions.py @@ -118,6 +118,14 @@ def CONT_TOGGLE(self, prop_name): assert_in(prop_name, ["fullscreen", "floating", "sticky"]) self.prop_name = prop_name +@action_init() +def FULLSCREEN(self, on=True): + self.on = on + +@action_init() +def SHOW_STATUSBAR(self, on=True): + self.on = on + @action_init() def RESTART_MANAGER(self, prop_name): assert_in(prop_name, ["fullscreen", "floating", "sticky"]) diff --git a/keymap-python/i3.py b/keymap-python/i3.py index 7eeeb34..028d7cb 100755 --- a/keymap-python/i3.py +++ b/keymap-python/i3.py @@ -97,6 +97,9 @@ def x(self): @action_serialize("CONT_TOGGLE") def x(self): return f"{self.prop_name} toggle" +@action_serialize("FULLSCREEN") +def x(self): + return f"fullscreen {'enable' if self.on else 'disable'}" @action_serialize("GO_MODE") def x(self): return f'mode "{self.mode.name or "default"}"; exec '+cmd_expand(f"i3-mode-log '{self.mode.name or 'default'}'") @@ -113,6 +116,9 @@ def f(self): def f(self): return g["CONFIRM_CMD"]("i3-msg exit", "Do you really want to EXIT i3?") +@action_serialize("SHOW_STATUSBAR") +def x(self): + return f"bar mode {'dock' if self.on else 'invisible'}" load_main() if have_i3_woman: -- GitLab