-
Notifications
You must be signed in to change notification settings - Fork 123
Auto move windows@jeff hanna : Add New Extension : Initial Release #975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Auto move windows@jeff hanna : Add New Extension : Initial Release #975
Conversation
|
Please use a list in this extension settings to edit the rules. |
…y setting was being used.
|
The “Maximized” and “Maximize Vertically” options work fine, but the “X” and ‘Y’ values (as well as “Width”) are not respected. Use a screen ruler to check them. |
Thank you for your constructive criticisms, @claudiux. I am much happier with the settings dialog based on the input you provided. I'm not seeing variations in the X, Y, width, or height values between what I have specified and what I am measuring on screen. My display is 5120 x 1440 at 100% "User interface scale" and "Enable fractional scaling controls (experimental)" off. I have an NVIDIA gpu running the NVIDA 580 (open) drivers. Would you provide similar information for your setup, please? Specifically if you are running any interface scaling amount. How much of a variance is there between the values you have entered and what you have measured? |
Auto Move Windows
This Cinnamon spice automatically moves and resizes newly opened application windows according to per-application rules.
Configuration
Rules are stored in the extension settings under the key
app-rulesas a JSON array of objects.Each rule object has this shape (fields are optional unless noted):
wmClass(string, required): the window class returned bymetaWindow.get_wm_class()(e.g. "Firefox").Matching modes
By default rules match against the window's WM_CLASS value using a case-insensitive substring match. You can also match against the window title by adding
"matchField": "title"to a rule. Title-based patterns are lowercased by the prefs UI on save/capture, and the runtime compares titles case-insensitively against the stored lowercase pattern.Example title-based rule:
{
"matchField": "title",
"wmClass": "google calendar",
"workspace": 2
}
workspace(integer, optional): 0-based workspace index to move the window to.x,y(integer, optional): top-left coordinates where the window should be placed.width,height(integer, optional): desired width/height in pixels.maximized(boolean, optional): iftrue, the window will be maximized (fullscreen). This takes precedence overx,y,width, andheight.maximizeVertically(boolean, optional): iftrue, the window will be maximized vertically (full height) but will respect thewidthsetting. Theheightvalue is ignored. Requireswidthto be specified.firstOnly(boolean, optional): iftrue, the extension only acts on the first instance of the app; subsequent windows are ignored until that window closes.Example
app-rulesJSON:[
{
"wmClass": "Firefox",
"workspace": 1,
"x": 50,
"y": 50,
"width": 1200,
"height": 800,
"firstOnly": false
},
{
"wmClass": "Gnome-terminal",
"workspace": 2,
"width": 1000,
"height": 700,
"firstOnly": true
},
{
"wmClass": "Chrome",
"workspace": 0,
"maximized": true
},
{
"wmClass": "Kitty",
"workspace": 3,
"x": 1280,
"width": 3626,
"maximizeVertically": true
}
]
Editing rules
Notes
wmClass. Some applications report varying WM_CLASS; if rules don't match, check the application's WM_CLASS (e.g. withxprop WM_CLASS).License
MIT
Attributions
Extension icon created by Freepik - Flaticon https://www.flaticon.com