feat: replace swayidle with hypridle for idle management
hypridle pairs with hyprlock, honors idle inhibitors (video/calls no longer blank or lock the screen), and is config-file driven. Same staging as before: blank monitors @5m, lock @10m, suspend-then-hibernate @30m. Locks via 'loginctl lock-session' so the before-sleep lock is deduplicated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,30 @@
|
|||||||
|
general {
|
||||||
|
# Dedup: never stack a second hyprlock on top of an existing one
|
||||||
|
lock_cmd = pidof hyprlock || hyprlock
|
||||||
|
# Lock before the machine sleeps, restore monitors on wake
|
||||||
|
before_sleep_cmd = loginctl lock-session
|
||||||
|
after_sleep_cmd = niri msg action power-on-monitors
|
||||||
|
# Honor idle inhibitors (video, meetings, presentations) instead of
|
||||||
|
# blanking/locking through them — this is the swayidle behavior we lost.
|
||||||
|
ignore_dbus_inhibit = false
|
||||||
|
ignore_systemd_inhibit = false
|
||||||
|
}
|
||||||
|
|
||||||
|
# 5 min: blank the monitors
|
||||||
|
listener {
|
||||||
|
timeout = 300
|
||||||
|
on-timeout = niri msg action power-off-monitors
|
||||||
|
on-resume = niri msg action power-on-monitors
|
||||||
|
}
|
||||||
|
|
||||||
|
# 10 min: lock (drives lock_cmd via logind)
|
||||||
|
listener {
|
||||||
|
timeout = 600
|
||||||
|
on-timeout = loginctl lock-session
|
||||||
|
}
|
||||||
|
|
||||||
|
# 30 min: suspend-then-hibernate
|
||||||
|
listener {
|
||||||
|
timeout = 1800
|
||||||
|
on-timeout = systemctl suspend-then-hibernate
|
||||||
|
}
|
||||||
@@ -32,6 +32,7 @@ ln -sf "$(pwd)/wofi/config" ~/.config/wofi/config
|
|||||||
ln -sf "$(pwd)/wofi/style.css" ~/.config/wofi/style.css
|
ln -sf "$(pwd)/wofi/style.css" ~/.config/wofi/style.css
|
||||||
mkdir -p ~/.config/hypr
|
mkdir -p ~/.config/hypr
|
||||||
ln -sf "$(pwd)/hyprlock/hyprlock.conf" ~/.config/hypr/hyprlock.conf
|
ln -sf "$(pwd)/hyprlock/hyprlock.conf" ~/.config/hypr/hyprlock.conf
|
||||||
|
ln -sf "$(pwd)/hypridle/hypridle.conf" ~/.config/hypr/hypridle.conf
|
||||||
ln -sf "$(pwd)/fish/config.fish" ~/.config/fish/config.fish
|
ln -sf "$(pwd)/fish/config.fish" ~/.config/fish/config.fish
|
||||||
ln -sf "$(pwd)/starship/starship.toml" ~/.config/starship.toml
|
ln -sf "$(pwd)/starship/starship.toml" ~/.config/starship.toml
|
||||||
ln -sf "$(pwd)/alacritty/alacritty.toml" ~/.config/alacritty/alacritty.toml
|
ln -sf "$(pwd)/alacritty/alacritty.toml" ~/.config/alacritty/alacritty.toml
|
||||||
|
|||||||
+1
-1
@@ -41,7 +41,7 @@ spawn-at-startup "mako"
|
|||||||
spawn-at-startup "awww-daemon"
|
spawn-at-startup "awww-daemon"
|
||||||
spawn-at-startup "nm-applet" "--indicator"
|
spawn-at-startup "nm-applet" "--indicator"
|
||||||
spawn-at-startup "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
|
spawn-at-startup "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
|
||||||
spawn-at-startup "swayidle" "-w" "timeout" "300" "niri msg action power-off-monitors" "timeout" "600" "hyprlock" "timeout" "1800" "systemctl suspend-then-hibernate" "before-sleep" "hyprlock"
|
spawn-at-startup "hypridle"
|
||||||
spawn-at-startup "wl-paste" "--watch" "cliphist" "store"
|
spawn-at-startup "wl-paste" "--watch" "cliphist" "store"
|
||||||
spawn-at-startup "wlsunset" "-l" "49.2" "-L" "-123.1"
|
spawn-at-startup "wlsunset" "-l" "49.2" "-L" "-123.1"
|
||||||
spawn-at-startup "xwayland-satellite"
|
spawn-at-startup "xwayland-satellite"
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ wl-clipboard
|
|||||||
brightnessctl
|
brightnessctl
|
||||||
pamixer
|
pamixer
|
||||||
hyprlock
|
hyprlock
|
||||||
swayidle
|
hypridle
|
||||||
ttf-jetbrains-mono-nerd
|
ttf-jetbrains-mono-nerd
|
||||||
polkit-gnome
|
polkit-gnome
|
||||||
fprintd
|
fprintd
|
||||||
|
|||||||
Reference in New Issue
Block a user