moved etc into usr folder

This commit is contained in:
tumillanino
2026-03-24 20:57:42 +11:00
parent 4b6c30e0b2
commit 451d8a0391
1869 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
## Design Philosophy
First and foremost, this is a color scheme. Making colors work
well takes precedence over other kinds of functionality.
### History
This plugin kept on growing essentially because no one was there to push back on
changes that went against, for example, parts of the UNIX philosophy. This lead to
a state where there were almost an infinite number of configuration options,
and combining them in unique ways would almost certainly break something.
Maintaining the options for everyone's setup was impossible, and fixing
one bug would cause several others to appear. Eventually the addition
of more and more things that didn't relate to colors, such as status line modules,
took time away from getting the basics right.
Moving forward, we will be trying to align with the philosophies listed below.
This is in contrast to what the plugin has historically offered in terms of functionality.
### UNIX Philosphy
1. Write programs that do one thing and do it well.
- Do colors, and do colors well. Other things like displaying the weather
are not the responsibility of this plugin.
1. Write programs to work together.
- The full palette is exposed as user options, allowing
easy integration with any other kind of tmux configuration.
1. Write programs to handle text streams, because that is a universal interface.
- TMUX is a text based program. Each of the palette options are strings
in user options that can be piped into other programs and options.
### Configurability is the root of all evil
Adopted from "[Fish Shell's design philophy](https://fishshell.com/docs/current/design.html)".
Every configuration option in a program is a place where the program is too
stupid to figure out for itself what the user really wants, and should be
considered a failure of both the program and the programmer who implemented it.
Rationale: Different configuration options are a nightmare to maintain, since
the number of potential bugs caused by specific configuration combinations
quickly becomes an issue. Configuration options often imply assumptions about
the code which change when reimplementing the code, causing issues with
backwards compatibility. But mostly, configuration options should be avoided
since they simply should not exist, as the program should be smart enough to do
what is best, or at least a good enough approximation of it.
### The law of orthogonality
The set of options that do exist should have a small set of orthogonal features.
Any situation where two options are related but not identical, one of them
should be removed, and the other should be made powerful and general enough to
handle all common use cases of either feature.
Rationale: Related features make the configuration options larger, which makes
it harder to use. It also increases the size of the source code, making the
program harder to maintain and update.

View File

@@ -0,0 +1,37 @@
# Frequently Asked Questions
## Window Names
By default, window names are the pane title, and the pane title is
set by the shell running in each pane. Oh My ZSH does this [automatically](https://github.com/ohmyzsh/ohmyzsh/wiki/Settings#automatic-title),
as does [fish](https://fishshell.com/docs/current/cmds/fish_title.html).
The format string used can be changed by setting the following options:
```bash
set -g @catppuccin_window_text "#W"
set -g @catppuccin_window_current_text "#W"
```
The window title is `#W`, the current path is `#{b:pane_current_path}`. A huge
amount of customisation is possible, and is explained in depth
in the "[tmux man page](https://man7.org/linux/man-pages/man1/tmux.1.html#FORMATS)".
## Symbols are not displaying
Make sure you have installed a [Nerd Font](https://www.nerdfonts.com/),
and that your terminal is set to use that font.
## My options are not being applied
Go through these steps:
1. Completely kill tmux and restart (`killall tmux`).
1. Ensure every `@catppuccin.*` option is being set _before_
the plugin is loaded. Loading occurs where you have `run` in your config file.
1. Double check for typos. There are two "c"s and two "p"s in "catppuccin".
1. Do not use `-o` to set options that begin with `@`. The `-o` flag means that
the option will not be set if it has already been set. You do not need this
in your config file.
1. Double check that any option that does _not_ start with `@` is set after the
plugin is loaded.

View File

@@ -0,0 +1,116 @@
## Configuration Reference
<img src="../../assets/structure.svg" style="background: #eff1f5" />
This is a diagram of how the theme is split between its components.
### Top Level Options
| Option | Effect |
| -------------------- | ------------------------------------------------------------------------------ |
| `@catppuccin_flavor` | Sets the catppuccin flavor, one of "latte", "frappe", "macchiato", or "mocha". |
### Status Line
| Option | Effect |
| ----------------------------- | --------------------------------------------- |
| @catppuccin_status_background | Sets the background color of the status line. |
- `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>}`)
### 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 | Preview |
| --------- | ------------------------------------------------------------------------ | ------------------------------------------------------ |
| `basic` | Simple styling with blocks. | ![window basic](../../assets/window-basic.webp) |
| `rounded` | Each window is separated with rounded separators. | ![window rounded style](../../assets/window-rounded.webp) |
| `slanted` | Each window is separated with slanted separators. | ![window slanted style](../../assets/window-slanted.webp) |
| `custom` | Custom separators are used. This is required to override the separators! | |
| `none` | Styling of the window status is completely disabled. | ![window no styling](../../assets/window-none.webp) |
If you want to change the active color to something else (the default is mauve),
use the following. For example to use lavender:
```bash
set -g @catppuccin_window_current_number_color "#{@thm_lavender}"
```
<details>
<summary>Customising the separators</summary>
Add the following,
setting whatever values you'd like for the separators:
```bash
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 ""
```
</details>
### Menu
**Set the menu selected style:**
```sh
# Use a value compatible with the standard tmux `menu-selected-style`
set -g @catppuccin_menu_selected_style "fg=#{@thm_surface_0},bg=#{@thm_yellow}"
```
### All options and their defaults
```bash
# Menu styling options
set -ogq @catppuccin_menu_selected_style "fg=#{@thm_fg},bold,bg=#{@thm_overlay_0}"
# Pane styling options
set -ogq @catppuccin_pane_status_enabled "no" # set to "yes" to enable
set -ogq @catppuccin_pane_border_status "off" # set to "yes" to enable
set -ogq @catppuccin_pane_border_style "fg=#{@thm_overlay_0}"
set -ogq @catppuccin_pane_active_border_style "##{?pane_in_mode,fg=#{@thm_lavender},##{?pane_synchronized,fg=#{@thm_mauve},fg=#{@thm_lavender}}}"
set -ogq @catppuccin_pane_left_separator "█"
set -ogq @catppuccin_pane_middle_separator "█"
set -ogq @catppuccin_pane_right_separator "█"
set -ogq @catppuccin_pane_color "#{@thm_green}"
set -ogq @catppuccin_pane_background_color "#{@thm_surface_0}"
set -ogq @catppuccin_pane_default_text "##{b:pane_current_path}"
set -ogq @catppuccin_pane_default_fill "number"
set -ogq @catppuccin_pane_number_position "left" # right, left
set -ogq @catppuccin_window_status_style "basic" # basic, rounded, slanted, custom, or none
set -ogq @catppuccin_window_text_color "#{@thm_surface_0}"
set -ogq @catppuccin_window_number_color "#{@thm_overlay_2}"
set -ogq @catppuccin_window_text " #T"
set -ogq @catppuccin_window_number "#I"
set -ogq @catppuccin_window_current_text_color "#{@thm_surface_1}"
set -ogq @catppuccin_window_current_number_color "#{@thm_mauve}"
set -ogq @catppuccin_window_current_text " #T"
set -ogq @catppuccin_window_current_number "#I"
set -ogq @catppuccin_window_number_position "left"
set -ogq @catppuccin_window_flags "none" # none, icon, or text
set -ogq @catppuccin_window_flags_icon_last " 󰖰" # -
set -ogq @catppuccin_window_flags_icon_current " 󰖯" # *
set -ogq @catppuccin_window_flags_icon_zoom " 󰁌" # Z
set -ogq @catppuccin_window_flags_icon_mark " 󰃀" # M
set -ogq @catppuccin_window_flags_icon_silent " 󰂛" # ~
set -ogq @catppuccin_window_flags_icon_activity " 󱅫" # #
set -ogq @catppuccin_window_flags_icon_bell " 󰂞" # !
# Matches icon order when using `#F` (`#!~[*-]MZ`)
set -ogq @catppuccin_window_flags_icon_format "##{?window_activity_flag,#{E:@catppuccin_window_flags_icon_activity},}##{?window_bell_flag,#{E:@catppuccin_window_flags_icon_bell},}##{?window_silence_flag,#{E:@catppuccin_window_flags_icon_silent},}##{?window_active,#{E:@catppuccin_window_flags_icon_current},}##{?window_last_flag,#{E:@catppuccin_window_flags_icon_last},}##{?window_marked_flag,#{E:@catppuccin_window_flags_icon_mark},}##{?window_zoomed_flag,#{E:@catppuccin_window_flags_icon_zoom},} "
# Status line options
set -ogq @catppuccin_status_left_separator ""
set -ogq @catppuccin_status_middle_separator ""
set -ogq @catppuccin_status_right_separator "█"
set -ogq @catppuccin_status_connect_separator "yes" # yes, no
set -ogq @catppuccin_status_fill "icon"
set -ogq @catppuccin_status_module_bg_color "#{@thm_surface_0}"
```

View File

@@ -0,0 +1,239 @@
## 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 with `run`.
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:
```sh
set -g status-right-length 100
set -g status-right "#{E:@catppuccin_status_application}#{E:@catppuccin_status_session}"
set -g status-left ""
```
## Customizing modules
Every module 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"
```
### Override the specific module's background color
```sh
set -g @catppuccin_status_[module_name]_bg_color "#{@thm_surface_0}"
```
### Removing a specific module option
```sh
set -g @catppuccin_[module_name]_[option] ""
```
This is for the situation where you want to remove the icon from a module.
For example:
```sh
set -g @catppuccin_date_time_icon ""
```
### Notes for TPM users
Make sure you load the catppuccin theme prior to setting the status-left and/or
status-left options. This ensures the catppuccin options (such as colors and
status modules) are defined so they can then be used.
After status-left and/or status-left have been set, make sure to run TPM to load
the modules. This runs any plugins that may replace text in the status line.
```bash
# load catppuccin theme ...
run '~/.config/tmux/plugins/tmux/catppuccin.tmux' # or where this file is located on your machine
# ... and then set status-left & status-right ...
set -g status-left "#{E:@catppuccin_status_session}"
set -g status-right "#{E:@catppuccin_status_[module_name]}"
set -ag status-right "#{E:@catppuccin_status_[module_name]}"
set -agF status-right "#{E:@catppuccin_status_[module_name]}"
# ... and finally start TPM
set -g @plugin 'tmux-plugins/tpm'
run '~/.tmux/plugins/tpm/tpm'
```
## Battery module
**Requirements:** This module depends on [tmux-battery](https://github.com/tmux-plugins/tmux-battery/tree/master).
**Install:** The preferred way to install tmux-battery is using [TPM](https://github.com/tmux-plugins/tpm).
**Configure:**
```sh
run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
set -agF status-right "#{E:@catppuccin_status_battery}"
set -g @plugin 'tmux-plugins/tmux-battery'
run '~/.tmux/plugins/tpm/tpm'
```
## CPU module
**Requirements:** This module depends on [tmux-cpu](https://github.com/tmux-plugins/tmux-cpu/tree/master).
**Install:** The preferred way to install tmux-cpu is using [TPM](https://github.com/tmux-plugins/tpm).
**Configure:**
```sh
run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
set -agF status-right "#{E:@catppuccin_status_cpu}"
set -g @plugin 'tmux-plugins/tmux-cpu'
run '~/.tmux/plugins/tpm/tpm'
```
## Weather modules
### tmux-weather
**Requirements:** This module depends on [tmux-weather](https://github.com/xamut/tmux-weather).
**Install:** The preferred way to install tmux-weather is using [TPM](https://github.com/tmux-plugins/tpm).
**Configure:**
```sh
run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
set -agF status-right "#{E:@catppuccin_status_weather}"
set -g @plugin 'xamut/tmux-weather'
run '~/.tmux/plugins/tpm/tpm'
```
### tmux-clima
**Requirements:** This module depends on [tmux-clima](https://github.com/vascomfnunes/tmux-clima).
**Install:** The preferred way to install tmux-clima is using [TPM](https://github.com/tmux-plugins/tpm).
**Configure:**
```sh
run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
set -agF status-right "#{E:@catppuccin_status_clima}"
set -g @plugin 'vascomfnunes/tmux-clima'
run '~/.tmux/plugins/tpm/tpm'
```
## Load module
**Configure:**
```sh
run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
set -agF status-right "#{E:@catppuccin_status_load}"
```
## Gitmux module
**Requirements:** This module depends on [gitmux](https://github.com/arl/gitmux).
**Install:** To install gitmux, follow the instructions in the [gitmux documentation](https://github.com/arl/gitmux/blob/main/README.md#installing).
**Configure:**
Add the gitmux module to the status modules list.
```sh
run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
set -agF status-right "#{@catppuccin_status_gitmux}"
```
Follow the instructions in the [gitmux documentation](https://github.com/arl/gitmux/blob/main/README.md#customizing)
to create a gitmux config file. The gitmux plugin expects a file to be present
at `~/.gitmux.conf`.
Add the following to your `~/.gitmux.conf` so that it uses catppuccin colors:
```yaml
tmux:
styles:
clear: "#[fg=#{@thm_fg}]"
state: "#[fg=#{@thm_red},bold]"
branch: "#[fg=#{@thm_fg},bold]"
remote: "#[fg=#{@thm_teal}]"
divergence: "#[fg=#{@thm_fg}]"
staged: "#[fg=#{@thm_green},bold]"
conflict: "#[fg=#{@thm_red},bold]"
modified: "#[fg=#{@thm_yellow},bold]"
untracked: "#[fg=#{@thm_mauve},bold]"
stashed: "#[fg=#{@thm_blue},bold]"
clean: "#[fg=#{@thm_rosewater},bold]"
insertions: "#[fg=#{@thm_green}]"
deletions: "#[fg=#{@thm_red}]"
```
## Pomodoro module
**Requirements:**: This module depends on [tmux-pomodoro-plus](https://github.com/olimorris/tmux-pomodoro-plus/tree/main).
**Install:**: The preferred way to install tmux-pomodoro-plus is using [TPM](https://github.com/tmux-plugins/tpm).
**Configure:**
```sh
run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
set -agF status-right "#{E:@catppuccin_status_pomodoro_plus}"
set -g @plugin 'olimorris/tmux-pomodoro-plus'
run '~/.tmux/plugins/tpm/tpm'
```
## Kube module
**Requirements:** This module depends on [kube-tmux](https://github.com/jonmosco/kube-tmux).
**Install:** The preferred way to install kube-tmux is using [TPM](https://github.com/tmux-plugins/tpm).
**Configure:**
```sh
set -g @catppuccin_kube_context_color "#{@thm_red}"
set -g @catppuccin_kube_namespace_color "#{@thm_sky}"
run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
set -agF status-right "#{E:@catppuccin_status_kube}"
set -g @plugin 'jonmosco/kube-tmux'
run '~/.tmux/plugins/tpm/tpm'
```

View File

@@ -0,0 +1,72 @@
Want to install the color scheme and make tmux pastel? Great! Here's how.
## Step 1: Clone this repository
<!-- x-release-please-start-version -->
```bash
mkdir -p ~/.config/tmux/plugins/catppuccin
git clone -b v2.1.3 https://github.com/catppuccin/tmux.git ~/.config/tmux/plugins/catppuccin/tmux
```
<!-- x-release-please-end -->
## Step 2: Edit your tmux configuration file
Using your favourite editor, edit the file `~/.tmux.conf`.
It should look like this:
```bash
set -g @catppuccin_flavor 'mocha'
run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
```
This will load the catppuccin plugin and apply the defaults.
To apply the changes to your configuration file, exit tmux completely
and start it again. You can also run `tmux source ~/.tmux.conf`, but this may
not work as well when changing options.
## Step 3: Customize
The default configuration looks a little bland. Let's change it to
be a bit more colorful. Edit your tmux config again so it looks like this.
```bash
# Pick a softer palette.
set -g @catppuccin_flavor 'frappe'
run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
# Make the status line more pleasant.
set -g status-left ""
set -g status-right '#[fg=#{@thm_crust},bg=#{@thm_teal}] session: #S '
# Ensure that everything on the right side of the status line
# is included.
set -g status-right-length 100
```
There is some new stuff here. Firstly, everything is documented in
the "[tmux man page](https://man7.org/linux/man-pages/man1/tmux.1.html)".
Go check it out if anything is unclear. The lines `set -g ...` are setting
"options". The `-g` means that the option is global, so it applies everywhere.
When an option name begins with `@`, then it is a "user" option and has no
effect on tmux itself. This is used to essentially set global variables.
Three options are set that control how tmux looks, `status-left`,
`status-right`, and `status-right-length`. These options are documented
in the man page, but the tl;dr is that they control what appears on the left
and right of the status line.
The `#[]` syntax is an embedded style, similar to inline css.
`fg=#{@thm_crust}` says "make the text the crust color". `@thm_crust` is a
user option set by the plugin. It is created by the line
`run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux`, so if you try
and use colors before that line, it won't work. The `#S` is a special sequence
that tmux replaces with the current session name. There are a long, long
"[list of special sequences](https://man7.org/linux/man-pages/man1/tmux.1.html#FORMATS)"
that tmux can replace.
If everything is working right, your version should look like this:
![Demonstration of basic configuration](../../assets/demos/basic.gif)

View File

@@ -0,0 +1,41 @@
# User Defined Status Line Modules
To create your own status line module that uses the catppuccin theme,
all you need to do is add it to the `status-left` or `status-right` options.
You can add arbitrary things to the status line like so:
```sh
# ~/.tmux.conf
set -agF status-right "#[fg=#{@thm_crust},bg=#{@thm_teal}] ##H "
```
This will append the current hostname (`#H`) to the status line with a teal
background and dark black text.
You can also use icons for styling, for example to show the used memory percentage
on MacOS:
```sh
set -g status-right "#[bg=#{@thm_flamingo},fg=#{@thm_crust}]#[reverse]#[noreverse]󱀙 "
set -ag status-right "#[fg=#{@thm_fg},bg=#{@thm_mantle}] #(memory_pressure | awk '/percentage/{print $5}') "
```
![Example of the custom ram module](../../assets/ram-example.webp)
To use the status module formatting that catppuccin uses, do the following:
```sh
# In ~/.tmux.conf, after the catppuccin plugin has been loaded.
%hidden MODULE_NAME="my_custom_module"
set -ogq "@catppuccin_${MODULE_NAME}_icon" " "
set -ogqF "@catppuccin_${MODULE_NAME}_color" "#{E:@thm_pink}"
set -ogq "@catppuccin_${MODULE_NAME}_text" "#{pane_current_command}"
source "<path to catppuccin plugin>/utils/status_module.conf"
set -g status-right "#{E:@catppuccin_status_application}#{E:@catppuccin_status_my_custom_module}"
```