问题
I'm looking for a way to move windows to screen corners (top-left, top, top-right, right, bottom-right, bottom, bottom-left, left, maximize) using keyboard shortcuts on Ubuntu 18.04 (Gnome Shell 3.28.3).
What I tried that does not work:
- In settings/keyboard shortcuts, there is no way to move window to corners, only to move between screens, workspaces and whatsoever
- the "CompizConfig Settings manager" allows to enable "Grid" and to set keyboard bindings, but they don't have any effect when pressed
- before Ubuntu 18.04, I used quicktile (https://github.com/ssokolow/quicktile), but it does not work correctly anymore, also its quite bloated and stuck on Python 2
I would be ok to write a (preferably Python) script to move windows like quicktile does (which high level display library should I use for that nowadays)?
回答1:
Seems that "Put windows" https://extensions.gnome.org/extension/39/put-windows/ is "enough" to do it, though it seems to be a bit buggy sometimes. To install it via Chrome, you need to install these packages first:
apt-get install chrome-gnome-shell gnome-shell-extensions
I needed to restart Gnome to make it work.
回答2:
I wrote a basic Python script to move windows into screen corners, since all solutions I tried where buggy (gaps between windows and screen corners, windows accidentally moving to other screen), also since this allows to completely customize everything related:
https://github.com/ifischer/window-tiler
来源:https://stackoverflow.com/questions/52208274/move-window-to-screen-corners-using-keyboard-shortcuts-on-ubuntu-18-04