Waybar icon indicating copy to clipboard operation
Waybar copied to clipboard

waybar-custom: tooltip \n support

Open jlo62 opened this issue 10 months ago • 2 comments

Hi,

If I add a \n into the tooltip string for waybar-custom with json output, there is no tooltip.
If I use \r, it works.

Please either mention this somewhere or add support, as I found out about \r by googling.

jlo62 avatar Apr 21 '24 14:04 jlo62

Thanks, I was also trying to use \n. I added a line to the wiki.

As a side note, wikis can be edited by anyone.

sornig avatar Apr 28 '24 21:04 sornig

I use a function to format my tooltip if needed. It gives me good control over the presentation:

fmt_tooltip() {
  tooltipTxt+="$name \n"
  tooltipTxt+=$(someOtherFunction)
  tooltipTxt+="\nSomeText\n"
  tooltipTxt+=$(OutputOfCommand)
  echo -e "$tooltipTxt"
}
tooltip=$(fmt_tooltip)

ashish-kus avatar Jun 06 '24 19:06 ashish-kus