Home Forums Wiki Doc Install Extras Screenshots Source Code Projects Blog Users Groups Register
Glx-Dock / Cairo-Dock List of forums Ideas | Propositions Change launcher Program Class to Window Match
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)
Ideas | Propositions

Subjects Author Language Messages Last message
[Locked] Change launcher Program Class to Window Match
onyxwolf English 14 Guest [Read]
26 January 2013 à 14:43

onyxwolf, Wednesday 23 December 2009 à 21:30


Subscription date : 14 December 2009
Messages : 59
My first proposition! Yay me! And I promise its a doozy. First I want to thank matttbe and Fabounet for their quick responses to my bug posts despite the 8 +/- hour time difference. Not to mention their dual-language support. You guys rock!

Now that I'm done brown-nosing...

Currently, when we create a new launcher, we can put in the Program Class (under Extra Perimeters when in the launcher modification window) so that launcher knows to put an indicator under the launcher and it knows to switch to that window when pressed. My proposal is to change that to a window match command line. Like what CCSM uses for many of its windows effects. Even better yet just add this ability, like put a check box that says something like "Use Window Match instead of Program Class," which when you check, it'll gray-out the Program Class text box and show a Window Match text box below it. That way For instance, if I wanted one launcher to open terminal and be my primary terminal launcher/task I would just put Gnome-terminal in the Program Class; however, if for some odd reason I wanted to have a launcher to open a terminal in the Documents directory and wanted the two launchers to distinguish between the two, I would use the command "gnome-terminal --working-directory=/home/onyxwolf/Documents" then select the the Window Match option, using the line "class=Gnome-terminal & title=Documents$" (in Compiz the & means and, the $ means ends with) in its text box. I would then go back to the first launcher, select the Window Match option and enter in the line "class=Gnome-terminal & !(title=Documents$)" (the & ! means and not). There for if the first is open pressing the second will open the second one, be able to show the task indicator and switch two it, while the first would do all other terminals.

A practical reason I want this is to distinguish between my different Virtual Machines, and my VM controller (I use VirtualBox). Is this do-able? Because lets admit the vast majority of us Cairo-Dock users are all about the eye-candy, but also the configurability of it (personally I started with AWN but hated how I couldn't switch the indicator icon from that drab gray triangle, and thats why I tried CD). Any ideas?

matttbe, Wednesday 23 December 2009 à 21:43


Subscription date : 24 January 2009
Messages : 12573
You're right, it can be interesting .

We can simply add a button that launch this command :
xprop | grep CLASS | cut -d\" -f2 | cut -d\" -f1
but a control of title and class with a possibility to add more than one rule is a good idea !

onyxwolf, Wednesday 23 December 2009 à 22:25


Subscription date : 14 December 2009
Messages : 59
Another good example of where it would come in handy is VLC. When you xprop WM_CLASS it, the result is WM_CLASS(STRING) = "", "" ; therefor, it has no class so you can't currently tie it into its launcher. But its window title is "VLC media player" so could say title=^VLC (^ meaning begins with).

fabounet, Friday 25 December 2009 à 12:26


Subscription date : 30 November 2007
Messages : 17118
indeed that could be great, yet quite difficult to realize
I'll think about it for the 2.2

onyxwolf, Monday 28 December 2009 à 17:18


Subscription date : 14 December 2009
Messages : 59
Glad you liked my idea.

Guest, Thursday 11 February 2010 à 18:57

I like this idea. Indeed i have searched for solution to VLC mentioned by onyxwolf, obviously nothing useful was found.

onyxwolf, Tuesday 23 February 2010 à 20:25


Subscription date : 14 December 2009
Messages : 59
Sorry I've been out for a little bit since the move from cairo-dock.org! But I'm back now. Finally VLC got a class ! (That was their doing right?) I am also Happy to see the implementation of matttbe's grab class button, which works flawlessly, thanx guys! Now maybe if I bug Sun enough they'll add per VM classes on their VirtualBox! (Yeah Right) Still crossing my fingers for a WM like rule base for 2.2, but won't be disappointed if it doesn't make it. That's so specialized and I know you guys are kicking butt in other ways. (Case in point-- the Doncky applet!)

nochka85, Tuesday 23 February 2010 à 23:35


Subscription date : 29 November 2007
Messages : 7408
Sorry, but can someone translate in french what onyxwolf says :
That's so specialized and I know you guys are kicking butt in other ways. (Case in point-- the Doncky applet!)


... I understood everything before ... but not this sentence

(sorry for my english )

matttbe, Wednesday 24 February 2010 à 01:11


Subscription date : 24 January 2009
Messages : 12573
En gros et à première vue : c'est du détail et "on" est p-ê occupé à autre chose (comme l'applet Doncky Kong )
(mais il est une heure du mat' )

taiebot65, Wednesday 24 February 2010 à 01:19


Subscription date : 26 October 2008
Messages : 1904
that means you rock and he appreciate this new applet

matttbe, Wednesday 24 February 2010 à 03:02


Subscription date : 24 January 2009
Messages : 12573

nochka85, Wednesday 24 February 2010 à 13:26


Subscription date : 29 November 2007
Messages : 7408
So i can only answer ->

Guest, Thursday 12 April 2012 à 08:15

Has this feature being cancelled?
For example, capturing class for Sublime editor doesn't help (there's still two icons in a dock), but it has "Sublime Text 2" caption, which can be easily matched.

matttbe, Thursday 12 April 2012 à 10:10


Subscription date : 24 January 2009
Messages : 12573
This feature has not been implemented mainly because it's a feature to solve problem of other apps. Applications with a GUI should have a class (and always the same)

Can you launch this command from a terminal and select Sublime's window:
xprop | grep CLASS

If the result is empty, please report this bug to Sublime's devs.

Guest, Saturday 26 January 2013 à 14:43

!!! Don't forget the Anti-spam filter !!!
coooooooooooooooooool

Ideas | Propositions

Subjects Author Language Messages Last message
[Locked] Change launcher Program Class to Window Match
onyxwolf English 14 Guest [Read]
26 January 2013 à 14:43


Glx-Dock / Cairo-Dock List of forums Ideas | Propositions Change launcher Program Class to Window Match 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.