Move window to screen corners using keyboard shortcuts on Ubuntu 18.04 [closed]

拟墨画扇 提交于 2021-01-03 07:10:37

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!