2021-11-08 12:28:11 +01:00
|
|
|
---
|
|
|
|
- name: Creates directory
|
|
|
|
become: true
|
|
|
|
ansible.builtin.file:
|
2023-08-01 22:13:23 +02:00
|
|
|
path: '{{ i3wm_usr.home }}/.config'
|
2021-11-08 12:28:11 +01:00
|
|
|
state: directory
|
|
|
|
mode: 0750
|
2023-08-01 22:13:23 +02:00
|
|
|
owner: "{{ i3wm_usr.user }}"
|
|
|
|
group: "{{ i3wm_usr.user }}"
|
2021-11-08 12:28:11 +01:00
|
|
|
|
2023-05-19 17:07:00 +02:00
|
|
|
- name: Create i3 config folder
|
2021-11-08 12:28:11 +01:00
|
|
|
become: true
|
|
|
|
ansible.builtin.file:
|
2023-08-01 22:13:23 +02:00
|
|
|
path: '{{ i3wm_usr.home }}/.config/i3/'
|
2021-11-08 12:28:11 +01:00
|
|
|
state: directory
|
2023-08-01 22:13:23 +02:00
|
|
|
mode: 0750
|
|
|
|
owner: "{{ i3wm_usr.user }}"
|
|
|
|
group: "{{ i3wm_usr.user }}"
|
2021-11-08 12:28:11 +01:00
|
|
|
|
2023-05-19 17:07:00 +02:00
|
|
|
- name: Copy multiple images
|
2023-08-01 22:40:01 +02:00
|
|
|
become: true
|
2021-11-08 12:28:11 +01:00
|
|
|
ansible.builtin.copy:
|
|
|
|
src: "{{ item.src }}"
|
|
|
|
dest: "{{ item.dest }}"
|
|
|
|
mode: 0644
|
2023-08-01 22:13:23 +02:00
|
|
|
owner: "{{ i3wm_usr.user }}"
|
|
|
|
group: "{{ i3wm_usr.user }}"
|
2021-11-08 12:28:11 +01:00
|
|
|
with_items:
|
2023-08-01 22:13:23 +02:00
|
|
|
- { src: 'files/background.png', dest: "{{ i3wm_usr.home }}/.config/background.png" }
|
|
|
|
- { src: 'files/lockscreen.png', dest: '{{ i3wm_usr.home }}/.config/lockscreen.png' }
|
2021-11-08 12:28:11 +01:00
|
|
|
when: i3wm_copy_wallpapers | bool
|
|
|
|
|
2023-05-19 17:07:00 +02:00
|
|
|
- name: Copy and validate i3wm config file
|
2021-11-08 12:28:11 +01:00
|
|
|
become: true
|
2021-11-08 13:55:47 +01:00
|
|
|
ansible.builtin.template:
|
2021-11-08 12:28:11 +01:00
|
|
|
src: templates/config.j2
|
2023-08-01 22:13:23 +02:00
|
|
|
dest: "{{ i3wm_usr.home }}/.config/i3/config"
|
2021-11-08 12:28:11 +01:00
|
|
|
mode: 0600
|
|
|
|
backup: true
|
|
|
|
validate: i3 -C -c %s
|
2023-08-01 22:13:23 +02:00
|
|
|
owner: "{{ i3wm_usr.user }}"
|
|
|
|
group: "{{ i3wm_usr.user }}"
|
2021-11-08 12:28:11 +01:00
|
|
|
|
2023-08-01 22:13:23 +02:00
|
|
|
- name: Create directory ~/.config/i3blocks/
|
2021-11-15 00:28:35 +01:00
|
|
|
become: true
|
2021-11-08 19:30:22 +01:00
|
|
|
ansible.builtin.file:
|
2023-08-01 22:13:23 +02:00
|
|
|
path: "{{ i3wm_usr.home }}/.config/i3blocks/"
|
2021-11-08 19:30:22 +01:00
|
|
|
state: directory
|
2023-08-01 22:13:23 +02:00
|
|
|
mode: '0750'
|
|
|
|
owner: "{{ i3wm_usr.user }}"
|
|
|
|
group: "{{ i3wm_usr.user }}"
|
2021-11-08 19:30:22 +01:00
|
|
|
|
2023-08-01 22:13:23 +02:00
|
|
|
- name: Generate i3blocks config
|
2021-11-08 12:28:11 +01:00
|
|
|
become: true
|
2023-08-01 22:13:23 +02:00
|
|
|
ansible.builtin.template:
|
|
|
|
src: 'templates/i3blocks_config.j2'
|
|
|
|
dest: "{{ i3wm_usr.home }}/.config/i3blocks/config"
|
2021-11-08 19:30:22 +01:00
|
|
|
mode: 0640
|
2023-08-01 22:13:23 +02:00
|
|
|
owner: "{{ i3wm_usr.user }}"
|
|
|
|
group: "{{ i3wm_usr.user }}"
|
2021-11-08 19:30:22 +01:00
|
|
|
|
2023-05-19 17:07:00 +02:00
|
|
|
- name: Copy i3blocks config
|
2021-11-08 19:30:22 +01:00
|
|
|
become: true
|
|
|
|
ansible.builtin.copy:
|
|
|
|
src: "files/i3blocks/{{ item }}"
|
2023-08-01 22:13:23 +02:00
|
|
|
dest: "{{ i3wm_usr.home }}/.config/i3blocks/{{ item }}"
|
2021-11-08 19:30:22 +01:00
|
|
|
mode: 0750
|
2023-08-01 22:13:23 +02:00
|
|
|
owner: "{{ i3wm_usr.user }}"
|
|
|
|
group: "{{ i3wm_usr.user }}"
|
2021-11-08 19:30:22 +01:00
|
|
|
with_items:
|
2023-08-01 22:13:23 +02:00
|
|
|
- 'volume.sh'
|
2023-08-22 14:53:13 +02:00
|
|
|
- 'wlan.py'
|
2023-08-01 22:13:23 +02:00
|
|
|
- 'battery.py'
|
|
|
|
|
|
|
|
- name: Create rofi config folder
|
|
|
|
become: true
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: '{{ i3wm_usr.home }}/.config/rofi/'
|
|
|
|
state: directory
|
|
|
|
mode: 0750
|
|
|
|
owner: "{{ i3wm_usr.user }}"
|
|
|
|
group: "{{ i3wm_usr.user }}"
|
|
|
|
|
|
|
|
- name: Copy rofi config
|
|
|
|
become: true
|
|
|
|
ansible.builtin.copy:
|
|
|
|
src: "{{ i3_rofi_config_file }}"
|
|
|
|
dest: "{{ i3wm_usr.home }}/.config/rofi/config.rasi"
|
|
|
|
mode: 0640
|
|
|
|
owner: "{{ i3wm_usr.user }}"
|
|
|
|
group: "{{ i3wm_usr.user }}"
|