diff --git a/hypr/.config/hypr/hypridle.conf b/hypr/.config/hypr/hypridle.conf new file mode 100644 index 0000000..1a0fe8a --- /dev/null +++ b/hypr/.config/hypr/hypridle.conf @@ -0,0 +1,32 @@ +# hypridle.conf — idle stages: hyprsaver (5min) -> Noctalia lock (10min) -> DPMS off. +# Managed by dotfiles (stow hypr). +# +# NOTE: this Hyprland (hyprmod Lua runtime, 0.56.x) evaluates `hyprctl dispatch` +# args as Lua — classic `dispatch dpms off` syntax fails. Dispatchers must be +# hl.dsp.* expressions (e.g. hl.dsp.dpms(false)). + +general { + lock_cmd = pidof -q noctalia || noctalia msg session lock + before_sleep_cmd = loginctl lock-session + after_sleep_cmd = hyprctl dispatch 'hl.dsp.dpms(true)' +} + +# 5min: GPU screensaver (wlr-layer-shell overlay, any input dismisses it). +listener { + timeout = 300 + on-timeout = hyprsaver + on-resume = hyprsaver --quit +} + +# 10min: lock via Noctalia (SUPER+L runs the same command). +listener { + timeout = 600 + on-timeout = loginctl lock-session +} + +# 10m30s: power off displays. +listener { + timeout = 630 + on-timeout = hyprctl dispatch 'hl.dsp.dpms(false)' + on-resume = hyprctl dispatch 'hl.dsp.dpms(true)' +} diff --git a/hypr/.config/hypr/hyprland.lua b/hypr/.config/hypr/hyprland.lua index c0529f5..f721f55 100644 --- a/hypr/.config/hypr/hyprland.lua +++ b/hypr/.config/hypr/hyprland.lua @@ -32,6 +32,10 @@ hl.on("hyprland.start", function() hl.exec_cmd("noctalia &") end) +hl.on("hyprland.start", function() + hl.exec_cmd("hypridle &") +end) + hl.on("hyprland.start", function() hl.exec_cmd("sh ~/.config/hypr/scripts/portal-host-override.sh") hl.exec_cmd("sh ~/.config/hypr/scripts/ensure-mime-defaults.sh") diff --git a/hypr/.config/hypr/hyprsaver.toml b/hypr/.config/hypr/hyprsaver.toml new file mode 100644 index 0000000..fbadbfa --- /dev/null +++ b/hypr/.config/hypr/hyprsaver.toml @@ -0,0 +1,40 @@ +# hyprsaver.toml — chill playlist: calm shaders + cool palettes, cycling. +# Location: ~/.config/hypr/hyprsaver.toml (stowed from dotfiles). +# Names verified against `hyprsaver --list-shaders` / `--list-palettes`. +# Everything else uses hyprsaver's built-in defaults (see +# /usr/share/hyprsaver/examples/config.toml for the full reference). + +[general] +fps = 30 +shader = "cycle" +palette = "cycle" +shader_cycle_interval = 300 +palette_cycle_interval = 60 +cycle_order = "random" +synced = true +shader_playlist = "chill" +palette_playlist = "chill" + +[playlists.chill] +shaders = [ + "plasma", + "marble", + "snowfall", + "aurora", + "clouds", + "planet", + "starfield", + "fireflies", +] +palettes = [ + "vaporwave", + "frost", + "ocean", + "aurora", +] + +[behavior] +fade_in_ms = 800 +fade_out_ms = 400 +dismiss_on = ["key", "mouse_move", "mouse_click", "touch"] +exclusive_keyboard = true diff --git a/hypr/.config/hypr/modules/keybinds.lua b/hypr/.config/hypr/modules/keybinds.lua index d72d66e..1af8a2c 100644 --- a/hypr/.config/hypr/modules/keybinds.lua +++ b/hypr/.config/hypr/modules/keybinds.lua @@ -226,5 +226,6 @@ hl.bind("SHIFT + PRINT", hl.dsp.exec_cmd("hyprshot -m active --output-folder " . }) hl.bind(var.mainMod .. " + L", hl.dsp.exec_cmd(command.lock), { locked = true, description = "Lock screen" }) +hl.bind(var.mainMod .. " + SHIFT + L", hl.dsp.exec_cmd(command.screensaver), { description = "Start screensaver (any key quits)" }) hl.bind(var.mainMod .. " + K", hl.dsp.exec_cmd(command.keybinds_show), { description = "Show keybind overview" }) hl.bind(var.mainMod .. " + W", hl.dsp.exec_cmd(command.wallpaper_select), { description = "Wallpaper select" }) diff --git a/hypr/.config/hypr/modules/shell_commands.lua b/hypr/.config/hypr/modules/shell_commands.lua index 15f7667..14ea5d6 100644 --- a/hypr/.config/hypr/modules/shell_commands.lua +++ b/hypr/.config/hypr/modules/shell_commands.lua @@ -7,6 +7,7 @@ return { settings = "noctalia msg settings-toggle", control_center = "noctalia msg panel-toggle control-center", lock = "noctalia msg session lock", + screensaver = "hyprsaver", wallpaper_select = "noctalia msg panel-toggle wallpaper", keybinds_show = "sh ~/.config/hypr/scripts/show-keybinds.sh", } diff --git a/setup/hypr/packages.txt b/setup/hypr/packages.txt index b7cc8bc..6ca93cf 100644 --- a/setup/hypr/packages.txt +++ b/setup/hypr/packages.txt @@ -12,6 +12,7 @@ @pacman hyprland +hypridle xdg-desktop-portal-hyprland hyprpolkitagent pantheon-shortcut-overlay @@ -23,3 +24,4 @@ noctalia @aur hyprmod +hyprsaver