Bladeren bron

change lockscreen-auto unit

main
bovenliggende
commit
b1b500667d
5 gewijzigde bestanden met toevoegingen van 28 en 21 verwijderingen
  1. +1
    -1
      defaults/main.yaml
  2. +5
    -0
      tasks/clean.yaml
  3. +7
    -7
      tasks/lockscreen.yaml
  4. +0
    -13
      templates/lockscreen/lockscreen-auto.service.j2
  5. +15
    -0
      templates/lockscreen/xss-lock.service.j2

+ 1
- 1
defaults/main.yaml Bestand weergeven

@@ -38,7 +38,7 @@ system_suspend_command: systemctl suspend
system_reboot_command: systemctl reboot
system_poweroff_command: systemctl poweroff

lockscreen_auto_enabled: true
xss_lock_enabled: true
lockscreen_lock_command: xset s activate
lockscreen_timeout: 300
lockscreen_locktime: 30


+ 5
- 0
tasks/clean.yaml Bestand weergeven

@@ -13,3 +13,8 @@
- pipe-watcher
- select-screenlayout
- timer

- name: remove lockscreen-auto systemd user service
file:
path: ~/.config/systemd/user/lockscreen-auto.service
state: absent

+ 7
- 7
tasks/lockscreen.yaml Bestand weergeven

@@ -19,13 +19,13 @@

- name: lockscreen-auto graphical-session service definition
template:
src: lockscreen/lockscreen-auto.service.j2
dest: ~/.config/systemd/user/lockscreen-auto.service
src: lockscreen/xss-lock.service.j2
dest: ~/.config/systemd/user/xss-lock.service
notify: systemd daemon-reload

- name: lockscreen-auto graphical-session service
- name: xss-lock graphical-session service
systemd:
name: lockscreen-auto.service
enabled: "{{ lockscreen_auto_enabled }}"
state: "{{ lockscreen_auto_enabled | ternary('started','stopped') }}"
scope: user
name: xss-lock.service
enabled: "{{ xss_lock_enabled }}"
state: "{{ xss_lock_enabled | ternary('started','stopped') }}"
scope: user

+ 0
- 13
templates/lockscreen/lockscreen-auto.service.j2 Bestand weergeven

@@ -1,13 +0,0 @@
{{ 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

+ 15
- 0
templates/lockscreen/xss-lock.service.j2 Bestand weergeven

@@ -0,0 +1,15 @@
[Unit]
Description=xss-lock - use external locker as X screen saver
Documentation=man:xss-lock(1)
PartOf=graphical-session.target
Wants=xset.service
After=xset.service

[Service]
Type=simple
EnvironmentFile=/home/anarcat/.xsecurelock.env
# note that when this works, document in #994762
ExecStart=/usr/bin/xss-lock --verbose --transfer-sleep-lock --session=${XDG_SESSION_ID} --notifier /usr/libexec/xsecurelock/dimmer -- xsecurelock

[Install]
WantedBy=graphical-session.target