@@ -45,10 +45,12 @@ system_suspend_command: systemctl suspend | |||||
system_reboot_command: systemctl reboot | system_reboot_command: systemctl reboot | ||||
system_poweroff_command: systemctl poweroff | system_poweroff_command: systemctl poweroff | ||||
session_lock_enabled: "{{ (home_profile != 'presentation') and (home_profile != 'vdesk') }}" | |||||
session_lock_command: xset s activate | |||||
session_enable_screensaver_command: /usr/local/bin/screensaver-enable | |||||
session_disable_screensaver_command: /usr/local/bin/screensaver-disable | |||||
lockscreen_enabled: "{{ (home_profile != 'presentation') and (home_profile != 'vdesk') }}" | |||||
lockscreen_lock_command: xset s activate | |||||
lockscreen_timeout: 300 | |||||
lockscreen_locktime: 30 | |||||
display_sleeptime: 300 | |||||
file_browser_command: thunar | file_browser_command: thunar | ||||
calculator_command: "{{default_browser}} --new-window https://www.geogebra.org/calculator" | calculator_command: "{{default_browser}} --new-window https://www.geogebra.org/calculator" | ||||
@@ -0,0 +1,2 @@ | |||||
#!/bin/sh | |||||
exec /usr/libexec/xscreensaver/glmatrix -density 50 -no-rotate $@ |
@@ -5,3 +5,5 @@ | |||||
pkg: | pkg: | ||||
- socat | - socat | ||||
- fish | - fish | ||||
- xsecurelock | |||||
- xss-lock |
@@ -62,3 +62,9 @@ | |||||
path: ~/.config/systemd/user/autostart-desktop-app@.service | path: ~/.config/systemd/user/autostart-desktop-app@.service | ||||
state: absent | state: absent | ||||
notify: systemd daemon-reload | notify: systemd daemon-reload | ||||
- name: screensaver graphical-session service disabled | |||||
systemd: | |||||
name: screensaver.service | |||||
enabled: false | |||||
scope: user |
@@ -0,0 +1,17 @@ | |||||
--- | |||||
- name: lockscreen environment | |||||
template: | |||||
src: lockscreen/lockscreen.env.j2 | |||||
dest: ~/.lockscreen.env | |||||
- name: lockscreen graphical-session service | |||||
template: | |||||
src: lockscreen/lockscreen.service.j2 | |||||
dest: ~/.config/systemd/user/lockscreen.service | |||||
- name: lockscreen graphical-session service enabled | |||||
systemd: | |||||
name: lockscreen.service | |||||
enabled: "{{ lockscreen_enabled }}" | |||||
scope: user |
@@ -6,7 +6,6 @@ | |||||
- import_tasks: ssh.yaml | - import_tasks: ssh.yaml | ||||
- import_tasks: tmux.yaml | - import_tasks: tmux.yaml | ||||
- import_tasks: pulseaudio.yaml | - import_tasks: pulseaudio.yaml | ||||
- import_tasks: screensaver.yaml | |||||
- import_tasks: git.yaml | - import_tasks: git.yaml | ||||
- import_tasks: timer.yaml | - import_tasks: timer.yaml | ||||
@@ -18,6 +17,9 @@ | |||||
- import_tasks: i3.yaml | - import_tasks: i3.yaml | ||||
tags: | tags: | ||||
- i3 | - i3 | ||||
- import_tasks: lockscreen.yaml | |||||
tags: | |||||
- lockscreen | |||||
- import_tasks: workspaces.yaml | - import_tasks: workspaces.yaml | ||||
- import_tasks: icons.yaml | - import_tasks: icons.yaml | ||||
- import_tasks: background.yaml | - import_tasks: background.yaml | ||||
@@ -1,7 +0,0 @@ | |||||
--- | |||||
- name: screensaver graphical-session service enabled | |||||
systemd: | |||||
name: screensaver.service | |||||
enabled: "{{ session_lock_enabled }}" | |||||
scope: user |
@@ -22,7 +22,7 @@ floating_modifier $mod | |||||
### default/local mode | ### default/local mode | ||||
## special keys | ## special keys | ||||
bindsym XF86Sleep exec {{i3_exec_command_prefix}} {{session_lock_command}} | |||||
bindsym XF86Sleep exec {{i3_exec_command_prefix}} {{lockscreen_lock_command}} | |||||
bindsym XF86Mail exec {{i3_exec_command_prefix}} {{mail_command}} | bindsym XF86Mail exec {{i3_exec_command_prefix}} {{mail_command}} | ||||
bindsym XF86HomePage exec {{i3_exec_command_prefix}} {{default_browser}} | bindsym XF86HomePage exec {{i3_exec_command_prefix}} {{default_browser}} | ||||
bindsym XF86Calculator exec {{i3_exec_command_prefix}} {{calculator_command}} | bindsym XF86Calculator exec {{i3_exec_command_prefix}} {{calculator_command}} | ||||
@@ -173,7 +173,7 @@ bindsym $mod+KP_Add exec {{points_up_command}} | |||||
mode "remote" { | mode "remote" { | ||||
bindcode $mod+9 mode "default" | bindcode $mod+9 mode "default" | ||||
bindsym XF86Sleep exec {{session_lock_command}} | |||||
bindsym XF86Sleep exec {{lockscreen_lock_command}} | |||||
# The middle button over a titlebar kills the window | # The middle button over a titlebar kills the window | ||||
bindsym --release button2 kill | bindsym --release button2 kill | ||||
@@ -200,8 +200,8 @@ mode "session" { | |||||
bindsym r reload; exec --no-startup-id ~/.xsession.reload.fish; mode "default"; {{on_focus_workspace}} | bindsym r reload; exec --no-startup-id ~/.xsession.reload.fish; mode "default"; {{on_focus_workspace}} | ||||
bindsym R reload; exec --no-startup-id ~/.xsession.reload.fish; mode "default"; {{on_focus_workspace}} | bindsym R reload; exec --no-startup-id ~/.xsession.reload.fish; mode "default"; {{on_focus_workspace}} | ||||
bindsym s exec --no-startup-id {{system_suspend_command}}; mode "default"; {{on_focus_workspace}} | bindsym s exec --no-startup-id {{system_suspend_command}}; mode "default"; {{on_focus_workspace}} | ||||
bindsym l exec --no-startup-id {{session_lock_command}}; mode "default"; {{on_focus_workspace}} | |||||
bindcode 49 exec --no-startup-id {{session_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}} | |||||
bindsym e exec --no-startup-id {{session_enable_screensaver_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 d exec --no-startup-id {{session_disable_screensaver_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}} | ||||
@@ -0,0 +1,5 @@ | |||||
{{ ansible_managed | comment }} | |||||
XSECURELOCK_SAVER=%h/bin/screensaver | |||||
XSECURELOCK_AUTH_BACKGROUND_COLOR={{home_base_color_hue|hsv2rgb(66,47)}} | |||||
XSECURELOCK_SWITCH_USER_COMMAND=dm-tool switch-to-greeter |
@@ -0,0 +1,14 @@ | |||||
{{ ansible_managed | comment }} | |||||
[Unit] | |||||
Description=Screensaver | |||||
PartOf=graphical-session.target | |||||
[Service] | |||||
Type=simple | |||||
ExecStart=/usr/bin/xss-lock -l -- xsecurelock | |||||
Restart=always | |||||
EnvironmentFile=%h/.lockscreen.env | |||||
[Install] | |||||
WantedBy=graphical-session.target |
@@ -20,7 +20,12 @@ xrdb -merge ~/.Xresources | |||||
rofi -theme ~/.config/rofi/theme -dump-xresources > ~/.config/rofi/config | rofi -theme ~/.config/rofi/theme -dump-xresources > ~/.config/rofi/config | ||||
# screensaver settings | # screensaver settings | ||||
/usr/local/bin/screensaver-settings | |||||
xset s on | |||||
xset +dpms | |||||
xset s {{ lockscreen_timeout | int }} {{ lockscreen_locktime | int }} | |||||
# DPMS options | |||||
xset dpms {{ display_sleeptime | int }} {{ display_sleeptime | int }} {{ display_sleeptime | int }} | |||||
# allow hosts | # allow hosts | ||||
{% for xhost in home_xhosts_allow %} | {% for xhost in home_xhosts_allow %} | ||||