|
SQP, Monday 09 April 2012 à 17:05
|
|
Subscription date : 03 July 2010
Messages : 1081
|
As we discussed a few days ago, there should be a nice way to quit or reload the dock, even if this could be achieved with an alias or a shortcut to dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.**Quit**
I had the idea to make a script to factorize the common part of this command that is always the same. Only the last part change from one command to another (in bold).
But as this would be great to give that ability to every user, without adding another script to their path, I tried to integrate it to the dock.
-R, --remote-control Send DBus commands to your running cairo-dock program. (ex: -R Quit)
with this, we can use such commands :
cairo-dock -R Quit
cairo-dock -R "Animate string:fire int32:60 string:module=clock"
Some string params should be escaped, but this can be a great step for easily manual or script control (no more killall or ctrl-c without this stupid dbus syntax).
Even if it can surely be improved, this is only a 10 lines patch. No need a separated script for this I guess.
bzr pull lp:~sqp/cairo-dock-core/main-add-remote-control-option
1052
Add command option -R = --remote-control : Send DBus commands to your running cairo-dock program
PS : I would still like to rename --colors to --color (to match ls and grep options), and it's shortcut -A is already taken by ask-backend |
Subscription date : 06 September 2009
Messages : 1635
|
Very good idea ! It's nice work |
|
matttbe, Thursday 12 April 2012 à 22:52
|
|
|
SQP, Friday 13 April 2012 à 00:19
|
|
Subscription date : 03 July 2010
Messages : 1081
|
Having one untranslated line that won't really be usefull for people who won't be able to read the related doc (only in english) will not really hurt.
The text may say that DBus must be active, but I guess that it i clear enough that it is DBus related
I guess my print should be removed as it could lead to logging some things that shouldn't be (if used for displaying dock text popup for example). (same apply to xchat flood)
While not perfect, this ensure some nice features :
-Every users would have it. So it will enhance our dock debuging ability or advices we can give on the forum (more commands easily available)
-Will keep up to date if the dock DBus location change.
This solution seem a nice compromise to not have a dedicated script (executed like --version and --capuccino). |
|
matttbe, Friday 13 April 2012 à 00:30
|
|
Subscription date : 24 January 2009
Messages : 12573
|
Having one untranslated line that won't really be usefull for people who won't be able to read the related doc (only in english) will not really hurt. Yes, it's true but it's also a new feature and now each new feature has to be detailed for distribution maintainers...
So it will enhance our dock debuging ability or advices we can give on the forum (more commands easily available) Yes but I think the only command that we'll use is to quit the dock.
-Will keep up to date if the dock DBus location change. but it's still much better to launch a dbus-send command
DBus location should not change and if we want to create script, it's maybe better to directly use dbus-send (for the reply, string formatting, not loading cairo-dock binary, etc.) |
|
SQP, Friday 13 April 2012 à 00:57
|
|
Subscription date : 03 July 2010
Messages : 1081
|
be sure I would be the last one to suggest such option if DBus commands were readable or writable but with such crap I don't see better.
To have a cairo-dock session to send commands to, it must be already loaded, so I'm not sure that would be too heavy to relaunch. |
|