Update docs for trunc format helper
This commit is contained in:
@@ -116,6 +116,7 @@ playerctl metadata --format "Volume: {{ volume * 100 }}"
|
||||
| `markup_escape` | string | Escape XML markup characters in the string. |
|
||||
| `default` | any, any | Print the first value if it is present, or else print the second. |
|
||||
| `emoji` | status or volume | Try to convert the variable to an emoji representation. |
|
||||
| `trunc` | string, int | Truncate string to a maximum length. |
|
||||
|
||||
| Variable | Description |
|
||||
| ------------ | ------------------------------------------------- |
|
||||
|
@@ -251,6 +251,12 @@ to an emoji representation. Currently implemented for
|
||||
.Fa status
|
||||
and
|
||||
.Fa volume .
|
||||
.It Fn trunc str len
|
||||
Truncate
|
||||
.Fa str
|
||||
to a maximum of
|
||||
.Fa len
|
||||
characters, adding an ellipsis (…) if necessary.
|
||||
.El
|
||||
.Pp
|
||||
The template language is also able to perform basic math operations.
|
||||
|
Reference in New Issue
Block a user