From ffd04e9710f892f3d5962bb112597384eb8e291d Mon Sep 17 00:00:00 2001 From: Zero Rust Date: Sat, 23 May 2020 07:13:47 -0400 Subject: [PATCH] full menu and command for arandr scripts --- bumblebee_status/modules/contrib/arandr.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bumblebee_status/modules/contrib/arandr.py b/bumblebee_status/modules/contrib/arandr.py index 16f66b5..a31ce29 100644 --- a/bumblebee_status/modules/contrib/arandr.py +++ b/bumblebee_status/modules/contrib/arandr.py @@ -54,6 +54,17 @@ class Module(core.module.Module): displays = Module._get_displays() layouts = Module._get_layouts() available_layouts = Module._prune_layouts(layouts, displays) + log.debug("Available layouts:") + log.debug(available_layouts) + + if len(available_layouts) > 0: + for layout in available_layouts: + sh = os.path.join(__screenlayout_dir__, layout) + sh_name = os.path.splitext(layout)[0] + cmd = self.parameter(sh_name, sh) + menu.add_menuitem(sh_name, + callback=partial(util.cli.execute, sh) + ) menu.show(widget, 0, 0)