diff --git a/modules/features/hypr/default.nix b/modules/features/hypr/default.nix index 286e5df..7fad0dc 100644 --- a/modules/features/hypr/default.nix +++ b/modules/features/hypr/default.nix @@ -44,6 +44,7 @@ otter-launcher = self'.packages.otter-launcher; quickshell = self'.packages.quickshell; waybar = self'.packages.waybar; + wlogout = self'.packages.wlogout; way-edges = self'.packages.way-edges; }; }; diff --git a/modules/features/wlogout/default.nix b/modules/features/wlogout/default.nix new file mode 100644 index 0000000..1165781 --- /dev/null +++ b/modules/features/wlogout/default.nix @@ -0,0 +1,22 @@ +{ + inputs, + moduleWithSystem, + ... +}: { + flake.nixosModules.wlogout = moduleWithSystem ({self', ...}: { + environment.systemPackages = with self'.packages; [ + wlogout + ]; + }); + perSystem = {pkgs, ...}: { + packages.wlogout = inputs.wrappers.lib.wrapPackage ({...}: { + inherit pkgs; + package = pkgs.wlogout; + flags = { + "--css" = ./style.css; + "--layout" = ./layout; + "--buttons-per-row" = "5"; + }; + }); + }; +} diff --git a/modules/features/wlogout/icons/exit.png b/modules/features/wlogout/icons/exit.png new file mode 100644 index 0000000..6f061f2 Binary files /dev/null and b/modules/features/wlogout/icons/exit.png differ diff --git a/modules/features/wlogout/icons/lock.png b/modules/features/wlogout/icons/lock.png new file mode 100644 index 0000000..51ca4af Binary files /dev/null and b/modules/features/wlogout/icons/lock.png differ diff --git a/modules/features/wlogout/icons/power.png b/modules/features/wlogout/icons/power.png new file mode 100644 index 0000000..9003c18 Binary files /dev/null and b/modules/features/wlogout/icons/power.png differ diff --git a/modules/features/wlogout/icons/reload.png b/modules/features/wlogout/icons/reload.png new file mode 100644 index 0000000..05e0200 Binary files /dev/null and b/modules/features/wlogout/icons/reload.png differ diff --git a/modules/features/wlogout/icons/slwwp.png b/modules/features/wlogout/icons/slwwp.png new file mode 100644 index 0000000..24e190f Binary files /dev/null and b/modules/features/wlogout/icons/slwwp.png differ diff --git a/modules/features/wlogout/layout b/modules/features/wlogout/layout new file mode 100755 index 0000000..440783f --- /dev/null +++ b/modules/features/wlogout/layout @@ -0,0 +1,30 @@ +{ + "label" : "lock", + "action" : "hyprlock", + "text" : "Lock", + "keybind" : "l" +} +{ + "label" : "logout", + "action" : "hyprctl dispatch 'hl.dsp.exit()'" , + "text" : "Logout", + "keybind" : "e" +} +{ + "label" : "shutdown", + "action" : "systemctl poweroff", + "text" : "Shutdown", + "keybind" : "s" +} +{ + "label" : "suspend", + "action" : "systemctl suspend", + "text" : "Sleep", + "keybind" : "u" +} +{ + "label" : "reboot", + "action" : "systemctl reboot", + "text" : "Reboot", + "keybind" : "r" +} diff --git a/modules/features/wlogout/style.css b/modules/features/wlogout/style.css new file mode 100755 index 0000000..e82c0e3 --- /dev/null +++ b/modules/features/wlogout/style.css @@ -0,0 +1,73 @@ +* { + background-image: none; + box-shadow: none; +} + +window { + background-color: rgba(12, 12, 12, 0.05); +} + +button { + border-radius: 0; + border-color: #cba6f7; + text-decoration-color: #ffffff; + color: #FFFFFF; + background-color: #313244; + border-style: solid none; + border-width: 4px; + background-repeat: no-repeat; + background-position: 50% 30%; + background-size: 75%; +} + +button:first-child { + border-top-left-radius: 10px; + border-bottom-left-radius: 10px; +} + +button:last-child { + border-top-right-radius: 10px; + border-bottom-right-radius: 10px; +} + +#lock { + border-left-style: solid; + background-image: image(url("./icons/lock.png")); +} + +#logout { + background-image: image(url("./icons/exit.png")); +} + +#suspend { + background-image: image(url("./icons/slwwp.png")); +} + +#shutdown { + background-image: image(url("./icons/power.png")); +} + +#reboot { + border-right-style: solid; + background-image: image(url("./icons/reload.png")); +} + +#lock:focus { + background-color: #f38ba8; +} + +#logout:focus { + background-color: #fab387; +} + +#shutdown:focus { + background-color: #a6e3a1; +} + +#suspend:focus { + background-color: #f9e2af; +} + +#reboot:focus { + background-color: #cba6f7; +}