feat(modules): extract all ui components into independend modules
This commit is contained in:
parent
a436f766cb
commit
56a447094a
14 changed files with 274 additions and 200 deletions
16
status/application.sh
Normal file
16
status/application.sh
Normal file
|
@ -0,0 +1,16 @@
|
|||
show_application() {
|
||||
local icon="$(get_tmux_option "@catppuccin_application_icon" "")"
|
||||
|
||||
if [[ $1 -eq 0 || $status_connect_separator == "no" ]]
|
||||
then
|
||||
local show_left_separator="#[fg=$thm_pink,bg=$thm_bg,nobold,nounderscore,noitalics]$status_left_separator"
|
||||
else
|
||||
local show_left_separator="#[fg=$thm_pink,bg=$thm_gray,nobold,nounderscore,noitalics]$status_left_separator"
|
||||
fi
|
||||
|
||||
local show_icon="#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics]$icon "
|
||||
local show_text="#[fg=$thm_fg,bg=$thm_gray] #W"
|
||||
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"
|
||||
}
|
18
status/date_time.sh
Normal file
18
status/date_time.sh
Normal file
|
@ -0,0 +1,18 @@
|
|||
show_date_time() {
|
||||
local icon="$(get_tmux_option "@catppuccin_datetime_icon" "")"
|
||||
local format="$(get_tmux_option "@catppuccin_date_time_format" "%Y-%m-%d %H:%M")"
|
||||
|
||||
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 show_icon="#[fg=$thm_bg,bg=$thm_blue,nobold,nounderscore,noitalics]$icon "
|
||||
local show_text="#[fg=$thm_fg,bg=$thm_gray] $format"
|
||||
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"
|
||||
}
|
||||
|
16
status/directory.sh
Normal file
16
status/directory.sh
Normal file
|
@ -0,0 +1,16 @@
|
|||
show_directory() {
|
||||
local icon="$(get_tmux_option "@catppuccin_directory_icon" "")"
|
||||
|
||||
if [[ $1 -eq 0 || $status_connect_separator == "no" ]]
|
||||
then
|
||||
local show_left_separator="#[fg=$thm_pink,bg=$thm_bg,nobold,nounderscore,noitalics]$status_left_separator"
|
||||
else
|
||||
local show_left_separator="#[fg=$thm_pink,bg=$thm_gray,nobold,nounderscore,noitalics]$status_left_separator"
|
||||
fi
|
||||
|
||||
local show_icon="#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics]$icon "
|
||||
local show_text="#[fg=$thm_fg,bg=$thm_gray] #{b:pane_current_path}"
|
||||
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"
|
||||
}
|
16
status/host.sh
Normal file
16
status/host.sh
Normal file
|
@ -0,0 +1,16 @@
|
|||
show_host() {
|
||||
local icon="$(get_tmux_option "@catppuccin_host_icon" "")"
|
||||
|
||||
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 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"
|
||||
}
|
16
status/session.sh
Normal file
16
status/session.sh
Normal file
|
@ -0,0 +1,16 @@
|
|||
show_session() {
|
||||
local icon="$(get_tmux_option "@catppuccin_session_icon" "")"
|
||||
|
||||
if [[ $1 -eq 0 || $status_connect_separator == "no" ]]
|
||||
then
|
||||
local show_left_separator="#[fg=$thm_green]#[bg=$thm_bg]#{?client_prefix,#[fg=$thm_red],#[fg=$thm_green]}$status_left_separator"
|
||||
else
|
||||
local show_left_separator="#[fg=$thm_green]#[bg=$thm_gray]#{?client_prefix,#[fg=$thm_red],#[fg=$thm_green]}$status_left_separator"
|
||||
fi
|
||||
|
||||
local show_icon="#{?client_prefix,#[bg=$thm_red],#[bg=$thm_green]}#[fg=$thm_bg]$icon "
|
||||
local show_text="#[fg=$thm_fg,bg=$thm_gray] #S"
|
||||
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"
|
||||
}
|
16
status/user.sh
Normal file
16
status/user.sh
Normal file
|
@ -0,0 +1,16 @@
|
|||
show_user() {
|
||||
local icon="$(get_tmux_option "@catppuccin_user_icon" "")"
|
||||
|
||||
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 show_icon="#[fg=$thm_bg,bg=$thm_blue,nobold,nounderscore,noitalics]$icon "
|
||||
local show_text="#[fg=$thm_fg,bg=$thm_gray] #(whoami)"
|
||||
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"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue