Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/battery_percentage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ print_battery_percentage() {
battery=$(find /sys/class/power_supply/*/capacity | tail -n1)
cat "$battery"
elif command_exists "pmset"; then
pmset -g batt | grep -o "[0-9]\{1,3\}%"
pmset -g batt | grep --color=never -o "[0-9]\{1,3\}%"
elif command_exists "acpi"; then
acpi -b | grep -m 1 -Eo "[0-9]+%"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
acpi -b | grep -m 1 -Eo "[0-9]+%"
acpi -b | grep --color=never -m 1 -Eo "[0-9]+%"

elif command_exists "upower"; then
Expand Down