mirror of
https://github.com/TECHNOFAB11/tmux2k.git
synced 2025-12-12 08:00: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*)
|
CYGWIN* | MINGW32* | MSYS* | MINGW*)
|
||||||
# leaving empty - TODO - windows compatability
|
# leaving empty - TODO - windows compatability
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*) ;;
|
|
||||||
|
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -91,7 +88,7 @@ battery_status() {
|
||||||
echo ''
|
echo ''
|
||||||
;;
|
;;
|
||||||
charging)
|
charging)
|
||||||
echo ''
|
echo ''
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo ''
|
echo ''
|
||||||
|
|
@ -100,8 +97,6 @@ battery_status() {
|
||||||
}
|
}
|
||||||
|
|
||||||
battery_label() {
|
battery_label() {
|
||||||
bat_perc=$1
|
|
||||||
|
|
||||||
if [ "$bat_perc" -gt 90 ]; then
|
if [ "$bat_perc" -gt 90 ]; then
|
||||||
echo " "
|
echo " "
|
||||||
elif [ "$bat_perc" -gt 75 ]; then
|
elif [ "$bat_perc" -gt 75 ]; then
|
||||||
|
|
@ -120,7 +115,7 @@ battery_label() {
|
||||||
main() {
|
main() {
|
||||||
bat_stat=$(battery_status)
|
bat_stat=$(battery_status)
|
||||||
bat_perc="$(battery_percent)"
|
bat_perc="$(battery_percent)"
|
||||||
bat_label=$(get_tmux_option "@tmux2k-battery-label" "$(battery_label "$bat_perc")")
|
bat_label="$(battery_label)"
|
||||||
|
|
||||||
if [ -z "$bat_stat" ]; then
|
if [ -z "$bat_stat" ]; then
|
||||||
echo "$bat_label $bat_perc%"
|
echo "$bat_label $bat_perc%"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue