Merge pull request #57 from catppuccin/feature/refactor-in-modules
Feature/refactor in modules
307
README.md
|
@ -67,55 +67,10 @@ set -g @catppuccin_flavour 'latte' # or frappe, macchiato, mocha
|
|||
1. Copy your desired theme's configuration contents into your Tmux config (usually stored at `~/.tmux.conf`)
|
||||
2. Reload Tmux by either restarting the session or reloading it with `tmux source-file ~/.tmux.conf`
|
||||
|
||||
## Status line themes
|
||||
## Overview
|
||||

|
||||
|
||||
### Default
|
||||
|
||||

|
||||
|
||||
With window tabs option enabled
|
||||
|
||||

|
||||
|
||||
### Pill shape
|
||||
|
||||
```sh
|
||||
set -g @catppuccin_pill_theme_enabled on
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Powerline
|
||||
|
||||
```sh
|
||||
set -g @catppuccin_powerline_theme_enabled on
|
||||
set -g @catppuccin_l_left_separator ""
|
||||
set -g @catppuccin_l_right_separator ""
|
||||
set -g @catppuccin_r_left_separator ""
|
||||
set -g @catppuccin_r_right_separator ""
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Powerline with icons
|
||||
|
||||
```sh
|
||||
set -g @catppuccin_powerline_icons_theme_enabled on
|
||||
set -g @catppuccin_l_left_separator ""
|
||||
set -g @catppuccin_l_right_separator ""
|
||||
set -g @catppuccin_r_left_separator ""
|
||||
set -g @catppuccin_r_right_separator ""
|
||||
```
|
||||
|
||||

|
||||
|
||||
### No patched fonts
|
||||
|
||||
```sh
|
||||
set -g @catppuccin_no_patched_fonts_theme_enabled on
|
||||
```
|
||||
|
||||

|
||||
This is a diagram on how the theme is split between it's components.
|
||||
|
||||
## Configuration options
|
||||
|
||||
|
@ -123,70 +78,236 @@ All flavours support certain levels of customization that match our [Catppuccin
|
|||
Style Guide][style-guide]. To add these customizations, add any of the following
|
||||
options to your Tmux configuration.
|
||||
|
||||
### Enable window tabs
|
||||
|
||||
By default, the theme places the `window-status` in the `status-right`. With
|
||||
`@catppuccin_window_tabs_enabled` set to `on`, the theme will place the
|
||||
directory within the `status-right` and move the window names to the
|
||||
`window-status` format variables.
|
||||
### Window
|
||||
|
||||
#### Set the window left separator:
|
||||
```sh
|
||||
set -g @catppuccin_window_tabs_enabled on # or off to disable window_tabs
|
||||
set -g @catppuccin_window_left_separator "█"
|
||||
```
|
||||
|
||||
### Configure separator
|
||||
|
||||
By default, the theme will use a round separator.
|
||||
To overwrite it use `@catppuccin_l_left_separator`, `@catppuccin_l_right_separator` for left status / window tabs and `@catppuccin_r_left_separator`, `@catppuccin_r_right_separator` for right status.
|
||||
|
||||
With the default status line theme
|
||||
|
||||
#### Set the window middle separator:
|
||||
```sh
|
||||
set -g @catppuccin_l_right_separator "█"
|
||||
set -g @catppuccin_r_left_separator "█"
|
||||
set -g @catppuccin_window_middle_separator "█"
|
||||
```
|
||||
|
||||
### Enable DateTime
|
||||
|
||||
By default, the `date_time` component is set to off.
|
||||
It can be enabled by specifying any tmux date and time format.
|
||||
|
||||
#### Set the window right separator:
|
||||
```sh
|
||||
set -g @catppuccin_date_time "%Y-%m-%d %H:%M"
|
||||
set -g @catppuccin_window_right_separator "█"
|
||||
```
|
||||
|
||||
### Enable User
|
||||
|
||||
By default, the `user` component is set to off.
|
||||
It can be enabled by toggling it on.
|
||||
|
||||
#### Position the number:
|
||||
```sh
|
||||
set -g @catppuccin_user "on"
|
||||
set -g @catppuccin_window_number_position "left"
|
||||
```
|
||||
Values:
|
||||
- left - the number will be on the left part of the window
|
||||
- right - the number will be on the right part of the window
|
||||
|
||||
#### Enable window status:
|
||||
```sh
|
||||
set -g @ccatppuccin_window_status_enable "yes"
|
||||
```
|
||||
Values:
|
||||
- yes - this will enable the window status part
|
||||
- no - this will disable the window status part
|
||||
|
||||
#### Enable window status icons instead of text:
|
||||
```sh
|
||||
set -g @catppuccin_window_status_icon_enable "yes"
|
||||
```
|
||||
Values:
|
||||
- yes - this will replace the windows status text with icons
|
||||
- no - this will keep the windows status in text format
|
||||
|
||||
### Override windows status icons
|
||||
```sh
|
||||
set -g @catppuccin_icon_window_last ""
|
||||
set -g @catppuccin_icon_window_current ""
|
||||
set -g @catppuccin_icon_window_zoom ""
|
||||
set -g @catppuccin_icon_window_mark ""
|
||||
set -g @catppuccin_icon_window_silent ""
|
||||
set -g @catppuccin_icon_window_activity ""
|
||||
set -g @catppuccin_icon_window_bell ""
|
||||
```
|
||||
|
||||
### Enable Host
|
||||
|
||||
By default, the `host` component is set to off.
|
||||
It can be enabled by toggling it on.
|
||||
### Window default
|
||||
|
||||
#### Set the window default color fill:
|
||||
```sh
|
||||
set -g @catppuccin_host "on"
|
||||
set -g @catppuccin_window_default_fill "number"
|
||||
```
|
||||
Values:
|
||||
- number - only the number of the window part will have color
|
||||
- all - the entire window part will have the same color
|
||||
- none - the entire window part will have no color
|
||||
|
||||
#### Override the window default text:
|
||||
```sh
|
||||
set -g @catppuccin_window_default_text "#{b:pane_current_path}" # use "#W" for application instead of directory
|
||||
```
|
||||
|
||||
### Customize Icons
|
||||
### Window current
|
||||
|
||||
Each of the components comes with their own default icon, which
|
||||
can be changed to fit your preference or requirements of your font.
|
||||
|
||||
*Note: NerdFont Icons do not render properly in the Github UI, so the below example
|
||||
does not use them*
|
||||
#### Set the window current color fill:
|
||||
```sh
|
||||
set -g @catppuccin_datetime_icon "A"
|
||||
set -g @catppuccin_user_icon "B"
|
||||
set -g @catppuccin_directory_icon "C"
|
||||
set -g @catppuccin_window_icon "D"
|
||||
set -g @catppuccin_session_icon "E"
|
||||
set -g @catppuccin_host_icon "F"
|
||||
set -g @catppuccin_window_current_fill "number"
|
||||
```
|
||||
Values:
|
||||
- number - only the number of the window part will have color
|
||||
- all - the entire window part will have the same color
|
||||
- none - the entire window part will have no color
|
||||
|
||||
#### Override the window current text:
|
||||
```sh
|
||||
set -g @catppuccin_window_current_text "#{b:pane_current_path}" # use "#W" for application instead of directory
|
||||
```
|
||||
|
||||
#### Set the current directory format
|
||||
```sh
|
||||
set -g @catppuccin_window_current_format_directory_text "#{b:pane_current_path}"
|
||||
```
|
||||
Use this to overide the way the current directory is displayed.
|
||||
|
||||
#### Set the directory format
|
||||
```sh
|
||||
set -g @catppuccin_window_format_directory_text "#{b:pane_current_path}"
|
||||
```
|
||||
Use this to overide the way the directory is displayed.
|
||||
|
||||
### Status
|
||||
|
||||
#### Set the status module left separator:
|
||||
```sh
|
||||
set -g @catppuccin_status_left_separator ""
|
||||
```
|
||||
|
||||
#### Set the status module right separator:
|
||||
```sh
|
||||
set -g @catppuccin_status_right_separator "█"
|
||||
```
|
||||
|
||||
#### Set the status module right separator inverse:
|
||||
```sh
|
||||
set -g @catppuccin_status_right_separator_inverse "no"
|
||||
```
|
||||
Values:
|
||||
- yes - the colors will be inverted for the right separator
|
||||
- no - the colors will not be inverted for the right separator
|
||||
|
||||
#### Set the status connect separator:
|
||||
```sh
|
||||
set -g @catppuccin_status_connect_separator "yes"
|
||||
```
|
||||
Values:
|
||||
- yes - the background color of the separator will not blend in with the brackground color of tmux
|
||||
- no - the background color of the separator will blend in with the brackground color of tmux
|
||||
|
||||
#### Set the status module color fill:
|
||||
```sh
|
||||
set -g @catppuccin_status_color_fill "icon"
|
||||
```
|
||||
Values:
|
||||
- icon - only the icon of the module will have color
|
||||
- all - the entire module will have the same color
|
||||
|
||||
#### Set the module list
|
||||
```sh
|
||||
set -g @catppuccin_status_modules" "application session"
|
||||
```
|
||||
Provide a list of modules and the order in which you want them to appear in the status.
|
||||
|
||||
Available modules:
|
||||
- application - display the current window running application
|
||||
- directory - display the basename of the current window path
|
||||
- session - display the number of tmux sessions running
|
||||
- user - display the username
|
||||
- host - display the hostname
|
||||
- date_time - display the date and time
|
||||
|
||||
### Customizing modules
|
||||
|
||||
Every module (except the module "session") supports the following overrides:
|
||||
|
||||
#### Override the specific module icon
|
||||
```sh
|
||||
set -g @catppuccin_[module_name]_icon" "icon"
|
||||
```
|
||||
|
||||
#### Override the specific module color
|
||||
```sh
|
||||
set -g @catppuccin_[module_name]_color" "color"
|
||||
```
|
||||
|
||||
#### Override the specific module text
|
||||
```sh
|
||||
set -g @catppuccin_[module_name]_text" "text"
|
||||
```
|
||||
|
||||
## Configuration Examples
|
||||
|
||||
### Config 1
|
||||

|
||||
|
||||
```sh
|
||||
set -g @catppuccin_window_right_separator "█ "
|
||||
set -g @catppuccin_window_number_position "right"
|
||||
set -g @catppuccin_window_middle_separator " | "
|
||||
|
||||
set -g @catppuccin_window_default_fill "none"
|
||||
|
||||
set -g @catppuccin_window_current_fill "all"
|
||||
|
||||
set -g @catppuccin_status_modules "application session user host date_time"
|
||||
set -g @catppuccin_status_left_separator "█"
|
||||
|
||||
set -g @catppuccin_date_time_text "%Y-%m-%d %H:%M:%S"
|
||||
```
|
||||
|
||||
### Config 2
|
||||

|
||||
|
||||
```sh
|
||||
set -g @catppuccin_window_left_separator "█"
|
||||
set -g @catppuccin_window_right_separator "█ "
|
||||
set -g @catppuccin_window_number_position "right"
|
||||
set -g @catppuccin_window_middle_separator " █"
|
||||
|
||||
set -g @catppuccin_window_default_fill "number"
|
||||
|
||||
set -g @catppuccin_window_current_fill "number"
|
||||
set -g @catppuccin_window_current_text "#{pane_current_path}"
|
||||
|
||||
set -g @catppuccin_status_modules "application session date_time"
|
||||
set -g @catppuccin_status_left_separator ""
|
||||
set -g @catppuccin_status_right_separator " "
|
||||
set -g @catppuccin_status_right_separator_inverse "yes"
|
||||
set -g @catppuccin_status_color_fill "all"
|
||||
set -g @catppuccin_status_connect_separator "no"
|
||||
```
|
||||
|
||||
### Config 3
|
||||

|
||||
|
||||
```sh
|
||||
set -g @catppuccin_window_left_separator ""
|
||||
set -g @catppuccin_window_right_separator " "
|
||||
set -g @catppuccin_window_icon_position "right"
|
||||
set -g @catppuccin_window_middle_separator " █"
|
||||
|
||||
set -g @catppuccin_window_default_fill "number"
|
||||
set -g @catppuccin_window_default_text "#W"
|
||||
|
||||
set -g @catppuccin_window_current_fill "number"
|
||||
set -g @catppuccin_window_current_text "#W"
|
||||
|
||||
set -g @catppuccin_status_modules "directory user host session"
|
||||
set -g @catppuccin_status_left_separator " "
|
||||
set -g @catppuccin_status_right_separator ""
|
||||
set -g @catppuccin_status_right_separator_inverse "no"
|
||||
set -g @catppuccin_status_color_fill "icon"
|
||||
set -g @catppuccin_status_connect_separator "no"
|
||||
|
||||
set -g @catppuccin_directory_text "#{pane_current_path}"
|
||||
```
|
||||
|
||||
[style-guide]: https://github.com/catppuccin/catppuccin/blob/main/docs/style-guide.md
|
||||
|
|
BIN
assets/config1.png
Normal file
After Width: | Height: | Size: 91 KiB |
BIN
assets/config2.png
Normal file
After Width: | Height: | Size: 77 KiB |
BIN
assets/config3.png
Normal file
After Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 7 KiB |
BIN
assets/overview.png
Normal file
After Width: | Height: | Size: 222 KiB |
BIN
assets/pill.webp
Before Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 9.6 KiB |
300
catppuccin.tmux
|
@ -31,6 +31,160 @@ setw() {
|
|||
tmux_commands+=(set-window-option -gq "$option" "$value" ";")
|
||||
}
|
||||
|
||||
build_window_icon() {
|
||||
local window_status_icon_enable="$(get_tmux_option "@catppuccin_window_status_icon_enable" "yes")"
|
||||
|
||||
local custom_icon_window_last="$(get_tmux_option "@catppuccin_icon_window_last" "")"
|
||||
local custom_icon_window_current="$(get_tmux_option "@catppuccin_icon_window_current" "")"
|
||||
local custom_icon_window_zoom="$(get_tmux_option "@catppuccin_icon_window_zoom" "")"
|
||||
local custom_icon_window_mark="$(get_tmux_option "@catppuccin_icon_window_mark" "")"
|
||||
local custom_icon_window_silent="$(get_tmux_option "@catppuccin_icon_window_silent" "")"
|
||||
local custom_icon_window_activity="$(get_tmux_option "@catppuccin_icon_window_activity" "")"
|
||||
local custom_icon_window_bell="$(get_tmux_option "@catppuccin_icon_window_bell" "")"
|
||||
|
||||
if [[ $window_status_icon_enable == "yes" ]]
|
||||
then
|
||||
local show_window_status="#(printf '%%s\n' '#F' | sed \"s/*/${custom_icon_window_current}/\" | sed \"s/-/${custom_icon_window_last}/\" | sed \"s/#/${custom_icon_window_activity}/\" | sed \"s/#//g\"| sed \"s/~/${custom_icon_window_silent}/\" | sed \"s/!/${custom_icon_window_bell}/\" | sed \"s/M/${custom_icon_window_mark}/\" | sed \"s/Z/${custom_icon_window_zoom}/\")"
|
||||
fi
|
||||
|
||||
if [[ $window_status_icon_enable == "no" ]]
|
||||
then
|
||||
local show_window_status="#F"
|
||||
fi
|
||||
|
||||
echo $show_window_status
|
||||
}
|
||||
|
||||
build_window_format() {
|
||||
local number="$1"
|
||||
local color="$2"
|
||||
local background="$3"
|
||||
local text="$4"
|
||||
local fill="$5"
|
||||
|
||||
if [[ $window_status_enable == "yes" ]]
|
||||
then
|
||||
local icon="$( build_window_icon )"
|
||||
text="$text $icon"
|
||||
fi
|
||||
|
||||
if [[ $fill == "none" ]]
|
||||
then
|
||||
local show_left_separator="#[fg=$thm_gray,bg=$thm_bg,nobold,nounderscore,noitalics]$window_left_separator"
|
||||
local show_number="#[fg=$thm_fg,bg=$thm_gray]$number"
|
||||
local show_middle_separator="#[fg=$thm_fg,bg=$thm_gray,nobold,nounderscore,noitalics]$window_middle_separator"
|
||||
local show_text="#[fg=$thm_fg,bg=$thm_gray]$text"
|
||||
local show_right_separator="#[fg=$thm_gray,bg=$thm_bg]$window_right_separator"
|
||||
|
||||
fi
|
||||
|
||||
if [[ $fill == "all" ]]
|
||||
then
|
||||
local show_left_separator="#[fg=$color,bg=$thm_bg,nobold,nounderscore,noitalics]$window_left_separator"
|
||||
local show_number="#[fg=$background,bg=$color]$number"
|
||||
local show_middle_separator="#[fg=$background,bg=$color,nobold,nounderscore,noitalics]$window_middle_separator"
|
||||
local show_text="#[fg=$background,bg=$color]$text"
|
||||
local show_right_separator="#[fg=$color,bg=$thm_bg]$window_right_separator"
|
||||
|
||||
fi
|
||||
|
||||
if [[ $fill == "number" ]]
|
||||
then
|
||||
local show_number="#[fg=$background,bg=$color]$number"
|
||||
local show_middle_separator="#[fg=$color,bg=$background,nobold,nounderscore,noitalics]$window_middle_separator"
|
||||
local show_text="#[fg=$thm_fg,bg=$background]$text"
|
||||
|
||||
if [[ $window_number_position == "right" ]]
|
||||
then
|
||||
local show_left_separator="#[fg=$background,bg=$thm_bg,nobold,nounderscore,noitalics]$window_left_separator"
|
||||
local show_right_separator="#[fg=$color,bg=$thm_bg]$window_right_separator"
|
||||
fi
|
||||
|
||||
if [[ $window_number_position == "left" ]]
|
||||
then
|
||||
local show_right_separator="#[fg=$background,bg=$thm_bg,nobold,nounderscore,noitalics]$window_right_separator"
|
||||
local show_left_separator="#[fg=$color,bg=$thm_bg]$window_left_separator"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
local window_format
|
||||
|
||||
if [[ $window_number_position == "right" ]]
|
||||
then
|
||||
window_format="$show_left_separator$show_text$show_middle_separator$show_number$show_right_separator"
|
||||
fi
|
||||
|
||||
if [[ $window_number_position == "left" ]]
|
||||
then
|
||||
window_format="$show_left_separator$show_number$show_middle_separator$show_text$show_right_separator"
|
||||
fi
|
||||
|
||||
echo $window_format
|
||||
}
|
||||
|
||||
build_status_module() {
|
||||
local index="$1"
|
||||
local icon="$2"
|
||||
local color="$3"
|
||||
local text="$4"
|
||||
|
||||
if [[ $index -eq 0 || $status_connect_separator == "no" ]]
|
||||
then
|
||||
local show_left_separator="#[fg=$color,bg=$thm_bg,nobold,nounderscore,noitalics]$status_left_separator"
|
||||
else
|
||||
local show_left_separator="#[fg=$color,bg=$thm_gray,nobold,nounderscore,noitalics]$status_left_separator"
|
||||
fi
|
||||
|
||||
if [[ $status_fill == "icon" ]]
|
||||
then
|
||||
local show_icon="#[fg=$thm_bg,bg=$color,nobold,nounderscore,noitalics]$icon "
|
||||
local show_text="#[fg=$thm_fg,bg=$thm_gray] $text"
|
||||
local show_right_separator="#[fg=$thm_gray,bg=$thm_bg,nobold,nounderscore,noitalics]$status_right_separator"
|
||||
fi
|
||||
|
||||
if [[ $status_fill == "all" ]]
|
||||
then
|
||||
local show_icon="#[fg=$thm_bg,bg=$color,nobold,nounderscore,noitalics]$icon "
|
||||
local show_text="#[fg=$thm_bg,bg=$color]$text"
|
||||
local show_right_separator="#[fg=$color,bg=$thm_bg,nobold,nounderscore,noitalics]$status_right_separator"
|
||||
fi
|
||||
|
||||
if [[ $status_right_separator_inverse == "yes" ]]
|
||||
then
|
||||
local show_right_separator="#[fg=$thm_bg,bg=$color,nobold,nounderscore,noitalics]$status_right_separator"
|
||||
fi
|
||||
|
||||
echo "$show_left_separator$show_icon$show_text$show_right_separator"
|
||||
}
|
||||
|
||||
load_modules() {
|
||||
local loaded_modules
|
||||
|
||||
local modules_path=$1
|
||||
local modules_list=$2
|
||||
|
||||
local modules_array
|
||||
read -a modules_array <<< "$modules_list"
|
||||
|
||||
local module_index=0;
|
||||
local module_name
|
||||
for module_name in ${modules_array[@]}
|
||||
do
|
||||
local module_path=$modules_path/$module_name.sh
|
||||
source $module_path
|
||||
|
||||
if [[ 0 -eq $? ]]
|
||||
then
|
||||
loaded_modules="$loaded_modules$( show_$module_name $module_index )"
|
||||
module_index=$module_index+1
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
echo $loaded_modules
|
||||
}
|
||||
|
||||
main() {
|
||||
local theme
|
||||
theme="$(get_tmux_option "@catppuccin_flavour" "mocha")"
|
||||
|
@ -65,141 +219,29 @@ main() {
|
|||
|
||||
# --------=== Statusline
|
||||
|
||||
# NOTE: Checking for the value of @catppuccin_window_tabs_enabled
|
||||
local wt_enabled
|
||||
wt_enabled="$(get_tmux_option "@catppuccin_window_tabs_enabled" "off")"
|
||||
readonly wt_enabled
|
||||
|
||||
local pill_theme_enabled
|
||||
pill_theme_enabled="$(get_tmux_option "@catppuccin_pill_theme_enabled" "off")"
|
||||
readonly pill_theme_enabled
|
||||
|
||||
local powerline_theme_enabled
|
||||
powerline_theme_enabled="$(get_tmux_option "@catppuccin_powerline_theme_enabled" "off")"
|
||||
readonly powerline_theme_enabled
|
||||
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 powerline_icons_theme_enabled
|
||||
powerline_icons_theme_enabled="$(get_tmux_option "@catppuccin_powerline_icons_theme_enabled" "off")"
|
||||
readonly powerline_icons_theme_enabled
|
||||
local window_format=$( load_modules "$PLUGIN_DIR/window" "window_default_format")
|
||||
local window_current_format=$( load_modules "$PLUGIN_DIR/window" "window_current_format")
|
||||
|
||||
local no_patched_fonts_theme_enabled
|
||||
no_patched_fonts_theme_enabled="$(get_tmux_option "@catppuccin_no_patched_fonts_theme_enabled" "off")"
|
||||
readonly no_patched_fonts_theme_enabled
|
||||
|
||||
# Separators for the left status / window list
|
||||
local l_left_separator
|
||||
l_left_separator="$(get_tmux_option "@catppuccin_l_left_separator" "")"
|
||||
readonly l_left_separator
|
||||
setw window-status-format "${window_format}"
|
||||
setw window-status-current-format "${window_current_format}"
|
||||
|
||||
local l_right_separator
|
||||
l_right_separator="$(get_tmux_option "@catppuccin_l_right_separator" "")"
|
||||
readonly l_right_separator
|
||||
local status_left_separator="$(get_tmux_option "@catppuccin_status_left_separator" "")"
|
||||
local status_right_separator="$(get_tmux_option "@catppuccin_status_right_separator" "█")"
|
||||
local status_right_separator_inverse="$(get_tmux_option "@catppuccin_status_right_separator_inverse" "no")"
|
||||
local status_connect_separator="$(get_tmux_option "@catppuccin_status_connect_separator" "yes")"
|
||||
local status_fill="$(get_tmux_option "@catppuccin_status_fill" "icon")"
|
||||
|
||||
# Separators for the right status
|
||||
local r_left_separator
|
||||
r_left_separator="$(get_tmux_option "@catppuccin_r_left_separator" "")"
|
||||
readonly r_left_separator
|
||||
|
||||
local r_right_separator
|
||||
r_right_separator="$(get_tmux_option "@catppuccin_r_right_separator" "")"
|
||||
readonly r_right_separator
|
||||
|
||||
local user
|
||||
user="$(get_tmux_option "@catppuccin_user" "off")"
|
||||
readonly user
|
||||
|
||||
local host
|
||||
host="$(get_tmux_option "@catppuccin_host" "off")"
|
||||
readonly host
|
||||
|
||||
local date_time
|
||||
date_time="$(get_tmux_option "@catppuccin_date_time" "off")"
|
||||
readonly date_time
|
||||
|
||||
# Icons
|
||||
local directory_icon
|
||||
directory_icon="$(get_tmux_option "@catppuccin_directory_icon" "")"
|
||||
readonly directory_icon
|
||||
|
||||
local window_icon
|
||||
window_icon="$(get_tmux_option "@catppuccin_window_icon" "")"
|
||||
readonly window_icon
|
||||
|
||||
local session_icon
|
||||
session_icon="$(get_tmux_option "@catppuccin_session_icon" "")"
|
||||
readonly session_icon
|
||||
|
||||
local user_icon
|
||||
user_icon="$(get_tmux_option "@catppuccin_user_icon" "")"
|
||||
readonly user_icon
|
||||
|
||||
local host_icon
|
||||
host_icon="$(get_tmux_option "@catppuccin_host_icon" "")"
|
||||
readonly host_icon
|
||||
|
||||
local datetime_icon
|
||||
datetime_icon="$(get_tmux_option "@catppuccin_datetime_icon" "")"
|
||||
readonly datetime_icon
|
||||
|
||||
# Source status line themes
|
||||
if [[ "${pill_theme_enabled}" == "off" ]] &&
|
||||
[[ "${powerline_theme_enabled}" == "off" ]] &&
|
||||
[[ "${powerline_icons_theme_enabled}" == "off" ]] &&
|
||||
[[ "${no_patched_fonts_theme_enabled}" == "off" ]]; then
|
||||
source "$PLUGIN_DIR/$DEFAULT_STATUS_LINE_FILE"
|
||||
fi
|
||||
|
||||
if [[ "${pill_theme_enabled}" == "on" ]]; then
|
||||
source "$PLUGIN_DIR/$PILL_STATUS_LINE_FILE"
|
||||
fi
|
||||
|
||||
if [[ "${powerline_theme_enabled}" == "on" ]]; then
|
||||
source "$PLUGIN_DIR/$POWERLINE_STATUS_LINE_FILE"
|
||||
fi
|
||||
|
||||
if [[ "${powerline_icons_theme_enabled}" == "on" ]]; then
|
||||
source "$PLUGIN_DIR/$POWERLINE_ICONS_STATUS_LINE_FILE"
|
||||
fi
|
||||
|
||||
if [[ "${no_patched_fonts_theme_enabled}" == "on" ]]; then
|
||||
source "$PLUGIN_DIR/$NO_PATCHED_FONTS_STATUS_LINE_FILE"
|
||||
fi
|
||||
|
||||
# Right column 1 by default shows the Window name.
|
||||
local right_column1=$show_window
|
||||
|
||||
# Right column 2 by default shows the current Session name.
|
||||
local right_column2=$show_session
|
||||
|
||||
# Window status by default shows the current directory basename.
|
||||
local window_status_format=$show_directory_in_window_status
|
||||
local window_status_current_format=$show_directory_in_window_status_current
|
||||
|
||||
# NOTE: With the @catppuccin_window_tabs_enabled set to on, we're going to
|
||||
# update the right_column1 and the window_status_* variables.
|
||||
if [[ "${wt_enabled}" == "on" ]]; then
|
||||
right_column1=$show_directory
|
||||
window_status_format=$show_window_in_window_status
|
||||
window_status_current_format=$show_window_in_window_status_current
|
||||
fi
|
||||
|
||||
if [[ "${user}" == "on" ]]; then
|
||||
right_column2="$right_column2$show_user"
|
||||
fi
|
||||
|
||||
if [[ "${host}" == "on" ]]; then
|
||||
right_column2="$right_column2$show_host"
|
||||
fi
|
||||
|
||||
if [[ "${date_time}" != "off" ]]; then
|
||||
right_column2="$right_column2$show_date_time"
|
||||
fi
|
||||
local status_modules="$(get_tmux_option "@catppuccin_status_modules" "application session")"
|
||||
local loaded_modules=$( load_modules "$PLUGIN_DIR/status" "$status_modules")
|
||||
|
||||
set status-left ""
|
||||
set status-right "${right_column1}${right_column2}"
|
||||
|
||||
setw window-status-format "${window_status_format}"
|
||||
setw window-status-current-format "${window_status_current_format}"
|
||||
set status-right "${loaded_modules}"
|
||||
|
||||
# --------=== Modes
|
||||
#
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
local show_directory
|
||||
readonly show_directory="#[fg=$thm_pink,bg=$thm_bg,nobold,nounderscore,noitalics]$r_left_separator#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics]$directory_icon #[fg=$thm_fg,bg=$thm_gray] #{b:pane_current_path} "
|
||||
|
||||
local show_window
|
||||
readonly show_window="#[fg=$thm_pink,bg=$thm_bg,nobold,nounderscore,noitalics]$r_left_separator#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics]$window_icon #[fg=$thm_fg,bg=$thm_gray] #W "
|
||||
|
||||
local show_session
|
||||
readonly show_session="#[fg=$thm_green]#[bg=$thm_gray]#{?client_prefix,#[fg=$thm_red],#[fg=$thm_green]}$r_left_separator#{?client_prefix,#[bg=$thm_red],#[bg=$thm_green]}#[fg=$thm_bg]$session_icon #[fg=$thm_fg,bg=$thm_gray] #S "
|
||||
|
||||
local show_directory_in_window_status
|
||||
readonly show_directory_in_window_status="#[fg=$thm_bg,bg=$thm_blue] #I #[fg=$thm_fg,bg=$thm_gray] #{b:pane_current_path} "
|
||||
|
||||
local show_directory_in_window_status_current
|
||||
readonly show_directory_in_window_status_current="#[fg=$thm_bg,bg=$thm_orange] #I #[fg=$thm_fg,bg=$thm_bg] #{b:pane_current_path} "
|
||||
|
||||
local show_window_in_window_status
|
||||
readonly show_window_in_window_status="#[fg=$thm_fg,bg=$thm_bg] #W #[fg=$thm_bg,bg=$thm_blue] #I#[fg=$thm_blue,bg=$thm_bg]$l_right_separator "
|
||||
|
||||
local show_window_in_window_status_current
|
||||
readonly show_window_in_window_status_current="#[fg=$thm_fg,bg=$thm_gray] #W #[fg=$thm_bg,bg=$thm_orange] #I#[fg=$thm_orange,bg=$thm_bg,nobold,nounderscore,noitalics]$l_right_separator "
|
||||
|
||||
local show_user
|
||||
readonly show_user="#[fg=$thm_cyan,bg=$thm_gray,nobold,nounderscore,noitalics]$r_left_separator#[fg=$thm_bg,bg=$thm_cyan,nobold,nounderscore,noitalics]$user_icon #[fg=$thm_fg,bg=$thm_gray] #(whoami) "
|
||||
|
||||
local show_host
|
||||
readonly show_host="#[fg=$thm_magenta,bg=$thm_gray,nobold,nounderscore,noitalics]$r_left_separator#[fg=$thm_bg,bg=$thm_magenta,nobold,nounderscore,noitalics]$host_icon #[fg=$thm_fg,bg=$thm_gray] #H "
|
||||
|
||||
local show_date_time
|
||||
readonly show_date_time="#[fg=$thm_blue,bg=$thm_gray,nobold,nounderscore,noitalics]$r_left_separator#[fg=$thm_bg,bg=$thm_blue,nobold,nounderscore,noitalics]$datetime_icon #[fg=$thm_fg,bg=$thm_gray] $date_time "
|
|
@ -1,29 +0,0 @@
|
|||
local show_directory
|
||||
readonly show_directory="#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics] #{b:pane_current_path} #[bg=$thm_bg] "
|
||||
|
||||
local show_window
|
||||
readonly show_window="#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics] #W #[bg=$thm_bg] "
|
||||
|
||||
local show_session
|
||||
readonly show_session="#{?client_prefix,#[bg=$thm_red],#[bg=$thm_green]}#[fg=$thm_bg] #S #[bg=$thm_bg] "
|
||||
|
||||
local show_directory_in_window_status
|
||||
readonly show_directory_in_window_status="#[fg=$thm_bg,bg=$thm_blue,nobold,nounderscore,noitalics] #I #[fg=$thm_fg,bg=$thm_gray,nobold,nounderscore,noitalics] #{b:pane_current_path} "
|
||||
|
||||
local show_directory_in_window_status_current
|
||||
readonly show_directory_in_window_status_current="#[fg=$thm_bg,bg=$thm_orange,nobold,nounderscore,noitalics] #I #[fg=$thm_fg,bg=$thm_bg,nobold,nounderscore,noitalics] #{b:pane_current_path} "
|
||||
|
||||
local show_window_in_window_status
|
||||
readonly show_window_in_window_status="#[fg=$thm_fg,bg=$thm_bg,nobold,nounderscore,noitalics] #W #[fg=$thm_bg,bg=$thm_blue,nobold,nounderscore,noitalics] #I "
|
||||
|
||||
local show_window_in_window_status_current
|
||||
readonly show_window_in_window_status_current="#[fg=$thm_fg,bg=$thm_gray,nobold,nounderscore,noitalics] #W #[fg=$thm_bg,bg=$thm_orange,nobold,nounderscore,noitalics] #I "
|
||||
|
||||
local show_user
|
||||
readonly show_user="#[fg=$thm_bg,bg=$thm_cyan,nobold,nounderscore,noitalics] #(whoami) #[bg=$thm_bg] "
|
||||
|
||||
local show_host
|
||||
readonly show_host="#[fg=$thm_bg,bg=$thm_magenta,nobold,nounderscore,noitalics] #H #[bg=$thm_bg] "
|
||||
|
||||
local show_date_time
|
||||
readonly show_date_time="#[fg=$thm_bg,bg=$thm_blue,nobold,nounderscore,noitalics] $date_time #[bg=$thm_bg] "
|
|
@ -1,29 +0,0 @@
|
|||
local show_directory
|
||||
readonly show_directory="#[fg=$thm_pink,bg=$thm_bg,nobold,nounderscore,noitalics]$r_left_separator#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics]$directory_icon #[fg=$thm_fg,bg=$thm_gray] #{b:pane_current_path} #[fg=$thm_gray,bg=$thm_bg,nobold,nounderscore,noitalics]$r_right_separator "
|
||||
|
||||
local show_window
|
||||
readonly show_window="#[fg=$thm_pink,bg=$thm_bg,nobold,nounderscore,noitalics]$r_left_separator#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics]$window_icon #[fg=$thm_fg,bg=$thm_gray] #W #[fg=$thm_gray,bg=$thm_bg,nobold,nounderscore,noitalics]$r_right_separator "
|
||||
|
||||
local show_session
|
||||
readonly show_session="#[fg=$thm_green,bg=$thm_bg,nobold,nounderscore,noitalics]#{?client_prefix,#[fg=$thm_red],#[fg=$thm_green]}$r_left_separator#[fg=$thm_bg,bg=$thm_green]#{?client_prefix,#[bg=$thm_red],#[bg=$thm_green]}$session_icon #[fg=$thm_fg,bg=$thm_gray] #S #[fg=$thm_gray,bg=$thm_bg,nobold,nounderscore,noitalics]$r_right_separator "
|
||||
|
||||
local show_directory_in_window_status
|
||||
readonly show_directory_in_window_status="#[fg=$thm_bg,bg=$thm_blue] #I #[fg=$thm_fg,bg=$thm_gray] #{b:pane_current_path} "
|
||||
|
||||
local show_directory_in_window_status_current
|
||||
readonly show_directory_in_window_status_current="#[fg=$thm_bg,bg=$thm_orange] #I #[fg=$thm_fg,bg=$thm_bg] #{b:pane_current_path} "
|
||||
|
||||
local show_window_in_window_status
|
||||
readonly show_window_in_window_status="#[fg=$thm_gray,bg=$thm_bg,nobold,nounderscore,noitalics]$l_left_separator#[fg=$thm_fg,bg=$thm_gray]#W #[fg=$thm_bg,bg=$thm_blue] #I#[fg=$thm_blue,bg=$thm_bg,nobold,nounderscore,noitalics]$l_right_separator "
|
||||
|
||||
local show_window_in_window_status_current
|
||||
readonly show_window_in_window_status_current="#[fg=$thm_gray,bg=$thm_bg,nobold,nounderscore,noitalics]$l_left_separator#[fg=$thm_fg,bg=$thm_gray]#W #[fg=$thm_bg,bg=$thm_orange] #I#[fg=$thm_orange,bg=$thm_bg,nobold,nounderscore,noitalics]$l_right_separator "
|
||||
|
||||
local show_user
|
||||
readonly show_user="#[fg=$thm_cyan,bg=$thm_bg,nobold,nounderscore,noitalics]$r_left_separator#[fg=$thm_bg,bg=$thm_cyan,nobold,nounderscore,noitalics]$user_icon #[fg=$thm_fg,bg=$thm_gray] #(whoami) #[fg=$thm_gray,bg=$thm_bg,nobold,nounderscore,noitalics]$r_right_separator "
|
||||
|
||||
local show_host
|
||||
readonly show_host="#[fg=$thm_magenta,bg=$thm_bg,nobold,nounderscore,noitalics]$r_left_separator#[fg=$thm_bg,bg=$thm_magenta,nobold,nounderscore,noitalics]$host_icon #[fg=$thm_fg,bg=$thm_gray] #H #[fg=$thm_gray,bg=$thm_bg,nobold,nounderscore,noitalics]$r_right_separator "
|
||||
|
||||
local show_date_time
|
||||
readonly show_date_time="#[fg=$thm_blue,bg=$thm_bg,nobold,nounderscore,noitalics]$r_left_separator#[fg=$thm_bg,bg=$thm_blue,nobold,nounderscore,noitalics]$datetime_icon #[fg=$thm_fg,bg=$thm_gray] $date_time #[fg=$thm_gray,bg=$thm_bg,nobold,nounderscore,noitalics]$r_right_separator "
|
|
@ -1,30 +0,0 @@
|
|||
local show_directory
|
||||
readonly show_directory="#[fg=$thm_pink,bg=$thm_bg,nobold,nounderscore,noitalics]$r_left_separator#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics] $directory_icon #{b:pane_current_path} $r_right_separator"
|
||||
|
||||
local show_window
|
||||
readonly show_window="#[fg=$thm_pink,bg=$thm_bg,nobold,nounderscore,noitalics]$r_left_separator#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics] $window_icon #W $r_right_separator"
|
||||
|
||||
local show_session
|
||||
readonly show_session="#[fg=$thm_green,bg=$thm_bg,nobold,nounderscore,noitalics]#{?client_prefix,#[fg=$thm_red],#[fg=$thm_green]}$r_left_separator#{?client_prefix,#[bg=$thm_red],#[bg=$thm_green]}#[fg=$thm_bg] $session_icon #S #{?client_prefix,#[bg=$thm_red],#[bg=$thm_green]}#[fg=$thm_bg]$r_right_separator"
|
||||
|
||||
local show_directory_in_window_status
|
||||
readonly show_directory_in_window_status="#[fg=$thm_bg,bg=$thm_gray,nobold,noitalics,nounderscore]$l_left_separator #[fg=$thm_fg,bg=$thm_gray,nobold,noitalics,nounderscore]#I #{b:pane_current_path} #[fg=$thm_gray,bg=$thm_bg,nobold,noitalics,nounderscore]$l_right_separator"
|
||||
|
||||
local show_directory_in_window_status_current
|
||||
readonly show_directory_in_window_status_current="#[fg=$thm_bg,bg=$thm_blue,nobold,noitalics,nounderscore]$l_left_separator #[fg=$thm_bg,bg=$thm_blue,nobold,noitalics,nounderscore]#I #{b:pane_current_path} #[fg=$thm_blue,bg=$thm_bg,nobold,noitalics,nounderscore]$l_right_separator"
|
||||
|
||||
local show_window_in_window_status
|
||||
readonly show_window_in_window_status="#[fg=$thm_bg,bg=$thm_gray,nobold,noitalics,nounderscore]$l_left_separator #[fg=$thm_fg,bg=$thm_gray,nobold,noitalics,nounderscore]#W #I #[fg=$thm_gray,bg=$thm_bg,nobold,noitalics,nounderscore]$l_right_separator"
|
||||
|
||||
local show_window_in_window_status_current
|
||||
readonly show_window_in_window_status_current="#[fg=$thm_bg,bg=$thm_blue,nobold,noitalics,nounderscore]$l_left_separator #[fg=$thm_bg,bg=$thm_blue,nobold,noitalics,nounderscore]#W #I #[fg=$thm_blue,bg=$thm_bg,nobold,noitalics,nounderscore]$l_right_separator"
|
||||
|
||||
local show_user
|
||||
readonly show_user="#[fg=$thm_cyan,bg=$thm_bg,nobold,nounderscore,noitalics]$r_left_separator#[fg=$thm_bg,bg=$thm_cyan,nobold,nounderscore,noitalics] $user_icon #(whoami) $r_right_separator"
|
||||
|
||||
local show_host
|
||||
readonly show_host="#[fg=$thm_magenta,bg=$thm_bg,nobold,nounderscore,noitalics]$r_left_separator#[fg=$thm_bg,bg=$thm_magenta,nobold,nounderscore,noitalics] $host_icon #H $r_right_separator"
|
||||
|
||||
local show_date_time
|
||||
readonly show_date_time="#[fg=$thm_blue,bg=$thm_bg,nobold,nounderscore,noitalics]$r_left_separator#[fg=$thm_bg,bg=$thm_blue,nobold,nounderscore,noitalics] $datetime_icon $date_time $r_right_separator"
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
local show_directory
|
||||
readonly show_directory="#[fg=$thm_pink,bg=$thm_bg,nobold,nounderscore,noitalics]$r_left_separator#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics] #{b:pane_current_path} $r_right_separator"
|
||||
|
||||
local show_window
|
||||
readonly show_window="#[fg=$thm_pink,bg=$thm_bg,nobold,nounderscore,noitalics]$r_left_separator#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics] #W $r_right_separator"
|
||||
|
||||
local show_session
|
||||
readonly show_session="#[fg=$thm_green,bg=$thm_bg,nobold,nounderscore,noitalics]#{?client_prefix,#[fg=$thm_red],#[fg=$thm_green]}$r_left_separator#{?client_prefix,#[bg=$thm_red],#[bg=$thm_green]}#[fg=$thm_bg] #S #{?client_prefix,#[bg=$thm_red],#[bg=$thm_green]}#[fg=$thm_bg]$r_right_separator"
|
||||
|
||||
local show_directory_in_window_status
|
||||
readonly show_directory_in_window_status="#[fg=$thm_bg,bg=$thm_gray,nobold,noitalics,nounderscore]$l_left_separator #[fg=$thm_fg,bg=$thm_gray,nobold,noitalics,nounderscore]#I #{b:pane_current_path} #[fg=$thm_gray,bg=$thm_bg,nobold,noitalics,nounderscore]$l_right_separator"
|
||||
|
||||
local show_directory_in_window_status_current
|
||||
readonly show_directory_in_window_status_current="#[fg=$thm_bg,bg=$thm_blue,nobold,noitalics,nounderscore]$l_left_separator #[fg=$thm_bg,bg=$thm_blue,nobold,noitalics,nounderscore]#I #{b:pane_current_path} #[fg=$thm_blue,bg=$thm_bg,nobold,noitalics,nounderscore]$l_right_separator"
|
||||
|
||||
local show_window_in_window_status
|
||||
readonly show_window_in_window_status="#[fg=$thm_bg,bg=$thm_gray,nobold,noitalics,nounderscore]$l_left_separator #[fg=$thm_fg,bg=$thm_gray,nobold,noitalics,nounderscore]#W #I #[fg=$thm_gray,bg=$thm_bg,nobold,noitalics,nounderscore]$l_right_separator"
|
||||
|
||||
local show_window_in_window_status_current
|
||||
readonly show_window_in_window_status_current="#[fg=$thm_bg,bg=$thm_blue,nobold,noitalics,nounderscore]$l_left_separator #[fg=$thm_bg,bg=$thm_blue,nobold,noitalics,nounderscore]#W #I #[fg=$thm_blue,bg=$thm_bg,nobold,noitalics,nounderscore]$l_right_separator"
|
||||
|
||||
local show_user
|
||||
readonly show_user="#[fg=$thm_cyan,bg=$thm_bg,nobold,nounderscore,noitalics]$r_left_separator#[fg=$thm_bg,bg=$thm_cyan,nobold,nounderscore,noitalics] #(whoami) $r_right_separator"
|
||||
|
||||
local show_host
|
||||
readonly show_host="#[fg=$thm_magenta,bg=$thm_bg,nobold,nounderscore,noitalics]$r_left_separator#[fg=$thm_bg,bg=$thm_magenta,nobold,nounderscore,noitalics] #H $r_right_separator"
|
||||
|
||||
local show_date_time
|
||||
readonly show_date_time="#[fg=$thm_blue,bg=$thm_bg,nobold,nounderscore,noitalics]$r_left_separator#[fg=$thm_bg,bg=$thm_blue,nobold,nounderscore,noitalics] $date_time $r_right_separator"
|
10
status/application.sh
Normal file
|
@ -0,0 +1,10 @@
|
|||
show_application() {
|
||||
local index=$1
|
||||
local icon="$(get_tmux_option "@catppuccin_application_icon" "")"
|
||||
local color="$(get_tmux_option "@catppuccin_application_color" "$thm_pink")"
|
||||
local text="$(get_tmux_option "@catppuccin_application_text" "#W")"
|
||||
|
||||
local module=$( build_status_module "$index" "$icon" "$color" "$text" )
|
||||
|
||||
echo $module
|
||||
}
|
11
status/date_time.sh
Normal file
|
@ -0,0 +1,11 @@
|
|||
show_date_time() {
|
||||
local index=$1
|
||||
local icon="$(get_tmux_option "@catppuccin_date_time_icon" "")"
|
||||
local color="$(get_tmux_option "@catppuccin_date_time_color" "$thm_blue")"
|
||||
local text="$(get_tmux_option "@catppuccin_date_time_text" "%Y-%m-%d %H:%M")"
|
||||
|
||||
local module=$( build_status_module "$index" "$icon" "$color" "$text" )
|
||||
|
||||
echo $module
|
||||
}
|
||||
|
10
status/directory.sh
Normal file
|
@ -0,0 +1,10 @@
|
|||
show_directory() {
|
||||
local index=$1
|
||||
local icon="$(get_tmux_option "@catppuccin_directory_icon" "")"
|
||||
local color="$(get_tmux_option "@catppuccin_directory_color" "$thm_pink")"
|
||||
local text="$(get_tmux_option "@catppuccin_directory_text" "#{b:pane_current_path}")"
|
||||
|
||||
local module=$( build_status_module "$index" "$icon" "$color" "$text" )
|
||||
|
||||
echo $module
|
||||
}
|
10
status/host.sh
Normal file
|
@ -0,0 +1,10 @@
|
|||
show_host() {
|
||||
local index=$1
|
||||
local icon="$(get_tmux_option "@catppuccin_host_icon" "")"
|
||||
local color="$(get_tmux_option "@catppuccin_host_color" "$thm_magenta")"
|
||||
local text="$(get_tmux_option "@catppuccin_host_text" "#H")"
|
||||
|
||||
local module=$( build_status_module "$index" "$icon" "$color" "$text" )
|
||||
|
||||
echo $module
|
||||
}
|
33
status/session.sh
Normal file
|
@ -0,0 +1,33 @@
|
|||
show_session() {
|
||||
local index=$1
|
||||
local icon="$(get_tmux_option "@catppuccin_session_icon" "")"
|
||||
local text="$(get_tmux_option "@catppuccin_session_text" "#S")"
|
||||
|
||||
if [[ $index -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 "
|
||||
|
||||
if [[ $status_fill == "icon" ]]
|
||||
then
|
||||
local show_text="#[fg=$thm_fg,bg=$thm_gray] $text"
|
||||
local show_right_separator="#[fg=$thm_gray,bg=$thm_bg,nobold,nounderscore,noitalics]$status_right_separator"
|
||||
fi
|
||||
|
||||
if [[ $status_fill == "all" ]]
|
||||
then
|
||||
local show_text="#[fg=$thm_bg]$text"
|
||||
local show_right_separator="#[fg=$thm_green]#[bg=$thm_bg]#{?client_prefix,#[fg=$thm_red],#[fg=$thm_green]}$status_right_separator"
|
||||
fi
|
||||
|
||||
if [[ $status_right_separator_inverse == "yes" ]]
|
||||
then
|
||||
local show_right_separator="#[fg=$thm_bg]$status_right_separator"
|
||||
fi
|
||||
|
||||
echo "$show_left_separator$show_icon$show_text$show_right_separator"
|
||||
}
|
10
status/user.sh
Normal file
|
@ -0,0 +1,10 @@
|
|||
show_user() {
|
||||
local index=$1
|
||||
local icon="$(get_tmux_option "@catppuccin_user_icon" "")"
|
||||
local color="$(get_tmux_option "@catppuccin_user_color" "$thm_cyan")"
|
||||
local text="$(get_tmux_option "@catppuccin_user_text" "#(whoami)")"
|
||||
|
||||
local module=$( build_status_module "$index" "$icon" "$color" "$text" )
|
||||
|
||||
echo $module
|
||||
}
|
11
window/window_current_format.sh
Normal file
|
@ -0,0 +1,11 @@
|
|||
show_window_current_format() {
|
||||
local number="#I"
|
||||
local color="$thm_orange"
|
||||
local background="$thm_bg"
|
||||
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
|
||||
|
||||
local current_window_format=$( build_window_format "$number" "$color" "$background" "$text" "$fill" )
|
||||
|
||||
echo "$current_window_format"
|
||||
}
|
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"
|
||||
}
|