diff --git a/INSTALL.md b/INSTALL.md index 03362b6..1556ee2 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -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` diff --git a/scripts/dracula.sh b/scripts/dracula.sh index b33d8d2..bf9c146 100755 --- a/scripts/dracula.sh +++ b/scripts/dracula.sh @@ -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