Whitespace/newlines being stripped from notifications #1275
-
Apologies in advance if this is by design and working as expected. It seems that Dunst strips newlines or any other whitespace characters from the end of the notification body. Since I'm using centered alignment, this causes issues for one of my notifications scripts in which I simply want to reproduce the output of If I simply use This doesn't look great though since everything is bold and as far as I can tell markup can't be used in the summary text so I can't achieve the desired result. What I'd actually like to do is more like This works great except for the last line which has the trailing whitespace stripped and therefore isn't aligned with the rest of the text. I've messed around with trying to insert newlines or spaces but they always seem to be stripped and not displayed. The closest I've gotten is to insert some kind of invalid markup tag which does have the desired affect of getting the last row of text aligned but also breaks the markup that highlights the current day of the month and apparently also strips the formatting from the summary since it's no longer bold So I'm stumped. Is there any way to achieve the result I'm after? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I figured out a way to make this work, in case anyone is interested:
|
Beta Was this translation helpful? Give feedback.
I figured out a way to make this work, in case anyone is interested:
dunstify "$(cal | head -n1)" "$(cal | tail -n+2 | sed "/^[[:space:]]*$/d;s/$(date '+%e')\b/<span background='#282828' foreground='#ebdbb2'>$(date '+%e')<\/span>/g;s/ /<span> <\/span>/g")"