{ pkgs, config, lib, ... }: let cfg = config.py.programs.wlogout; pkg = config.programs.wlogout.package; in { options.py.programs.wlogout.enable = lib.mkEnableOption "wlogout"; config.programs.wlogout = lib.mkIf cfg.enable { enable = true; style = import ./style.nix { inherit pkg; }; layout = [ { label = "hibernate"; action = "systemctl hibernate"; text = "Hibernate"; keybind = "h"; } { label = "reboot"; action = "systemctl reboot"; text = "Reboot"; keybind = "r"; } { label = "suspend"; action = "systemctl suspend"; text = "Suspend"; keybind = "u"; } { label = "suspend-then-hibernate"; action = "systemctl suspend-then-hibernate"; text = "Supend then Hibernate"; keybind = "p"; } { label = "lock"; action = "${pkgs.swaylock-effects}/bin/swaylock"; text = "Lock"; keybind = "l"; } { label = "shutdown"; action = "systemctl poweroff"; text = "Shutdown"; keybind = "s"; } ]; }; }