Skip to content

Latest commit

ย 

History

History
386 lines (272 loc) ยท 12.1 KB

README.md

File metadata and controls

386 lines (272 loc) ยท 12.1 KB

Logo
Catppuccin for Tmux

Content

  1. Themes
  2. Installation
  3. Overview
  4. Configuration options
    1. Window
    2. Window default
    3. Window current
    4. Status
    5. Pane
    6. Customizing modules
    7. Battery module
    8. CPU module
    9. Weather modules
    10. Load module
  5. Create a custom module
  6. Configuration Examples
    1. Config 1
    2. Config 2
    3. Config 3

Themes

Installation

In order to have the icons displayed correctly please use/update your favorite patched font. If you do not have a patched font installed, you can override or remove any icon. Check the documentation below on the options available.

Manual (Recommended)

This method is recommended as TPM has some issues with name conflicts.

  1. Clone this repository to your desired location (e.g. ~/.config/tmux/plugins/catppuccin).
mkdir -p ~/.config/tmux/plugins/catppuccin
git clone https://github.com/catppuccin/tmux.git ~/.config/tmux/plugins/catppuccin/tmux
  1. Add the following line to your tmux.conf file: run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
  2. (Optional) Set your preferred flavor and/or add configuration options as listed in Configuration Options. These options must be added above the run ~/.config... line.
  3. Reload Tmux by either restarting or reloading with tmux source ~/.tmux.conf

TPM

  1. Install TPM
  2. Add the Catppuccin plugin:
# See https://github.com/catppuccin/tmux/tags for additional tags
set -g @plugin 'catppuccin/tmux#latest'
# ...above
set -g @plugin 'tmux-plugins/tpm'
  1. (Optional) Set your preferred flavor, it defaults to "mocha":
set -g @catppuccin_flavor 'mocha' # latte, frappe, macchiato or mocha

Overview

Default This is a diagram of how the theme is split between its components.

Configuration options

All flavors support certain levels of customization that match our Catppuccin Style Guide. To add these customizations, add any of the following options to your Tmux configuration.

Window

The plugin comes with three window styles built in, these can be customized by setting the @catppuccin_window_status_style option. The default is basic.

Option Effect
basic Simple styling with blocks.
rounded Each window is separated with rounded separators.
slanted Each window is separated with slanted separators.
custom Custom separators are used.
none Styling of the window status is completely disabled.

If you want to change the active color to something else (the default is peach), use the following. For example to use lavender:

set -g @catppuccin_window_current_background "#{@thm_lavender}"
Customising the separators

Add the following (above set -g @plugin "catppuccin/tmux" if using TPM), setting whatever values you'd like for the separators:

set -g @catppuccin_window_status_style "custom"
set -g @catppuccin_window_left_separator ""
set -g @catppuccin_window_middle_separator ""
set -g @catppuccin_window_right_separator ""

Pane

Set the pane border style

set -g @catppuccin_pane_border_style "fg=#{@thm_surface_0}" # Use a value compatible with the standard tmux 'pane-border-style'

Set the pane active border style

set -g @catppuccin_pane_active_border_style "fg=#{@thm_peach}" # Use a value compatible with the standard tmux 'pane-border-active-style'

Menu

Set the menu selected style:

set -g @catppuccin_menu_selected_style "fg=#{@thm_surface_0},bg=#{@thm_yellow}" # Use a value compatible with the standard tmux `menu-selected-style`

Status Line

Set the default status bar visibility:

set -g @catppuccin_status_default "on"

Override the default status background color:

set -g @catppuccin_status_background "default"

This will overwrite the status bar background:

  • default will use the color from the selected theme
  • none will make the status bar transparent
  • use hex color codes for other colors or a theme color (#{@thm_<color>})

Note: you need to restart tmux for this to take effect:

tmux kill-server && tmux

Set the status module left separator:

set -g @catppuccin_status_left_separator "๎‚ถ"

Set the status module right separator:

set -g @catppuccin_status_right_separator "โ–ˆ"

Set the status connect separator:

set -g @catppuccin_status_connect_separator "yes"

Possible values:

  • yes - the background color of the separator will not blend in with the background color of tmux
  • no - the background color of the separator will blend in with the background color of tmux

Set the status module color fill:

set -g @catppuccin_status_fill "icon"

Values:

  • icon - only the icon of the module will have color
  • all - the entire module will have the same color

Set the status module justify value:

set -g @catppuccin_status_justify "left"

Values:

  • left
  • centre - puts the window list in the relative centre of the available free space
  • right
  • absolute-centre - uses the centre of the entire horizontal space

Pane Options

By default no pane styling options are set. To enable, set @catppuccin_pane_status_enabled to yes.

Defaults:

set -g @catppuccin_pane_status_enabled "no"
set -g @catppuccin_pane_border_status "off" # See `pane-border-status`
set -g @catppuccin_pane_left_separator "โ–ˆ"
set -g @catppuccin_pane_right_separator "โ–ˆ"
set -g @catppuccin_pane_middle_separator "โ–ˆ"
set -g @catppuccin_pane_number_position "left"
set -g @catppuccin_pane_default_fill "number"
set -g @catppuccin_pane_default_text "#{b:pane_current_path}"
set -g @catppuccin_pane_border_style "fg=#{@thm_overlay_0}"
set -g @catppuccin_pane_active_border_style "#{?pane_in_mode,fg=#{@thm_lavender},#{?pane_synchronized,fg=#{@thm_magenta},fg=#{@thm_lavender}}}"
set -g @catppuccin_pane_color "#{@thm_green}"
set -g @catppuccin_pane_background_color "#{@thm_surface_0}"

Using the theme's built-in status modules

To use the theme's built in status modules, set the status-left and status-right tmux options after the plugin has been loaded.

The tmux status line modules are set as variables and prefixed with @catppuccin_status_<module>.

To use the application and session modules on the right and have nothing on the left:

set -gF status-right "#{E:@catpuccin_status_application}#{E:@catppuccin_status_session}"
set -g status-left ""

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
  • uptime - display the uptime
  • battery - display the battery

For a full list of modules and their options see status.

Configuration Examples

Below are provided a few configurations as examples or starting points.

Note: When switching between configurations run:

tmux kill-server

To kill the tmux server and clear all global variables.

Config 1

Default

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_left_separator "โ–ˆ"
set -g @catppuccin_status_right_separator "โ–ˆ"

set -g @catppuccin_date_time_text "%Y-%m-%d %H:%M:%S"

# Run catppuccin plugin manually or through tpm
# ...

set -gF  status-right "#{E:@catppuccin_status_application}"
set -agF status-right "#{E:@catppuccin_status_session}"
set -agF status-right "#{E:@catppuccin_status_user}"
set -agF status-right "#{E:@catppuccin_status_host}"
set -agF status-right "#{E:@catppuccin_status_date_time}"

Config 2

Default

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_left_separator  "๎‚ถ"
set -g @catppuccin_status_right_separator " ๎‚ถ"
set -g @catppuccin_status_fill "all"
set -g @catppuccin_status_connect_separator "yes"

# Run catppuccin plugin manually or through tpm
# ...

set -gF status-right "#{E:@catppuccin_status_application}#{E:@catppuccin_status_session}#{E:@catppuccin_status_date_time}"

Config 3

Default

set -g @catppuccin_window_left_separator "๎‚ถ"
set -g @catppuccin_window_right_separator "๎‚ดย "
set -g @catppuccin_window_middle_separator " โ–ˆ"
set -g @catppuccin_window_number_position "right"

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_left_separator  " ๎‚ถ"
set -g @catppuccin_status_right_separator "๎‚ด"
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_status_connect_separator "no"

set -g @catppuccin_directory_text "#{pane_current_path}"

# Run catppuccin plugin manually or through tpm
# ...

set -gF  status-right "#{E:@catppuccin_status_directory}"
set -agF status-right "#{E:@catppuccin_status_user}"
set -agF status-right "#{E:@catppuccin_status_host}"
set -agF status-right "#{E:@catppuccin_status_session}"

๐Ÿ’ Thanks to

ย 

Copyright ยฉ 2021-present Catppuccin Org