You are not logged in.

#1 2020-10-05 12:52:27

jlfh0816
Member
From: Plougonvelin (France)
Registered: 2017-01-14
Posts: 21

xfce notification theme for just one application

Hi there everyone!

Right now, changing xfce-notify-4.0 theme changes it globally, for all of the applications.

Is it possible to apply a special notification theme to one application only?

Examples :
Smoke theme for notify-send
ZOMG-PONIES ! for my-weather-indicator application
default theme for all others applications

Thanks you for your time!


Xubuntu 18.04.4 LTS (64 bits)

Offline

#2 2020-10-05 18:08:27

hhh
Meep!
Registered: 2015-09-17
Posts: 10,582
Website

Re: xfce notification theme for just one application

I don't think so. xfce4-notifyd is pretty basic. I'd go so far as to say that all notification systems for any OS on any device are lacking in customization features. I'm using Cinnamon on buster and I had to hack the binary just to increase the notification timeout. Xfce's notification settings and it's GUI are better than Cinnamon's and GNOME's.

Offline

#3 2020-10-05 18:47:16

damo
....moderator....
Registered: 2015-08-20
Posts: 6,329

Re: xfce notification theme for just one application

Maybe Method 2 in HowTo: set a custom GTK2 theme for an application may give some ideas?


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#4 2020-10-05 19:11:09

jlfh0816
Member
From: Plougonvelin (France)
Registered: 2017-01-14
Posts: 21

Re: xfce notification theme for just one application

@hhh
Yes, I agree. Notification softwares are sadly fairly basic et offer too little customisation.

@damo
Thank you for the link. I will see if I can use it for my case. A friend also mentioned environment variables (and GTK3 doc) could be of use here, but I lack programming experience to fully explore this suggestion...


Xubuntu 18.04.4 LTS (64 bits)

Offline

#5 2020-10-06 06:37:01

ohnonot
...again
Registered: 2015-09-29
Posts: 4,917
Website

Re: xfce notification theme for just one application

If you can modify the command that launches the notification, it is possible.
Create a gtkrc that applies the desired theme, then change the command from

notify-send something

to

GTK2_RC_FILES=~/.themes/custom.gtkrc notify-send something

If not, I would argue that other notification daemons are more customisable. E.g. dunst.


BL quote proposals to this thread please.
my repos / my repos

Offline

#6 2020-10-06 07:08:30

jlfh0816
Member
From: Plougonvelin (France)
Registered: 2017-01-14
Posts: 21

Re: xfce notification theme for just one application

@ohnonot
Thank you very much for this suggestion. It seems very interesting to me.
I will try this ASAP and show the result if successful.
Otherwise I haven't tested dunst yet but it's in my projects too.
Thanks again.


Xubuntu 18.04.4 LTS (64 bits)

Offline

#7 2020-10-06 08:16:24

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,107
Website

Re: xfce notification theme for just one application

With dunst and this in dunstrc

[notify-send]
appname = "notify-send"
background = "#900000"
foreground = "#ffffff"

messages from notify-send will have red background. There seems to be multiple ways to set filtering.

Offline

#8 2020-10-06 10:00:53

jlfh0816
Member
From: Plougonvelin (France)
Registered: 2017-01-14
Posts: 21

Re: xfce notification theme for just one application

Thanks brontosaurusrex, I really appreciate your help. Dunst actually looks more easily configurable than notify-send. This is a lead I will explore but first I will try to force notify-send to use a particular gtk3 theme.
Thanks again!


Xubuntu 18.04.4 LTS (64 bits)

Offline

#9 2020-10-06 15:59:30

trilobite
Member
From: Saskatchewan, Canada
Registered: 2017-06-27
Posts: 29

Re: xfce notification theme for just one application

I'm not sophisticated about xfce and notifications but am using 'generic monitor' to grab weather reports with it. Works fine.  I think you could add any $bash script you wanted.


{Linux-using people I haven't met are friends yet to be made.}

Offline

#10 2020-10-06 18:03:45

jlfh0816
Member
From: Plougonvelin (France)
Registered: 2017-01-14
Posts: 21

Re: xfce notification theme for just one application

@trilobite
I don't quite understand what you call a 'generic monitor'. Can you possibly give me a link so that I realize what exactly can your 'generic monitor' do?


Xubuntu 18.04.4 LTS (64 bits)

Offline

#11 2020-10-06 19:33:00

damo
....moderator....
Registered: 2015-08-20
Posts: 6,329

Re: xfce notification theme for just one application

jlfh0816 wrote:

@trilobite
I don't quite understand what you call a 'generic monitor'. Can you possibly give me a link so that I realize what exactly can your 'generic monitor' do?

He didn't say "a" generic monitor. I presume it is the xfce genmon.

apt-cache search genmon
xfce4-genmon-plugin - Generic Monitor for the Xfce4 panel
xfce4-goodies - enhancements for the Xfce4 Desktop Environment

Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#12 2020-10-06 19:39:05

jlfh0816
Member
From: Plougonvelin (France)
Registered: 2017-01-14
Posts: 21

Re: xfce notification theme for just one application

@trilobite
@damo
sorry for my mistake, I didn't understand right away ...


On the French Ubuntu forum (https://forum.ubuntu-fr.org/viewtopic.p … #p22347210), beuguissime offered me a solution that works well:
- notify-send uses a temporary Retro theme for 10 seconds
- then automatic return to the original Greybird theme

notify-send "Hello theme Retro"; xfconf-query -c xfce4-notifyd -p /theme -s Retro; sleep 10; xfconf-query -c xfce4-notifyd -p /theme -s Greybird

Last edited by jlfh0816 (2020-10-06 19:49:45)


Xubuntu 18.04.4 LTS (64 bits)

Offline

Board footer

Powered by FluxBB