diff --git a/files/.config/systemd/user/sway-session.target.wants/swayidle.service b/files/.config/systemd/user/sway-session.target.wants/swayidle.service new file mode 120000 index 0000000..2ba6dd7 --- /dev/null +++ b/files/.config/systemd/user/sway-session.target.wants/swayidle.service @@ -0,0 +1 @@ +/home/marchambault/.config/systemd/user/swayidle.service \ No newline at end of file diff --git a/files/.config/systemd/user/swayidle.service b/files/.config/systemd/user/swayidle.service new file mode 100644 index 0000000..a79251d --- /dev/null +++ b/files/.config/systemd/user/swayidle.service @@ -0,0 +1,15 @@ +[Unit] +Description=Idle manager for Wayland +Documentation=man:swayidle(1) +PartOf=graphical-session.target + +[Service] +Type=simple +ExecStart=/usr/bin/swayidle -w \ + timeout 300 'lock' \ + timeout 600 'swaymsg "output * dpms off"' \ + resume 'swaymsg "output * dpms on"' \ + before-sleep 'lock' + +[Install] +WantedBy=sway-session.target diff --git a/scripts/post-install.sh b/scripts/post-install.sh index 8826d7e..db4e84c 100644 --- a/scripts/post-install.sh +++ b/scripts/post-install.sh @@ -3,6 +3,8 @@ # run units systemctl --user daemon-reload systemctl --user enable --now tmux.service +systemctl --user enable --now redshift.service +systemctl --user enable --now swayidle.service systemctl --user enable --now mpv.service # install tmux plugins