aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dotfiles/.config/waybar/config11
-rw-r--r--dotfiles/.config/waybar/style.css1
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;