feat: when theme enabled and not set it default to dark256

This commit is contained in:
Maciej Sypien 2024-09-21 21:02:23 +02:00
parent 26522d4901
commit 0f19833001
No known key found for this signature in database
GPG key ID: 10BC01EDA6827DC8
3 changed files with 21 additions and 5 deletions

View file

@ -18,9 +18,24 @@ get_theme() {
}
main() {
local theme
theme=$(get_theme "$THEME_OPTION" "$DEFAULT_THEME")
tmux source-file "$CURRENT_DIR/tmux-gruvbox-${theme}.conf"
local _theme _path
_theme=$(get_theme "$THEME_OPTION" "$DEFAULT_THEME")
case "$_theme" in
light-transparent)
_theme="light-transparent"
;;
dark-transparent)
_theme="dark-transparent"
;;
light | light256)
_theme="light"
;;
dark | dark256 | *)
_theme="dark"
;;
esac
tmux source-file "${CURRENT_DIR}/tmux-gruvbox-${_theme}.conf"
}
main "$@"

View file

@ -12,6 +12,7 @@ main() {
printf "\n=============================================="
printf "\n %s" "$test"
printf "\n=============================================="
printf ""
bash -c "$test"
# run all and count failures

View file

@ -28,8 +28,8 @@ helper_print_fail() {
local _current_val="${2}"
local _expected_val="${3}"
printf "FAIL. %s\n" "${_msg}"
printf "current value:\t%s" "$_current_val"
printf "expected value:\t%s" "$_expected_val"
printf "current value:\t%s\n" "$_current_val"
printf "expected value:\t%s\n" "$_expected_val"
}
helper_print_success() {