You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.9 KiB

---
- name: Set up sway
vars:
uid: "{{ lookup('env','USER') }}"
TZ: "{{ lookup('env','TZ') }}"
wallpaper_path: /home/{{ uid }}/.config/wallpaper/debian.jpg
hosts: localhost
connection: local
become: false
tasks:
- name: Install autotiling
ansible.builtin.command:
cmd: pipx install autotiling
creates: /home/{{ uid }}/.local/bin/autotiling
- name: Create sway dir
ansible.builtin.file:
dest: /home/{{ uid }}/.config/sway
state: directory
- name: Create xdg dir
ansible.builtin.file:
dest: /home/{{ uid }}/.config/xdg-desktop-portal
state: directory
- name: Install sway config
ansible.builtin.template:
src: ../templates/sway_config.j2
dest: /home/{{ uid }}/.config/sway/config
owner: '{{ uid }}'
group: '{{ uid }}'
mode: '0640'
notify: Reload sway
- name: Install sway config
ansible.builtin.template:
src: ../templates/sway-portals.conf.j2
dest: /home/{{ uid }}/.config/xdg-desktop-portal/sway-portals.conf
owner: '{{ uid }}'
group: '{{ uid }}'
mode: '0640'
notify: Reload sway
- 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'
notify: Reload sway
- name: Create wallpaper dir
ansible.builtin.file:
dest: /home/{{ uid }}/.config/wallpaper
state: directory
- name: Setup wall paper
ansible.builtin.copy:
dest: '{{ wallpaper_path }}'
src: ../data/debian.jpg
notify: Reload sway
handlers:
- name: Reload sway
ansible.builtin.command:
cmd: swaymsg reload