-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Add targets for swayidle, sway-session
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# -*- systemd -*- | ||
# Kanged from https://github.com/kuhy/.dotfiles/blob/master/system/systemd.org | ||
# exec "systemctl --user import-environment; systemctl --user start sway-session.target" | ||
|
||
[Unit] | ||
Description=Sway compositor session | ||
Documentation=man:systemd.special | ||
BindsTo=graphical-session.target | ||
Wants=graphical-session-pre.target | ||
After=graphical-session-pre.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# -*- systemd -*- | ||
# Kanged from https://github.com/kuhy/.dotfiles/blob/master/system/systemd.org | ||
# scu-enable-now swayidle.target | ||
[Unit] | ||
Description=Idle manager for Wayland | ||
Documentation=man:swayidle(1) | ||
PartOf=graphical-session.target | ||
|
||
[Service] | ||
Type=simple | ||
# This will lock your screen after 300 seconds of inactivity, then turn off | ||
# your displays after another 300 seconds, and turn your screens back on when | ||
# resumed. Also pauses media before locking. | ||
# It will also lock your screen before your computer goes to sleep. | ||
ExecStart=/usr/bin/swayidle -w \ | ||
timeout 300 'swaylock -f --clock --image ~/Pictures/Walls/lockscreen.png --daemonize' \ | ||
timeout 450 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ | ||
before-sleep 'playerctl pause' \ | ||
before-sleep 'swaylock -f --clock --image ~/Pictures/Walls/lockscreen.png --daemonize' \ | ||
idlehint 780 | ||
|
||
[Install] | ||
WantedBy=sway-session.target |