You are not logged in.
Does anyone know how can I get the notification dbus popups? E.g. if I press my keyboard backlight up/down button, then I get a slider in the upper right corner moving up/down. I would like to get this slider notification via a script without pressing anything. Currently, I have a script that manages to change the keyboard backlight (downloaded from https://keramida.wordpress.com/2013/03/ … -from-cli/ ), but it uses notify-send which looks completely different than the notification that came out of the box.
Similar notifications happen if I change the LCD screen or change the volume by buttons, or if network connects, then I also get a nice-looking notification.
If anyone could help me where to look, what files should I search for, I would greatly appreciate it.
Thanks.
Last edited by ghorvath (2016-04-24 14:15:51)
Offline
I'm definitely no dbus expert, but have you tried using libnotify as a tool for this?
the libnotify suite implements the gnome desktop notifications. Apparently though in order to use libnotify you'll need a notification server. You have a few to pick from as it seems:
Notification Servers
Look at the above link, as there are ways to script your own dbus calls, in various languages, like java, C, or Python, of course requiring a lot more effort, but you can probably fine tune it specifically to your needs of the keyboard backlight etc...
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
I would like to get this slider notification via a script without pressing anything
BunsenLabs uses xfce4-notifyd as the server for the notification system.
Offline
@Horizon_Brave Thank you, I will look at these.
However, the system must have everything in place already, because I get the nice notifications when I push the buttons. I simply want to have the same notifications when using the script.
Anyway, I will look at the links, maybe they will shed some light on this.
Thanks.
Offline
ghorvath wrote:I would like to get this slider notification via a script without pressing anything
BunsenLabs uses xfce4-notifyd as the server for the notification system.
Ah, thanks HoaS, wasn't aware we came shipped with our own. My apologies! But atleast OP has a few other options just in case ;D
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline
In the end, I managed to find the icon, and write this small function to my script which works perfectly:
notify_of_backlight_change()
{
VALUE=$1
MAX=$( backlight_get_max )
notify-send -t 800 \
-i /usr/share/icons/hicolor/scalable/status/xfpm-brightness-keyboard.svg \
-h int:value:$((100*VALUE/MAX)) \
"Keyboard brightness set to $VALUE"
}
The original script can be downloaded from https://keramida.wordpress.com/2013/03/ … -from-cli/ if anyone is interested.
Thank you very much for all the help.
Offline
So... just before I can put this to bed, and be able to rest at night...
Dbus = The specification for many different clients to write and send notifications to each other and the desktop.
xfce-notifiyd = is one particular implentation of the dbus server (what recieves and decides how/when/how long etc.. to display the message..
gdbus = Is a client side application used my client programs to interact with the xfce-notifyd daemon right?
The screen shot I took below shows a bunch of spawned gdbus child processes, so I"m assuming each one is making calls using the gdbus api?
Do I have this right HoaS?
"I have not failed, I have found 10,000 ways that will not work" -Edison
Offline