diff options
author | Piotr Miller <nwg.piotr@gmail.com> | 2020-07-23 15:48:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-23 15:48:48 +0200 |
commit | 126c07da532fd58df0af86f9f1741e29d6bf2db9 (patch) | |
tree | bf81d17b2eb30c2b5398350510dd20935354bf55 | |
parent | 3e59a58522d3f9c4a359ba33cbe9d1609ce067b4 (diff) | |
parent | 5d3cc9a8c83d85c7536d83cc6065e655d8289abb (diff) | |
download | autotiling-126c07da532fd58df0af86f9f1741e29d6bf2db9.tar.gz |
Merge pull request #15 from nschloe/version-v
add --version
-rw-r--r-- | README.md | 18 | ||||
-rw-r--r-- | autotiling/main.py | 10 | ||||
-rw-r--r-- | setup.cfg | 2 |
3 files changed, 23 insertions, 7 deletions
@@ -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() @@ -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 |