Added multiple battery support

This commit is contained in:
Steins7 2024-09-04 17:02:12 +02:00
parent 5af3ab092b
commit 4279c0549e

11
config
View File

@ -6,7 +6,7 @@
// Choose the order of the modules
"modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["sway/window"],
"modules-right": ["idle_inhibitor", "pulseaudio", "network", "cpu", "memory", "temperature", "custom/bat1", "clock", "tray"],
"modules-right": ["idle_inhibitor", "pulseaudio", "network", "cpu", "memory", "temperature", "custom/bat0", "custom/bat1", "clock", "tray"],
// Modules configuration
// "sway/workspaces": {
// "disable-scroll": true,
@ -111,12 +111,19 @@
//"battery#bat2": {
// "bat": "BAT2"
//},
"custom/bat0": {
"exec": "~/.config/waybar/scripts/battery.py BAT0",
"return-type": "json",
"format": " {} {icon} ",
"format-icons": ["", "", "", "", ""],
"tooltip": true
},
"custom/bat1": {
"exec": "~/.config/waybar/scripts/battery.py BAT1",
"return-type": "json",
"format": " {} {icon} ",
"format-icons": ["", "", "", "", ""],
"tooltip": false
"tooltip": true
},
"network": {
// "interface": "wlp2*", // (Optional) To force the use of this interface