pyxzones


Namepyxzones JSON
Version 0.0.1 PyPI version JSON
download
home_page
SummaryA Linux window management tool inspired by Microsoft's FancyZones
upload_time2024-02-03 23:47:31
maintainer
docs_urlNone
author
requires_python>=3.10
license
keywords pyx zones fancyzones
VCS
bugtrack_url
requirements python-xlib ewmh xdg-base-dirs pycairo PyGObject
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PyXZones

## A slice of [FancyZones](https://learn.microsoft.com/en-us/windows/powertoys/fancyzones) on Linux

This project is an attempt to emulate some of the functionality Windows users are able to leverage from FancyZones. Users can drag and drop windows into predefined zones, and have PyXZones fit the window to the zone space.


## How to use

Installed locally via `pip` (ie. `pip install pyxzones`) or executed as a python module from a clone of the git repository (`python -m pyxzones`) are effectively equivalent.

The default zone configuration and various other settings are provided the `settings.py` file and can be overwritten from a `pyxzones.json` configuration file located at the [XDG_CONFIG*](https://wiki.archlinux.org/title/XDG_Base_Directory) locations, or the user's home folder (a `.pyxzones.json` file is also suitable in the home folder).

Zones can be set as vertical or horizontal slices of a monitor. The existing example is hopefully suitable as guidance for general usage (please see `example_config/pyxzones.json`).

With zones configured, and pyxzones running, the activation key(s) also set in settings (efault `Alt_L`) can be held while moving a window with the cursor to activate snapping. Holding this keybinding, windows can be dragged to a zone, and upon releasing the mouse click, the window will snap to the dimensions of the predefined zone.


`Note:` This package requires access with the Xorg server bindings, so it should only be used on Xorg-based Unix Systems or systems with sufficient Xorg backwards compatibility. Please see more information in the below [System Requirements](#system-requirements) section.


## Seeing stubborn windows?

You may run across some windows that behave strangely. Specifically calling out here GTK3.0 windows, which have a default margin around them and will not cooperate with resizing to fill a zone completely.

To get around this GTK quirk, you may adjust your user CSS rules (located at `~/.config/gtk-3.0/gtk.css`) for GTK as follows:
```css
/* early GTK 3 rules */
.window-frame {
  margin: 0px;
  box-shadow: none;
}

/* newer GTK 3 rules */
window > decoration {
  margin: 0;
  box-shadow: none;
}
```
Note that you may need to create the file mentioned above and this will likely require an X server restart (not just log out/log in) to apply.

## System Requirements

#### Building

To build the app, a system must have the required GTK libraries used in the current zone display window. On the development system used, these included `libcairo2-dev libgirepository1.0-dev gir1.2-gtk-4.0`. A reference for multiple systems is located at the PyGObject documentation [located here](https://pygobject.readthedocs.io/en/latest/getting_started.html).

#### Window Manager

In addition, the X Window Manager being used must support the `Xrandr` and `Record` extentions and the following X features are _required_ for basic expected functionality:
* _NET_WORKAREAS
* _NET_MOVERESIZE_WINDOW
* _NET_SHOWING_DESKTOP
* _NET_ACTIVE_WINDOW

The features below may not be strictly required, but will degrate the quality of the experience that can be expected:
* _NET_FRAME_EXTENTS
* _GTK_WORKAREAS_*
* _NET_WM_STATE
* _NET_CURRENT_DESKTOP

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pyxzones",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "pyx,zones,fancyzones",
    "author": "",
    "author_email": "Josh Gentry <jg@noclip.dev>",
    "download_url": "https://files.pythonhosted.org/packages/c7/69/752a28de14e64e8c47d4eefc408327cd82dda892b981d445eb1f8dcb79b3/pyxzones-0.0.1.tar.gz",
    "platform": null,
    "description": "# PyXZones\n\n## A slice of [FancyZones](https://learn.microsoft.com/en-us/windows/powertoys/fancyzones) on Linux\n\nThis project is an attempt to emulate some of the functionality Windows users are able to leverage from FancyZones. Users can drag and drop windows into predefined zones, and have PyXZones fit the window to the zone space.\n\n\n## How to use\n\nInstalled locally via `pip` (ie. `pip install pyxzones`) or executed as a python module from a clone of the git repository (`python -m pyxzones`) are effectively equivalent.\n\nThe default zone configuration and various other settings are provided the `settings.py` file and can be overwritten from a `pyxzones.json` configuration file located at the [XDG_CONFIG*](https://wiki.archlinux.org/title/XDG_Base_Directory) locations, or the user's home folder (a `.pyxzones.json` file is also suitable in the home folder).\n\nZones can be set as vertical or horizontal slices of a monitor. The existing example is hopefully suitable as guidance for general usage (please see `example_config/pyxzones.json`).\n\nWith zones configured, and pyxzones running, the activation key(s) also set in settings (efault `Alt_L`) can be held while moving a window with the cursor to activate snapping. Holding this keybinding, windows can be dragged to a zone, and upon releasing the mouse click, the window will snap to the dimensions of the predefined zone.\n\n\n`Note:` This package requires access with the Xorg server bindings, so it should only be used on Xorg-based Unix Systems or systems with sufficient Xorg backwards compatibility. Please see more information in the below [System Requirements](#system-requirements) section.\n\n\n## Seeing stubborn windows?\n\nYou may run across some windows that behave strangely. Specifically calling out here GTK3.0 windows, which have a default margin around them and will not cooperate with resizing to fill a zone completely.\n\nTo get around this GTK quirk, you may adjust your user CSS rules (located at `~/.config/gtk-3.0/gtk.css`) for GTK as follows:\n```css\n/* early GTK 3 rules */\n.window-frame {\n  margin: 0px;\n  box-shadow: none;\n}\n\n/* newer GTK 3 rules */\nwindow > decoration {\n  margin: 0;\n  box-shadow: none;\n}\n```\nNote that you may need to create the file mentioned above and this will likely require an X server restart (not just log out/log in) to apply.\n\n## System Requirements\n\n#### Building\n\nTo build the app, a system must have the required GTK libraries used in the current zone display window. On the development system used, these included `libcairo2-dev libgirepository1.0-dev gir1.2-gtk-4.0`. A reference for multiple systems is located at the PyGObject documentation [located here](https://pygobject.readthedocs.io/en/latest/getting_started.html).\n\n#### Window Manager\n\nIn addition, the X Window Manager being used must support the `Xrandr` and `Record` extentions and the following X features are _required_ for basic expected functionality:\n* _NET_WORKAREAS\n* _NET_MOVERESIZE_WINDOW\n* _NET_SHOWING_DESKTOP\n* _NET_ACTIVE_WINDOW\n\nThe features below may not be strictly required, but will degrate the quality of the experience that can be expected:\n* _NET_FRAME_EXTENTS\n* _GTK_WORKAREAS_*\n* _NET_WM_STATE\n* _NET_CURRENT_DESKTOP\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A Linux window management tool inspired by Microsoft's FancyZones",
    "version": "0.0.1",
    "project_urls": {
        "Homepage": "https://github.com/joshgentry/pyxzones",
        "Issues": "https://github.com/joshgentry/pyxzones/issues"
    },
    "split_keywords": [
        "pyx",
        "zones",
        "fancyzones"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2619817929484ab8a072071ca6bae31ef0267e699968fd64c137587584af0240",
                "md5": "6eb290456ad39c2a05b9f35f1ac9f52c",
                "sha256": "9b77a0290d0755673f51e3c42d080de740ee59df657b4c773e6226c024a676df"
            },
            "downloads": -1,
            "filename": "pyxzones-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6eb290456ad39c2a05b9f35f1ac9f52c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 30879,
            "upload_time": "2024-02-03T23:47:29",
            "upload_time_iso_8601": "2024-02-03T23:47:29.214300Z",
            "url": "https://files.pythonhosted.org/packages/26/19/817929484ab8a072071ca6bae31ef0267e699968fd64c137587584af0240/pyxzones-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c769752a28de14e64e8c47d4eefc408327cd82dda892b981d445eb1f8dcb79b3",
                "md5": "90fd4817c409bdf1fde9033ba38687d5",
                "sha256": "0c7c126d81a93545d63e9f8b3be14b0a6aa26c77e4f4e914c466f6b58d41bd40"
            },
            "downloads": -1,
            "filename": "pyxzones-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "90fd4817c409bdf1fde9033ba38687d5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 29220,
            "upload_time": "2024-02-03T23:47:31",
            "upload_time_iso_8601": "2024-02-03T23:47:31.307657Z",
            "url": "https://files.pythonhosted.org/packages/c7/69/752a28de14e64e8c47d4eefc408327cd82dda892b981d445eb1f8dcb79b3/pyxzones-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-03 23:47:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "joshgentry",
    "github_project": "pyxzones",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "python-xlib",
            "specs": [
                [
                    "==",
                    "0.33"
                ]
            ]
        },
        {
            "name": "ewmh",
            "specs": [
                [
                    "==",
                    "0.1.6"
                ]
            ]
        },
        {
            "name": "xdg-base-dirs",
            "specs": [
                [
                    "==",
                    "6.0.1"
                ]
            ]
        },
        {
            "name": "pycairo",
            "specs": [
                [
                    "==",
                    "1.25.1"
                ]
            ]
        },
        {
            "name": "PyGObject",
            "specs": [
                [
                    "==",
                    "3.46.0"
                ]
            ]
        }
    ],
    "lcname": "pyxzones"
}
        
Elapsed time: 0.17394s