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 Remote-Control (keyboard control) plugin / patch to autohide dock on shortcut key
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] Remote-Control (keyboard control) plugin / patch to autohide dock on shortcut key
vaddimka English 3 fabounet [Read]
01 February 2012 à 12:46

vaddimka, Saturday 28 January 2012 à 23:50


Subscription date : 28 January 2012
Messages : 2
Hi there!
I'm using Cairo Dock with IR remote and the new Control from keyboard feature is extremely helpful.
I have desktop composition disabled (enabling it causes tearing in XBMC) so I cannot use any Visibility setting except "pop-up on shortcut" (otherwise Cairo makes black rectangle on the screen even when it's hidden).
That's why my 'usage pattern' is like:
-- raise Cairo with 'shortcut key to trigger the applet'
-- select an application
-- use it (Cairo dock hides)

But sometimes I want just hide Cairo after raising it and I can do it only by using another shortcut key from 'Visibility' section (which is not a very convenient from the remote).
Thought it could be better to set selection to the active window/application after raising Cairo by the shortcut key (from the usability point of view) -- in this case user could hide Cairo by pressing Enter (or OK on the remote) without launching anything, I made a patch to hide the dock using the same keyboard shortcut used to rise it (the same key on the remote). Maybe it will be useful to someone else

--- cairo-dock-plug-ins-3.0.0.0alpha2~20120113~bzr2263.orig/Remote-Control/src/applet-session.c
+++ cairo-dock-plug-ins-3.0.0.0alpha2~20120113~bzr2263/Remote-Control/src/applet-session.c
@@ -177,6 +177,12 @@
cairo_dock_freeze_docks (FALSE);

myData.iSessionState = CD_SESSION_CLOSING;
+
+ CairoDock *pDock = cairo_dock_search_dock_from_name (myConfig.cDockName);
+ if (pDock == NULL)
+ pDock = g_pMainDock;
+
+ gtk_widget_hide( pDock->container.pWidget );
}

fabounet, Tuesday 31 January 2012 à 13:47


Subscription date : 30 November 2007
Messages : 17118
IIRC, when pressing "Escape" should cancel the remote control, and the dock should return to its previous state
same when pressing the shortkey again.
but since I've made some rework on this applet in the 3.0, maybe it's only with the latest version (you can try it with our weekly PPA if you use a .deb based system).
That would be nice if you could test it

vaddimka, Tuesday 31 January 2012 à 14:19


Subscription date : 28 January 2012
Messages : 2
The problem is, when i'm pressing Escape it indeed returns to the previous state. But this state happens to be "popped up by shortcut key" state. And the shortcut key to pop up the dock is different from the one used to "summon" keyboard-control So I kinda cannot close the dock using the same key. I'll check the newest release (thought I compiled my from the source code).
Anyway I found a way to keep composition on and have no tearing issues in XBMC. Just wrote a script to turn composition off (in metacity) start XBMC in fullscreen and then turn composition back on after XBMC exits In this case every standard Visibility option works as intended and the dock hides automatically after some timeout (without any remaining black rectangles).

fabounet, Wednesday 01 February 2012 à 12:46


Subscription date : 30 November 2007
Messages : 17118
ok I see the problem
I'll handle this case too.

what about using the visibility mode "hide behind windows" (not sure the exact name) ? it's very similar to the auto-hide, but the dock is physically behind the other windows, rather than just invisible.

Technical discussions | Discussions techniques

Subjects Author Language Messages Last message
[Locked] Remote-Control (keyboard control) plugin / patch to autohide dock on shortcut key
vaddimka English 3 fabounet [Read]
01 February 2012 à 12:46


Glx-Dock / Cairo-Dock List of forums Technical discussions | Discussions techniques Remote-Control (keyboard control) plugin / patch to autohide dock on shortcut key 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.