diff options
Diffstat (limited to 'roles/hyprcursor')
| -rw-r--r-- | roles/hyprcursor/defaults/main.yml | 3 | ||||
| -rw-r--r-- | roles/hyprcursor/meta/argument_specs.yml | 14 | ||||
| -rw-r--r-- | roles/hyprcursor/meta/main.yml | 11 | ||||
| -rw-r--r-- | roles/hyprcursor/tasks/main.yml | 25 |
4 files changed, 53 insertions, 0 deletions
diff --git a/roles/hyprcursor/defaults/main.yml b/roles/hyprcursor/defaults/main.yml new file mode 100644 index 00000000..16cc87cd --- /dev/null +++ b/roles/hyprcursor/defaults/main.yml @@ -0,0 +1,3 @@ +--- +hyprcursor_version: "v2.0.0" +hyprcursor_variant: "Banana" diff --git a/roles/hyprcursor/meta/argument_specs.yml b/roles/hyprcursor/meta/argument_specs.yml new file mode 100644 index 00000000..914e8129 --- /dev/null +++ b/roles/hyprcursor/meta/argument_specs.yml @@ -0,0 +1,14 @@ +--- +argument_specs: + main: + short_description: "Install banana cursor for Hyprland" + description: "Install banana cursor for Hyprland" + options: + hyprcursor_version: + type: "str" + description: "Release version tag" + default: "v2.0.0" + hyprcursor_variant: + type: "str" + description: "Cursor variant (Banana, Banana-Blue, Banana-Green, Banana-Red)" + default: "Banana" diff --git a/roles/hyprcursor/meta/main.yml b/roles/hyprcursor/meta/main.yml new file mode 100644 index 00000000..7702db3f --- /dev/null +++ b/roles/hyprcursor/meta/main.yml @@ -0,0 +1,11 @@ +--- +dependencies: [] +galaxy_info: + author: "a14m" + description: "Install banana cursor for Hyprland" + license: "MIT" + min_ansible_version: "2.18" + platforms: + - name: "ArchLinux" + versions: + - "all" 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 |
