You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -262,6 +263,57 @@ Use `--print` to preview the metadata for any background configuration without a
262
263
263
264
---
264
265
266
+
## badge <VersionBadge version="v0.14.2" />
267
+
268
+
The `badge` command sets or clears a visual badge indicator on a block or tab header.
269
+
270
+
```sh
271
+
wsh badge [icon]
272
+
wsh badge --clear
273
+
```
274
+
275
+
Badges are used to draw attention to a block or tab, such as indicating a process has completed or needs attention. If no icon is provided, it defaults to `circle-small`. Icon names are [Font Awesome](https://fontawesome.com/icons) icon names (without the `fa-` prefix).
276
+
277
+
Flags:
278
+
279
+
- `--color string` - set the badge color (CSS color name or hex)
280
+
- `--priority float` - set the badge priority (default 10; higher priority badges take precedence)
281
+
- `--clear` - remove the badge from the block or tab
282
+
- `--beep` - play the system bell sound when setting the badge
283
+
- `--pid int` - watch a PID and automatically clear the badge when it exits (sets default priority to 5)
284
+
- `-b, --block` - target a specific block or tab (same format as `getmeta`)
285
+
286
+
Examples:
287
+
288
+
```sh
289
+
# Set a default badge on the current block
290
+
wsh badge
291
+
292
+
# Set a badge with a custom icon and color
293
+
wsh badge circle-check --color green
294
+
295
+
# Set a high-priority badge on a specific block
296
+
wsh badge triangle-exclamation --color red --priority 20 -b 2
297
+
298
+
# Set a badge that clears when a process exits
299
+
wsh badge --pid 12345
300
+
301
+
# Play the bell and set a badge when done
302
+
wsh badge circle-check --beep
303
+
304
+
# Clear the badge on the current block
305
+
wsh badge --clear
306
+
307
+
# Clear the badge on a specific tab
308
+
wsh badge --clear -b tab
309
+
```
310
+
311
+
:::note
312
+
The `--pid` flag is not supported on Windows.
313
+
:::
314
+
315
+
---
316
+
265
317
## run
266
318
267
319
The `run` command creates a new terminal command block and executes a specified command within it. The command can be provided either as arguments after `--` or using the `-c` flag. Unless the `-x` or `-X` flags are passed, commands can be re-executed by pressing `Enter` once the command has finished running.
0 commit comments