diff --git a/suites/desktop/home.nix b/suites/desktop/home.nix index 43a8760..8074a41 100644 --- a/suites/desktop/home.nix +++ b/suites/desktop/home.nix @@ -3,7 +3,26 @@ pkgs, ... }: -with lib; { +with lib; let + power-menu = pkgs.writeScript "power-menu" '' + SELECTION="$(printf "󰌾 Lock\n󰶐 Power off monitors\n󰗽 Log out\n󰤄 Suspend\n Reboot\n󰐥 Shutdown" | fuzzel --dmenu -l 6 -p "⚡ ")" + + case $SELECTION in + *"Lock") + loginctl lock-session;; + *"Power off monitors") + niri msg action power-off-monitors;; + *"Log out") + niri msg action exit;; + *"Suspend") + systemctl suspend;; + *"Reboot") + systemctl reboot;; + *"Shutdown") + systemctl poweroff;; + esac + ''; +in { imports = [../home.nix]; # Consistent theming. @@ -36,7 +55,6 @@ with lib; { # Wayland environment variables. environment = { CLUTTER_BACKEND = "wayland"; - DISPLAY = null; GDK_BACKEND = "wayland,x11"; MOZ_ENABLE_WAYLAND = "1"; NIXOS_OZONE_WL = "1"; @@ -52,11 +70,6 @@ with lib; { path = getExe pkgs.xwayland-satellite-unstable; }; - # Autostart. - spawn-at-startup = [ - {command = ["smile" "--start-hidden"];} - ]; - # Don't show client-side window decorations. prefer-no-csd = true; @@ -76,7 +89,7 @@ with lib; { # Spawn programs. "Mod+Return".action.spawn = "ghostty"; "Mod+Space".action.spawn = "fuzzel"; - "Mod+E".action.spawn = "smile"; + "Mod+E".action.spawn = "bemoji"; "Mod+Alt+L".action.spawn = "hyprlock"; # Show overview @@ -136,11 +149,8 @@ with lib; { # Close windows. "Mod+Q".action.close-window = {}; - # Quit Niri. - "Mod+Shift+E".action.quit = {}; - - # Turn off monitors. - "Mod+Shift+Escape".action.power-off-monitors = {}; + # Power menu. + "Mod+Shift+E".action.spawn = "${power-menu}"; # Take a screenshot. "Mod+P".action.screenshot = {}; @@ -232,15 +242,6 @@ with lib; { proportion = 1.0 / 2.0; }; }; - - window-rules = [ - { - matches = [ - {app-id = "it.mijorus.smile";} - ]; - open-floating = true; - } - ]; }; }; @@ -270,93 +271,6 @@ with lib; { stylix.targets.hyprlock.useWallpaper = false; - # Logout screen. - programs.wlogout = { - enable = true; - - layout = [ - { - label = "lock"; - action = "loginctl lock-session"; - text = "Lock"; - keybind = "l"; - } - { - label = "logout"; - action = "niri msg action exit"; - text = "Logout"; - keybind = "e"; - } - { - label = "suspend"; - action = "systemctl suspend"; - text = "Suspend"; - keybind = "u"; - } - { - label = "shutdown"; - action = "systemctl poweroff"; - text = "Shutdown"; - keybind = "s"; - } - { - label = "reboot"; - action = "systemctl reboot"; - text = "Reboot"; - keybind = "r"; - } - ]; - - style = '' - * { - background-image: none; - box-shadow: none; - } - - window { - background-color: rgba(12, 12, 12, 0.6); - } - - button { - border-radius: 0; - border-color: #7fbbb3; - text-decoration-color: #d3c6aa; - color: #d3c6aa; - background-color: #272e33; - border-style: solid; - border-width: 1px; - background-repeat: no-repeat; - background-position: center; - background-size: 25%; - } - - button:focus, button:active, button:hover { - outline-style: none; - background-color: #2e383c; - } - - #lock { - background-image: image(url("${pkgs.wleave}/share/wleave/icons/lock.svg")); - } - - #logout { - background-image: image(url("${pkgs.wleave}/share/wleave/icons/logout.svg")); - } - - #suspend { - background-image: image(url("${pkgs.wleave}/share/wleave/icons/suspend.svg")); - } - - #shutdown { - background-image: image(url("${pkgs.wleave}/share/wleave/icons/shutdown.svg")); - } - - #reboot { - background-image: image(url("${pkgs.wleave}/share/wleave/icons/reboot.svg")); - } - ''; - }; - # Auto-lock. services.hypridle = { enable = true; @@ -496,6 +410,7 @@ with lib; { fonts.fontconfig.enable = true; # discover fonts installed by home.packages. home.packages = with pkgs; [ + bemoji caligula celluloid decibels @@ -531,7 +446,6 @@ with lib; { seahorse signal-desktop simple-scan - smile system-config-printer via wdisplays