This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Window rules are not working as they should

Tags: kwin, window rules kwin, window rules kwin, window rules
(comma "," separated)
SmilingSun2
Registered Member
Posts
37
Karma
0
OS
Window rules are not working with gimp, e.g:

the layers toolbox:

Window Class: gimp
Window role: gimp-dock
Window Types: normal
Window Title: Layers
Position Forced
Size Forced
Desktop Forced
Shaded Forced
Keep Above Forced

When i press apply in the window specific rules dialogue everything is placed correctly, but when i close and restart gimp the rules do not work.

Is there a way to manually send the command to apply window rules again? instruct kwin to do the same action it does when i press apply? i could just wrap the gimp script which waits a bit and executes this command to correctly arrange gimp's interface.
User avatar
Zarin
KDE Developer
Posts
345
Karma
8
OS
Chances are there is one little part of the rule that is preventing it from being applied. Have a look at it again and check everything--it's easy to overlook something like a window title in the "window extra" settings.

Also can you please attach your ~/.kde4/share/config/kwinrulesrc please.
SmilingSun2
Registered Member
Posts
37
Karma
0
OS
Found the problem, apply initially doesn't work if the window name is specified in the window rule (for gimp, works fine for synaptic). For gimp i was using a combination of these, and thats why it was breaking. I created an additional general rule (21) which applied shading initially and used separate title specific window rules for the rest.

The relevent rules:
Code: Select all
[21]
Description=Desktop 8 - Gimp Dock
above=true                       
aboverule=2                     
clientmachine=linux             
clientmachinematch=0             
shade=true                       
shaderule=3                     
title=Layers                     
titlematch=0                     
types=1                         
windowrole=gimp-dock             
windowrolematch=1               
wmclass=gimp                     
wmclasscomplete=false           
wmclassmatch=1                   

[22]
Description=Desktop 8 - Gimp Layers
above=true                         
aboverule=2                       
clientmachine=linux               
clientmachinematch=0               
desktop=8                         
desktoprule=2                     
position=550,34                   
positionrule=2                     
size=260,500                       
sizerule=2                         
title=Layers                       
titlematch=1                       
types=4294967295                   
windowrole=gimp-dock               
windowrolematch=1                 
wmclass=gimp                       
wmclasscomplete=false             
wmclassmatch=1                     

[23]
Description=Desktop 8 - Gimp Tool Options
above=true                               
aboverule=2                             
clientmachine=linux                     
clientmachinematch=0                     
desktop=8                               
desktoprule=2                           
position=811,34                         
positionrule=2                           
size=280,600                             
sizerule=2                               
title=Tool Options                       
titlematch=1                             
types=4294967295                         
windowrole=gimp-dock                     
windowrolematch=1                       
wmclass=gimp                             
wmclasscomplete=false                   
wmclassmatch=1                           

[24]
Description=Desktop 8 - Gimp Colours and Gradients
above=true                                       
aboverule=2                                       
clientmachine=linux                               
clientmachinematch=0                             
desktop=8                                         
desktoprule=2                                     
ignoreposition=true                               
ignorepositionrule=2                             
position=1092,34                                 
positionrule=2                                   
size=280,500                                     
sizerule=2                                       
title=FG/BG, Gradients                           
titlematch=1                                     
types=4294967295                                 
windowrole=gimp-dock                             
windowrolematch=1                                 
wmclass=gimp                                     
wmclasscomplete=false                             
wmclassmatch=1                                   

[25]
Description=Desktop 8 - Gimp Undo,Brushes,Paths
above=true                                     
aboverule=2                                   
clientmachine=linux                           
clientmachinematch=0                           
desktop=8                                     
desktoprule=2                                 
ignoreposition=true                           
ignorepositionrule=2                           
position=1373,34                               
positionrule=2                                 
size=300,600                                   
sizerule=2                                     
title=Undo, Brushes, Paths                     
titlematch=1                                   
types=4294967295                               
windowrole=gimp-dock                           
windowrolematch=1                             
wmclass=gimp                                   
wmclasscomplete=false                         
wmclassmatch=1                                 

[26]
Description=Desktop 8 - Image Window
below=true                         
belowrule=3                         
clientmachine=linux                 
clientmachinematch=0               
desktop=8                           
desktoprule=2                       
noborder=true                       
noborderrule=3                     
position=69,29                     
positionrule=3                     
size=1611,1021                     
sizerule=3                         
title=Untitled-2.0 (RGB, 1 layer) 420x300
titlematch=0                             
types=1                                 
windowrole=gimp-image-window             
windowrolematch=1                       
wmclass=gimp                             
wmclasscomplete=false                   
wmclassmatch=1                           

[27]
Description=Desktop 8 - Gimp Toolbox
clientmachine=linux                 
clientmachinematch=0               
desktop=8                           
desktoprule=2                       
noborder=true                       
noborderrule=2                     
position=0,29                       
positionrule=2                     
size=69,1500                       
sizerule=2                         
title=GIMP                         
titlematch=0                       
types=1                             
windowrole=gimp-toolbox             
windowrolematch=1                   
wmclass=gimp                       
wmclasscomplete=false               
wmclassmatch=1                     

[28]
Description=Desktop 8 - GImp Splash
above=true                         
aboverule=2                       
clientmachine=linux               
clientmachinematch=0               
desktop=8                         
desktoprule=2                     
title=GIMP Startup                 
titlematch=0                       
types=512                         
windowrole=gimp-startup           
windowrolematch=1                 
wmclass=gimp                       
wmclasscomplete=false             
wmclassmatch=1
SmilingSun2
Registered Member
Posts
37
Karma
0
OS
To be more specific i think the window might be changing the name after its started, this would cause apply initially rules to fail, unfortunately there is no way to tell kwin to reapply rules to windows when the name changes.


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell