From cf088a69981989fee815bd284fcc8e9e36a3b32f Mon Sep 17 00:00:00 2001 From: moons Date: Mon, 3 Aug 2026 22:56:44 +0900 Subject: [PATCH] labwc --- modules/applications/labwc/home.nix | 51 ++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/modules/applications/labwc/home.nix b/modules/applications/labwc/home.nix index 58746b8..0bb983a 100644 --- a/modules/applications/labwc/home.nix +++ b/modules/applications/labwc/home.nix @@ -38,6 +38,28 @@ let "then".action."@name" = name; }; }; + + menuExecute = label: command: { + inherit label; + action = { + name = "Execute"; + inherit command; + }; + }; + + showMenu = button: menu: { + "@button" = button; + "@action" = "Press"; + action = { + "@name" = "ShowMenu"; + "@menu" = menu; + }; + }; + + menuAction = label: name: { + inherit label; + action.name = name; + }; in { home.packages = [ screenshot ]; @@ -58,6 +80,22 @@ in ]; }; + menu = [ + { + menuId = "root-menu"; + items = [ + (menuExecute "ターミナル" "ghostty") + (menuExecute "Vicinae" "vicinae toggle") + (menuExecute "ファイル" "nautilus --new-window") + + { separator = true; } + + (menuAction "Reconfigure" "Reconfigure") + (menuAction "Exit" "Exit") + ]; + } + ]; + rc = { keyboard = { @@ -144,7 +182,18 @@ in "@prefix" = "Workspace"; }; - mouse.default = true; + mouse = { + default = true; + + context = { + "@name" = "Desktop"; + + mousebind = [ + (showMenu "Right" "root-menu") + (showMenu "Middle" "client-list-combined-menu") + ]; + }; + }; libinput.device = [ {