summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--roles/battop/meta/argument_specs.yml6
-rw-r--r--roles/battop/meta/main.yml12
-rw-r--r--roles/battop/tasks/main.yml8
-rw-r--r--roles/hyprland/meta/main.yml1
-rw-r--r--roles/hyprland/templates/rules.conf.j22
-rw-r--r--roles/waybar/templates/waybar/config.jsonc.j23
6 files changed, 30 insertions, 2 deletions
diff --git a/roles/battop/meta/argument_specs.yml b/roles/battop/meta/argument_specs.yml
new file mode 100644
index 00000000..0bcf6024
--- /dev/null
+++ b/roles/battop/meta/argument_specs.yml
@@ -0,0 +1,6 @@
+---
+argument_specs:
+ main:
+ short_description: "Install battop"
+ description: "Install battop"
+ options: {}
diff --git a/roles/battop/meta/main.yml b/roles/battop/meta/main.yml
new file mode 100644
index 00000000..c6bdeea3
--- /dev/null
+++ b/roles/battop/meta/main.yml
@@ -0,0 +1,12 @@
+---
+dependencies:
+ - role: "yay"
+galaxy_info:
+ author: "a14m"
+ description: "Install battop"
+ license: "MIT"
+ min_ansible_version: "2.18"
+ platforms:
+ - name: "ArchLinux"
+ versions:
+ - "all"
diff --git a/roles/battop/tasks/main.yml b/roles/battop/tasks/main.yml
new file mode 100644
index 00000000..95fcb84b
--- /dev/null
+++ b/roles/battop/tasks/main.yml
@@ -0,0 +1,8 @@
+---
+- name: "Ensure battop is installed"
+ become: true
+ become_user: "aur_builder"
+ kewlfft.aur.aur:
+ name: "battop"
+ state: "present"
+ use: "yay"
diff --git a/roles/hyprland/meta/main.yml b/roles/hyprland/meta/main.yml
index a657398b..47d97237 100644
--- a/roles/hyprland/meta/main.yml
+++ b/roles/hyprland/meta/main.yml
@@ -11,6 +11,7 @@ dependencies:
- role: "font"
- role: "wlctl"
- role: "btop"
+ - role: "battop"
- role: "bluetui"
- role: "wiremix"
- role: "waybar"
diff --git a/roles/hyprland/templates/rules.conf.j2 b/roles/hyprland/templates/rules.conf.j2
index fe90ea0c..a635029a 100644
--- a/roles/hyprland/templates/rules.conf.j2
+++ b/roles/hyprland/templates/rules.conf.j2
@@ -10,7 +10,7 @@ windowrule = center on, match:tag floating-window
windowrule = size 875 600, match:tag floating-window
windowrule = stay_focused on, match:tag floating-window
-windowrule = tag +floating-window, match:class work.kartoffln.(bluetui|btop|wiremix|wlctl|clipse)
+windowrule = tag +floating-window, match:class work.kartoffln.(bluetui|btop|battop|wiremix|wlctl|clipse)
windowrule = float on, match:class org.gnome.Calculator
# Picture-in-picture overlays
diff --git a/roles/waybar/templates/waybar/config.jsonc.j2 b/roles/waybar/templates/waybar/config.jsonc.j2
index 2fb0b4bd..a8ccba81 100644
--- a/roles/waybar/templates/waybar/config.jsonc.j2
+++ b/roles/waybar/templates/waybar/config.jsonc.j2
@@ -144,7 +144,8 @@
"states": {
"warning": 20,
"critical": 10
- }
+ },
+ "on-click-right": "/etc/xdg/waybar/scripts/launch-tui battop"
},
"custom/power" : {
"interval": "once",