vainhero
August 12th, 2009, 05:00 PM
I'm trying to set the WM_CLASS xWindow Property for a specific window.
Here is what im trying to do. Gedit has the name "Gedit". As such, it minimizes on my dock according to its name "Gedit". Say I want to minimize Gedit with a different name.
Well, I can type
gedit --name magic --class magicNow, I type xprop, (in another prompt), click on Gedit window and I get
WM_CLASS(STRING) = "magic", "magic"This means that Gedit will now minimize with other applications with WM_CLASS = magic
keep in mind, class is the first string in WM_CLASS and name is the second string.
This is what im trying to do, and I wish I could launch all my programs being able to specify --name and --class. (I think class isn't as important with my panel "cairo-dock")
ok...
This doesnt work, for example, when I launch a crossover office 'wine' program. These exec commands dont take --name or --class.
so... i resorted to reading up on xprop. and tried forcing WM_CLASS to fix name and class
Apprantly, you can set xproperties
xprop -f WM_CLASS 8s -set WM_CLASS "magic"output:
WM_CLASS(STRING) = "magic"This should set the window class to "magic". Unfortunately, my window manager only cares about the 2nd string in WM_CLASS, not the first string. So that code above is useless.
I CANT FIGURE OUT HOW TO SET 2 STRINGS TO WM_CLASS!!! the xprop manual tells me that WM_CLASS consists of 2 consecutive null terminated strings. It doesnt tell me how to set them though.
I tried this: notice the 8ss. 2 8-bit strings
xprop -f WM_CLASS 8ss -set WM_CLASS "magic" "magic"xprop -f WM_CLASS 8ss -set WM_CLASS "magic.magic"xprop -f WM_CLASS 8ss -set WM_CLASS magic||magicxprop -f WM_CLASS 8ss -set name "magic" nada, nilch, nothing, zip
it only takes the first string. Im trying to foce WM_CLASS in xprop to read
WM_CLASS(STRING) = "magic", "magic"that comma in there is crucial! it means that the field contains 2 strings.
I dont know how to specify 2 strings though. Does anyone?
Here is what im trying to do. Gedit has the name "Gedit". As such, it minimizes on my dock according to its name "Gedit". Say I want to minimize Gedit with a different name.
Well, I can type
gedit --name magic --class magicNow, I type xprop, (in another prompt), click on Gedit window and I get
WM_CLASS(STRING) = "magic", "magic"This means that Gedit will now minimize with other applications with WM_CLASS = magic
keep in mind, class is the first string in WM_CLASS and name is the second string.
This is what im trying to do, and I wish I could launch all my programs being able to specify --name and --class. (I think class isn't as important with my panel "cairo-dock")
ok...
This doesnt work, for example, when I launch a crossover office 'wine' program. These exec commands dont take --name or --class.
so... i resorted to reading up on xprop. and tried forcing WM_CLASS to fix name and class
Apprantly, you can set xproperties
xprop -f WM_CLASS 8s -set WM_CLASS "magic"output:
WM_CLASS(STRING) = "magic"This should set the window class to "magic". Unfortunately, my window manager only cares about the 2nd string in WM_CLASS, not the first string. So that code above is useless.
I CANT FIGURE OUT HOW TO SET 2 STRINGS TO WM_CLASS!!! the xprop manual tells me that WM_CLASS consists of 2 consecutive null terminated strings. It doesnt tell me how to set them though.
I tried this: notice the 8ss. 2 8-bit strings
xprop -f WM_CLASS 8ss -set WM_CLASS "magic" "magic"xprop -f WM_CLASS 8ss -set WM_CLASS "magic.magic"xprop -f WM_CLASS 8ss -set WM_CLASS magic||magicxprop -f WM_CLASS 8ss -set name "magic" nada, nilch, nothing, zip
it only takes the first string. Im trying to foce WM_CLASS in xprop to read
WM_CLASS(STRING) = "magic", "magic"that comma in there is crucial! it means that the field contains 2 strings.
I dont know how to specify 2 strings though. Does anyone?