@@ -69,3 +69,9 @@ | |||||
enabled: false | enabled: false | ||||
state: stopped | state: stopped | ||||
scope: user | scope: user | ||||
- name: lockscreen graphical-session service disabled | |||||
systemd: | |||||
name: lockscreen.service | |||||
enabled: false | |||||
scope: user |
@@ -17,7 +17,13 @@ | |||||
dest: ~/.config/systemd/user/lockscreen.service | dest: ~/.config/systemd/user/lockscreen.service | ||||
notify: systemd daemon-reload | notify: systemd daemon-reload | ||||
- name: lockscreen graphical-session service enabled | |||||
- name: lockscreen-auto graphical-session service | |||||
template: | |||||
src: lockscreen/lockscreen-auto.service.j2 | |||||
dest: ~/.config/systemd/user/lockscreen-auto.service | |||||
notify: systemd daemon-reload | |||||
- name: lockscreen-auto graphical-session service enabled | |||||
systemd: | systemd: | ||||
name: lockscreen.service | name: lockscreen.service | ||||
enabled: "{{ lockscreen_enabled }}" | enabled: "{{ lockscreen_enabled }}" | ||||
@@ -0,0 +1,13 @@ | |||||
{{ ansible_managed | comment }} | |||||
[Unit] | |||||
Description=Screensaver | |||||
PartOf=graphical-session.target | |||||
[Service] | |||||
Type=simple | |||||
ExecStart=/usr/bin/xss-lock -l -- systemctl --user start lockscreen.service | |||||
Restart=always | |||||
[Install] | |||||
WantedBy=graphical-session.target |
@@ -5,11 +5,10 @@ Description=Screensaver | |||||
PartOf=graphical-session.target | PartOf=graphical-session.target | ||||
[Service] | [Service] | ||||
Type=simple | |||||
ExecStart=/usr/bin/xss-lock -l -- xsecurelock | |||||
Type=notify | |||||
ExecStart=xsecurelock -- systemd-notify --ready | |||||
NotifyAccess=all | |||||
EnvironmentFile=%h/.lockscreen.env | EnvironmentFile=%h/.lockscreen.env | ||||
Environment="XSECURELOCK_SAVER=%h/.screensaver.sh" | |||||
Restart=always | |||||
[Install] | [Install] | ||||
WantedBy=graphical-session.target | WantedBy=graphical-session.target |