Add battery percentage to status bar on macOS

This commit is contained in:
Kenneth Benzie 2019-08-30 16:55:17 +01:00
parent b6ee1bb677
commit cd1a73f304

View File

@ -120,8 +120,11 @@ setw -g status-left-style fg=colour240,bg=colour233
# Centre status style # Centre status style
setw -g status-style fg=colour240,bg=colour233 setw -g status-style fg=colour240,bg=colour233
# Right status style # Right status style, show data and time (and battery percentage on macOS).
setw -g status-right "%a %d-%m-%y %H:%M " if '[ "`uname`" = "Darwin" ]' \
'setw -g status-right "#(pmset -g batt | grep --color=never -Eo "\\d+%%")\
%a %d-%m-%y %H:%M "' \
'setw -g status-right "%a %d-%m-%y %H:%M "'
setw -g status-right-style fg=white,bg=colour233 setw -g status-right-style fg=white,bg=colour233
# Active window status style # Active window status style