diff --git a/modules/home/default.nix b/modules/home/default.nix index e70d1a7..d02d55f 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -17,6 +17,7 @@ ./stylix.nix ./vscode.nix ./wallpaper.nix + ./wlogout.nix ./xdg.nix ./yazi.nix ./zsh.nix diff --git a/modules/home/ghostty.nix b/modules/home/ghostty.nix index 5115230..58293ae 100644 --- a/modules/home/ghostty.nix +++ b/modules/home/ghostty.nix @@ -7,6 +7,7 @@ enableZshIntegration = true; settings = { theme = "Catppuccin Mocha"; + term = "xterm-256color"; }; systemd.enable = true; }; diff --git a/modules/home/hypr/keybinds.nix b/modules/home/hypr/keybinds.nix index 2f3ce1c..e1bf8ce 100644 --- a/modules/home/hypr/keybinds.nix +++ b/modules/home/hypr/keybinds.nix @@ -13,6 +13,7 @@ "$mod, Q, killactive" "$mod, W, exec, ghostty +new-window" "$mod, S, exec, rofi -show drun -show-icons" + "$mod, Escape, exec, wlogout" # Window Movement "$mod, left, movefocus, l" diff --git a/modules/home/wlogout.nix b/modules/home/wlogout.nix new file mode 100644 index 0000000..fde00aa --- /dev/null +++ b/modules/home/wlogout.nix @@ -0,0 +1,111 @@ +{ + config, + pkgs, + ... +}: +{ + programs.wlogout = { + enable = true; + layout = [ + { + label = "lock"; + action = "loginctl lock-session"; + text = "Lock"; + keybind = "l"; + } + { + label = "hibernate"; + action = "systemctl hibernate"; + text = "Hibernate"; + keybind = "h"; + } + { + label = "logout"; + action = "loginctl terminate-user $USER"; + text = "Logout"; + keybind = "e"; + } + { + label = "shutdown"; + action = "systemctl poweroff"; + text = "Shutdown"; + keybind = "s"; + } + { + label = "suspend"; + action = "systemctl suspend"; + text = "Suspend"; + keybind = "u"; + } + { + label = "reboot"; + action = "systemctl reboot"; + text = "Reboot"; + keybind = "r"; + } + ]; + style = with config.lib.stylix.colors.withHashtag; '' + * { + font-family: "Rubik Light"; + background-image: none; + box-shadow: none; + } + + window { + background: url("${config.xdg.userDirs.extraConfig.XDG_WALLPAPERS_DIR}/lanterns_of_twilight.png"); + background-size: cover; + } + + button { + margin: 10px; + border-radius: 20px; + border-color: ${base0F}; + text-decoration-color: ${base0F}; + color: ${base0F}; + background-color: alpha(${base01}, 0.5); + border-style: solid; + border-width: 2px; + background-repeat: no-repeat; + background-position: center; + background-size: 25%; + } + + button:focus, button:active, button:hover { + background-color: alpha(${base0F}, 0.3); + outline-style: none; + } + + button:hover { + background-size: 27%; + } + + button span { + font-size: 1.2em; + } + + #lock { + background-image: url("${pkgs.wlogout}/share/wlogout/assets/lock.svg"); + } + + #logout { + background-image: url("${pkgs.wlogout}/share/wlogout/assets/logout.svg"); + } + + #suspend { + background-image: url("${pkgs.wlogout}/share/wlogout/assets/suspend.svg"); + } + + #hibernate { + background-image: url("${pkgs.wlogout}/share/wlogout/assets/hibernate.svg"); + } + + #shutdown { + background-image: url("${pkgs.wlogout}/share/wlogout/assets/shutdown.svg"); + } + + #reboot { + background-image: url("${pkgs.wlogout}/share/wlogout/assets/reboot.svg"); + } + ''; + }; +} diff --git a/modules/system/services.nix b/modules/system/services.nix index 59fb441..9881be8 100644 --- a/modules/system/services.nix +++ b/modules/system/services.nix @@ -15,10 +15,11 @@ variant = ""; }; - # Enable touchpad support (enabled default in most desktopManager). - # libinput.enable = true; }; + # Enable touchpad support (enabled default in most desktopManager). + libinput.enable = true; + # Enable CUPS to print documents. printing = { enable = true;