aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md18
-rw-r--r--autotiling/main.py10
-rw-r--r--setup.cfg2
3 files changed, 23 insertions, 7 deletions
diff --git a/README.md b/README.md
index 5d26708..c30809d 100644
--- a/README.md
+++ b/README.md
@@ -14,15 +14,15 @@ action](https://img.youtube.com/vi/UWRZuhn92bQ/0.jpg)](https://www.youtube.com/w
1. Install autotiling. Possible methods:
- * _PyPi._ autotiling is available from PyPi, so you can install it with
+ * _PyPi._
+
+ [![PyPi
+ Version](https://img.shields.io/pypi/v/autotiling.svg?style=flat-square)](https://pypi.org/project/autotiling)
+
+ autotiling is available from PyPi, so you can install it with
```
pip install autotiling
```
- _NOTE:_ The current master branch is compatible with sway >= 1.5. For lower
- versions you need to use the script from the [sway14
- branch](https://github.com/nwg-piotr/autotiling/tree/sway14) or the [0.9
- release](https://github.com/nwg-piotr/autotiling/releases/tag/v0.9).
-
* _Arch Linux_
@@ -45,5 +45,11 @@ action](https://img.youtube.com/vi/UWRZuhn92bQ/0.jpg)](https://www.youtube.com/w
snap install autotiling
```
+ _NOTE:_ The current release and master branch is compatible with sway >= 1.5. For
+ lower versions you need to use the script from the [sway14
+ branch](https://github.com/nwg-piotr/autotiling/tree/sway14) or the [0.9
+ release](https://github.com/nwg-piotr/autotiling/releases/tag/v0.9).
+
+
2. Add `exec autotiling` to the `~/.config/sway/config` or `exec_always --no-startup-id
autotiling` to the `~/.config/i3/config` file.
diff --git a/autotiling/main.py b/autotiling/main.py
index d253999..f3644a7 100644
--- a/autotiling/main.py
+++ b/autotiling/main.py
@@ -18,6 +18,8 @@ from functools import partial
from i3ipc import Connection, Event
+from .__about__ import __version__
+
def switch_splitting(i3, e, debug):
try:
@@ -69,6 +71,14 @@ def main():
parser.add_argument(
"--debug", action="store_true", help="Print debug messages to stderr"
)
+ parser.add_argument(
+ "--version",
+ "-v",
+ action="version",
+ version="%(prog)s {}, Python {}".format(__version__, sys.version),
+ help="display version information",
+ )
+
args = parser.parse_args()
handler = partial(switch_splitting, debug=args.debug)
i3 = Connection()
diff --git a/setup.cfg b/setup.cfg
index 7155b99..1bf5536 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,6 @@
[metadata]
name = autotiling
-version = 1.1
+version = 1.2
author = Piotr Miller
author_email = nwg.piotr@gmail.com
description = Automatically switch the horizontal/vertical window split orientation in i3 and sway