mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
pw-mon: add support for colored output
Same CLI as pw-dump, i.e. -N, --no-colors, --color=always etc are
supported.
This uses a for-loop macro hack to automatically print prefixes and
suffixes, the with_prefix() macro resolves into the correct printf
statements to insert either just the marker "*" or the ansi sequences
for color/reset. Use of the macro is simply:
```
with_prefix(true, stderr) {
fprintf(stderr, "this will be prefixed\n");
}
```
This commit is contained in:
parent
cafe94efc2
commit
671410b3bf
2 changed files with 98 additions and 29 deletions
|
|
@ -33,6 +33,10 @@ OPTIONS
|
|||
--version
|
||||
Show version information.
|
||||
|
||||
-N | --color=WHEN
|
||||
Whether to use color, one of 'never', 'always', or 'auto'. The
|
||||
default is 'auto'. **-N** is equivalent to **--color=never**.
|
||||
|
||||
AUTHORS
|
||||
=======
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue