diff --git a/keymap-python/actions.py b/keymap-python/actions.py index a2f96a824cb959c6bae6f5cfe7eb91fd3100a926..7966b9c446b7764ba01e5c3d709b6b17e18bfc71 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 7eeeb34a6e524e0c526edc95026b81b870d962a4..028d7cb68164871fa8be56b437ea67f5904c6357 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: