From f0f9ae6a2a4a979c4fe2dcc2c1c9462af5bd3553 Mon Sep 17 00:00:00 2001 From: Stephan Sokolow Date: Thu, 9 Oct 2025 02:50:51 -0400 Subject: [PATCH 1/6] Fix .desktop file location in contrib'd .deb boilerplate --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From c0845773820c23e8f59116bb85ac7c806c078783 Mon Sep 17 00:00:00 2001 From: Stephan Sokolow Date: Thu, 9 Oct 2025 03:02:30 -0400 Subject: [PATCH 2/6] CONTRIBUTING.rst: Add "Before you open a PR..." --- CONTRIBUTING.rst | 8 ++++++++ 1 file changed, 8 insertions(+) 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 `_. From 9a56246ff1a9d851e006dac291f4bf589d11b873 Mon Sep 17 00:00:00 2001 From: Stephan Sokolow Date: Thu, 9 Oct 2025 04:20:29 -0400 Subject: [PATCH 3/6] Strip trailing whitespace for __version__ --- quicktile/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quicktile/__main__.py b/quicktile/__main__.py index 3a164fd..7a6082a 100644 --- a/quicktile/__main__.py +++ b/quicktile/__main__.py @@ -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) From 17bcfa9f9a5f7dfc8dcd3caf3787eac6448efc16 Mon Sep 17 00:00:00 2001 From: Stephan Sokolow Date: Thu, 9 Oct 2025 04:46:29 -0400 Subject: [PATCH 4/6] Acknowledge two known bugs in testing section of developer's guide --- docs/developing.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 ^^^^^^^^^^^^^^^^^ From 7de5c5b1d65444f9e67fdf520713bd386199b4bf Mon Sep 17 00:00:00 2001 From: Stephan Sokolow Date: Thu, 9 Oct 2025 04:46:35 -0400 Subject: [PATCH 5/6] Enhance --debug to gather version information --- quicktile/__main__.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/quicktile/__main__.py b/quicktile/__main__.py index 7a6082a..ce823f7 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 @@ -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'): + try: + logging.debug("Host distro is {}".format( + platform.freedesktop_os_release().get( + 'PRETTY_NAME', '(unknown)'))) + except OSError: + 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) From cb498a5565d528c3c020c92543142e827d7ba901 Mon Sep 17 00:00:00 2001 From: Stephan Sokolow Date: Thu, 9 Oct 2025 04:51:59 -0400 Subject: [PATCH 6/6] Mark untestable branches in new --debug code --- quicktile/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quicktile/__main__.py b/quicktile/__main__.py index ce823f7..d4d2522 100644 --- a/quicktile/__main__.py +++ b/quicktile/__main__.py @@ -214,12 +214,12 @@ def main() -> None: logging.debug("Host OS is {} {} {}".format( uname.system, uname.release, uname.version)) - if hasattr(platform, 'freedesktop_os_release'): + 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: + except OSError: # pragma: no cover logging.debug("Couldn't identify host distro") if 'WAYLAND_DISPLAY' in os.environ: