feat: configure swaylock
This commit is contained in:
parent
b0fdee5f17
commit
4f207431e9
4 changed files with 21 additions and 0 deletions
2
roles/desktop/files/sway.d/lock.conf
Normal file
2
roles/desktop/files/sway.d/lock.conf
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
exec swayidle -w timeout 1200 'swaylock'
|
||||||
|
bindsym $mod+Ctrl+l exec swaylock
|
1
roles/desktop/files/swaylock
Normal file
1
roles/desktop/files/swaylock
Normal file
|
@ -0,0 +1 @@
|
||||||
|
image=~/Pictures/wallpapers/$(ls -1 ~/Pictures/wallpapers | shuf | head -1)
|
|
@ -6,3 +6,5 @@
|
||||||
import_tasks: wofi.yml
|
import_tasks: wofi.yml
|
||||||
- name: Dunst
|
- name: Dunst
|
||||||
import_tasks: dunst.yml
|
import_tasks: dunst.yml
|
||||||
|
- name: Swaylock
|
||||||
|
import_tasks: swaylock.yml
|
||||||
|
|
16
roles/desktop/tasks/swaylock.yml
Normal file
16
roles/desktop/tasks/swaylock.yml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
- name: Install swayidle and swaylock
|
||||||
|
become: true
|
||||||
|
ansible.builtin.apt:
|
||||||
|
pkg:
|
||||||
|
- swayidle
|
||||||
|
- swaylock
|
||||||
|
- name: Create swaylock config dir
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ ansible_env.HOME }}/.config/swaylock"
|
||||||
|
state: directory
|
||||||
|
mode: '1770'
|
||||||
|
- name: Copy swaylock config file
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: files/swaylock
|
||||||
|
dest: "{{ ansible_env.HOME }}/.config/swaylock/config"
|
||||||
|
mode: '0660'
|
Loading…
Reference in a new issue