A helper tool for quickly configuring a multi-monitor setup, built with tiled window managers in mind
Project description
qkdisplays - Quick Displays
qkdisplays is a helper tool for quickly configuring a multi-monitor setup, built with tiled window managers in mind. Useful if you often change your multi-monitor setup and wish to configure it with the same ease you navigate your window manager.
At the moment qkdisplays only supports Sway but support for other environments might be added in the future.
Motivation
I use a laptop, and I often connect it to different docking stations which I have never connected to before. These docking stations often themselves contain more than one monitor. This means that I often need to configure the positioning of my displays. While there are nice GUI tools to do so, I felt like it would be nice if there was a tool to do the same using keyboard shortcuts which would allow me to perform this configuration quicker. Same as how tiled window managers can allow you to control windows quicker using keyboard shortcuts.
Usage
qkdisplays provides multiple commands that can control the positioning of the displays (as well as scaling). The idea is that you can configure Sway to add keybindings for each of these commands (most likely in its own separate mode). You can check out the example Sway config later in this document.
Running qkdisplays show (which you can run when you enter the Sway mode) will
show a 1-indexed numbered indicator on each display, going from left to right.
E.g., the display that shows 1 is configured to be the leftmost display. You
can use this to quickly tell how the displays are currently configured. Then,
you can use qkdisplays focus to navigate using these indicators, qkdisplays place to move displays using these indicators or qkdisplays move to switch
between a display and the one adjacent to it to its right or left. Finally,
qkdisplays close closes these indicators (which you can run upon exiting the
Sway mode).
NOTE: At the moment qkdisplays only supports configuring the positions of
the displays on the x axis, and pretty much expects you to have a setup where
all the displays are contiguous on that axis (you can even enforce them to all
be on the same position on the y axis with the strict_y config option). This
is because A. the idea of this tool is to quickly configure the displays which
might not be the case if the options are too complex and B. I have to admit
that I personally only want this setup, and never actually found use for a case
where the displays are not all contiguous on the x axis.
qkdisplays also supports setting the scaling of the currently focused display
using qkdisplays set_scale.
For more information you can run qkdisplays --help or browse the man page.
Demo
Installation
For Arch Linux users, a qkdisplays package is available in the AUR.
Otherwise, the package is available on PyPI so can be installed by running
pip install qkdisplays
If you install via pip, ensure you have the system libraries for gtk3 and
gtk-layer-shell installed (e.g., libgtk-3-dev and libgtk-layer-shell-dev
on Debian/Ubuntu, or gtk3 and gtk-layer-shell on Arch Linux).
Sway configuration example
mode "monitors" {
# In monitors mode navigate between monitors same as you would normally in
# sway between containers/workspaces, except no up/down and no $mod key.
bindsym $left focus output left
bindsym $right focus output right
bindsym Shift+$left exec qkdisplays move left
bindsym Shift+$right exec qkdisplays move right
bindsym 1 exec qkdisplays focus 1
bindsym 2 exec qkdisplays focus 2
bindsym 3 exec qkdisplays focus 3
bindsym 4 exec qkdisplays focus 4
bindsym 5 exec qkdisplays focus 5
bindsym 6 exec qkdisplays focus 6
bindsym 7 exec qkdisplays focus 7
bindsym 8 exec qkdisplays focus 8
bindsym 9 exec qkdisplays focus 9
bindsym 0 exec qkdisplays focus 10
bindsym Shift+1 exec qkdisplays place 1
bindsym Shift+2 exec qkdisplays place 2
bindsym Shift+3 exec qkdisplays place 3
bindsym Shift+4 exec qkdisplays place 4
bindsym Shift+5 exec qkdisplays place 5
bindsym Shift+6 exec qkdisplays place 6
bindsym Shift+7 exec qkdisplays place 7
bindsym Shift+8 exec qkdisplays place 8
bindsym Shift+9 exec qkdisplays place 9
bindsym Shift+0 exec qkdisplays place 10
# Configure scale of current output with + and -
bindsym plus exec qkdisplays set_scale +0.05
bindsym minus exec qkdisplays set_scale -0.05
# Restore scale to 1 with =
bindsym equal exec qkdisplays set_scale 1
# Close qkdisplays, return to default mode
bindsym Return exec qkdisplays close; mode "default"
bindsym Escape exec qkdisplays close; mode "default"
}
# Have qkdisplays running while in monitors mode to show monitor indications
bindsym $mod+Shift+m exec qkdisplays show; mode "monitors"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qkdisplays-1.0.tar.gz.
File metadata
- Download URL: qkdisplays-1.0.tar.gz
- Upload date:
- Size: 28.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76902810f875b84bf08d7e1e0c2f1094d7f3a88192760115025ffeb8820a0722
|
|
| MD5 |
5cda00fc1622e48f74d6f65ecbb7d809
|
|
| BLAKE2b-256 |
fcf0948df61f3fc04ae2ffb61e959805d79271fb18f5f19fc149595e075d5898
|
File details
Details for the file qkdisplays-1.0-py3-none-any.whl.
File metadata
- Download URL: qkdisplays-1.0-py3-none-any.whl
- Upload date:
- Size: 22.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46a983c0f6861de46d596b3842c4745430cff882f76a92e7afbe6c8f199564e4
|
|
| MD5 |
2d04cd6bb1b88fc571cb1ac8cb018fe9
|
|
| BLAKE2b-256 |
1a15d5970ba3066599ff58ff37fb904d610362aee55120e9e3b11805cd001352
|