From dc7b9ef6cfb1cdeb067188deb2bcdcf6808afe06 Mon Sep 17 00:00:00 2001 From: Nico Schlömer Date: Thu, 23 Jul 2020 14:19:42 +0200 Subject: add --version --- autotiling/main.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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() -- cgit From 676a5e51bf1d2b1f0f2ce45b47453b2f320c68fc Mon Sep 17 00:00:00 2001 From: Nico Schlömer Date: Thu, 23 Jul 2020 14:25:51 +0200 Subject: add pypi badge --- README.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5d26708..50a5b7f 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 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. -- cgit From ad62737f12bcda202697143aa40c07eb5a7337d1 Mon Sep 17 00:00:00 2001 From: Nico Schlömer Date: Thu, 23 Jul 2020 14:27:22 +0200 Subject: more readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 50a5b7f..c30809d 100644 --- a/README.md +++ b/README.md @@ -45,8 +45,8 @@ action](https://img.youtube.com/vi/UWRZuhn92bQ/0.jpg)](https://www.youtube.com/w snap 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 + _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). -- cgit From 5d3cc9a8c83d85c7536d83cc6065e655d8289abb Mon Sep 17 00:00:00 2001 From: Nico Schlömer Date: Thu, 23 Jul 2020 15:43:10 +0200 Subject: version bump --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit