Skip to main content

A Linux window management tool inspired by Microsoft's FancyZones

Project description

PyXZones

A slice of 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* 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 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:

/* 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.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyxzones-0.0.1.tar.gz (29.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyxzones-0.0.1-py3-none-any.whl (30.9 kB view details)

Uploaded Python 3

File details

Details for the file pyxzones-0.0.1.tar.gz.

File metadata

  • Download URL: pyxzones-0.0.1.tar.gz
  • Upload date:
  • Size: 29.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for pyxzones-0.0.1.tar.gz
Algorithm Hash digest
SHA256 0c7c126d81a93545d63e9f8b3be14b0a6aa26c77e4f4e914c466f6b58d41bd40
MD5 90fd4817c409bdf1fde9033ba38687d5
BLAKE2b-256 c769752a28de14e64e8c47d4eefc408327cd82dda892b981d445eb1f8dcb79b3

See more details on using hashes here.

File details

Details for the file pyxzones-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyxzones-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 30.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for pyxzones-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9b77a0290d0755673f51e3c42d080de740ee59df657b4c773e6226c024a676df
MD5 6eb290456ad39c2a05b9f35f1ac9f52c
BLAKE2b-256 2619817929484ab8a072071ca6bae31ef0267e699968fd64c137587584af0240

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page