diff options
Diffstat (limited to 'roles/hyprcursor/tasks/main.yml')
| -rw-r--r-- | roles/hyprcursor/tasks/main.yml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/roles/hyprcursor/tasks/main.yml b/roles/hyprcursor/tasks/main.yml new file mode 100644 index 00000000..ee93accf --- /dev/null +++ b/roles/hyprcursor/tasks/main.yml @@ -0,0 +1,25 @@ +--- +- name: "Ensure hyprcursor is installed" + become: true + ansible.builtin.package: + name: "hyprcursor" + state: "present" + +- name: "Ensure icons directory exists" + ansible.builtin.file: + path: "{{ ansible_env.HOME }}/.local/share/icons" + state: "directory" + mode: "0755" + +- name: "Check if cursor theme exists" + ansible.builtin.stat: + path: "{{ ansible_env.HOME }}/.local/share/icons/{{ hyprcursor_variant }}" + register: hyprcursor_theme_dir + +- name: "Download and extract banana cursor" + ansible.builtin.unarchive: + # yamllint disable-line + src: "https://github.com/ful1e5/banana-cursor/releases/download/{{ hyprcursor_version }}/{{ hyprcursor_variant }}.tar.xz" + dest: "{{ ansible_env.HOME }}/.local/share/icons" + remote_src: true + when: not hyprcursor_theme_dir.stat.exists |
