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) 1. [Config 1](#config-1)
2. [Config 2](#config-2) 2. [Config 2](#config-2)
3. [Config 3](#config-3) 3. [Config 3](#config-3)
## Themes ## Themes
- 🌻 [Latte](./catppuccin-latte.tmuxtheme) - 🌻 [Latte](./catppuccin-latte.tmuxtheme)
@ -143,7 +143,7 @@ Values:
#### Override the window default text: #### Override the window default text:
```sh ```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 ### Window current
@ -159,7 +159,7 @@ Values:
#### Override the window current text: #### Override the window current text:
```sh ```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 #### Set the current directory format
@ -213,9 +213,10 @@ Values:
#### Set the module list #### Set the module list
```sh ```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: Available modules:
- application - display the current window running application - 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" set -g @catppuccin_[module_name]_text "text"
``` ```
#### Removing a specific module option #### Removing a specific module option
```sh ```sh
set -g @catppuccin_[module_name]_[option] "null" set -g @catppuccin_[module_name]_[option] "null"
``` ```
@ -258,7 +259,7 @@ set -g @catppuccin_date_time_icon "null"
### Battery module ### Battery module
#### Requirements #### 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 #### Install
The prefered way to install tmux-battery is using [TPM](https://github.com/tmux-plugins/tpm). 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_connect_separator=$(get_tmux_option "@catppuccin_status_connect_separator" "yes")
local status_fill=$(get_tmux_option "@catppuccin_status_fill" "icon") local status_fill=$(get_tmux_option "@catppuccin_status_fill" "icon")
local status_modules=$(get_tmux_option "@catppuccin_status_modules" "application session") local status_modules_right=$(get_tmux_option "@catppuccin_status_modules_right" "application session")
local loaded_modules=$( load_modules "$status_modules") local loaded_modules_right=$( load_modules "$status_modules_right")
set status-left "" local status_modules_left=$(get_tmux_option "@catppuccin_status_modules_left" "")
set status-right "$loaded_modules" local loaded_modules_left=$( load_modules "$status_modules_left")
set status-left "$loaded_modules_left"
set status-right "$loaded_modules_right"
# --------=== Modes # --------=== Modes
# #