Limit amount of characters #251
Answered
by
FelixKratz
itaysharir
asked this question in
Q&A
-
|
btw I know i'm asking a lot of questions, This is probably the last one. Sorry to bother you again. |
Beta Was this translation helpful? Give feedback.
Answered by
FelixKratz
Sep 17, 2022
Replies: 2 comments
-
|
When you get the title of the window from yabai you can simply cut it with e.g. sed: TITLE=$(yabai -m query --windows --window | jq -r '.title' | sed 's/\(.\{30\}\).*/\1.../'
sketchybar --set $NAME label="$TITLE"This example cuts the title after 30 characters and adds "..." to the end if the string was truncated, titles under 30 characters do not get changed. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
itaysharir
-
|
Thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

When you get the title of the window from yabai you can simply cut it with e.g. sed:
This example cuts the title after 30 characters and adds "..." to the end if the string was truncated, titles under 30 characters do not get changed.