Add system-info macOS user agent

The `system-info` directory contains scripts and configuration files to
install and remove a `launchd` user agent on macOS which collects
information about the system and outputs it to the file
`~/.cache/tmux/system-info`. This file is then read periodically by
`tmux` and the contents displayed in the status line.
This commit is contained in:
2021-02-16 23:55:02 +00:00
parent 1d2a5f249d
commit d96a1b7438
6 changed files with 52 additions and 5 deletions

View File

@@ -124,11 +124,8 @@ setw -g status-left-style fg=colour240,bg=colour233
# Centre status style
setw -g status-style fg=colour240,bg=colour233
# Right status style, show data and time (and battery percentage on macOS).
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 "'
# Right status style shows system info, date, and time.
setw -g status-right "#(cat ~/.cache/tmux/system-info) %a %d-%m-%y %H:%M "
setw -g status-right-style fg=white,bg=colour233
# Active window status style