diff --git a/README.md b/README.md index 8106ae2..9f3d10d 100644 --- a/README.md +++ b/README.md @@ -77,8 +77,8 @@ set -g @catppuccin_right_separator "█" ##### Enable DateTime -By default, the `date_time` componenet is set to off. -It can be enabled by specifing any tmux date and time format. +By default, the `date_time` component is set to off. +It can be enabled by specifying any tmux date and time format. ```sh set -g @catppuccin_date_time "%Y-%m-%d %H:%M" @@ -86,8 +86,8 @@ set -g @catppuccin_date_time "%Y-%m-%d %H:%M" ##### Enable User -By default, the `user` componenet is set to off. -It can be enabled by toggoling it on. +By default, the `user` component is set to off. +It can be enabled by toggling it on. ```sh set -g @catppuccin_user "on" @@ -95,13 +95,29 @@ set -g @catppuccin_user "on" ##### Enable Host -By default, the `host` componenet is set to off. -It can be enabled by toggoling it on. +By default, the `host` component is set to off. +It can be enabled by toggling it on. ```sh set -g @catppuccin_host "on" ``` +##### Customize Icons + +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* +```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" +``` + [style-guide]: https://github.com/catppuccin/catppuccin/blob/main/docs/style-guide.md ## 💝 Thanks to diff --git a/catppuccin.tmux b/catppuccin.tmux index 72ce019..36c5829 100755 --- a/catppuccin.tmux +++ b/catppuccin.tmux @@ -64,11 +64,11 @@ main() { local wt_enabled wt_enabled="$(get_tmux_option "@catppuccin_window_tabs_enabled" "off")" readonly wt_enabled - + local right_separator right_separator="$(get_tmux_option "@catppuccin_right_separator" "")" readonly right_separator - + local left_separator left_separator="$(get_tmux_option "@catppuccin_left_separator" "")" readonly left_separator @@ -77,23 +77,47 @@ main() { user="$(get_tmux_option "@catppuccin_user" "off")" readonly user + local user_icon + user_icon="$(get_tmux_option "@catppuccin_user_icon" "")" + readonly user_icon + local host host="$(get_tmux_option "@catppuccin_host" "off")" readonly host + 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 host_icon + host_icon="$(get_tmux_option "@catppuccin_host_icon" "󰒋")" + readonly host_icon + local date_time date_time="$(get_tmux_option "@catppuccin_date_time" "off")" readonly date_time + local datetime_icon + datetime_icon="$(get_tmux_option "@catppuccin_datetime_icon" "")" + readonly datetime_icon + # These variables are the defaults so that the setw and set calls are easier to parse. local show_directory - readonly show_directory="#[fg=$thm_pink,bg=$thm_bg,nobold,nounderscore,noitalics]$right_separator#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics] #[fg=$thm_fg,bg=$thm_gray] #{b:pane_current_path} #{?client_prefix,#[fg=$thm_red]" + readonly show_directory="#[fg=$thm_pink,bg=$thm_bg,nobold,nounderscore,noitalics]$right_separator#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics]$directory_icon #[fg=$thm_fg,bg=$thm_gray] #{b:pane_current_path} #{?client_prefix,#[fg=$thm_red]" local show_window - readonly show_window="#[fg=$thm_pink,bg=$thm_bg,nobold,nounderscore,noitalics]$right_separator#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics] #[fg=$thm_fg,bg=$thm_gray] #W #{?client_prefix,#[fg=$thm_red]" + readonly show_window="#[fg=$thm_pink,bg=$thm_bg,nobold,nounderscore,noitalics]$right_separator#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics]$window_icon #[fg=$thm_fg,bg=$thm_gray] #W #{?client_prefix,#[fg=$thm_red]" local show_session - readonly show_session="#[fg=$thm_green]}#[bg=$thm_gray]$right_separator#{?client_prefix,#[bg=$thm_red],#[bg=$thm_green]}#[fg=$thm_bg] #[fg=$thm_fg,bg=$thm_gray] #S " + readonly show_session="#[fg=$thm_green]}#[bg=$thm_gray]$right_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} " @@ -108,13 +132,13 @@ main() { 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]$left_separator#[fg=$thm_fg,bg=$thm_bg,nobold,nounderscore,noitalics] " local show_user - readonly show_user="#[fg=$thm_blue,bg=$thm_gray]$right_separator#[fg=$thm_bg,bg=$thm_blue] #[fg=$thm_fg,bg=$thm_gray] #(whoami) " + readonly show_user="#[fg=$thm_blue,bg=$thm_gray]$right_separator#[fg=$thm_bg,bg=$thm_blue]$user_icon #[fg=$thm_fg,bg=$thm_gray] #(whoami) " local show_host - readonly show_host="#[fg=$thm_blue,bg=$thm_gray]$right_separator#[fg=$thm_bg,bg=$thm_blue]󰒋 #[fg=$thm_fg,bg=$thm_gray] #H " + readonly show_host="#[fg=$thm_blue,bg=$thm_gray]$right_separator#[fg=$thm_bg,bg=$thm_blue]$host_icon #[fg=$thm_fg,bg=$thm_gray] #H " local show_date_time - readonly show_date_time="#[fg=$thm_blue,bg=$thm_gray]$right_separator#[fg=$thm_bg,bg=$thm_blue] #[fg=$thm_fg,bg=$thm_gray] $date_time " + readonly show_date_time="#[fg=$thm_blue,bg=$thm_gray]$right_separator#[fg=$thm_bg,bg=$thm_blue]$datetime_icon #[fg=$thm_fg,bg=$thm_gray] $date_time " # Right column 1 by default shows the Window name. local right_column1=$show_window