Skip to content

Commit

Permalink
docs: move the status line docs to the docs dir
Browse files Browse the repository at this point in the history
  • Loading branch information
kjnsn committed Oct 16, 2024
1 parent d8c77f6 commit 9d0c14a
Show file tree
Hide file tree
Showing 4 changed files with 208 additions and 281 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ Available modules:
- `uptime` - display the uptime
- `battery` - display the battery
For a full list of modules and their options see [status](./status/README.md).
For a full list of modules and their options see [status](./docs/status-line-reference.md).
## Configuration Examples
Expand Down
9 changes: 6 additions & 3 deletions custom/README.md → docs/custom-status-guide.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# 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.
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:

Expand All @@ -10,9 +11,11 @@ You can add arbitrary things to the status line like so:
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.
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:
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]󱀙 "
Expand Down
201 changes: 201 additions & 0 deletions docs/status-line-reference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
### 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"
```

#### 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

**Requirements:** This module depends on [tmux-loadavg](https://github.com/jamesoff/tmux-loadavg).

**Install:** The preferred way to install tmux-loadavg 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_load}"

set -g @plugin 'jamesoff/tmux-loadavg'
run '~/.tmux/plugins/tpm/tpm'
```

### 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}"
```

To customize the gitmux module, you can follow the instrucctions in the [gitmux documentation](https://github.com/arl/gitmux/blob/main/README.md#customizing).

### 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'
```
Loading

0 comments on commit 9d0c14a

Please sign in to comment.