added a percentage style to the battery indicator
This commit is contained in:
+13
-7
@@ -275,7 +275,7 @@ run 'cut -c3- ~/.tmux.conf | sh -s apply_configuration'
|
||||
# status_right_prefix="#{?client_prefix,#[fg=$tmux_conf_theme_prefix_fg]#[bg=$tmux_conf_theme_prefix_bg]#[bold]⌨ #[fg=$tmux_conf_theme_prefix_fg]#[bg=$tmux_conf_theme_status_bg]#[nobold],}"
|
||||
# fi
|
||||
# if [ x"$battery_enabled" = x"true" ] ; then
|
||||
# status_right_battery="${tmux_conf_battery:-#(cut -c3- ~/.tmux.conf | sh -s battery ${tmux_conf_battery_symbol:-block} ${tmux_conf_battery_symbol_count:-auto} \"${tmux_conf_battery_palette:-colour160,colour254,colour16}\" ${tmux_conf_battery_status:-enabled})} "
|
||||
# status_right_battery="${tmux_conf_battery:-#(cut -c3- ~/.tmux.conf | sh -s battery ${tmux_conf_battery_style:-bar} ${tmux_conf_battery_symbol:-block} ${tmux_conf_battery_symbol_count:-auto} \"${tmux_conf_battery_palette:-colour160,colour254,colour16}\" ${tmux_conf_battery_status:-enabled})} "
|
||||
# has_battery=$(eval echo \$${status_right_battery#\#})
|
||||
# if [ -n "$has_battery" ] && ([ x"$time_enabled" = x"true" ] || [ x"$date_enabled" = x"true" ]) ; then
|
||||
# status_right_battery="${status_right_battery}#[fg=$tmux_conf_theme_time_date_fg,nobold]$right_separator"
|
||||
@@ -410,10 +410,11 @@ run 'cut -c3- ~/.tmux.conf | sh -s apply_configuration'
|
||||
# return
|
||||
# fi
|
||||
#
|
||||
# battery_symbol=$1
|
||||
# battery_symbol_count=$2
|
||||
# battery_palette=$3
|
||||
# battery_status=$4
|
||||
# battery_style=$1
|
||||
# battery_symbol=$2
|
||||
# battery_symbol_count=$3
|
||||
# battery_palette=$4
|
||||
# battery_status=$5
|
||||
# if [ x"$battery_symbol_count" = x"auto" ]; then
|
||||
# columns=$(tmux -q display -p '#{client_width}' 2> /dev/null || echo 80)
|
||||
# if [ $columns -ge 80 ]; then
|
||||
@@ -437,13 +438,18 @@ run 'cut -c3- ~/.tmux.conf | sh -s apply_configuration'
|
||||
# fi
|
||||
# fi
|
||||
#
|
||||
# if [ x"$battery_style" = x"percentage" ] ; then
|
||||
# printf %.0f%% $(awk "BEGIN{print $charge * 100}")
|
||||
# return
|
||||
# fi
|
||||
#
|
||||
# if echo $battery_palette | grep -q -E '^heat|gradient(,[a-z0-9]{7,9})?$'; then
|
||||
# battery_style=$(echo $battery_palette | cut -d, -f1)
|
||||
# palette_style=$(echo $battery_palette | cut -d, -f1)
|
||||
# battery_bg=$(echo $battery_palette | cut -s -d, -f2)
|
||||
# battery_bg=${battery_bg:-colour16}
|
||||
# gradient="196 202 208 214 220 226 190 154 118 82 46"
|
||||
# heat="233 234 235 237 239 241 243 245 247 144 143 142 184 214 208 202 196"
|
||||
# eval palette=$(echo \$$battery_style)
|
||||
# eval palette=$(echo \$$palette_style)
|
||||
# count=$(echo $(echo $palette | wc -w))
|
||||
#
|
||||
# eval set -- "$palette"
|
||||
|
||||
Reference in New Issue
Block a user