gtk-tiling icon indicating copy to clipboard operation
gtk-tiling copied to clipboard

Any chance of getting this to work on Linux Mint 20 / Ubuntu 20.04?

Open winkmal opened this issue 4 years ago • 3 comments

Very nice script. I would like to give it a try, but Ubuntu 20.04 (focal) has removed Python 2 support, and pygtk package is not in the official repos anymore. Any chance this would work with minimal changes in Python 3? Which packages would I need to install?

winkmal avatar Jan 05 '21 17:01 winkmal

Hi @rotton, thanks! It's been a while since I made this, and I don't have any plans to port it to Python 3. I use ShellTile myself on Ubuntu 20.04 under Gnome, which works alright. I'd be happy to accept a PR for this though! :slightly_smiling_face:

Instead of from gtk.gdk import *, you would use

import gi
gi.require_version('Gdk', '3.0')
from gi.repository import Gdk
# ...
display = Gdk.Display.get_default()

And so on. Alternatively, you could install python2 (sudo apt install python2), but I'm not sure this single script is worth that. Consider i3? That's a pretty neat tiling WM that will do what my script does, and then some.

sjaakvandenberg avatar Jan 05 '21 18:01 sjaakvandenberg

Thanks for the prompt reply.

I use ShellTile myself on Ubuntu 20.04 under Gnome, which works alright.

Well, I am on Cinnamon which has basic tiling built in. But I am especially looking for other ratios than 1:1. And unfortunately, if I resize one window manually and tile another one to the other site with the mouse, it does not fill the gap (as it does in Windows 10), but always goes to 50 % of the screen width. That's what I liked about your script, that I can use other ratios such as 30:70. Hm, if it's just changing a couple of lines, I could try porting it. But I need to know which (Ubuntu) package contains the dependencies needed for the import statements.

winkmal avatar Jan 05 '21 18:01 winkmal

I created a rough first draft (#2), still with large parts of the original code commented out. Feel free to take it further (it doesn't work in its current state).

sjaakvandenberg avatar Jan 05 '21 18:01 sjaakvandenberg