diff --git a/playbooks/sway.yaml b/playbooks/sway.yaml index e8fa063..80f0208 100644 --- a/playbooks/sway.yaml +++ b/playbooks/sway.yaml @@ -21,4 +21,14 @@ owner: "{{ uid }}" group: "{{ uid }}" mode: '0640' - + - name: Create waybar dir + ansible.builtin.file: + dest: "/home/{{ uid }}/.config/waybar" + state: directory + - name: Install waybar config + ansible.builtin.template: + src: ../templates/waybar_config.j2 + dest: "/home/{{ uid }}/.config/waybar/config" + owner: "{{ uid }}" + group: "{{ uid }}" + mode: '0640' diff --git a/templates/waybar_config.j2 b/templates/waybar_config.j2 new file mode 100644 index 0000000..15b1c68 --- /dev/null +++ b/templates/waybar_config.j2 @@ -0,0 +1,16 @@ +{ + "layer": "top", + "modules-left": ["sway/workspaces", "sway/mode"], + "modules-center": ["sway/window"], + "modules-right": ["battery", "clock", "tray"], + "sway/window": { + "max-length": 50 + }, + "battery": { + "format": "{capacity}% {icon}", + "format-icons": ["", "", "", "", ""] + }, + "clock": { + "format-alt": "{:%a, %d. %b %H:%M}" + } +}