diff options
| author | Blake Romero <blake@blkrom.com> | 2025-07-17 12:27:47 +0100 |
|---|---|---|
| committer | Blake Romero <blake@blkrom.com> | 2025-07-17 12:27:47 +0100 |
| commit | 4c954840680f72007054050493551b2c222a10f1 (patch) | |
| tree | 9d4dc654c64e8cdd58a4ad3385008c83d15089b2 | |
| parent | 1b18d9eb3de646ee8a1b5f46f58406228c368584 (diff) | |
Update yambar battery module to use more icons and script
| -rwxr-xr-x | dot-config/yambar/config.yml | 61 | ||||
| -rwxr-xr-x | dot-config/yambar/scripts/notify-bat | 3 |
2 files changed, 41 insertions, 23 deletions
diff --git a/dot-config/yambar/config.yml b/dot-config/yambar/config.yml index d4f96ac..91d1bfa 100755 --- a/dot-config/yambar/config.yml +++ b/dot-config/yambar/config.yml @@ -41,39 +41,54 @@ define: - &volume-down volume down 1% - &brightness-up brightnessctl set +1% - &brightness-down brightnessctl --min-value=10 set 1-% + + # Scripts - &pacman-notify ~/.config/yambar/scripts/pacman-notify - &pacman-update ~/.config/yambar/scripts/pacman-update - &newsboat-open ~/.config/yambar/scripts/newsboat-open + - ¬ify-bat ~/.config/yambar/scripts/notify-bat # MODULES battery: &battery name: BAT0 - poll-interval: 3000 + poll-interval: 5000 content: map: + on-click: *notify-bat + foreground: *teal + margin: *margin + default: {string: {text: "{state}"}} conditions: - ~(state == "unknown"): - map: - default: {string: {text: "{state}"}} - conditions: - state == "discharging": - - ramp: - tag: capacity - items: - - string: {text: "({estimate}) {capacity}% ", margin: *margin, foreground: *RED} - - string: {text: "({estimate}) {capacity}% ", margin: *margin, foreground: *yellow} - - string: {text: "({estimate}) {capacity}% ", margin: *margin, foreground: *teal} - - string: {text: "({estimate}) {capacity}% ", margin: *margin, foreground: *teal} - - string: {text: "({estimate}) {capacity}% ", margin: *margin, foreground: *teal} - state == "charging": - - ramp: - tag: capacity - items: - - string: {text: "({estimate}) {capacity}% ", margin: *margin, foreground: *RED} - - string: {text: "({estimate}) {capacity}% ", margin: *margin, foreground: *YLW} - - string: {text: "({estimate}) {capacity}% ", margin: *margin, foreground: *GRN} - state == "full": - - string: {text: "{capacity}% ", margin: *margin, foreground: *green} + state == "discharging": + - ramp: + tag: capacity + items: + - string: {text: "{capacity}% ", foreground: *RED} + - string: {text: "{capacity}% ", foreground: *orange} + - string: {text: "{capacity}% ", foreground: *yellow} + - string: {text: "{capacity}% ", foreground: *yellow} + - string: {text: "{capacity}% "} + - string: {text: "{capacity}% "} + - string: {text: "{capacity}% "} + - string: {text: "{capacity}% "} + - string: {text: "{capacity}% "} + - string: {text: "{capacity}% "} + state == "charging": + - ramp: + tag: capacity + items: + - string: {text: "({estimate}) {capacity}% ", foreground: *RED} + - string: {text: "({estimate}) {capacity}% ", foreground: *orange} + - string: {text: "({estimate}) {capacity}% ", foreground: *yellow} + - string: {text: "({estimate}) {capacity}% ", foreground: *yellow} + - string: {text: "({estimate}) {capacity}% "} + - string: {text: "({estimate}) {capacity}% "} + - string: {text: "({estimate}) {capacity}% "} + - string: {text: "({estimate}) {capacity}% "} + - string: {text: "({estimate}) {capacity}% "} + - string: {text: "({estimate}) {capacity}% "} + state == "full": + - string: {text: "{capacity}% ", foreground: *green} pipewire: &pipewire anchors: diff --git a/dot-config/yambar/scripts/notify-bat b/dot-config/yambar/scripts/notify-bat new file mode 100755 index 0000000..506e223 --- /dev/null +++ b/dot-config/yambar/scripts/notify-bat @@ -0,0 +1,3 @@ +#!/bin/sh + +notify-send "Battery" "Duration remaining: $(acpi | cut -d' ' -f5)" |
