Home Forums Wiki Doc Install Extras Screenshots Source Code Projects Blog Users Groups Register
Glx-Dock / Cairo-Dock List of forums Technical discussions | Discussions techniques Set DemandsAttention via DBus on Cairo-Dock 2.3
The latest stable release is the *3.4.0* : How to install it here.
Note: We just switched from BZR to Git on Github! (only to host the code and your future pull requests)
Technical discussions | Discussions techniques

Subjects Author Language Messages Last message
[Locked] Set DemandsAttention via DBus on Cairo-Dock 2.3
Guest English 10 Guest [Read]
24 August 2011 à 23:07

Guest, Tuesday 23 August 2011 à 03:06

Hello!
I'm trying to make a small bash script that sets an icon to demand attention. I've checked the wiki, but all I found is the article for version 2.4. What would the dbus-send command look like for 2.3?
Thanks!

matttbe, Tuesday 23 August 2011 à 10:45


Subscription date : 24 January 2009
Messages : 12573
Hello,

I've just added a link to the previous version of this doc => http://www.glx-dock.org/ww_page.php?p=Control_your_dock_with_DBus&lang=en&rev=1279802197
Like the Animate method, but will animate the icon endlessly, and the icon will be visible even if the dock is hidden. If the animation is an empty string, or "default", the animation used when an application demands the attention will be used. The first argument is True to start demanding the attention, and False to stop it.
dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock/demo org.cairodock.CairoDock.applet.DemandsAttention boolean:True string:"bounce"

dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock/demo org.cairodock.CairoDock.applet.DemandsAttention boolean:False string:""

Guest, Tuesday 23 August 2011 à 19:21

Thanks matttbe!
But how can I tell it which icon I to apply the DemandsAttention to? In this case I want to set it for the thunderbird icon.

matttbe, Tuesday 23 August 2011 à 19:39


Subscription date : 24 January 2009
Messages : 12573
Mmh, sorry I can't test it right now but maybe something like that:
dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.DemandsAttention string:default int32:2 string:any string:thunderbird string:none
or just the animation:
dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.Animate string:default int32:2 string:any string:thunderbird string:none


PS: about thunderbird: http://glx-dock.org/bg_topic.php?t=5087&pos=0#mess_65074

Guest, Tuesday 23 August 2011 à 19:56

The animation alone works fine, but the DemandsAttention does nothing

PS: I know the addon, I've been using it for some time, but I was trying to replicate its behavior using a script in Popper https://launchpad.net/popper. That way I can get notified about incoming mails without having thunderbird always running. (I probably could get a similar effect with Cairo's Mail applet, but doing it myself is fun )

matttbe, Tuesday 23 August 2011 à 20:35


Subscription date : 24 January 2009
Messages : 12573
DemandsAttention does nothing
No you've to create an applet to do that

I know the addon, I've been using it for some time, but I was trying to replicate its behavior using a script in Popper
Good idea

Guest, Tuesday 23 August 2011 à 20:43

matttbe :
No you've to create an applet to do that :-?

Sorry, but I don't quite understand. Does that mean I can't set a specific icon unless it's an applet?

Good idea ;)


Thanks! And it's almost working. For now I've just set the animation to run 10000 times, but I'd like it to jump on top of the windows when I receive an email and the dock is hidden.

matttbe, Tuesday 23 August 2011 à 23:26


Subscription date : 24 January 2009
Messages : 12573
If you want to use 'DemandsAttention' you've to create an applet, e.g. by using python, bash, vala, ruby, mono, etc. and our DBus interface. If you want more examples, you can have a look here and here

Guest, Tuesday 23 August 2011 à 23:47

Oh, OK!
Then I guess I'll stay with the animation on this case, as I'm not trying to re-implement Popper's code into a plugin, but I'll take a look in case I feel like doing something else sometime.
Thank you!

fabounet, Wednesday 24 August 2011 à 13:03


Subscription date : 30 November 2007
Messages : 17118
the DemandsAttention has been added to the main Dbus interface in the 2.4, that is to say you can set a demand_attention animation on any icon easily.

Guest, Wednesday 24 August 2011 à 23:07

Nice! I'll check it out when I upgrade my dock.
Thank you!

Technical discussions | Discussions techniques

Subjects Author Language Messages Last message
[Locked] Set DemandsAttention via DBus on Cairo-Dock 2.3
Guest English 10 Guest [Read]
24 August 2011 à 23:07


Glx-Dock / Cairo-Dock List of forums Technical discussions | Discussions techniques Set DemandsAttention via DBus on Cairo-Dock 2.3 Top

Online users :

Powered by ElementSpeak © 2007 Adrien Pilleboue, 2009-2013 Matthieu Baerts.
Dock based on CSS Dock Menu (Ndesign) with jQuery. Icons by zgegball
Cairo-Dock is a free software under GNU-GPL3 licence. First stable version created by Fabounet.
Many thanks to TuxFamily for the web Hosting and Mav for the domain name.