diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index ebfd638..eeb4be3 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -18,3 +18,11 @@ Before You Open An Issue... traceback from the ``Details...`` button. Thanks for making it easier for me to help you. + +Before You Open A PR... +======================= + +1. Please open an issue so you don't risk contributing code that won't be + accepted. + +2. Read the `Developer's Guide `_. diff --git a/debian/rules b/debian/rules index 1e9c5e1..b6cad30 100755 --- a/debian/rules +++ b/debian/rules @@ -22,4 +22,4 @@ include /usr/share/dpkg/default.mk override_dh_auto_install: dh_auto_install - install -D quicktile.desktop debian/quicktile/etc/xdg/autostart/quicktile.desktop + install -D quicktile/quicktile.desktop debian/quicktile/etc/xdg/autostart/quicktile.desktop diff --git a/docs/developing.rst b/docs/developing.rst index d9bedc5..6f2399c 100644 --- a/docs/developing.rst +++ b/docs/developing.rst @@ -274,6 +274,17 @@ For best results, configure your virtual desktop with the following characterist best chance of triggering any dead-space-related bugs in the code for calculating usable regions. +.. note:: The following two behaviours are currently known bugs where a proper + solution is blocked on reworking how window state is tracked and you don't + need to worry that you've caused them: + + 1. If a window is so far down or to the right that it would be outside the + bounds of the destination monitor, QuickTile will refuse to honor a request to move it to that monitor to avoid the risk of your window manager allowing it to get lost off the edge of the desktop. This can block commands like ``monitor-switch``. + 2. If a window's top-left corner is within the bounds of the destination + montiro, but its bottom-right corner extends beyond it, the window will + be resized to fit, but it won't remember its old size if it's moved back + to its original monitor. + Automated Testing ^^^^^^^^^^^^^^^^^ diff --git a/quicktile/__main__.py b/quicktile/__main__.py index 3a164fd..d4d2522 100644 --- a/quicktile/__main__.py +++ b/quicktile/__main__.py @@ -33,7 +33,7 @@ # pylint: disable=unsubscriptable-object # pylint: disable=wrong-import-order -import errno, logging, os, signal, sys +import errno, logging, os, platform, signal, sys from argparse import ArgumentParser from importlib.resources import files @@ -56,7 +56,7 @@ from typing import Optional # NOQA pylint: disable=unused-import # -- -__version__ = files("quicktile").joinpath("VERSION").read_text() +__version__ = files("quicktile").joinpath("VERSION").read_text().strip() Wnck.set_client_type(Wnck.ClientType.PAGER) @@ -204,6 +204,27 @@ def main() -> None: logging.basicConfig(level=logging.DEBUG if args.debug else logging.INFO, format='%(levelname)s: %(message)s') + if args.debug: + logging.debug("Starting QuickTile v{} on {} under Python v{}".format( + __version__, + os.environ.get('XDG_CURRENT_DESKTOP', '(unknown DE)').strip(), + platform.python_version())) + + uname = platform.uname() + logging.debug("Host OS is {} {} {}".format( + uname.system, uname.release, uname.version)) + + if hasattr(platform, 'freedesktop_os_release'): # pragma: no branch + try: + logging.debug("Host distro is {}".format( + platform.freedesktop_os_release().get( + 'PRETTY_NAME', '(unknown)'))) + except OSError: # pragma: no cover + logging.debug("Couldn't identify host distro") + + if 'WAYLAND_DISPLAY' in os.environ: + logging.warning("QuickTile appears to be running under Wayland") + cfg_path = os.path.join(XDG_CONFIG_DIR, 'quicktile.cfg') first_run = not os.path.exists(cfg_path) config = load_config(cfg_path)