View Full Version : winrules plugin v0.6.3
gnumdk
March 3rd, 2007, 11:02 PM
State plugin is dead, viva winrules!
Here winrules plugin, a complete rewrite of state plugin using compiz matching window functionnality.
http://hibbert.univ-lille3.fr/~cbellegarde/Compiz/winrules-0.6.3.tar.gz
You need compiz > 2007/03/08 !
Current git:
http://gitweb.opencompositing.org/?p=compcomm/plugins/winrules;a=summary
Current options are:
- Set window as above
- Set window as below
- Set window as fullscreen
- Set window as sticky
- Set window as widget
- Don't show window in pager
- Don't show window in taskbar
- Set window as non closable
- Set window as non maximizable
- Set window as non minimizable
- Set window as non movable
- Set window as non resizable
- Set window to not get focus
Update 0.6.3:
- Just code clean up
Update 0.6.2:
- Fix another stupid possible segfault, but why 0.6.1 doesn't segfault?
Update 0.6.1:
- Fix possible segfault
- Fix download link :p
Update 0.6:
- Add an option to set a window to not get focus
Update 0.5:
-Use compiz actions restrictions
Update 0.4:
- Using a proposal action restriction mask
- Now really works ;)
Update 0.3.3:
- Just code optimization
- Problem with XA_WM_NORMAL_HINTS, looking for a solution.
Update 0.3.2:
- Fullscreen mode now working ;)
- Monitor a limited type of windows
Update 0.3.1:
- Where are you? :)
Update 0.3:
- Code optimization
- Fix windows loosing actions
Update 0.2:
- Add new matches
Update 0.1.1:
- Remove match type from display (not needed).
Vasek
March 5th, 2007, 07:30 PM
- Where are you? :)
Here :-)
Great work, thanks!!! I was missing something like this very much.
delfick
March 5th, 2007, 09:35 PM
very cool :D
some very nice attributes there :D
gnumdk
March 6th, 2007, 09:15 AM
I post here a beta version:
http://hibbert.univ-lille3.fr/~cbellegarde/Compiz/winrules-0.4beta.tar.gz
It now works much better.
But you need to apply this patch to core:
http://hibbert.univ-lille3.fr/~cbellegarde/Compiz/actionsRestrictions.patch
Cedric
gnumdk
March 6th, 2007, 10:09 PM
While coding this plugin, i discover Anonymous Arrays!
In state plugin, to enable a window as compiz widget, we need an int declaration like this:
int val=-2;
and then call:
XChangeProperty (w->screen->display->display, w->id, compizWidget,
XA_STRING, 8, PropModeReplace,
(unsigned char *) &val, 1);
With Anonymous Arrays, no variable declaration needed, you can do:
XChangeProperty (w->screen->display->display, w->id, compizWidget,
XA_STRING, 8, PropModeReplace,
(unsigned char *)(int[]){-2}, 1);
Vasek
March 6th, 2007, 10:25 PM
What's this? :shock: C99?
I would rather not use such feature in a release code :)
gnumdk
March 6th, 2007, 10:46 PM
http://www.run.montefiore.ulg.ac.be/~martin/resources/kung-f00.html
Vasek
March 6th, 2007, 11:13 PM
Well, I have just found it described on
http://home.tiscalinet.ch/t_wolf/tw/c/c9x_changes.html
Sorry, it's surely absolutely OK to use this... I have only remembered how we were warned at school, some two years ago, from using new, however attractive, constructs, because "the world's leading compilers still don't understand it reliably". But the teacher believed the best C compiler is MSVC and he tried to discredit gcc anyhow :)
iznogood
March 10th, 2007, 09:57 PM
hi all,
just a question
How does the new matching code works??
I put class=gnome-terminal on above or skiptaskbar and it does nothing...
Same for Gnome-terminal. Do i need something else too to make it work ???
Also i can not do any debugging on compiz. I get a segfault on libGlcore.
Can i overcome this somehow ???
Thanks in advance...
iz
Vasek
March 10th, 2007, 10:05 PM
Do i need something else too to make it work ???
This is managed by the regex plugin, compiz core alone takes care of "xid", "state" and "type" checks only.
The class name is the latter told by xprop, i.e., Gnome-terminal.
@gnumdk: Thanks for the 0.5, I didn't notice it when it was released. It works perfectly and the options enabled by action restrictions are very useful!
iznogood
March 10th, 2007, 10:30 PM
Do i need something else too to make it work ???
This is managed by the regex plugin, compiz core alone takes care of "xid", "state" and "type" checks only.
The class name is the latter told by xprop, i.e., Gnome-terminal.
@gnumdk: Thanks for the 0.5, I didn't notice it when it was released. It works perfectly and the options enabled by action restrictions are very useful!
but i have regex loaded
Vasek
March 10th, 2007, 11:06 PM
but i have regex loaded
Pardon then. Does an "any" match work? If it does, do the non-regex ones (e.g., type=Normal)?
iznogood
March 11th, 2007, 03:24 AM
tried type=Normal on skiptaskbar without any effect
Does it work for you ??
gnumdk
March 11th, 2007, 10:30 AM
Yes, it works here!
Are you sure winrules is really loaded?
iznogood
March 11th, 2007, 11:43 AM
ok i did it :lol:
I just mistyped put wrong string in params
(i put [class=Gnome-terminal] when it needed class=Gnome-terminal)
Very good job gnumdk
Only a minor thing though. Using xprop on nautilus i get
WM_CLASS(STRING) = "nautilus", "Nautilus"
however only Nautilus works...Is this a bug in regex ???
I do not think that class names need to be case sensitive or at the least maybe we can use a param for that ???
Haisen
March 11th, 2007, 02:59 PM
Yes, it works here!
Is possible to set multiple classes or types for a single match?
Vasek
March 11th, 2007, 03:30 PM
Is possible to set multiple classes or types for a single match?
Surely, here is an example mentioned in the source code:
!type=dock & (state=fullscreen | state=shaded)
A match for multiple types only can be specified simpler, although I'm not sure whether this is not subject to change:
Toolbar | Menu | Utility | Normal | Dialog | ModalDialog
gnumdk
March 14th, 2007, 02:17 PM
I just update link of 0.6, it was a dead link :(
Cedric
lowfi
March 27th, 2007, 01:21 PM
Only a minor thing though. Using xprop on nautilus i get
WM_CLASS(STRING) = "nautilus", "Nautilus"
however only Nautilus works...Is this a bug in regex ???
I do not think that class names need to be case sensitive or at the least maybe we can use a param for that ???
I think that's because the XClassHint structure has to members, res_name and res_class and regex compares 'class=' with res_class.
gnumdk
April 5th, 2007, 12:19 PM
v0.6.4 work with current git
gnumdk
April 21st, 2007, 04:23 PM
You can follow winrules dev here:
http://gitweb.opencompositing.org/?p=compcomm/plugins/winrules;a=summary
This topic will not be updated anymore...
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.