From 4cced84d89e68a74af8294f3c1b4b093197132e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaroslav=20de=20la=20Pe=C3=B1a=20Smirnov?= Date: Thu, 6 Apr 2023 02:16:18 +0300 Subject: waybar: batter energy consumption/charge rate --- dotfiles/.config/waybar/config | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'dotfiles/.config/waybar/config') 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": " {}", + "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 - }, + } } -- cgit v1.2.3