Merge pull request #71 from lowstar/main

feat(status): allow modules in left_status
This commit is contained in:
Valentin Uveges 2023-09-06 21:11:47 +03:00 committed by GitHub
commit d04e35db2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 11 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
@ -213,9 +213,10 @@ Values:
#### Set the module list
```sh
set -g @catppuccin_status_modules "application session"
set -g @catppuccin_status_modules_right "application session"
set -g @catppuccin_status_modules_left ""
```
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.
Available modules:
- application - display the current window running application
@ -245,7 +246,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 +259,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

@ -312,11 +312,14 @@ main() {
local status_connect_separator=$(get_tmux_option "@catppuccin_status_connect_separator" "yes")
local status_fill=$(get_tmux_option "@catppuccin_status_fill" "icon")
local status_modules=$(get_tmux_option "@catppuccin_status_modules" "application session")
local loaded_modules=$( load_modules "$status_modules")
local status_modules_right=$(get_tmux_option "@catppuccin_status_modules_right" "application session")
local loaded_modules_right=$( load_modules "$status_modules_right")
set status-left ""
set status-right "$loaded_modules"
local status_modules_left=$(get_tmux_option "@catppuccin_status_modules_left" "")
local loaded_modules_left=$( load_modules "$status_modules_left")
set status-left "$loaded_modules_left"
set status-right "$loaded_modules_right"
# --------=== Modes
#