@@ -11,20 +11,21 @@ | |||||
dest: ~/.screensaver.sh | dest: ~/.screensaver.sh | ||||
mode: 0755 | mode: 0755 | ||||
- name: lockscreen graphical-session service | |||||
- name: lockscreen graphical-session service definition | |||||
template: | template: | ||||
src: lockscreen/lockscreen.service.j2 | src: lockscreen/lockscreen.service.j2 | ||||
dest: ~/.config/systemd/user/lockscreen.service | dest: ~/.config/systemd/user/lockscreen.service | ||||
notify: systemd daemon-reload | notify: systemd daemon-reload | ||||
- name: lockscreen-auto graphical-session service | |||||
- name: lockscreen-auto graphical-session service definition | |||||
template: | template: | ||||
src: lockscreen/lockscreen-auto.service.j2 | src: lockscreen/lockscreen-auto.service.j2 | ||||
dest: ~/.config/systemd/user/lockscreen-auto.service | dest: ~/.config/systemd/user/lockscreen-auto.service | ||||
notify: systemd daemon-reload | notify: systemd daemon-reload | ||||
- name: lockscreen-auto graphical-session service enabled | |||||
- name: lockscreen-auto graphical-session service | |||||
systemd: | systemd: | ||||
name: lockscreen.service | |||||
enabled: "{{ lockscreen_enabled }}" | |||||
name: lockscreen-auto.service | |||||
enabled: "{{ lockscreen_auto_enabled }}" | |||||
state: "{{ lockscreen_auto_enabled | ternary('started','stopped') }}" | |||||
scope: user | scope: user |
@@ -200,8 +200,8 @@ mode "session" { | |||||
bindsym l exec --no-startup-id {{lockscreen_lock_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}} | bindcode 49 exec --no-startup-id {{lockscreen_lock_command}}; mode "default"; {{on_focus_workspace}} | ||||
bindsym b exec --no-startup-id xsetroot -solid black; mode "default"; {{on_focus_workspace}} | bindsym b exec --no-startup-id xsetroot -solid black; 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 e exec --no-startup-id xset s on; exec --no-startup-id xset dpms {{ display_sleeptime | int }} {{ display_sleeptime | int }} {{ display_sleeptime | int }}; mode "default"; {{on_focus_workspace}} | |||||
bindsym d exec --no-startup-id xset s off; exec --no-startup-id xset dpms 0 0 0; mode "default"; {{on_focus_workspace}} | |||||
bindsym Shift+R exec --no-startup-id {{system_reboot_command}}; 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}} | bindsym Shift+P exec --no-startup-id {{system_poweroff_command}}; mode "default"; {{on_focus_workspace}} | ||||
@@ -1,5 +1,6 @@ | |||||
{{ ansible_managed | comment }} | {{ ansible_managed | comment }} | ||||
#XSECURELOCK_SAVER=$HOME/.screensaver.sh | |||||
XSECURELOCK_AUTH_BACKGROUND_COLOR={{home_base_color_hue|hsv2rgb(66,47)}} | XSECURELOCK_AUTH_BACKGROUND_COLOR={{home_base_color_hue|hsv2rgb(66,47)}} | ||||
XSECURELOCK_SWITCH_USER_COMMAND=dm-tool switch-to-greeter | XSECURELOCK_SWITCH_USER_COMMAND=dm-tool switch-to-greeter | ||||
XSECURELOCK_AUTH_TIMEOUT=5 | XSECURELOCK_AUTH_TIMEOUT=5 |
@@ -7,8 +7,10 @@ PartOf=graphical-session.target | |||||
[Service] | [Service] | ||||
Type=notify | Type=notify | ||||
ExecStart=xsecurelock -- systemd-notify --ready | ExecStart=xsecurelock -- systemd-notify --ready | ||||
ExecStartPost=xset dpms $XSECURELOCK_AUTH_TIMEOUT $XSECURELOCK_AUTH_TIMEOUT $XSECURELOCK_AUTH_TIMEOUT | |||||
NotifyAccess=all | NotifyAccess=all | ||||
EnvironmentFile=%h/.lockscreen.env | EnvironmentFile=%h/.lockscreen.env | ||||
ExecStopPost=xset dpms {{ display_sleeptime | int }} {{ display_sleeptime | int }} {{ display_sleeptime | int }} | |||||
[Install] | [Install] | ||||
WantedBy=graphical-session.target | WantedBy=graphical-session.target |