feat: improve transparent background (#175)
* feat: improve transparent background * fix: fix for config2 * chore: remove status right separator invert * chore: update config presets in documentation
This commit is contained in:
parent
e2d345648c
commit
a1079943b6
7 changed files with 82 additions and 102 deletions
|
@ -10,7 +10,6 @@ source "${PLUGIN_DIR}/builder/pane_builder.sh"
|
|||
source "${PLUGIN_DIR}/utils/tmux_utils.sh"
|
||||
source "${PLUGIN_DIR}/utils/module_utils.sh"
|
||||
|
||||
|
||||
main() {
|
||||
# Aggregate all commands in one array
|
||||
local tmux_commands=()
|
||||
|
@ -29,14 +28,14 @@ main() {
|
|||
# shellcheck source=catppuccin-frappe.tmuxtheme
|
||||
# https://github.com/dylanaraps/pure-sh-bible#parsing-a-keyval-file
|
||||
while IFS='=' read -r key val; do
|
||||
# Skip over lines containing comments.
|
||||
# (Lines starting with '#').
|
||||
[ "${key##\#*}" ] || continue
|
||||
# Skip over lines containing comments.
|
||||
# (Lines starting with '#').
|
||||
[ "${key##\#*}" ] || continue
|
||||
|
||||
# '$key' stores the key.
|
||||
# '$val' stores the value.
|
||||
eval "local $key"="$val"
|
||||
done < "${PLUGIN_DIR}/catppuccin-${theme}.tmuxtheme"
|
||||
# '$key' stores the key.
|
||||
# '$val' stores the value.
|
||||
eval "local $key"="$val"
|
||||
done <"${PLUGIN_DIR}/catppuccin-${theme}.tmuxtheme"
|
||||
|
||||
# status general
|
||||
local status_default=$(get_tmux_option "@catppuccin_status_default" "on")
|
||||
|
@ -46,12 +45,10 @@ main() {
|
|||
set status-justify "$status_justify"
|
||||
|
||||
local status_background=$(get_tmux_option "@catppuccin_status_background" "theme")
|
||||
if [ "${status_background}" = "theme" ];
|
||||
then
|
||||
if [ "${status_background}" = "theme" ]; then
|
||||
set status-bg "${thm_bg}"
|
||||
else
|
||||
if [ "${status_background}" = "default" ]
|
||||
then
|
||||
if [ "${status_background}" = "default" ]; then
|
||||
set status-style bg=default
|
||||
else
|
||||
set status-bg "${status_background}"
|
||||
|
@ -61,7 +58,6 @@ main() {
|
|||
set status-left-length "100"
|
||||
set status-right-length "100"
|
||||
|
||||
|
||||
# messages
|
||||
set message-style "fg=${thm_cyan},bg=${thm_gray},align=centre"
|
||||
set message-command-style "fg=${thm_cyan},bg=${thm_gray},align=centre"
|
||||
|
@ -70,9 +66,9 @@ main() {
|
|||
local pane_status_enable=$(get_tmux_option "@catppuccin_pane_status_enabled" "no") # yes
|
||||
local pane_border_status=$(get_tmux_option "@catppuccin_pane_border_status" "off") # bottom
|
||||
local pane_border_style=$(get_tmux_option "@catppuccin_pane_border_style" "fg=${thm_gray}")
|
||||
local pane_active_border_style=$(\
|
||||
local pane_active_border_style=$(
|
||||
get_tmux_option "@catppuccin_pane_active_border_style" \
|
||||
"#{?pane_in_mode,fg=${thm_yellow},#{?pane_synchronized,fg=${thm_magenta},fg=${thm_orange}}}"
|
||||
"#{?pane_in_mode,fg=${thm_yellow},#{?pane_synchronized,fg=${thm_magenta},fg=${thm_orange}}}"
|
||||
)
|
||||
local pane_left_separator=$(get_tmux_option "@catppuccin_pane_left_separator" "█")
|
||||
local pane_middle_separator=$(get_tmux_option "@catppuccin_pane_middle_separator" "█")
|
||||
|
@ -89,14 +85,11 @@ main() {
|
|||
local window_status_separator=$(get_tmux_option "@catppuccin_window_separator" "")
|
||||
setw window-status-separator "$window_status_separator"
|
||||
|
||||
setw window-status-activity-style "fg=${thm_fg},bg=${thm_bg},none"
|
||||
setw window-status-style "fg=${thm_fg},bg=${thm_bg},none"
|
||||
|
||||
local window_left_separator=$(get_tmux_option "@catppuccin_window_left_separator" "█")
|
||||
local window_right_separator=$(get_tmux_option "@catppuccin_window_right_separator" "█")
|
||||
local window_middle_separator=$(get_tmux_option "@catppuccin_window_middle_separator" "█ ")
|
||||
local window_number_position=$(get_tmux_option "@catppuccin_window_number_position" "left") # right, left
|
||||
local window_status_enable=$(get_tmux_option "@catppuccin_window_status_enable" "no") # right, left
|
||||
local window_status_enable=$(get_tmux_option "@catppuccin_window_status_enable" "no") # right, left
|
||||
|
||||
local window_format=$(load_modules "window_default_format" "$modules_custom_path" "$modules_window_path")
|
||||
setw window-status-format "$window_format"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue