summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2026-01-15 15:01:19 +0100
committerAhmed Abdelhalim <[email protected]>2026-01-15 15:01:19 +0100
commit115f703928fc7b6ab2c591edcd025bab6c7a3ce8 (patch)
tree782f608aa554139a8306d391d1061e0de7edc665
parent99a4507fb0186f490ba6a4d35371f5fba5445b2d (diff)
Add role meta and initial theme setup using default theme
-rw-r--r--roles/hyprtheme/defaults/main.yml1
-rw-r--r--roles/hyprtheme/meta/argument_specs.yml14
-rw-r--r--roles/hyprtheme/meta/main.yml12
-rw-r--r--roles/hyprtheme/tasks/main.yml11
4 files changed, 38 insertions, 0 deletions
diff --git a/roles/hyprtheme/defaults/main.yml b/roles/hyprtheme/defaults/main.yml
index aef5809e..ec2b3877 100644
--- a/roles/hyprtheme/defaults/main.yml
+++ b/roles/hyprtheme/defaults/main.yml
@@ -1,2 +1,3 @@
---
hyprtheme_default_font: "JetBrainsMono Nerd Font"
+hyprtheme_default_theme: "everforest"
diff --git a/roles/hyprtheme/meta/argument_specs.yml b/roles/hyprtheme/meta/argument_specs.yml
new file mode 100644
index 00000000..f949da72
--- /dev/null
+++ b/roles/hyprtheme/meta/argument_specs.yml
@@ -0,0 +1,14 @@
+---
+argument_specs:
+ main:
+ short_description: "Install hyprland themes on ArchLinux"
+ description: "Install hyprland themes on ArchLinux"
+ options:
+ hyprtheme_default_theme:
+ description: "The initial default theme to be used"
+ type: "str"
+ default: "everforest"
+ hyprtheme_default_font:
+ description: "The default theme font to be used"
+ type: "str"
+ default: "JetBrainsMono Nerd Font"
diff --git a/roles/hyprtheme/meta/main.yml b/roles/hyprtheme/meta/main.yml
new file mode 100644
index 00000000..b0a348b6
--- /dev/null
+++ b/roles/hyprtheme/meta/main.yml
@@ -0,0 +1,12 @@
+---
+dependencies:
+ - role: "fonts"
+galaxy_info:
+ author: "a14m"
+ description: "Install hyprland themes"
+ license: "MIT"
+ min_ansible_version: "2.18"
+ platforms:
+ - name: "ArchLinux"
+ versions:
+ - "all"
diff --git a/roles/hyprtheme/tasks/main.yml b/roles/hyprtheme/tasks/main.yml
index cf1c4e35..7686df0d 100644
--- a/roles/hyprtheme/tasks/main.yml
+++ b/roles/hyprtheme/tasks/main.yml
@@ -43,3 +43,14 @@
loop:
- "scripts/theme-set"
- "scripts/theme-bg-next"
+
+- name: "Set default theme"
+ ansible.builtin.command:
+ # Running the command creates the symlinks for the current themes, using the hyprland.conf file to avoid rerunning
+ # This will run only if there is no current theme in place
+ # This will ignore the errors in the script, because the script restarts some hyprland services, which
+ # will fail on ssh connection, but having the theme files placed in the right directory will make sure that
+ # the first setup of hyprtheme is working and doesn't show errors on first boot
+ cmd: "{{ ansible_env.HOME }}/.config/hyprtheme/scripts/theme-set {{ hyprtheme_default_theme }}"
+ creates: "{{ ansible_env.HOME }}/.config/hyprtheme/current/hyprland.conf"
+ failed_when: false