Change swayidle to a systemd service

This commit is contained in:
John Mertz 2022-11-21 18:45:57 -05:00
parent c64a8402bb
commit 49991faf6e
2 changed files with 14 additions and 3 deletions

View File

@ -1,4 +1,5 @@
# vim: ft=sh # vim: ft=sh
#TODO: Convert to systemd services, where reasonable
################################################################################ ################################################################################
# Background utilities # Background utilities
@ -7,9 +8,6 @@
# Window transparency # Window transparency
exec ${HOME}/scripts/sway/window-transparency.py exec ${HOME}/scripts/sway/window-transparency.py
# Custom SwayIdle script
exec swayidle -w timeout 500 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' &
#exec ${HOME}/scripts/sway/idle.sh start &
# SSH Add - Should be started by profile instead # SSH Add - Should be started by profile instead
# exec eval `ssh-agent -a ${SSH_AUTH_SOCK}` # exec eval `ssh-agent -a ${SSH_AUTH_SOCK}`

View File

@ -0,0 +1,13 @@
[Unit]
Description=Swayidle to trigger idle actions
Documentation=man:swayidle(1)
PartOf=graphical-session.target
After=sway.service
[Service]
Type=simple
ExecStart=/var/home/jpm/scripts/sway/idle.sh start
ExecStop=/var/home/jpm/scripts/sway/idle.sh stop
[Install]
WantedBy=graphical-session.target