diff --git a/assets/lock-hover.png b/assets/lock-hover.png new file mode 100644 index 0000000..0db477a Binary files /dev/null and b/assets/lock-hover.png differ diff --git a/assets/lock.png b/assets/lock.png new file mode 100644 index 0000000..155ef9d Binary files /dev/null and b/assets/lock.png differ diff --git a/assets/logout-hover.png b/assets/logout-hover.png new file mode 100644 index 0000000..1a8aef1 Binary files /dev/null and b/assets/logout-hover.png differ diff --git a/assets/logout.png b/assets/logout.png new file mode 100644 index 0000000..b46b34c Binary files /dev/null and b/assets/logout.png differ diff --git a/assets/power-hover.png b/assets/power-hover.png new file mode 100644 index 0000000..b4c79de Binary files /dev/null and b/assets/power-hover.png differ diff --git a/assets/power.png b/assets/power.png new file mode 100644 index 0000000..9713cfb Binary files /dev/null and b/assets/power.png differ diff --git a/assets/restart-hover.png b/assets/restart-hover.png new file mode 100644 index 0000000..5c93bd5 Binary files /dev/null and b/assets/restart-hover.png differ diff --git a/assets/restart.png b/assets/restart.png new file mode 100644 index 0000000..52fd082 Binary files /dev/null and b/assets/restart.png differ diff --git a/assets/sleep-hover.png b/assets/sleep-hover.png new file mode 100644 index 0000000..06293e1 Binary files /dev/null and b/assets/sleep-hover.png differ diff --git a/assets/sleep.png b/assets/sleep.png new file mode 100644 index 0000000..e3339e7 Binary files /dev/null and b/assets/sleep.png differ diff --git a/assets/windows-hover.png b/assets/windows-hover.png new file mode 100644 index 0000000..ae9f2f5 Binary files /dev/null and b/assets/windows-hover.png differ diff --git a/assets/windows.png b/assets/windows.png new file mode 100644 index 0000000..470a8b6 Binary files /dev/null and b/assets/windows.png differ diff --git a/modules/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix index 32946f2..e098f66 100644 --- a/modules/home-manager/hyprland.nix +++ b/modules/home-manager/hyprland.nix @@ -116,7 +116,7 @@ in "$mod+Shift, 0, movetoworkspace, 10" "$mod+Ctrl+Alt, Right, movetoworkspace, r+1" "$mod+Ctrl+Alt, Left, movetoworkspace, r-1" - "$mod, Backspace, exec, wlogout -b 5 -T 600 -B 600" + "$mod, Backspace, exec, wlogout -b 4 -T 600 -B 600" "$mod+Shift+Ctrl, Left, movewindow, l" "$mod+Shift+Ctrl, Right, movewindow, r" "$mod+Shift+Ctrl, Up, movewindow, u" diff --git a/modules/home-manager/wlogout.nix b/modules/home-manager/wlogout.nix index fe67914..f44d2a6 100644 --- a/modules/home-manager/wlogout.nix +++ b/modules/home-manager/wlogout.nix @@ -1,7 +1,117 @@ { config, pkgs, ... }: - +let + wallpaper = ../../assets/wallpaper1.jpg; + lock = ../../assets/lock.png; + lock-hover = ../../assets/lock-hover.png; + shutdown = ../../assets/power.png; + shutdown-hover = ../../assets/power-hover.png; + logout = ../../assets/logout.png; + logout-hover = ../../assets/logout-hover.png; + reboot = ../../assets/restart.png; + reboot-hover = ../../assets/restart-hover.png; +in { programs.wlogout = { enable = true; + layout = [ + { + label = "lock"; + action = "swaylock -eFLfk -i ${wallpaper}"; + text = " Lock (L) "; + keybind = "l"; + } + { + label = "reboot"; + action = "systemctl reboot"; + text = " Reboot (R) "; + keybind = "r"; + } + { + label = "shutdown"; + action = "systemctl poweroff"; + text = "Shutdown (S)"; + keybind = "s"; + } + { + label = "logout"; + action = "hyprctl dispatch exit 0"; + text = " Logout (E) "; + keybind = "e"; + } + ]; + style = '' +window { + font-family: OxProto Nerd Font; + font-size: 14pt; + color: #000000; /* text */ + background-color: rgba(40, 40, 40, 0.76); +} + +button { + background-repeat: no-repeat; + background-position: center; + background-size: 50%; + border-style: solid; + border-radius: 4px; + border-width: 2px; + border-color: #ebdbb2; + background-color: rgba(40, 40, 40, 0.76); + margin: 10px; + transition: + box-shadow 0.3s ease-in-out, + background-color 0.3s ease-in-out; +} + +button:hover { + background-color: rgba(250, 137, 26, 0.3); + color: #282828; +} + +button:focus { + background-color: #ebdbb2; + color: #282828; +} + +#lock { + background-image: image(url("${lock}")); +} +#lock:focus { + background-image: image(url("${lock-hover}")); +} +#lock:hover { + background-image: image(url("${lock-hover}")); +} + +#logout { + background-image: image(url("${logout}")); +} +#logout:focus { + background-image: image(url("${logout-hover}")); +} +#logout:hover { + background-image: image(url("${logout-hover}")); +} + + +#shutdown { + background-image: image(url("${shutdown}")); +} +#shutdown:focus { + background-image: image(url("${shutdown-hover}")); +} +#shutdown:hover { + background-image: image(url("${shutdown-hover}")); +} + +#reboot { + background-image: image(url("${reboot}")); +} +#reboot:focus { + background-image: image(url("${reboot-hover}")); +} +#reboot:hover { + background-image: image(url("${reboot-hover}")); +} +''; }; }