summaryrefslogtreecommitdiffstats
path: root/roles/hyprcursor
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2026-01-16 17:20:10 +0100
committerAhmed Abdelhalim <[email protected]>2026-01-16 17:25:06 +0100
commit1cf7d4d33e2cd7bf85f5adc3a38072b04bffecb3 (patch)
treee39fd111e5a93db1f80405181d3bae57cfe9c4fb /roles/hyprcursor
parent0f49924acbb4799d4f9d3963b623612c1c64f75b (diff)
Add hyprcursor configurations to hyprland
Diffstat (limited to 'roles/hyprcursor')
-rw-r--r--roles/hyprcursor/defaults/main.yml3
-rw-r--r--roles/hyprcursor/meta/argument_specs.yml14
-rw-r--r--roles/hyprcursor/meta/main.yml11
-rw-r--r--roles/hyprcursor/tasks/main.yml25
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