mirror of
https://gitlab.com/dbrw/ansible-setup.git
synced 2026-02-06 00:35:33 +07:00
update user services
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=Services which should run when session is locked
|
||||
Documentation=man:systemd.special(7)
|
||||
Requires=lock-helper.service
|
||||
BindsTo=graphical-session.target dwm.service
|
||||
Conflicts=unlock.target
|
||||
After=graphical-session.target
|
||||
StopWhenUnneeded=yes
|
||||
@@ -0,0 +1,21 @@
|
||||
[Unit]
|
||||
Description=slock -- suckless screen locker
|
||||
Documentation=man:slock(1) man:xss-lock(1)
|
||||
PartOf=lock.target
|
||||
Conflicts=unclutter.service
|
||||
After=lock.target
|
||||
RefuseManualStop=yes
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStartPre=/usr/bin/xset +dpms dpms 0 0 ${DPMS_TIMEOUT}
|
||||
ExecStart=/usr/local/bin/slock -m "ANTI SUCK-SUCK CLUB"
|
||||
ExecStopPost=/bin/systemctl --user --no-block start xset-dpms.service
|
||||
ExecStopPost=/bin/systemctl --user --no-block start unclutter.service
|
||||
Restart=on-failure
|
||||
RestartSec=2
|
||||
|
||||
[Install]
|
||||
WantedBy=lock.target
|
||||
WantedBy=sleep.target
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Unclutter, hide mouse cursor on idle
|
||||
Documentation=man:unclutter(1)
|
||||
PartOf=graphical-session.target
|
||||
After=graphical-session.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/unclutter -display ${DISPLAY} -idle 2 -jitter 3 -grab -root
|
||||
Restart=on-failure
|
||||
RestartSec=2
|
||||
|
||||
[Install]
|
||||
WantedBy=graphical-session.target
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
[Unit]
|
||||
Description=Services which should run when session is unlocked
|
||||
Documentation=man:systemd.special(7)
|
||||
Conflicts=lock.target
|
||||
StopWhenUnneeded=yes
|
||||
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=XScreenSaver Utility
|
||||
Documentation=man:xss-lock(1)
|
||||
PartOf=graphical-session.target
|
||||
After=graphical-session.target
|
||||
Before=xset-xss.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/xss-lock -s ${XDG_SESSION_ID} --ignore-sleep -- systemctl --user --wait start lock.target
|
||||
Restart=always
|
||||
RestartSec=2
|
||||
|
||||
[Install]
|
||||
WantedBy=graphical-session.target
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Import environemnt to systemd user session
|
||||
systemctl --user import-environment DISPLAY XAUTHORITY PATH
|
||||
systemctl --user import-environment DISPLAY XAUTHORITY PATH XDG_SESSION_ID
|
||||
|
||||
# Run graphical-session.target
|
||||
systemctl --user start --wait xorg.target
|
||||
|
||||
Reference in New Issue
Block a user