PDA

View Full Version : Make Widgets Stick to One or More Desktops


Jupiter
June 27th, 2007, 05:50 AM
Howto Make Widgets Stick to One or More Desktops

In order to get desktop widgets "Superkaramba, Gkrealm, Screenlets, etc..." stick to the desktop, you must have
the Regex Matching plugin enabled. If it's not, please enable it before reading further.

Identifying a Window

Before anything about opacity or window rules can be set, you need to know how to tell ccsm which windows to apply the rules to.

There are 8 different ways to make Compiz Fusion recognise a window. Each of these ways is listed below, along with commands that can be entered into a console to help you find the information you need to use them.

type - What kind of window is it? A menu, a dialog, a tooltip, or something else?
Command: xprop | grep WINDOW_TYPE | cut -d _ -f 10
Or choose one: any, unknown, combo, desktop, dialog, dnd, dock, dropdownmenu, fullscreen, modaldialog, menu, normal, notification, popupmenu, splash, toolbar, tooltip, utility
role - What is the window's role? (Only useful for some programs. Usually blank.)
Command: xprop | grep "WM_WINDOW_ROLE(STRING)" | cut -d \" -f 2
name - What is the window's class name?
Command: xprop | grep WM_CLASS | cut -d \" -f 2
class - What is the window's class?
Command: xprop | grep WM_CLASS | cut -d \" -f 4
title - What is written in the window's title bar?
Command: xprop | grep "WM_NAME(STRING)" | cut -d \" -f 2
xid - What is the window's XID? (Only useful for identifying a window that's already open.)
Command: xprop | grep "WM_CLIENT_LEADER(WINDOW)" | cut -d ' ' -f 5
state - Is the window maximised, staying on top, sticky, or something else?
Choose one: modal, sticky, maxvert, maxhorz, shaded, skiptaskbar, skippager, hidden, fullscreen, above, below, or demandsattention
override_redirect - Is this window special? (Used differently by different programs. See Identifying a Window: Special Cases below.)

A window can be identified by a string of the form:
criterion=value
Note: There is no space before or after the = sign!

For example, this will match Superkaramba:
class=Superkaramba

In this example we identify Superkaramba as a dock:
class=Superkaramba & type=dock

Once we have the window identified, we can use the Set Windows Rules plugin to tell it how to handle these
windows. So if we want Superkaramba on all desktops we will use this command in the "Sticky" field.
class=Superkaramba & type=dock

We can use the same window identifier to set Superkaramba below all other windows by placing that
same string in the "Below" field. And to keep the widget from disappearing when you activate the
scale plugin, we can put the string in the "Non minimizable windows" field.

RYX
August 14th, 2007, 08:49 AM
I just wanted to note that the Screenlets in combination with the latest widget-plugin (from the git-repos) don't require fiddling with so many regex-matches anymore. The new widget-plugin (based on mikedee's idea and ported to C by maniac) offers a new match-expression "widget=" which allows selecting widget-windows by type instead of by name ...

See this post for more info: http://forum.compiz-fusion.org/showpost.php?p=21983&postcount=38

:)

Jupiter
August 14th, 2007, 07:55 PM
I just wanted to note that the Screenlets in combination with the latest widget-plugin (from the git-repos) don't require fiddling with so many regex-matches anymore. The new widget-plugin (based on mikedee's idea and ported to C by maniac) offers a new match-expression "widget=" which allows selecting widget-windows by type instead of by name ...

See this post for more info: http://forum.compiz-fusion.org/showpost.php?p=21983&postcount=38

:)

Excellent info RYX. Thanks. We will have to incorporate all this in the WIKI once it is up and running.