1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_i3wm.git synced 2024-08-16 10:09:53 +02:00

improve swaylock config

This commit is contained in:
L3D 2024-07-25 23:17:00 +02:00
parent 2100e20042
commit a0c14b4ad6
Signed by: l3d
GPG key ID: CD08445BFF4313D1
5 changed files with 34 additions and 2 deletions

View file

@ -16,7 +16,9 @@ sway__term_pkgs:
- foot-themes
sway__keyboard_settings: true
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_modules_left: ["sway/workspaces", "sway/mode", "sway/scratchpad"]
sway__waybar_modules_center: ["sway/window"]

View file

@ -34,6 +34,32 @@
label: "{{ swayusr.home }}/.config/sway/"
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
become: true
ansible.builtin.template:

View file

@ -21,6 +21,7 @@
- 'swayidle'
- 'swayimg'
- 'wdisplays'
- 'cmatrix'
- name: Ensure font-awesome is installed
ansible.builtin.apt:

3
templates/swaylock.j2 Normal file
View file

@ -0,0 +1,3 @@
# {{ ansible_managed }}
ignore-empty-password
{{ sway__swaylock }}

View file

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