Skip to content

Conversation

itakatz
Copy link

@itakatz itakatz commented Apr 23, 2025

Add remark about using -F option for set when setting the status.
See #527

Add remark about using `-F` option for `set` when setting the status.
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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: tmux calls them "options", so "Note that options are expanded as format strings by placing E: before the option name".

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set -gF worth being specific that F is the flag that treats the value passed as a format string that is immediately expanded. Also worth linking to the man page

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The status line expands format strings in status-{left,right} anyway before displaying them, so worth explaining why some modules need to their formats fully expanded prior to being added to the status-{left,right} options

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

More detailed expolanation about expanding options when setting the status
Copy link
Member

@rogeruiz rogeruiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 🌈

Good work on this @itakatz. Your updates address @kjnsn's review comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants