From 3b20f06c286a100017317eb8745786e3b65c05dc Mon Sep 17 00:00:00 2001 From: willifan Date: Sun, 26 May 2024 03:19:52 +0200 Subject: [PATCH] added wlogout --- .../graphical/hyprland/common/default.nix | 1 + .../graphical/hyprland/common/wlogout.nix | 83 +++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 users/willifan/graphical/hyprland/common/wlogout.nix diff --git a/users/willifan/graphical/hyprland/common/default.nix b/users/willifan/graphical/hyprland/common/default.nix index 0700cdd..acc305b 100644 --- a/users/willifan/graphical/hyprland/common/default.nix +++ b/users/willifan/graphical/hyprland/common/default.nix @@ -9,6 +9,7 @@ ./pipewire.nix ./polkit.nix ./utils.nix + ./wlogout.nix ./wofi.nix ]; diff --git a/users/willifan/graphical/hyprland/common/wlogout.nix b/users/willifan/graphical/hyprland/common/wlogout.nix new file mode 100644 index 0000000..f605fd2 --- /dev/null +++ b/users/willifan/graphical/hyprland/common/wlogout.nix @@ -0,0 +1,83 @@ +{ pkgs, home-manager, ...}: +{ + home-manager.users.willifan = { + programs.wlogout = { + enable = true; + layout = [ + { + label = "shutdown"; + action = "systemctl poweroff"; + text = "Shutdown"; + } + { + label = "hyprland"; + action = "hyprctl dispatch exit"; + text = "Exit Hyprland"; + } + { + label = "whatever"; + action = ""; + text = "whatever"; + } + { + label = "reboot"; + action = "systemctl reboot"; + text = "Reboot"; + } + { + label = "suspend"; + action = "systemctl suspend"; + text = "Suspend"; + } + { + label = "hibernate"; + action = "systemctl hibernate"; + text = "Hibernate"; + } + ]; + + style = '' + @import url("file:///home/willifan/.config/gtk-4.0/gtk.css"); + * { + background-image: none; + box-shadow: none; + } + + window { + background-color: rgba(12, 12, 12, 0.9); + } + + button { + border-radius: 10px; + border-color: #ffa44b; + border-style: solid; + border-width: 2px; + background-repeat: no-repeat; + background-position: center; + background-size: 25%; + } + + button:focus, button:active, button:hover { + /*background-color: #3700B3;*/ + outline-style: none; + } + + #suspend { + background-image: image(url("/home/willifan/.config/wlogout/suspend.png")); + } + + #hibernate { + background-image: image(url("/home/willifan/.config/wlogout/hibernate.png")); + } + + #shutdown { + background-image: image(url("/home/willifan/.config/wlogout/shutdown.png")); + } + + #reboot { + background-image: image(url("/home/willifan/.config/wlogout/reboot.png")); + } + ''; + }; + }; +} \ No newline at end of file