#wayland #wlroots #compositor #position #show #wltile

app wltile

A cli tool that positions outputs/displays for wlroots based compositors

9 releases (1 stable)

new 1.0.0 Apr 10, 2025
0.3.4 Apr 4, 2025
0.3.0 Mar 14, 2025
0.2.0 Mar 13, 2025
0.1.1 Mar 11, 2025

#128 in Command line utilities

Download history 129/week @ 2025-02-26 62/week @ 2025-03-05 313/week @ 2025-03-12 8/week @ 2025-03-19 505/week @ 2025-04-02

877 downloads per month

GPL-3.0-or-later

53KB
1.5K SLoC

Overview

wltile is a cli tool that positions outputs/displays for wlroots based compositors.

Install

Cargo

cargo install wltile`

Arch Linux

Available on AUR https://aur.archlinux.org/packages/wltile

paru wltile

Usage

wltile <COMMAND>

Commands:
  list      Lists all connected outputs
  show      Shows detailed info for the specified output
  position  Position outputs
  set       Sets properties of the output to a desired value
  help      Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

List

$ wltile list
eDP-1:
	Make: Lenovo Group Limited 0x414B
	Size: 2880 x 1800 scale: 2
	Refresh Rate: 120 kHz
	Position: (3440, 540)
DP-2:
	Make: Dell Inc. DELL S3423DWC
	Size: 3440 x 1440 scale: 1
	Refresh Rate: 60 kHz
	Position: (0, 0)

Show

$ wltile show DP-2
Make: Lenovo Group Limited
Model: 0x414B
Size: 2880 x 1800
Scale: 2
Transform: 0
Physical Size: 300 x 190 mm
Refresh Rate: 120 kHz
Position: (0, 0)
Modes:
        > 0. 2880 x 1800 @ 120 kHz (*)
          1. 2880 x 1800 @ 60 kHz
          2. 1920 x 1200 @ 120 kHz
          3. 1920 x 1080 @ 120 kHz
          4. 1600 x 1200 @ 120 kHz
          5. 1680 x 1050 @ 120 kHz
          6. 1440 x 900 @ 120 kHz
          7. 1280 x 1024 @ 120 kHz
          8. 1280 x 800 @ 120 kHz
          9. 1280 x 720 @ 120 kHz
          10. 1024 x 768 @ 120 kHz
          11. 800 x 600 @ 120 kHz
          12. 640 x 480 @ 120 kHz

Modes format is as following: <ordinal> <resolution> @ <refresh rate> <prefered mode>. The <ordinal> is used later to refer to the mode in other operations (for example to set the mode to a desired one).

Modes are always shown ordered from the highest resolution and referesh rate, to the lowest. This makes the ordinals stable between runs.

Position

wltile position <TARGET_OUTPUT> <RELATION> <REFERENCE_OUTPUT> [ALIGNMENT]

Arguments:
  <TARGET_OUTPUT>     Output to be positioned
  <RELATION>          How is it positioned to the reference output [possible values: left-of, right-of, top-of, bottom-of]
  <REFERENCE_OUTPUT>  Reference Output
  [ALIGNMENT]         Alignment [default: align-bottom] [possible values: align-bottom, align-top, align-right, align-left]

Options:
  -h, --help  Print help

Example:

$ wltile position DP-2 left-of eDP-1 align-bottom

Set

wltile set <TARGET_OUTPUT> <PROPERTY> <VALUE>

Arguments:
  <TARGET_OUTPUT>  
  <PROPERTY>       [possible values: mode, scale, rotation]
  <VALUE>          

Options:
  -h, --help  Print help

Example:

$ wltile show DP-2 # Show the supported modes
Make: Lenovo Group Limited
Model: 0x414B
Size: 2880 x 1800
Scale: 2
Transform: 0
Physical Size: 300 x 190 mm
Refresh Rate: 120 kHz
Position: (0, 0)
Modes:
        > 0. 2880 x 1800 @ 120 kHz (*)
          1. 2880 x 1800 @ 60 kHz
          2. 1920 x 1200 @ 120 kHz
          3. 1920 x 1080 @ 120 kHz
          4. 1600 x 1200 @ 120 kHz
          5. 1680 x 1050 @ 120 kHz
          6. 1440 x 900 @ 120 kHz
          7. 1280 x 1024 @ 120 kHz
          8. 1280 x 800 @ 120 kHz
          9. 1280 x 720 @ 120 kHz
          10. 1024 x 768 @ 120 kHz
          11. 800 x 600 @ 120 kHz
          12. 640 x 480 @ 120 kHz

# set the desired mode using shown ordinal
$ wltile set DP-2 mode 3 

$ wltile set DP-2 scale 1.5

$ wltile set DP-2 rotation 270

Dependencies

~9–20MB
~287K SLoC