Merge pull request #62 from playonverbs/master
Add flag for dd/mm date format that works with military time.
This commit is contained in:
commit
c09e371d6d
2 changed files with 22 additions and 10 deletions
|
@ -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 ram usage: `set -g @dracula-ram-usage true`
|
||||
* Enable gpu usage: `set -g @dracula-gpu-usage true`
|
||||
* Swap date to day/month `set -g @dracula-day-month true`
|
||||
|
|
|
@ -31,6 +31,7 @@ main()
|
|||
show_cpu_usage=$(get_tmux_option "@dracula-cpu-usage" false)
|
||||
show_ram_usage=$(get_tmux_option "@dracula-ram-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_refresh=$(get_tmux_option "@dracula-refresh-rate" 5)
|
||||
|
||||
|
@ -140,12 +141,17 @@ main()
|
|||
tmux set-option -ga status-right "#[fg=${orange},bg=${powerbg},nobold,nounderscore,noitalics] ${right_sep}#[fg=${dark_gray},bg=${orange}] #(cat $current_dir/../data/weather.txt)"
|
||||
powerbg=${orange}
|
||||
fi
|
||||
|
||||
if $show_time; then
|
||||
if $show_military; then # 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} "
|
||||
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} "
|
||||
fi
|
||||
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} "
|
||||
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
|
||||
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
|
||||
|
||||
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}"
|
||||
|
@ -180,12 +186,17 @@ main()
|
|||
fi
|
||||
|
||||
if $show_time; then
|
||||
if $show_military; then # military time
|
||||
tmux set-option -ga status-right "#[fg=${white},bg=${dark_purple}] %a %m/%d %R ${timezone} "
|
||||
else
|
||||
tmux set-option -ga status-right "#[fg=${white},bg=${dark_purple}] %a %m/%d %I:%M %p ${timezone} "
|
||||
fi
|
||||
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} "
|
||||
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
|
||||
tmux set-option -ga status-right "#[fg=${white},bg=${dark_purple}] %a %m/%d %I:%M %p ${timezone} "
|
||||
fi
|
||||
fi
|
||||
|
||||
tmux set-window-option -g window-status-current-format "#[fg=${white},bg=${dark_purple}] #I #W "
|
||||
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue