commit 94797ed7fe0d0af3b3f32bd953c65c5911e5e161
parent 1793e7476f98b44b8342bca7ee584e72c40f8d3d
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Fri, 29 Aug 2025 15:05:29 +0200
parent 1793e7476f98b44b8342bca7ee584e72c40f8d3d
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Fri, 29 Aug 2025 15:05:29 +0200
config/home-manager/zaphyra/services/swaync: replace `waylogout` with `wleave`
3 files changed, 57 insertions(+), 48 deletions(-)
A
|
50
++++++++++++++++++++++++++++++++++++++++++++++++++
M
|
54
+++++++-----------------------------------------------
diff --git a/config/home-manager/zaphyra/programs/wleave.nix b/config/home-manager/zaphyra/programs/wleave.nix @@ -0,0 +1,50 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + + home.packages = [ + (pkgs.writeShellScriptBin "wleave" '' + ${lib.getExe pkgs.wleave} --buttons-per-row 5 --column-spacing 10 --margin-bottom 440 --margin-top 440 $@ + '') + ]; + + home.file."${config.xdg.configHome}/wleave/layout".text = lib.concatStringsSep "\n" ( + lib.map (elem: builtins.toJSON elem) [ + { + label = "lock"; + action = "loginctl lock-session"; + text = "Lock"; + keybind = "l"; + } + { + label = "suspend"; + action = "systemctl suspend"; + text = "Suspend"; + keybind = "u"; + } + { + label = "logout"; + action = "loginctl terminate-user $USER"; + text = "Logout"; + keybind = "e"; + } + { + label = "shutdown"; + action = "systemctl poweroff"; + text = "Shutdown"; + keybind = "s"; + } + { + label = "reboot"; + action = "systemctl reboot"; + text = "Reboot"; + keybind = "r"; + } + ] + ); +}
diff --git a/config/home-manager/zaphyra/services/swaync.nix b/config/home-manager/zaphyra/services/swaync.nix @@ -1,11 +1,16 @@ { lib, pkgs, + homeManagerModules, ... }: { + imports = [ + homeManagerModules.zaphyra.programs.wleave + ]; + services.swaync = { enable = true; settings = { @@ -89,58 +94,13 @@ { type = "toggle"; label = ""; - # command = "swaync-client -cp; ${config.home.sessionVariables.TERMINAL} --confirm-close-surface=false -e ${lib.getExe pkgs.bluetui}"; + # command = "swaync-client -cp; ${config.home.sessionVariables.TERMINAL} --confirm-close-surface=false -e ${lib.getExe pkgs.bluetui}"; command = "swaync-client -cp; ${lib.getExe pkgs.overskride}"; update-command = "sh -c 'bluetoothctl show | grep -q \\\"Powered: yes\\\" && echo true || echo false'"; } { label = ""; - command = - let - configFile = pkgs.writeText "waylogout.conf" '' - screenshots - labels - selection-label - - font="Adwaita Sans" - - effect-blur=7x5 - indicator-thickness=20 - ring-color=888888aa - inside-color=88888866 - text-color=eaeaeaaa - line-color=00000000 - ring-selection-color=33cc33aa - inside-selection-color=33cc3366 - text-selection-color=eaeaeaaa - line-selection-color=00000000 - - default-action="suspend" - - lock-symbol= - lock-command="loginctl lock-session" - - logout-symbol= - logout-command="loginctl terminate-session" - - suspend-symbol= - suspend-command="systemctl suspend" - - poweroff-symbol= - poweroff-command="systemctl poweroff" - - reboot-symbol= - reboot-command="systemctl reboot" - - cancel-symbol= - ''; - waylogout = lib.concatStringsSep " " [ - (lib.getExe pkgs.waylogout) - "--config=${configFile}" - ]; - - in - "swaync-client -cp; ${waylogout}"; + command = "swaync-client -cp; wleave"; } ]; };
diff --git a/flake.nix b/flake.nix @@ -63,7 +63,6 @@ inputs.tgcNUR.overlays.nixpkgsUnstable inputs.tgcNUR.overlays.tuigreet inputs.tgcNUR.overlays.swaylock-plugin-fprintd - inputs.tgcNUR.overlays.waylogout (final: prev: { sherlock-launcher = inputs.sherlock.packages.${prev.system}.default; }) ];