From 4efe8a2160c8ef0d7355d4885abb612ae9e3e4bb Mon Sep 17 00:00:00 2001 From: Michael Shepanski Date: Sun, 15 May 2016 23:16:18 -0400 Subject: [PATCH] Add install instructions; Add some ignores; rename example --- .gitignore | 5 +++++ README.md | 17 ++++++++++++++++- example2.gif => example.gif | Bin pygrid.py | 5 +++-- 4 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 .gitignore rename example2.gif => example.gif (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0865b84 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +parts/* +snap/* +stage/* +*.snap +snapcraft.yaml \ No newline at end of file diff --git a/README.md b/README.md index 44a2613..cb3ba78 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ## PyGrid ## - + PyGrid is a small utility which allows you to easily organize your open windows by tiling, resizing and positioning them to make the best use of your desktop real estate. It's easy to configure and supports multiple monitors. #### Requirements #### @@ -42,5 +42,20 @@ Configuration is done via a JSON file located at `~/.config/pygrid.json` which w } ``` +#### Installation on Ubuntu #### +```bash +$ sudo apt-get install git python3-gi python3-xlib +$ cd +$ git clone https://github.com/mjs7231/pygrid.git +$ cd pygrid && ./pygrid.py +``` + +To start at boot I simply added the following line to *Startup Applications*. +```bash +/pygrid/pygrid.py +``` + + + #### Credit & License #### PyGrid was original a fork of [QuickTile by ssokolow](https://github.com/ssokolow/quicktile), but rewritten to allow a much easier configuration as well as updated code to run on Python3 & GTK3. Code released under GPLv2 License. diff --git a/example2.gif b/example.gif similarity index 100% rename from example2.gif rename to example.gif diff --git a/pygrid.py b/pygrid.py index 4b16c50..532956d 100755 --- a/pygrid.py +++ b/pygrid.py @@ -3,12 +3,13 @@ PyGrid - M.Shepanski 2016 Easily organize open windows on X11 desktop. """ -import copy, json, os -import gi, signal +import copy, json, os, signal from collections import namedtuple from itertools import product from Xlib import display, X from Xlib.keysymdef import miscellany + +import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, GObject # noqa from gi.repository import Gdk # noqa