Bläddra i källkod

lockscreen

pull/1/head
förälder
incheckning
0fd8476a44
6 ändrade filer med 27 tillägg och 6 borttagningar
  1. +1
    -0
      tasks/clean.yaml
  2. +7
    -0
      tasks/lockscreen.yaml
  3. +2
    -2
      templates/i3/i3.config.j2
  4. +13
    -0
      templates/lockscreen/lockscreen-auto.service.j2
  5. +1
    -1
      templates/lockscreen/lockscreen.env.j2
  6. +3
    -3
      templates/lockscreen/lockscreen.service.j2

+ 1
- 0
tasks/clean.yaml Visa fil

@@ -67,4 +67,5 @@
systemd:
name: screensaver.service
enabled: false
state: stopped
scope: user

+ 7
- 0
tasks/lockscreen.yaml Visa fil

@@ -9,6 +9,13 @@
template:
src: lockscreen/lockscreen.service.j2
dest: ~/.config/systemd/user/lockscreen.service
notify: systemd daemon-reload

- 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 graphical-session service enabled
systemd:


+ 2
- 2
templates/i3/i3.config.j2 Visa fil

@@ -201,8 +201,8 @@ mode "session" {
bindsym s exec --no-startup-id {{system_suspend_command}}; mode "default"; {{on_focus_workspace}}
bindsym l exec --no-startup-id {{lockscreen_lock_command}}; mode "default"; {{on_focus_workspace}}
bindcode 49 exec --no-startup-id {{lockscreen_lock_command}}; mode "default"; {{on_focus_workspace}}
bindsym e exec --no-startup-id {{session_enable_screensaver_command}}; mode "default"; {{on_focus_workspace}}
bindsym d exec --no-startup-id {{session_disable_screensaver_command}}; mode "default"; {{on_focus_workspace}}
bindsym e exec --no-startup-id systemctl --user start lockscreen.service; mode "default"; {{on_focus_workspace}}
bindsym d exec --no-startup-id systemctl --user stop lockscreen.service; mode "default"; {{on_focus_workspace}}
bindsym b exec --no-startup-id xsetroot -solid black; mode "default"; {{on_focus_workspace}}
bindsym Shift+R exec --no-startup-id {{system_reboot_command}}; mode "default"; {{on_focus_workspace}}
bindsym Shift+P exec --no-startup-id {{system_poweroff_command}}; mode "default"; {{on_focus_workspace}}


+ 13
- 0
templates/lockscreen/lockscreen-auto.service.j2 Visa fil

@@ -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

+ 1
- 1
templates/lockscreen/lockscreen.env.j2 Visa fil

@@ -1,5 +1,5 @@
{{ ansible_managed | comment }}

XSECURELOCK_SAVER=%h/bin/screensaver
#XSECURELOCK_SAVER=$HOME/bin/screensaver
XSECURELOCK_AUTH_BACKGROUND_COLOR={{home_base_color_hue|hsv2rgb(66,47)}}
XSECURELOCK_SWITCH_USER_COMMAND=dm-tool switch-to-greeter

+ 3
- 3
templates/lockscreen/lockscreen.service.j2 Visa fil

@@ -5,9 +5,9 @@ Description=Screensaver
PartOf=graphical-session.target

[Service]
Type=simple
ExecStart=/usr/bin/xss-lock -l -- xsecurelock
Restart=always
Type=notify
ExecStart=xsecurelock -- systemd-notify --ready
NotifyAccess=all
EnvironmentFile=%h/.lockscreen.env

[Install]