Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
9
rated 0 times [  9] [ 0]  / answers: 1 / hits: 14897  / 3 Years ago, sat, october 30, 2021, 2:32:51

I want to use command notify-send and display text from a file as a notification so that I can only edit that file to change command or forward contents from outputs of other programs to notify-send.



I tried :




  • notify-send -u critical -t 3000 < ~/ved


  • cat ved | notify-send -u critical -t 3000




It says : No summary specified.



What should I do about this summary?


More From » bash

 Answers
0

Im not sure what you want to do or what kind of file you want to display but man notify-send says



notify-send [OPTIONS] <summary> [body]


Summary being a title, so for example, the basename of your file.



So what you can do is



notify-send -u critical -t 3000 "$(basename ~/ved)" "$(cat ~/ved)"


But be aware that notify-send won't print long text file, it's not its job.



Also, I don't know for you or everyone else, but the -t option never worked for me, time being always 10s. I've read it was a bug a long time ago and it's still not working in 12.04.


[#34332] Sunday, October 31, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
peafowkes

Total Points: 356
Total Questions: 102
Total Answers: 117

Location: Lebanon
Member since Tue, Oct 12, 2021
3 Years ago
peafowkes questions
;