LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > linux-related notes
User Name
Password

Notices


Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
Rate this Entry

For those who don't like notify-send exhibiting its title ("notify-send") on LXQT

Posted 02-24-2023 at 06:03 PM by the dsc
Updated 02-24-2023 at 06:04 PM by the dsc

(Or anywhere using lxqt-notificationd, like in otherwise pure Openbox, which happens to be my case)

The "proper" way would be to have it always explicitly setting something else with "-a," but apparently one can emulate the title-less implementation of other notification daemons with an wrap-around script like this:

Code:
#!/bin/bash

if [[ ! "${@}" =~ "-a " ]] ; then

/usr/bin/notify-send -a "" "${@}"

else

/usr/bin/notify-send "${@}"

fi
And then leave the "default" use without expliciting "-a" untouched

The script should be named "notify-send" and be placed somewhere no $PATH with a higher priority than /usr/bin.

Apparently the "${@}" needs the double quotes there, otherwise there will be some errors.

Maybe with "&&" and "||" instead of the longer if/fi construct it can be an one-liner and perhaps some milliseconds faster, although I'm not sure on the latter.
Posted in Uncategorized
Views 284 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 04:54 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration