Merge branch 'master' of https://github.com/dracula/tmux into freebsd_support

This commit is contained in:
Ethan Edwards 2020-09-03 15:43:07 -04:00
commit f5fd574501
2 changed files with 22 additions and 8 deletions

View file

@ -29,3 +29,4 @@ Customize the status bar by adding any of these lines to your .tmux.conf as desi
* Enable cpu usage: `set -g @dracula-cpu-usage true` * Enable cpu usage: `set -g @dracula-cpu-usage true`
* Enable ram usage: `set -g @dracula-ram-usage true` * Enable ram usage: `set -g @dracula-ram-usage true`
* Enable gpu usage: `set -g @dracula-gpu-usage true` * Enable gpu usage: `set -g @dracula-gpu-usage true`
* Swap date to day/month `set -g @dracula-day-month true`

View file

@ -31,6 +31,7 @@ main()
show_cpu_usage=$(get_tmux_option "@dracula-cpu-usage" false) show_cpu_usage=$(get_tmux_option "@dracula-cpu-usage" false)
show_ram_usage=$(get_tmux_option "@dracula-ram-usage" false) show_ram_usage=$(get_tmux_option "@dracula-ram-usage" false)
show_gpu_usage=$(get_tmux_option "@dracula-gpu-usage" false) show_gpu_usage=$(get_tmux_option "@dracula-gpu-usage" false)
show_day_month=$(get_tmux_option "@dracula-day-month" false)
show_time=$(get_tmux_option "@dracula-show-time" true) show_time=$(get_tmux_option "@dracula-show-time" true)
show_refresh=$(get_tmux_option "@dracula-refresh-rate" 5) show_refresh=$(get_tmux_option "@dracula-refresh-rate" 5)
@ -141,11 +142,17 @@ main()
powerbg=${orange} powerbg=${orange}
fi fi
if $show_military; then # military time if $show_time; then
if $show_day_month && $show_military ; then # military time and dd/mm
tmux set-option -ga status-right "#[fg=${dark_purple},bg=${powerbg},nobold,nounderscore,noitalics] ${right_sep}#[fg=${white},bg=${dark_purple}] %a %d/%m %R ${timezone} "
elif $show_military; then # only military time
tmux set-option -ga status-right "#[fg=${dark_purple},bg=${powerbg},nobold,nounderscore,noitalics] ${right_sep}#[fg=${white},bg=${dark_purple}] %a %m/%d %R ${timezone} " tmux set-option -ga status-right "#[fg=${dark_purple},bg=${powerbg},nobold,nounderscore,noitalics] ${right_sep}#[fg=${white},bg=${dark_purple}] %a %m/%d %R ${timezone} "
elif $show_day_month; then # only dd/mm
tmux set-option -ga status-right "#[fg=${dark_purple},bg=${powerbg},nobold,nounderscore,noitalics] ${right_sep}#[fg=${white},bg=${dark_purple}] %a %d/%m %I:%M %p ${timezone} "
else else
tmux set-option -ga status-right "#[fg=${dark_purple},bg=${powerbg},nobold,nounderscore,noitalics] ${right_sep}#[fg=${white},bg=${dark_purple}] %a %m/%d %I:%M %p ${timezone} " tmux set-option -ga status-right "#[fg=${dark_purple},bg=${powerbg},nobold,nounderscore,noitalics] ${right_sep}#[fg=${white},bg=${dark_purple}] %a %m/%d %I:%M %p ${timezone} "
fi fi
fi
tmux set-window-option -g window-status-current-format "#[fg=${gray},bg=${dark_purple}]${left_sep}#[fg=${white},bg=${dark_purple}] #I #W #[fg=${dark_purple},bg=${gray}]${left_sep}" tmux set-window-option -g window-status-current-format "#[fg=${gray},bg=${dark_purple}]${left_sep}#[fg=${white},bg=${dark_purple}] #I #W #[fg=${dark_purple},bg=${gray}]${left_sep}"
@ -178,11 +185,17 @@ main()
tmux set-option -ga status-right "#[fg=${dark_gray},bg=${orange}] #(cat $current_dir/../data/weather.txt) " tmux set-option -ga status-right "#[fg=${dark_gray},bg=${orange}] #(cat $current_dir/../data/weather.txt) "
fi fi
if $show_military; then # military time if $show_time; then
if $show_day_month && $show_military ; then # military time and dd/mm
tmux set-option -ga status-right "#[fg=${white},bg=${dark_purple}] %a %d/%m %R ${timezone} "
elif $show_military; then # only military time
tmux set-option -ga status-right "#[fg=${white},bg=${dark_purple}] %a %m/%d %R ${timezone} " tmux set-option -ga status-right "#[fg=${white},bg=${dark_purple}] %a %m/%d %R ${timezone} "
elif $show_day_month; then # only dd/mm
tmux set-option -ga status-right "#[fg=${white},bg=${dark_purple}] %a %d/%m %I:%M %p ${timezone} "
else else
tmux set-option -ga status-right "#[fg=${white},bg=${dark_purple}] %a %m/%d %I:%M %p ${timezone} " tmux set-option -ga status-right "#[fg=${white},bg=${dark_purple}] %a %m/%d %I:%M %p ${timezone} "
fi fi
fi
tmux set-window-option -g window-status-current-format "#[fg=${white},bg=${dark_purple}] #I #W " tmux set-window-option -g window-status-current-format "#[fg=${white},bg=${dark_purple}] #I #W "