|
9 | 9 | - [Plugins](#Plugins) |
10 | 10 | - [attached-clients](#attached-clients---up) |
11 | 11 | - [battery](#battery---up) |
| 12 | + - [compact-alt](#compact-alt---up) |
12 | 13 | - [continuum](#continuum---up) |
13 | 14 | - [cpu-usage](#cpu-usage---up) |
14 | 15 | - [cwd](#cwd---up) |
@@ -198,6 +199,44 @@ alternatively, if you have no battery and would like a nerdfont icon to indicate |
198 | 199 | set -g @dracula-no-battery-label " " |
199 | 200 | ``` |
200 | 201 |
|
| 202 | +### compact-alt - [up](#table-of-contents) |
| 203 | +This widget allows the user to switch to an alternate list of widgets when the terminal becomes narrow. |
| 204 | +Switching only works if the widget is added to `set -g @dracula-plugins "your-plugins-here"`. |
| 205 | + |
| 206 | +to set what widgets should be shown in narrow mode, set the following variable. *make sure to include the compact-alt widget as you won't be able to switch out of narrow mode otherwise.* |
| 207 | + |
| 208 | +```bash |
| 209 | +set -g @dracula-narrow-plugins "compact-alt battery network weather" |
| 210 | +``` |
| 211 | + |
| 212 | +to determine when to switch to narrow mode, set the following variable. |
| 213 | +any value below this threshold is considered narrow. |
| 214 | + |
| 215 | +```bash |
| 216 | +set -g @dracula-compact-min-width 140 |
| 217 | +``` |
| 218 | + |
| 219 | +the compact-alt widget needs to reload your tmux config to switch from wide to narrow and back. |
| 220 | +therefore, you need to make sure to set the right path to your config file. |
| 221 | + |
| 222 | +```bash |
| 223 | +set -g @dracula-config-path "$HOME/.config/tmux/tmux.conf" |
| 224 | +``` |
| 225 | + |
| 226 | +if you want to see your window with and whether narrow mode is active, set the following, which is false per default. |
| 227 | + |
| 228 | +```bash |
| 229 | +set -g @dracula-compact-alt-verbose true |
| 230 | +``` |
| 231 | + |
| 232 | +this widget maintains a global variable informing about whether narrow mode is active. |
| 233 | +that variable should never be touched by the user and could potentially be used by other widgets/ plugins. |
| 234 | + |
| 235 | +```bash |
| 236 | +# NEVER DO: |
| 237 | +set -g @dracula-narrow-mode some-value |
| 238 | +``` |
| 239 | + |
201 | 240 | ### continuum - [up](#table-of-contents) |
202 | 241 |
|
203 | 242 | Set the output mode. Options are: |
|
0 commit comments