From 545bde1cb0886044b71cb86d169210d702dea5c7 Mon Sep 17 00:00:00 2001 From: Itamar Katz Date: Wed, 23 Apr 2025 12:48:34 +0300 Subject: [PATCH 1/2] Update status-line.md Add remark about using `-F` option for `set` when setting the status. --- docs/reference/status-line.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/reference/status-line.md b/docs/reference/status-line.md index 9e85c44b..7773340f 100644 --- a/docs/reference/status-line.md +++ b/docs/reference/status-line.md @@ -14,6 +14,7 @@ set -g status-right-length 100 set -g status-right "#{E:@catppuccin_status_application}#{E:@catppuccin_status_session}" set -g status-left "" ``` +Note that the status variables are expanded using `E:` before the variable name. Depending on the module used, you may also have to use `set -gF` in order for `set` to expand format, see for example the [CPU](#cpu-module) and [battery](#battery-module) modules below. ## Customizing modules From 8ad2fe032a17f078b8b559cf9838ab506580b5e6 Mon Sep 17 00:00:00 2001 From: Itamar Katz Date: Thu, 24 Apr 2025 11:53:49 +0300 Subject: [PATCH 2/2] Update status-line.md More detailed expolanation about expanding options when setting the status --- docs/reference/status-line.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/reference/status-line.md b/docs/reference/status-line.md index 7773340f..4d711041 100644 --- a/docs/reference/status-line.md +++ b/docs/reference/status-line.md @@ -14,7 +14,10 @@ set -g status-right-length 100 set -g status-right "#{E:@catppuccin_status_application}#{E:@catppuccin_status_session}" set -g status-left "" ``` -Note that the status variables are expanded using `E:` before the variable name. Depending on the module used, you may also have to use `set -gF` in order for `set` to expand format, see for example the [CPU](#cpu-module) and [battery](#battery-module) modules below. +Some notes about expanding options when setting the status line: +* Options are expanded as format strings by placing `E:` before the option name. +* When a module status string contains a reference to another variable, you have to add the `-F` flag that treats the value passed as a format string that is immediately expanded, that is use `set -gF` (see tmux [`set-option`](https://man.openbsd.org/OpenBSD-current/man1/tmux.1#set-option) man page). +* Example for such a case is the [battery](#battery-module) module below, where the status contains the format string `#{battery_percentage}` that needs to be further expanded. ## Customizing modules