-
Notifications
You must be signed in to change notification settings - Fork 122
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
Draft
JeffHanna
wants to merge
19
commits into
linuxmint:master
Choose a base branch
from
JeffHanna:auto-move-windows@JeffHanna
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Auto move windows@jeff hanna : Add New Extension : Initial Release #975
JeffHanna
wants to merge
19
commits into
linuxmint:master
from
JeffHanna:auto-move-windows@JeffHanna
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
|
Please use a list in this extension settings to edit the rules. |
…y setting was being used.
Member
|
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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