mirror of
https://github.com/roles-ansible/ansible_role_sway.git
synced 2024-08-16 13:49:49 +02:00
improve swaylock config
This commit is contained in:
parent
2100e20042
commit
a0c14b4ad6
5 changed files with 34 additions and 2 deletions
|
@ -16,7 +16,9 @@ sway__term_pkgs:
|
||||||
- foot-themes
|
- foot-themes
|
||||||
sway__keyboard_settings: true
|
sway__keyboard_settings: true
|
||||||
sway__keyboard_lang: 'de'
|
sway__keyboard_lang: 'de'
|
||||||
sway__lock: 'swaylock --color 000000 --image /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png'
|
sway__lock: 'swaylock --color 00000000 && killall -9 cmatrix & foot -F cmatrix -a -L && exit'
|
||||||
|
sway__swaylock: |
|
||||||
|
color=000000ff
|
||||||
sway__waybar: true
|
sway__waybar: true
|
||||||
sway__waybar_modules_left: ["sway/workspaces", "sway/mode", "sway/scratchpad"]
|
sway__waybar_modules_left: ["sway/workspaces", "sway/mode", "sway/scratchpad"]
|
||||||
sway__waybar_modules_center: ["sway/window"]
|
sway__waybar_modules_center: ["sway/window"]
|
||||||
|
|
|
@ -34,6 +34,32 @@
|
||||||
label: "{{ swayusr.home }}/.config/sway/"
|
label: "{{ swayusr.home }}/.config/sway/"
|
||||||
when: sway__dynamic_names | bool
|
when: sway__dynamic_names | bool
|
||||||
|
|
||||||
|
- name: Creates swaylock config directory if needed
|
||||||
|
become: true
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ swayusr.home }}/.swaylock"
|
||||||
|
state: directory
|
||||||
|
mode: '0750'
|
||||||
|
owner: "{{ swayusr.user }}"
|
||||||
|
group: "{{ swayusr.user }}"
|
||||||
|
loop: "{{ sway__user_list | flatten(1) }}"
|
||||||
|
loop_control:
|
||||||
|
loop_var: swayusr
|
||||||
|
label: "{{ swayusr.home }}/.swaylock"
|
||||||
|
|
||||||
|
- name: Deploy swaylock config file
|
||||||
|
become: true
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: 'templates/swaylock.j2'
|
||||||
|
dest: "{{ swayusr.home }}/.swaylock/config"
|
||||||
|
mode: '0640'
|
||||||
|
owner: "{{ swayusr.user }}"
|
||||||
|
group: "{{ swayusr.user }}"
|
||||||
|
loop: "{{ sway__user_list | flatten(1) }}"
|
||||||
|
loop_control:
|
||||||
|
label: "{{ swayusr.home }}/.swaylock/config"
|
||||||
|
loop_var: swayusr
|
||||||
|
|
||||||
- name: Deploy sway config file
|
- name: Deploy sway config file
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
- 'swayidle'
|
- 'swayidle'
|
||||||
- 'swayimg'
|
- 'swayimg'
|
||||||
- 'wdisplays'
|
- 'wdisplays'
|
||||||
|
- 'cmatrix'
|
||||||
|
|
||||||
- name: Ensure font-awesome is installed
|
- name: Ensure font-awesome is installed
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
|
|
3
templates/swaylock.j2
Normal file
3
templates/swaylock.j2
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# {{ ansible_managed }}
|
||||||
|
ignore-empty-password
|
||||||
|
{{ sway__swaylock }}
|
|
@ -1,3 +1,3 @@
|
||||||
---
|
---
|
||||||
playbook_version_number: 8 # should be int
|
playbook_version_number: 9 # should be int
|
||||||
playbook_version_path: 'role-roles-ansible.sway.version'
|
playbook_version_path: 'role-roles-ansible.sway.version'
|
||||||
|
|
Loading…
Reference in a new issue