Merge pull request #23 from ethancedwards8/master

Adding military time functionality
This commit is contained in:
Dane Williams 2020-05-20 19:50:38 -07:00 committed by GitHub
commit ce678ab116
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 3 deletions

View file

@ -20,3 +20,4 @@ Customize the status bar by adding any of these lines to your .tmux.conf as desi
* Disable weather functionality: `set -g @dracula-show-weather false`
* Switch from default fahrenheit to celsius: `set -g @dracula-show-fahrenheit false`
* Enable powerline symbols: `set -g @dracula-show-powerline true`
* Enable military time: `set -g @dracula-military-time true`

View file

@ -21,6 +21,7 @@ main()
show_weather=$(get_tmux_option "@dracula-show-weather" true)
show_fahrenheit=$(get_tmux_option "@dracula-show-fahrenheit" true)
show_powerline=$(get_tmux_option "@dracula-show-powerline" false)
show_military=$(get_tmux_option "@dracula-military-time" false)
# Dracula Color Pallette
white='#f8f8f2'
@ -85,7 +86,12 @@ main()
powerbg=${orange}
fi
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 #(date +%Z) "
if $show_military; then
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 #(date +%Z) "
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 #(date +%Z) "
fi
# window tabs
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}"
else
@ -105,8 +111,12 @@ main()
tmux set-option -ga status-right "#[fg=${dark_gray},bg=${orange}] #(cat $current_dir/../data/weather.txt) "
fi
tmux set-option -ga status-right "#[fg=${white},bg=${dark_purple}] %a %m/%d %I:%M %p #(date +%Z) "
if $show_military; then
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 #(date +%Z) "
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 #(date +%Z) "
fi
# window tabs
tmux set-window-option -g window-status-current-format "#[fg=${white},bg=${dark_purple}] #I #W "