Why
I had xfce4 panel, and I miss some informations like the remaining battery.
Code
Config polybar
In the config file ./config.polybar/config.
1 | [module/discharge] |
You also have to tell where gonna be the output.
In the config file:
1 | modules-right = filesystem xbacklight alsa pulseaudio wlan eth battery discharge date powermenu |
You have to add the name of your module, but it can be where you want.
Script
In ./config/polybar/discharge.sh
`
1 | #! /bin/bash |

It’s ugly, I will change the text later.