feat: improve light themes
This commit is contained in:
parent
84253ae979
commit
8e93542cc2
4 changed files with 96 additions and 13 deletions
|
@ -49,7 +49,7 @@ main() {
|
|||
# shellcheck disable=1091
|
||||
source "${CURRENT_DIR}/src/palette_gruvbox_light256.sh"
|
||||
# shellcheck disable=1091
|
||||
source "${CURRENT_DIR}/src/theme_gruvbox_light.sh"
|
||||
source "${CURRENT_DIR}/src/theme_gruvbox_light256.sh"
|
||||
;;
|
||||
dark)
|
||||
# shellcheck disable=1091
|
||||
|
@ -80,7 +80,11 @@ main() {
|
|||
)
|
||||
|
||||
case $_theme in
|
||||
light | light256)
|
||||
light256)
|
||||
# light256 have slightly different colors placement then regular light 16-bit
|
||||
theme_set_light256 "${theme_args[@]}"
|
||||
;;
|
||||
light)
|
||||
theme_set_light "${theme_args[@]}"
|
||||
;;
|
||||
dark | dark256 | *)
|
||||
|
|
|
@ -28,9 +28,9 @@ theme_set_dark() {
|
|||
tmux_append_setwo "window-status-activity-style" "bg=${col_bg1},fg=${col_fg3}"
|
||||
|
||||
# active window title colors
|
||||
local active_window_title_bg=${col_yellow2}
|
||||
if [[ "$_statusbar_alpha" == "true" ]]; then active_window_title_bg="default"; fi
|
||||
tmux_append_setwo "window-status-current-style" "bg=${active_window_title_bg},fg=${col_bg1}" # TODO cosider removing red!
|
||||
local _active_window_title_bg=${col_yellow2}
|
||||
if [[ "$_statusbar_alpha" == "true" ]]; then _active_window_title_bg="default"; fi
|
||||
tmux_append_setwo "window-status-current-style" "bg=${_active_window_title_bg},fg=${col_bg1}" # TODO cosider removing red!
|
||||
|
||||
# pane border
|
||||
tmux_append_seto "pane-active-border-style" "fg=${col_fg2}"
|
||||
|
|
|
@ -5,25 +5,32 @@
|
|||
#
|
||||
# shellcheck disable=SC2154
|
||||
theme_set_light() {
|
||||
local _left_status_value _right_status_value _window_status_current_format _window_status_format
|
||||
local _left_status_a _right_status_x _right_status_y _right_status_z _statusbar_alpha
|
||||
_left_status_a=$1
|
||||
_right_status_x=$2
|
||||
_right_status_y=$3
|
||||
_right_status_z=$4
|
||||
_statusbar_alpha=$5
|
||||
|
||||
tmux_append_seto "status" "on"
|
||||
|
||||
# default statusbar color
|
||||
tmux_append_seto "status-style" "bg=${col_bg1},fg=${col_fg1}"
|
||||
# default statusbar bg color
|
||||
local _statusbar_bg="${col_bg1}"
|
||||
if [[ "$_statusbar_alpha" == "true" ]]; then _statusbar_bg="default"; fi
|
||||
tmux_append_seto "status-style" "bg=${_statusbar_bg},fg=${col_fg1}"
|
||||
|
||||
# default window title colors
|
||||
tmux_append_setwo "window-status-style" "bg=${col_yellow2},fg=${col_bg1}"
|
||||
local _window_title_bg=${col_yellow2}
|
||||
if [[ "$_statusbar_alpha" == "true" ]]; then _window_title_bg="default"; fi
|
||||
tmux_append_setwo "window-status-style" "bg=${_window_title_bg},fg=${col_bg1}"
|
||||
|
||||
# default window with an activity alert
|
||||
tmux_append_setwo "window-status-activity-style" "bg=${col_bg1},fg=${col_fg3}"
|
||||
|
||||
# active window title colors
|
||||
tmux_append_setwo "window-status-current-style" "bg=default,fg=${col_bg1}" # TODO cosider removing red!
|
||||
local _active_window_title_bg=${col_yellow2}
|
||||
if [[ "$_statusbar_alpha" == "true" ]]; then _active_window_title_bg="default"; fi
|
||||
tmux_append_setwo "window-status-current-style" "bg=${_active_window_title_bg},fg=${col_bg1}" # TODO cosider removing red!
|
||||
|
||||
# pane border
|
||||
tmux_append_seto "pane-active-border-style" "fg=${col_fg2}"
|
||||
|
@ -54,8 +61,19 @@ theme_set_light() {
|
|||
tmux_append_setwo "window-status-separator" ""
|
||||
|
||||
tmux_append_seto "status-left" "#[bg=${col_bg3},fg=${col_fg3}] ${_left_status_a} #[bg=${col_bg1},fg=${col_bg3},nobold,noitalics,nounderscore]"
|
||||
tmux_append_seto "status-right" "#[bg=${col_bg1},fg=${col_bg2},nobold,nounderscore,noitalics]#[bg=${col_bg2},fg=${col_fg4}] ${_right_status_x} ${_right_status_y} #[bg=${col_bg2},fg=${col_fg3},nobold,noitalics,nounderscore]#[bg=${col_fg3},fg=${col_bg1}] ${_right_status_z}"
|
||||
|
||||
tmux_append_setwo "window-status-current-format" "#[bg=${col_yellow2},fg=${col_bg1},nobold,noitalics,nounderscore]#[bg=${col_yellow2},fg=${col_bg2}] #I #[bg=${col_yellow2},fg=${col_bg2},bold] #W#{?window_zoomed_flag,*Z,} #[bg=${col_bg1},fg=${col_yellow2},nobold,noitalics,nounderscore]"
|
||||
tmux_append_setwo "window-status-format" "#[bg=${col_bg2},fg=${col_bg1},noitalics]#[bg=${col_bg2},fg=${col_fg1}] #I #[bg=${col_bg2},fg=${col_fg1}] #W #[bg=${col_bg1},fg=${col_bg2},noitalics]"
|
||||
# right status
|
||||
local _status_right_bg=${col_bg1}
|
||||
if [[ "$_statusbar_alpha" == "true" ]]; then _status_right_bg="default"; fi
|
||||
tmux_append_seto "status-right" "#[bg=${_status_right_bg},fg=${col_bg2},nobold,nounderscore,noitalics]#[bg=${col_bg2},fg=${col_fg4}] ${_right_status_x} ${_right_status_y} #[bg=${col_bg2},fg=${col_fg3},nobold,noitalics,nounderscore]#[bg=${col_fg3},fg=${col_bg1}] ${_right_status_z}"
|
||||
|
||||
# current window
|
||||
local _current_window_status_format_bg=${col_bg1}
|
||||
if [[ "$_statusbar_alpha" == "true" ]]; then _current_window_status_format_bg="default"; fi
|
||||
tmux_append_setwo "window-status-current-format" "#[bg=${col_yellow2},fg=${col_bg1},nobold,noitalics,nounderscore]#[bg=${col_yellow2},fg=${col_bg2}] #I #[bg=${col_yellow2},fg=${col_bg2},bold] #W#{?window_zoomed_flag,*Z,} #{?window_end_flag,#[bg=${_current_window_status_format_bg}],#[bg=${col_bg1}]}#[fg=${col_yellow2},nobold,noitalics,nounderscore]"
|
||||
|
||||
# default window
|
||||
local _default_window_status_format_bg=${col_bg1}
|
||||
if [[ "$_statusbar_alpha" == "true" ]]; then _default_window_status_format_bg="default"; fi
|
||||
tmux_append_setwo "window-status-format" "#[bg=${col_bg2},fg=${col_bg1},noitalics]#[bg=${col_bg2},fg=${col_fg1}] #I #[bg=${col_bg2},fg=${col_fg1}] #W #{?window_end_flag,#[bg=${_default_window_status_format_bg}],#[bg=${col_bg1}]}#[fg=${col_bg2},noitalics]"
|
||||
}
|
||||
|
|
61
src/theme_gruvbox_light256.sh
Normal file
61
src/theme_gruvbox_light256.sh
Normal file
|
@ -0,0 +1,61 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Themes may use different colors in sets therefore we setup dark and light
|
||||
# separately.
|
||||
#
|
||||
# shellcheck disable=SC2154
|
||||
theme_set_light256() {
|
||||
local _left_status_value _right_status_value _window_status_current_format _window_status_format
|
||||
_left_status_a=$1
|
||||
_right_status_x=$2
|
||||
_right_status_y=$3
|
||||
_right_status_z=$4
|
||||
|
||||
tmux_append_seto "status" "on"
|
||||
|
||||
# default statusbar color
|
||||
tmux_append_seto "status-style" "bg=${col_bg1},fg=${col_fg1}"
|
||||
|
||||
# default window title colors
|
||||
tmux_append_setwo "window-status-style" "bg=${col_yellow2},fg=${col_bg1}"
|
||||
|
||||
# default window with an activity alert
|
||||
tmux_append_setwo "window-status-activity-style" "bg=${col_bg1},fg=${col_fg3}"
|
||||
|
||||
# active window title colors
|
||||
tmux_append_setwo "window-status-current-style" "bg=default,fg=${col_bg1}" # TODO cosider removing red!
|
||||
|
||||
# pane border
|
||||
tmux_append_seto "pane-active-border-style" "fg=${col_fg2}"
|
||||
tmux_append_seto "pane-border-style" "fg=${col_bg1}"
|
||||
|
||||
# message infos
|
||||
tmux_append_seto "message-style" "bg=${col_bg2},fg=${col_fg1}"
|
||||
|
||||
# writing commands inactive
|
||||
tmux_append_seto "message-command-style" "bg=${col_fg3},fg=${col_bg1}"
|
||||
|
||||
# pane number display
|
||||
tmux_append_seto "display-panes-active-colour" "${col_fg2}"
|
||||
tmux_append_seto "display-panes-colour" "${col_bg1}"
|
||||
|
||||
# clock
|
||||
tmux_append_setwo "clock-mode-colour" "${col_blue2}"
|
||||
|
||||
# bell
|
||||
tmux_append_setwo "window-status-bell-style" "bg=${col_red2},fg=${col_bg}"
|
||||
|
||||
## Theme settings mixed with colors (unfortunately, but there is no cleaner way)
|
||||
tmux_append_seto "status-justify" "left"
|
||||
tmux_append_seto "status-left-style" none
|
||||
tmux_append_seto "status-left-length" "80"
|
||||
tmux_append_seto "status-right-style" none
|
||||
tmux_append_seto "status-right-length" "80"
|
||||
tmux_append_setwo "window-status-separator" ""
|
||||
|
||||
tmux_append_seto "status-left" "#[bg=${col_bg3},fg=${col_fg3}] ${_left_status_a} #[bg=${col_bg1},fg=${col_bg3},nobold,noitalics,nounderscore]"
|
||||
tmux_append_seto "status-right" "#[bg=${col_bg1},fg=${col_bg2},nobold,nounderscore,noitalics]#[bg=${col_bg2},fg=${col_fg4}] ${_right_status_x} ${_right_status_y} #[bg=${col_bg2},fg=${col_fg3},nobold,noitalics,nounderscore]#[bg=${col_fg3},fg=${col_bg1}] ${_right_status_z}"
|
||||
|
||||
tmux_append_setwo "window-status-current-format" "#[bg=${col_yellow2},fg=${col_bg1},nobold,noitalics,nounderscore]#[bg=${col_yellow2},fg=${col_bg2}] #I #[bg=${col_yellow2},fg=${col_bg2},bold] #W#{?window_zoomed_flag,*Z,} #[bg=${col_bg1},fg=${col_yellow2},nobold,noitalics,nounderscore]"
|
||||
tmux_append_setwo "window-status-format" "#[bg=${col_bg2},fg=${col_bg1},noitalics]#[bg=${col_bg2},fg=${col_fg1}] #I #[bg=${col_bg2},fg=${col_fg1}] #W #[bg=${col_bg1},fg=${col_bg2},noitalics]"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue