mirror of
https://github.com/TECHNOFAB11/tmux2k.git
synced 2025-12-11 23:50:08 +01:00
fix: battery segment
This commit is contained in:
parent
c89b609980
commit
261da8813c
1 changed files with 3 additions and 8 deletions
|
|
@ -54,9 +54,6 @@ battery_percent() {
|
|||
CYGWIN* | MINGW32* | MSYS* | MINGW*)
|
||||
# leaving empty - TODO - windows compatability
|
||||
;;
|
||||
|
||||
*) ;;
|
||||
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
@ -91,7 +88,7 @@ battery_status() {
|
|||
echo ''
|
||||
;;
|
||||
charging)
|
||||
echo ''
|
||||
echo ''
|
||||
;;
|
||||
*)
|
||||
echo ''
|
||||
|
|
@ -100,8 +97,6 @@ battery_status() {
|
|||
}
|
||||
|
||||
battery_label() {
|
||||
bat_perc=$1
|
||||
|
||||
if [ "$bat_perc" -gt 90 ]; then
|
||||
echo " "
|
||||
elif [ "$bat_perc" -gt 75 ]; then
|
||||
|
|
@ -119,8 +114,8 @@ battery_label() {
|
|||
|
||||
main() {
|
||||
bat_stat=$(battery_status)
|
||||
bat_perc=" $(battery_percent)"
|
||||
bat_label=$(get_tmux_option "@tmux2k-battery-label" "$(battery_label "$bat_perc")")
|
||||
bat_perc="$(battery_percent)"
|
||||
bat_label="$(battery_label)"
|
||||
|
||||
if [ -z "$bat_stat" ]; then
|
||||
echo "$bat_label $bat_perc%"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue