We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d64c7fe commit 7810c8dCopy full SHA for 7810c8d
scripts/battery_percentage.sh
@@ -10,6 +10,9 @@ print_battery_percentage() {
10
pmset -g batt | grep -o "[0-9]\{1,3\}%"
11
elif command_exists "upower"; then
12
local batteries=( $(upower -e | grep battery) )
13
+ if [ -z "$batteries" ]; then
14
+ return
15
+ fi
16
local energy
17
local energy_full
18
for battery in ${batteries[@]}; do
0 commit comments