You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have a bash script which does some actions and then display a notification which contains the --action= flag, which does other actions, is set as follow:
notify-send.sh -u critical -t 0 -o Execute:'command1; command2' --icon=/path/to/icon/icon.png " " "<span color='#F6FF45' font='16px'><b>$processname\nThe commands has been executed</b></span>"
After 'command1; command2' I would like to add another notification, so I tried:
Which half-works: the fact is that in the second notification, the new line parameter "\n" is not applyed and furthermore $processname\nrestored is not displayed at all, when in the first notification, is properly displayed. And if I execute notify-send.sh -u critical -t 0 --icon=/path/to/icon/icon.png "$processname\nrestored" alone, works as expected.
What I am missing?
In this way the second notification display the message, but the newline is not inserted (only in the first notification, the new line is inserted).
EDIT:
Well, I needed to escape the new line as follow:
"$processname \
\\n\
has been restored"'
Feel free to close this ticket, or to say anything about, if there is another way to achieve the aim :-)
The text was updated successfully, but these errors were encountered:
MR-Diamond
changed the title
Start another notification from "--action=" ?
Start another notification from "--action=" and newline is not inserted
Dec 27, 2020
Hi, I have a bash script which does some actions and then display a notification which contains the
--action=
flag, which does other actions, is set as follow:notify-send.sh -u critical -t 0 -o Execute:'command1; command2' --icon=/path/to/icon/icon.png " " "<span color='#F6FF45' font='16px'><b>$processname\nThe commands has been executed</b></span>"
After
'command1; command2'
I would like to add another notification, so I tried:notify-send.sh -u critical -t 0 -o Execute:'command1; command2; notify-send.sh -u critical -t 0 --icon=/path/to/icon/icon.png "$processname\nrestored"' --icon=/path/to/icon/icon.png " " "<span color='#F6FF45' font='16px'><b>$processname\nThe commands has been executed</b></span>"
Which half-works: the fact is that in the second notification, the new line parameter "\n" is not applyed and furthermore
$processname\nrestored
is not displayed at all, when in the first notification, is properly displayed. And if I executenotify-send.sh -u critical -t 0 --icon=/path/to/icon/icon.png "$processname\nrestored"
alone, works as expected.What I am missing?
What I have been able to achieve for now is:
In this way the second notification display the message, but the newline is not inserted (only in the first notification, the new line is inserted).
EDIT:
Well, I needed to escape the new line as follow:
Feel free to close this ticket, or to say anything about, if there is another way to achieve the aim :-)
The text was updated successfully, but these errors were encountered: