feat(status): allow modules in left_status

This commit is contained in:
lowstar 2023-08-29 09:10:14 +02:00
parent 7a284c98e5
commit e6890ce846
2 changed files with 15 additions and 7 deletions

View file

@ -32,7 +32,7 @@
1. [Config 1](#config-1)
2. [Config 2](#config-2)
3. [Config 3](#config-3)
## Themes
- 🌻 [Latte](./catppuccin-latte.tmuxtheme)
@ -143,7 +143,7 @@ Values:
#### Override the window default text:
```sh
set -g @catppuccin_window_default_text "#{b:pane_current_path}" # use "#W" for application instead of directory
set -g @catppuccin_window_default_text "#{b:pane_current_path}" # use "#W" for application instead of directory
```
### Window current
@ -159,7 +159,7 @@ Values:
#### Override the window current text:
```sh
set -g @catppuccin_window_current_text "#{b:pane_current_path}" # use "#W" for application instead of directory
set -g @catppuccin_window_current_text "#{b:pane_current_path}" # use "#W" for application instead of directory
```
#### Set the current directory format
@ -215,7 +215,12 @@ Values:
```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.
Provide a list of modules and the order in which you want them to appear in the status.
Modules can also be added to the left status:
```sh
set -g @catppuccin_left_status_modules "session"
```
Available modules:
- application - display the current window running application
@ -245,7 +250,7 @@ set -g @catppuccin_[module_name]_color "color"
set -g @catppuccin_[module_name]_text "text"
```
#### Removing a specific module option
#### Removing a specific module option
```sh
set -g @catppuccin_[module_name]_[option] "null"
```
@ -258,7 +263,7 @@ set -g @catppuccin_date_time_icon "null"
### Battery module
#### Requirements
This module depends on [tmux-battery](https://github.com/tmux-plugins/tmux-battery/tree/master).
This module depends on [tmux-battery](https://github.com/tmux-plugins/tmux-battery/tree/master).
#### Install
The prefered way to install tmux-battery is using [TPM](https://github.com/tmux-plugins/tpm).

View file

@ -315,7 +315,10 @@ main() {
local status_modules=$(get_tmux_option "@catppuccin_status_modules" "application session")
local loaded_modules=$( load_modules "$status_modules")
set status-left ""
local left_status_modules=$(get_tmux_option "@catppuccin_left_status_modules" "")
local left_loaded_modules=$( load_modules "$left_status_modules")
set status-left "$left_loaded_modules"
set status-right "$loaded_modules"
# --------=== Modes