feat(modules): simplify parameters and use consistency in naming
This commit is contained in:
parent
480eebcb62
commit
c7ee28aafe
5 changed files with 30 additions and 51 deletions
|
@ -1,21 +1,11 @@
|
|||
show_window_current_format() {
|
||||
local icon="#I"
|
||||
local number="#I"
|
||||
local color="$thm_orange"
|
||||
local background="$thm_bg"
|
||||
local text
|
||||
local fill="$(get_tmux_option "@catppuccin_window_current_color_fill" "number")" # number, all, none
|
||||
local text="$(get_tmux_option "@catppuccin_window_current_text" "#{b:pane_current_path}")" # use #W for application instead of directory
|
||||
local fill="$(get_tmux_option "@catppuccin_window_current_fill" "number")" # number, all, none
|
||||
|
||||
if [[ $window_format_style == "directory" ]]
|
||||
then
|
||||
text="$(get_tmux_option "@catppuccin_window_current_format_directory_text" "#{b:pane_current_path}")"
|
||||
fi
|
||||
|
||||
if [[ $window_format_style == "application" ]]
|
||||
then
|
||||
text="#W"
|
||||
fi
|
||||
|
||||
local current_window_format=$( build_window_format "$icon" "$color" "$background" "$text" "$fill" )
|
||||
local current_window_format=$( build_window_format "$number" "$color" "$background" "$text" "$fill" )
|
||||
|
||||
echo "$current_window_format"
|
||||
}
|
||||
|
|
11
window/window_default_format.sh
Normal file
11
window/window_default_format.sh
Normal file
|
@ -0,0 +1,11 @@
|
|||
show_window_default_format() {
|
||||
local number="#I"
|
||||
local color="$thm_blue"
|
||||
local background="$thm_gray"
|
||||
local text="$(get_tmux_option "@catppuccin_window_default_text" "#{b:pane_current_path}")" # use #W for application instead of directory
|
||||
local fill="$(get_tmux_option "@catppuccin_window_default_fill" "number")" # number, all, none
|
||||
|
||||
local default_window_format=$( build_window_format "$number" "$color" "$background" "$text" "$fill" )
|
||||
|
||||
echo "$default_window_format"
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
show_window_format() {
|
||||
local icon="#I"
|
||||
local color="$thm_blue"
|
||||
local background="$thm_gray"
|
||||
local text
|
||||
local fill="$(get_tmux_option "@catppuccin_window_color_fill" "number")" # number, all, none
|
||||
|
||||
if [[ $window_format_style == "directory" ]]
|
||||
then
|
||||
text="$(get_tmux_option "@catppuccin_window_format_directory_text" "#{b:pane_current_path}")"
|
||||
fi
|
||||
|
||||
if [[ $window_format_style == "application" ]]
|
||||
then
|
||||
text="#W"
|
||||
fi
|
||||
|
||||
local current_window_format=$( build_window_format "$icon" "$color" "$background" "$text" "$fill")
|
||||
|
||||
echo "$current_window_format"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue