Update dot_config/polybar/scripts/executable_polybar_bluetooth_speaker.sh
Update dot_config/polybar/scripts/executable_polybar_custom_time.sh Update dot_config/polybar/scripts/executable_polybar_dunst_indicator.sh Update dot_config/polybar/scripts/executable_polybar_healthbar.sh Update dot_config/polybar/scripts/executable_polybar_net_indicator.sh Update dot_config/polybar/scripts/executable_polybar_net_speed.sh Update dot_config/polybar/scripts/executable_polybar_redshift_indicator.sh Update dot_config/polybar/scripts/executable_polybar_wifibar.sh
This commit is contained in:
parent
8b2408dafd
commit
fd95dd8b8f
8 changed files with 15 additions and 10 deletions
|
@ -12,7 +12,7 @@
|
|||
# Original idea for calculating the battery % is not mine, unfortunately
|
||||
# I don't remember the source.
|
||||
|
||||
source colors.sh
|
||||
source ~/.config/polybar/scripts/colors.sh
|
||||
|
||||
healthbar_print() {
|
||||
|
||||
|
@ -50,6 +50,11 @@ healthbar_print() {
|
|||
battery_max=$(("$battery_max_0 + $battery_max_1"))
|
||||
|
||||
battery_percent=$(("$battery_level * 100"))
|
||||
|
||||
if [ "$battery_max" -eq "0" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
battery_percent=$(("$battery_percent / $battery_max"))
|
||||
|
||||
# notify-send "Battery below 90%"
|
||||
|
@ -101,4 +106,4 @@ healthbar_print() {
|
|||
fi
|
||||
}
|
||||
|
||||
healthbar_print
|
||||
healthbar_print
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue