feat(modules): refactor modules and extract common functionality
This commit is contained in:
parent
56a447094a
commit
3b4bf404db
18 changed files with 200 additions and 352 deletions
|
@ -1,16 +1,10 @@
|
|||
show_host() {
|
||||
local index=$1
|
||||
local icon="$(get_tmux_option "@catppuccin_host_icon" "")"
|
||||
local color="$(get_tmux_option "@catppuccin_host_color" "$thm_blue")"
|
||||
local text="$(get_tmux_option "@catppuccin_host_text" "#H")"
|
||||
|
||||
if [[ $1 -eq 0 || $status_connect_separator == "no" ]]
|
||||
then
|
||||
local show_left_separator="#[fg=$thm_blue,bg=$thm_bg,nobold,nounderscore,noitalics]$status_left_separator"
|
||||
else
|
||||
local show_left_separator="#[fg=$thm_blue,bg=$thm_gray,nobold,nounderscore,noitalics]$status_left_separator"
|
||||
fi
|
||||
local module=$( build_status_module "$index" "$icon" "$color" "$text" )
|
||||
|
||||
local show_icon="#[fg=$thm_bg,bg=$thm_blue,nobold,nounderscore,noitalics]$icon "
|
||||
local show_text="#[fg=$thm_fg,bg=$thm_gray] #H"
|
||||
local show_right_separator="#[fg=$thm_gray,bg=$thm_bg,nobold,nounderscore,noitalics]$status_right_separator"
|
||||
|
||||
echo "$show_left_separator$show_icon$show_text$show_right_separator"
|
||||
echo $module
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue