diff options
author | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2023-04-06 02:16:18 +0300 |
---|---|---|
committer | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2023-04-12 01:49:18 +0300 |
commit | 4cced84d89e68a74af8294f3c1b4b093197132e7 (patch) | |
tree | aae744540614bad6e009571404010d7bce20ff83 /dotfiles/.config/waybar | |
parent | 48c276f78eb39864f7bf66420e4294d2c3ad641c (diff) | |
download | swayrice-4cced84d89e68a74af8294f3c1b4b093197132e7.tar.gz swayrice-4cced84d89e68a74af8294f3c1b4b093197132e7.zip |
waybar: batter energy consumption/charge rate
Diffstat (limited to 'dotfiles/.config/waybar')
-rw-r--r-- | dotfiles/.config/waybar/config | 11 | ||||
-rw-r--r-- | dotfiles/.config/waybar/style.css | 1 |
2 files changed, 11 insertions, 1 deletions
diff --git a/dotfiles/.config/waybar/config b/dotfiles/.config/waybar/config index c807ba4..35f7c4d 100644 --- a/dotfiles/.config/waybar/config +++ b/dotfiles/.config/waybar/config @@ -19,6 +19,7 @@ "custom/mail-status", "custom/pac-status", "custom/news-status", + "custom/batwatt", "memory", "custom/torrent-status", "network", @@ -217,9 +218,17 @@ "interval": 180, "exec": "bards4battery" }, + "custom/batwatt": { + "format": "<span color=\"#5b8277\"></span> {}", + "interval": 10, + "exec-if": "test -e /sys/class/power_supply/BAT0", + "exec": "echo print\\(\\'{}W\\'.format\\($(grep 'POWER_SUPPLY_POWER_NOW' /sys/class/power_supply/BAT0/uevent | awk -F '=' '{print $2}')/1000000\\)\\) | python", + "exec-on-event": true, + "on-click": "" + }, "custom/swaykbd": { "format": "{}", "exec": "swaykbd", "tooltip": false - }, + } } diff --git a/dotfiles/.config/waybar/style.css b/dotfiles/.config/waybar/style.css index 3d6a057..a7636b4 100644 --- a/dotfiles/.config/waybar/style.css +++ b/dotfiles/.config/waybar/style.css @@ -59,6 +59,7 @@ window#waybar { #custom-mail-status, #custom-news-status, #custom-waybar-mpris, +#custom-batwatt, #custom-torrent-status { color: #fdf6e3; padding: 0 6px; |