Skip to content

Commit

Permalink
graphical/bars/waybar: call correct locker depending on desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
khaneliman committed Jul 17, 2024
1 parent 0e93695 commit 2ccc926
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ in
menu-actions =
let
systemctl = getExe' pkgs.systemd "systemctl";
lock = getExe config.programs.hyprlock.package;
hyprlock = getExe config.programs.hyprlock.package;
swaylock = getExe config.programs.swaylock.package;
poweroff = getExe' pkgs.systemd "poweroff";
reboot = getExe' pkgs.systemd "reboot";
terminal = getExe config.programs.kitty.package;
Expand All @@ -140,7 +141,7 @@ in
inherit poweroff reboot;

hibernate = "${systemctl} hibernate";
lock = "${lock} --immediate";
lock = ''([[ "$XDG_CURRENT_DESKTOP" == "sway" ]] && ${swaylock} -defF) || ([[ "$XDG_CURRENT_DESKTOP" == "Hyprland" ]] && ${hyprlock}} --immediate)'';
suspend = "${systemctl} suspend";
top = "${terminal} ${top}";
logout = "$(${hyprctl} dispatch exit || ${swaymsg} exit) && ${systemctl} --user exit ";
Expand Down

0 comments on commit 2ccc926

Please sign in to comment.