I wrote this popular answer for Ubuntu 18.04 and 20.04, but now it won't work on Ubuntu 22.04 due to Wayland.
https://github.com/negesti/gnome-shell-extensions-negesti#wayland--wnck:
Because of this dependency and the different concepts of wayland and X11 to identify applications (wm_class vs. application_id) Wayland is not supported!
And from https://extensions.gnome.org/extension/39/put-windows/:
Any ideas, fixes, or alternatives?
This is something but isn't very useful, in my 2 minutes of playing with it: https://help.ubuntu.com/stable/ubuntu-help/shell-windows-states.html.en
In case this matters, a fresh Ubuntu 22.04 install has GNOME Shell 42.5
, as shown by gnome-shell --version
.
WinTile looks promising, but no luck so far. I opened an issue: https://github.com/Fmstrat/wintile/issues/91#issue-1504090370
The way I do it takes two shortcut keys, Ctrl+Super+Left/Right to throw the window to the left or right, then Ctrl+Super+Up/Down to throw it to the corner. That is:hold
This is: hold Ctrl+Super, then hit the arrow keys.
As an added bonus, I have Ctrl+Super+Left/Right to center the window:
This answers what you literally are asking here (i.e., place a window in a corner), but it does not resize a window to fit e.g. a quarter of a screen, which may be what you intended to ask. For tiling, there are still a couple of extensions available, even if the one you listed is not anymore updated. Look for "tile" on the Gnome Extensions website to find and try them.
To reset to default, change
set
byreset
and leave out the last argument of the command.I have discovered how to install and use two really good extensions for this:
I like to use both of these extensions simultaneously. I've tested both of them in Ubuntu 22.04 with both the X11 and Wayland window manager servers, and both extensions work in both cases.
Extension 1: Awesome Tiles (uses keyboard shortcuts to resize and snap windows to edges and corners)
Due to a known bug in Ubuntu 22.04, you can not install "Awesome Tiles" from the browser here: https://extensions.gnome.org/. Instead, install it from the
gnome-shell-extension-manager
:Open its GUI by pressing the Windows key and typing "Extension Manager". Its icon is a blue puzzle piece.
Click the "Browse" tab at the top, then search for "awesome tiles". Click the "Install" button to install it. Here you can see mine is already "Installed":
Click the "Installed" tab at the top, ensure the slider shows "Awesome Tiles" as activated (click the slider to activate/deactivate it), then click the gear icon to modify its settings:
Here are the default settings and shortcut keys it uses:
As you can see, it uses the Super (Windows) key + the keypad keys. A lot of smaller laptops and keyboards, however, do not have the keypad on the right side of the keyboard, so I recommend you use the Alt + Windows + Letters shortcuts which I've used in "Put Windows" before. Also, I really hate the gaps all around the windows (like a lot--so much so that I woulnd't recommend this tool at all if I couldn't remove them), so I recommend you remove the gaps by changing "Gap Between Window and Workspace" to 0, and disabling "Gaps Between Windows".
But, before we can add all of the shortcuts I like, we have to disable the default Ubuntu Alt + Windows + S "screen reader on or off" shortcut, which interferes. Go to your Ubuntu Settings --> Keyboard --> click "View and Customize Shortcuts" --> type in "alt+super+s", as shown here:
Click the "Turn screen reader on or off" shortcut you can see which is currently assigned to
Alt+Super+S
, and press Backspace to disable the shortcut --> click the "Set" button. You can now see it is "Disabled". Perfect:Now go ahead and change your "Awesome Tiles" keyboard shortcuts to be as follows. Remember that the Super key is the Windows key on a PC. Here are my new settings. I have highlighted all of the ones I just changed:
Update: I just changed this too: I changed 0.35 -> 0.33, and I added 0.25:
If you ever want to reset all of the settings to their defaults, see my answer here: How do I reset a Gnome Extension's settings to default? Ex: for "Awesome Tiles" in Ubuntu 22.04?.
Two other settings you may want to mess with are the "Center Tiling Steps" and "Side Tiling Steps". If you press the same shortcut repeatedly, it cycles through those multiple size settings as set there. Those are values from 0 to 1, where
0
represents 0% of the full size for that position, and1
represents the full size for that position, So, press the same shortcut repeatedly to cycle through 3 (as currently set) different sizes for each one, sized according to those settings.To get the most consistent results, I like to tile the window to center first. So, if I wanted to resize and snap the window to the top-left corner, I would press first Alt + Windows + S to center the window, and then I'd press Alt + Windows + Q to resize and snap it to the top-left. Centering between each move ensures it's always the correct size for that new position.
That's it! This is an excellent extension to use keyboard shortcuts to resize and snap your windows to edges and corners!
Extension 2: WinTile (allows you to drag with the mouse your windows to resize and snap them to left, right, or corners)
If in a hurry, just jump straight down to the "Install WinTile" section below. It's just a few short commands and steps.
The WinTile tool works phenomenally-well in Ubuntu 22.04, with both the X and Wayland window manager servers, and easily snaps windows into corners or edges. You have to follow my install instructions below, however, as it can't be installed from the browser (yet).
It takes some getting used-to compared to the tools I've been using for the past 8 years: CompizConfig in Unity in Ubuntu 14.04 and 16.04 and the "Put Windows" tool in GNOME in Ubuntu 18.04 and 20.04, but overall it gives a more-natural experience if you're using a mouse. Just drag the window towards the monitor edge or towards the corner and it automatically resizes and snaps accordingly! Here is an animated gif from the GitHub page: https://github.com/Fmstrat/wintile:
WinTile er, uh, problems
The WinTile tool hasn't been maintained in about a year so it's missing a few small PRs to bring it up-to-date. Therefore, it cannot be installed from the Gnome extensions store just quite yet. The biggest change it is missing is this tiny PR, which simply adds Gnome
41
and42
to themetadata.json
file to indicate it is compatible with these versions of Gnome as well: https://github.com/Fmstrat/wintile/pull/82/filesNote that the "About" section of Ubuntu 22.04's Settings shows me that it uses GNOME 42.5:
Here is the main WinTile repo: https://github.com/Fmstrat/wintile
Until it merges its 8 open PRs, and/or until someone else forks it and takes it over, we will use this temporary fork (which has disabled "Issues" in GitHub because they don't want to maintain it), but which conveniently has merged the open PRs: https://github.com/Captn138/wintile-reloaded
References I used to figure out the above and the following:
Install WinTile
Like I said, for now we will use https://github.com/Captn138/wintile-reloaded. Here's how to install it:
Open a terminal with Ctrl + Alt + T and run the following commands, one-at-a-time:
Now manually log back into Ubuntu, then open your Gnome Extension web-page as a portal into your locally-running Gnome extensions server: https://extensions.gnome.org/local/
You'll now see "WinTile RELOADED" as an option!:
To activate it, you can either click the toggle button from "OFF" to "ON" in that extension webpage, or run this at the terminal:
If you run the terminal command, you'll see the toggle update live in the browser window.
That's it! Drag windows to the corners of your monitor to your heart's content.
Configuration options
If you click the little tool icon in the browser you can change some settings if you like. Here are the possible settings to tweak. I decreased my "Delay in ms before preview displays" setting from the default 500ms to 100ms to make it much snappier.
Overall, not quite as versatile as "Put Windows" or "Awesome Tiles", but WinTile works great in Ubuntu 22.04, with both Wayland and X window servers, and it's more-intuitive for Windows users and those who like to use trackpads or mice ?.
Graphics driver problems in Ubuntu 22.04?
This is kind of related if you just installed Ubuntu 22.04.
If you find your new 22.04 computer having graphics driver problems or freezing, and you have an NVIDIA graphics card, see my detailed answer here to update your graphics drivers. See: (Recommended) Option 2: download and install the driver straight from NVIDIA.