summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--roles/hyprland/meta/main.yml1
-rw-r--r--roles/hyprland/templates/hyprland/autostart.conf.j21
-rw-r--r--roles/hyprtheme/files/scripts/theme-set5
-rw-r--r--roles/hyprtheme/tasks/template-theme.yml1
-rw-r--r--roles/hyprtheme/templates/theme/syshud.css.j23
-rw-r--r--roles/syshud/meta/argument_specs.yml6
-rw-r--r--roles/syshud/meta/main.yml12
-rw-r--r--roles/syshud/tasks/main.yml20
-rw-r--r--roles/syshud/templates/config.conf.j213
-rw-r--r--roles/syshud/templates/style.css.j260
10 files changed, 119 insertions, 3 deletions
diff --git a/roles/hyprland/meta/main.yml b/roles/hyprland/meta/main.yml
index c22bcc84..8794e8c6 100644
--- a/roles/hyprland/meta/main.yml
+++ b/roles/hyprland/meta/main.yml
@@ -11,6 +11,7 @@ dependencies:
- role: "waybar"
- role: "clipse"
- role: "tofi"
+ - role: "syshud"
- role: "hyprcursor"
- role: "hyprtheme"
galaxy_info:
diff --git a/roles/hyprland/templates/hyprland/autostart.conf.j2 b/roles/hyprland/templates/hyprland/autostart.conf.j2
index d110a6bd..164d1df9 100644
--- a/roles/hyprland/templates/hyprland/autostart.conf.j2
+++ b/roles/hyprland/templates/hyprland/autostart.conf.j2
@@ -5,3 +5,4 @@ exec-once = uwsm-app -- mako
exec-once = uwsm-app -- waybar
exec-once = uwsm-app -- swaybg -i ~/.config/hyprtheme/current/background -m fill
exec-once = uwsm-app -- clipse -listen
+exec-once = uwsm-app -- syshud
diff --git a/roles/hyprtheme/files/scripts/theme-set b/roles/hyprtheme/files/scripts/theme-set
index 2b7397e5..5d634e11 100644
--- a/roles/hyprtheme/files/scripts/theme-set
+++ b/roles/hyprtheme/files/scripts/theme-set
@@ -23,9 +23,8 @@ mv "$CURRENT_THEME_PATH.new" "$CURRENT_THEME_PATH"
pkill -x waybar || true
setsid uwsm-app -- waybar >/dev/null 2>&1 &
-
-# pkill -x swayosd-server || true
-# setsid uwsm-app -- swayosd-server >/dev/null 2>&1 &
+pkill -x syshud || true
+setsid uwsm-app -- syshud >/dev/null 2>&1 &
hyprctl reload >/dev/null 2>&1
diff --git a/roles/hyprtheme/tasks/template-theme.yml b/roles/hyprtheme/tasks/template-theme.yml
index d5dcab87..270b63e7 100644
--- a/roles/hyprtheme/tasks/template-theme.yml
+++ b/roles/hyprtheme/tasks/template-theme.yml
@@ -13,6 +13,7 @@
- "waybar.css"
- "clipse.json"
- "tofi.config"
+ - "syshud.css"
- name: "Template theme files for: {{ hyprtheme_name }}"
ansible.builtin.template:
diff --git a/roles/hyprtheme/templates/theme/syshud.css.j2 b/roles/hyprtheme/templates/theme/syshud.css.j2
new file mode 100644
index 00000000..4354efa5
--- /dev/null
+++ b/roles/hyprtheme/templates/theme/syshud.css.j2
@@ -0,0 +1,3 @@
+@define-color borders {{ accent }};
+@define-color theme_bg_color {{ background }};
+@define-color theme_fg_color {{ foreground }};
diff --git a/roles/syshud/meta/argument_specs.yml b/roles/syshud/meta/argument_specs.yml
new file mode 100644
index 00000000..1958a029
--- /dev/null
+++ b/roles/syshud/meta/argument_specs.yml
@@ -0,0 +1,6 @@
+---
+argument_specs:
+ main:
+ short_description: "Install syshud"
+ description: "Install syshud"
+ options: {}
diff --git a/roles/syshud/meta/main.yml b/roles/syshud/meta/main.yml
new file mode 100644
index 00000000..45b1fd50
--- /dev/null
+++ b/roles/syshud/meta/main.yml
@@ -0,0 +1,12 @@
+---
+dependencies:
+ - role: "yay"
+galaxy_info:
+ author: "a14m"
+ description: "Install syshud"
+ license: "MIT"
+ min_ansible_version: "2.18"
+ platforms:
+ - name: "ArchLinux"
+ versions:
+ - "all"
diff --git a/roles/syshud/tasks/main.yml b/roles/syshud/tasks/main.yml
new file mode 100644
index 00000000..05983848
--- /dev/null
+++ b/roles/syshud/tasks/main.yml
@@ -0,0 +1,20 @@
+---
+- name: "Ensure syshud is installed"
+ become: true
+ become_user: "aur_builder"
+ kewlfft.aur.aur:
+ name: "syshud"
+ state: "present"
+ use: "yay"
+
+- name: "Configure system defaults"
+ become: true
+ ansible.builtin.template:
+ src: "{{ item.src }}"
+ dest: "{{ item.dest }}"
+ mode: "0644"
+ loop:
+ - src: "config.conf.j2"
+ dest: "/usr/share/sys64/hud/config.conf"
+ - src: "style.css.j2"
+ dest: "/usr/share/sys64/hud/style.css"
diff --git a/roles/syshud/templates/config.conf.j2 b/roles/syshud/templates/config.conf.j2
new file mode 100644
index 00000000..19765ae1
--- /dev/null
+++ b/roles/syshud/templates/config.conf.j2
@@ -0,0 +1,13 @@
+[main]
+position=top-right
+orientation=h
+width=300
+height=50
+icon-size=18
+show-percentage=true
+margins=0 0 0 0
+timeout=3
+transition-time=0
+listeners=audio_in,audio_out,backlight
+backlight-path=
+keyboard-path=
diff --git a/roles/syshud/templates/style.css.j2 b/roles/syshud/templates/style.css.j2
new file mode 100644
index 00000000..cfaa6533
--- /dev/null
+++ b/roles/syshud/templates/style.css.j2
@@ -0,0 +1,60 @@
+/* vim: set filetype=css.ansible : */
+@import "{{ ansible_facts['env']['HOME'] }}/.config/hyprtheme/current/syshud.css";
+
+#syshud {
+ background: transparent;
+ color: @theme_fg_color;
+}
+
+#syshud .box_layout {
+ background: @theme_bg_color;
+ border-radius: 5px;
+ border: 2px solid @borders;
+ margin: 10px;
+}
+
+#syshud scale {
+ margin: 0px;
+ padding: 0px;
+}
+#syshud label {
+ color: @theme_fg_color;
+}
+
+/* Scale */
+#syshud scale {
+ padding: 0px;
+ min-height: 5px;
+ min-width: 5px;
+}
+#syshud scale trough {
+ border-radius: 0px;
+ background: alpha(currentColor, 0.1);
+ min-height: 5px;
+ min-width: 5px;
+ padding: 0px;
+}
+#syshud scale.horizontal highlight {
+ border-radius: 0px;
+ min-height: 5px;
+ min-width: 1px;
+ background: alpha(@theme_fg_color, 0.75);
+ margin: 0px;
+}
+#syshud scale slider {
+ background: transparent;
+ outline-color: transparent;
+ border-color: transparent;
+ color: transparent;
+ box-shadow: none;
+}
+
+/* Levels */
+#syshud .muted {
+}
+#syshud .low {
+}
+#syshud .medium {
+}
+#syshud .high {
+}