Migrate from swayidle to hypridle

This commit is contained in:
ItsDrike 2024-02-19 01:01:07 +01:00
parent a1f9a7c82d
commit ae02222df1
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
10 changed files with 69 additions and 32 deletions

View file

@ -0,0 +1,37 @@
#lock-cmd = swaylock -fF --image /home/itsdrike/Pictures/Wallpapers/Categories/Extra/CommieGNULinux.png --indicator-x-position 300 --indicator-y-position 300
general {
lock_cmd = swaylock -fF # dbus/sysd lock command (loginctl lock-session)
unlock-cmd = killall -s SIGUSR1 swaylock # same as above, but unlock
before_sleep_cmd = loginctl lock-session && sleep 2
ignore_dbus_inhibit = false
}
# Warn about going idle (5 mins)
listener {
timeout = 300
on-timeout = notify-send "HyprIdle" "Going idle in 10 seconds..."
}
# Lock the session & disable dunst notifications
listener {
timeout = 310
on-timeout = loginctl lock-session && dunstctl set-paused true
on-resume = dunstctl set-paused false
}
# Turn off the screen after another 30s
listener {
timeout = 340
on-timeout = hyprctl dispatch dpms off
on-resume = hyprctl dispatch dpms on
}
# Enter suspend/sleep state (10 mins)
# On low battery, or after HibernateDelaySec (/etc/systemd/sleep.conf), the system
# will enter full hibernation
listener {
timeout = 600,
on-timeout = systemctl suspend-then-hibernate
}

View file

@ -1,2 +0,0 @@
timeout 300 "hyprctl dispatch dpms off && dunstctl set-paused true" resume "hyprctl dispatch dpms on && dunstctl set-paused false"
timeout 310 "loginctl lock-session"

View file

@ -1,9 +1,9 @@
[Unit]
Description="Idle management daemon"
PartOf=graphical-session.target
PartOf=graphica-session.target
[Service]
ExecStart=/usr/bin/swayidle
ExecStart=/usr/bin/hypridle
Restart=on-failure
[Install]

View file

@ -1 +0,0 @@
/home/itsdrike/.config/systemd/user/systemd-lock-handler-swaylock.service

View file

@ -1,19 +0,0 @@
[Unit]
Description=Run Swaylock screenlocker on lock dbus event (using systemd-lock-handler)
# if swaylock exists cleanly, unlock this session
OnSuccess=unlock.target
# When lock.target is stopped, stop this too
PartOf=lock.target
# Delay lock.target until this service is ready
After=lock.target
[Service]
# systemd will consider this service started when swaylock forks
# which swaylock will only do after it has locked the screen
Type=forking
ExecStart=/usr/bin/swaylock -fF
#ExecStart=/usr/bin/swaylock -fF --image /home/itsdrike/Pictures/Wallpapers/Categories/Extra/CommieGNULinux.png --indicator-x-position 300 --indicator-y-position 300
Restart=on-failure
[Install]
WantedBy=lock.target

View file

@ -3,4 +3,3 @@ Description=Waylnad compositor loaded and ready
BindsTo=wm-ready.target
Wants=xdg-desktop-portal.service
Wants=xdg-desktop-portal-hyprland.service
Wants=systemd-lock-handler.service

View file

@ -0,0 +1 @@
/home/itsdrike/.config/systemd/user/hypridle.service

View file

@ -1 +0,0 @@
/home/itsdrike/.config/systemd/user/swayidle.service