jay-compositor 1.15.0

The Jay compositor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
# Command-Line Interface

Jay provides a comprehensive CLI for controlling the compositor, managing
displays, input devices, clients, and more. All subcommands communicate with
the running compositor over the Wayland protocol unless otherwise noted.

> [!TIP]
> Generate shell completions for tab-completion support:
>
> ```shell
> ~$ jay generate-completion bash > ~/.local/share/bash-completion/completions/jay
> ~$ jay generate-completion zsh > ~/.zfunc/_jay
> ~$ jay generate-completion fish > ~/.config/fish/completions/jay.fish
> ~$ jay generate-completion elvish  # pipe to appropriate location
> ~$ jay generate-completion powershell  # pipe to appropriate location
> ```

## Global Options

These options are accepted by every subcommand and must be passed before the
subcommand name (for example `jay --log-level debug randr`).

`--log-level <LEVEL>`
: Verbosity of the compositor or the CLI tool itself. One of `trace`, `debug`,
  `info`, `warn`, `error`, or `off`. When omitted, Jay falls back to the
  [`JAY_LOG_LEVEL`](environment-variables.md) environment variable, defaulting
  to `info`.

`--config-dir <DIR>`
: Overrides the [configuration directory](configuration/index.md) for this
  invocation, taking precedence over `JAY_CONFIG_DIR`, `XDG_CONFIG_HOME`, and
  `HOME`.

`--json`, `--all-json-fields`
: Emit machine-readable JSON. See [JSON Output](#json-output) below.

---

## JSON Output

Most query and status commands can output machine-readable JSON instead of
human-readable text. Pass the global `--json` flag before the subcommand:

```shell
~$ jay --json randr
~$ jay --json clients
~$ jay --json idle
```

Each command prints one or more JSON objects, one per line (JSONL format). This
makes it easy to process with tools like `jq`:

```shell
~$ jay --json randr | jq '.drm_devices[].connectors[].name'
~$ jay --json clients | jq 'select(.pid != null) | .pid'
```

By default, fields that are empty arrays, `null`, or `false` are omitted from
the output to reduce noise. To include every field, pass `--all-json-fields`:

```shell
~$ jay --all-json-fields --json randr
```

### Supported Commands

The following commands support `--json`:

`jay clients`
: One JSON object per client.

`jay color-management status`
: Color management enabled/available status.

`jay config path`
: The config file path as a JSON string.

`jay debugfs snapshot`
: The files inside the archive contain JSON instead of human-readable text.
  Nothing is printed to the terminal.

`jay idle status`
: Idle interval, grace period, and inhibitors.

`jay input show`, `jay input seat <seat> show`, `jay input device <id> show`
: Seats and input devices with all properties.

`jay log --path`
: The log file path as a JSON string.

`jay pid`
: The compositor PID as a JSON number.

`jay randr show`
: DRM devices, connectors, outputs, modes, and display properties.

`jay seat-test`
: Streaming JSONL -- one JSON object per input event (key, pointer, touch,
  gesture, tablet, switch).

`jay trace`
: Streaming JSONL -- one JSON object per traced Wayland message, plus one when
  a client is attached, one when it is detached, and one whenever messages are
  dropped. See [JSONL Format](tracing.md#jsonl-format).

`jay tree query`
: One JSON object per root node, with children nested recursively.

`jay version`
: The version string as a JSON value.

`jay xwayland status`
: Xwayland scaling mode and implied scale.

> [!TIP]
> Mutating commands (e.g., `jay idle set`, `jay randr output ... enable`)
> produce no output, so `--json` has no effect on them.

---

## Running

### `jay run`

Start the compositor.

```shell
~$ jay run
```

Optionally specify which backends to try (comma-separated, tried in order):

```shell
~$ jay run --backends x11,metal,headless
```

The default order is `x11,metal`. The first backend that can be started is
used. `metal` is the native DRM/KMS backend for bare-metal sessions.

### `jay quit`

Stop the running compositor.

```shell
~$ jay quit
```

### `jay pid`

Print the PID of the running compositor.

```shell
~$ jay pid
```

### `jay version`

Print the Jay version.

```shell
~$ jay version
```

---

## Configuration

### `jay config init`

Generate a configuration file pre-populated with all defaults.

```shell
~$ jay config init
```

If a config already exists, pass `--overwrite` to replace it (the old file is
backed up):

```shell
~$ jay config init --overwrite
```

> [!IMPORTANT]
> Once a config file exists, the entire built-in default configuration is
> replaced -- not merged. An empty config file means no shortcuts, no startup
> actions, nothing. Always use `jay config init` to start with a working
> configuration.

### `jay config path`

Print the path to the config file.

```shell
~$ jay config path
```

### `jay config open-dir`

Open the configuration directory with `xdg-open`.

```shell
~$ jay config open-dir
```

---

## Display & Graphics

All display and GPU commands live under `jay randr`.

### Showing Current Settings

```shell
~$ jay randr
~$ jay randr show
~$ jay randr show --modes      # include all available modes
~$ jay randr show --formats    # include all available framebuffer formats
```

### GPU / Card Commands

Set the primary (render) GPU:

```shell
~$ jay randr card card0 primary
```

Set the graphics API:

```shell
~$ jay randr card card0 api vulkan
~$ jay randr card card0 api opengl
```

Toggle direct scanout:

```shell
~$ jay randr card card0 direct-scanout enable
~$ jay randr card card0 direct-scanout disable
```

Toggle plane color pipelines (offloads color conversion to the display
hardware; only effective on supported devices):

```shell
~$ jay randr card card0 plane-color-pipelines enable
~$ jay randr card card0 plane-color-pipelines disable
```

Adjust the page-flip margin (in milliseconds, default 1.5):

```shell
~$ jay randr card card0 timing set-flip-margin 1.5
```

### Output Commands

Enable or disable an output:

```shell
~$ jay randr output DP-1 enable
~$ jay randr output DP-1 disable
```

Set the position:

```shell
~$ jay randr output DP-1 position 1920 0
```

Set the scale (fractional scaling supported):

```shell
~$ jay randr output DP-1 scale 1.5
~$ jay randr output DP-1 scale --round-to-float 1.333
```

Set the scaling filter (`linear` for smooth scaling, `nearest` for sharp,
blocky scaling):

```shell
~$ jay randr output DP-1 scaling-filter linear
~$ jay randr output DP-1 scaling-filter nearest
```

Set the mode (width, height, refresh rate in Hz):

```shell
~$ jay randr output DP-1 mode 2560 1440 144.0
```

Set the transform:

```shell
~$ jay randr output DP-1 transform rotate-90
~$ jay randr output DP-1 transform none
```

Available transforms: `none`, `rotate-90`, `rotate-180`, `rotate-270`, `flip`,
`flip-rotate-90`, `flip-rotate-180`, `flip-rotate-270`.

Override the non-desktop setting:

```shell
~$ jay randr output DP-1 non-desktop true
~$ jay randr output DP-1 non-desktop default
```

Configure VRR (variable refresh rate):

```shell
~$ jay randr output DP-1 vrr set-mode always
~$ jay randr output DP-1 vrr set-mode variant3
~$ jay randr output DP-1 vrr set-cursor-hz 240
~$ jay randr output DP-1 vrr set-cursor-hz none
```

VRR modes: `never`, `always`, `variant1` (one or more fullscreen apps),
`variant2` (single fullscreen app), `variant3` (single fullscreen app with
game/video content type). Pass `none` to `set-cursor-hz` to remove the cursor
Hz cap.

Configure tearing:

```shell
~$ jay randr output DP-1 tearing set-mode variant3
```

Tearing modes: `never`, `always`, `variant1` (one or more applications
displayed fullscreen), `variant2` (single application displayed fullscreen),
`variant3` (default -- single displayed application that requested tearing).

Set the framebuffer format:

```shell
~$ jay randr output DP-1 format set xrgb8888
```

Set the output color space and EOTF (for HDR):

```shell
~$ jay randr output DP-1 colors set bt2020 pq
~$ jay randr output DP-1 colors set default default
```

Set the brightness (in cd/m^2, or `default`):

```shell
~$ jay randr output DP-1 brightness 203
~$ jay randr output DP-1 brightness default
```

Set the blend space:

```shell
~$ jay randr output DP-1 blend-space linear
~$ jay randr output DP-1 blend-space srgb
```

Enable or disable native gamut usage:

```shell
~$ jay randr output DP-1 use-native-gamut true
~$ jay randr output DP-1 use-native-gamut false
```

### Virtual Outputs

```shell
~$ jay randr virtual-output create my-virtual-display
~$ jay randr virtual-output remove my-virtual-display
```

---

## Input

All input commands live under `jay input`.

### Showing Input Devices

```shell
~$ jay input
~$ jay input show
~$ jay input show -v    # verbose output with device details
```

### Seat Commands

Show seat information:

```shell
~$ jay input seat default show
~$ jay input seat default show -v
```

Set keyboard repeat rate (repeats per second, initial delay in ms):

```shell
~$ jay input seat default set-repeat-rate 25 600
```

Set the keymap from RMLVO names:

```shell
~$ jay input seat default set-keymap-from-names -l de
~$ jay input seat default set-keymap-from-names -l us -v intl -o compose:ralt
```

Set the keymap from a file (or stdin):

```shell
~$ jay input seat default set-keymap /path/to/keymap.xkb
```

Both `set-keymap` and `set-keymap-from-names` accept a `--shortcuts-group`
option to pin shortcut resolution to a specific group index:

```shell
~$ jay input seat default set-keymap-from-names -l us,ru -o grp:ctrl_space_toggle --shortcuts-group 0
```

Retrieve the current keymap:

```shell
~$ jay input seat default keymap > current.xkb
```

Toggle hardware cursor:

```shell
~$ jay input seat default use-hardware-cursor true
~$ jay input seat default use-hardware-cursor false
```

Set cursor size:

```shell
~$ jay input seat default set-cursor-size 24
```

Configure the simple (XCompose-based) input method:

```shell
~$ jay input seat default simple-im enable
~$ jay input seat default simple-im disable
~$ jay input seat default simple-im reload
```

### Device Commands

Show device information:

```shell
~$ jay input device 42 show
```

Set acceleration profile and speed:

```shell
~$ jay input device 42 set-accel-profile flat
~$ jay input device 42 set-accel-profile adaptive
~$ jay input device 42 set-accel-speed -0.5
```

Configure tap behavior:

```shell
~$ jay input device 42 set-tap-enabled true
~$ jay input device 42 set-tap-drag-enabled true
~$ jay input device 42 set-tap-drag-lock-enabled false
```

Set left-handed mode:

```shell
~$ jay input device 42 set-left-handed true
```

Set natural scrolling:

```shell
~$ jay input device 42 set-natural-scrolling true
```

Set pixels per scroll-wheel step:

```shell
~$ jay input device 42 set-px-per-wheel-scroll 30.0
```

Set the multiplier for non-wheel scroll events:

```shell
~$ jay input device 42 set-px-scroll-multiplier 2.0
```

Set the transform matrix (2x2):

```shell
~$ jay input device 42 set-transform-matrix 1.0 0.0 0.0 1.0
```

Set the calibration matrix (2x3, for touchscreens):

```shell
~$ jay input device 42 set-calibration-matrix 1.0 0.0 0.0 0.0 1.0 0.0
```

Set the click method:

```shell
~$ jay input device 42 set-click-method clickfinger
~$ jay input device 42 set-click-method button-areas
~$ jay input device 42 set-click-method none
```

Toggle middle button emulation:

```shell
~$ jay input device 42 set-middle-button-emulation true
```

Set the scroll method:

```shell
~$ jay input device 42 set-scroll-method two-fingers
~$ jay input device 42 set-scroll-method edge
~$ jay input device 42 set-scroll-method on-button-down
~$ jay input device 42 set-scroll-method no-scroll
```

Set the scroll button used by the `on-button-down` scroll method. The argument
is a button name from `input-event-codes.h`, or `none` to clear it:

```shell
~$ jay input device 42 set-scroll-button BTN_MIDDLE
~$ jay input device 42 set-scroll-button none
```

Toggle scroll button lock, so the scroll button starts and stops scrolling on
release instead of having to be held down:

```shell
~$ jay input device 42 set-scroll-button-lock true
~$ jay input device 42 set-scroll-button-lock false
```

Set a per-device keymap:

```shell
~$ jay input device 42 set-keymap /path/to/keymap.xkb
~$ jay input device 42 set-keymap-from-names -l de
~$ jay input device 42 keymap > device.xkb
```

The `--shortcuts-group` option is also available for per-device keymaps:

```shell
~$ jay input device 42 set-keymap-from-names -l us,de --shortcuts-group 0
```

Attach / detach a device from a seat:

```shell
~$ jay input device 42 attach default
~$ jay input device 42 detach
```

Map a device to a specific output:

```shell
~$ jay input device 42 map-to-output DP-1
~$ jay input device 42 remove-mapping
```

---

## Idle & Locking

### `jay idle`

Show idle status, including the current interval, grace period, and active
inhibitors:

```shell
~$ jay idle
~$ jay idle status
```

### `jay idle set`

Set the idle interval. Durations can be specified in flexible formats:

```shell
~$ jay idle set 10m
~$ jay idle set 1m 30s
~$ jay idle set disabled
```

### `jay idle set-grace-period`

Set the grace period (screens go black but are not locked/disabled):

```shell
~$ jay idle set-grace-period 30s
~$ jay idle set-grace-period disabled
```

### `jay unlock`

Unlock the compositor. This is useful when the screen locker crashes and the
session remains locked. Run it from another TTY or via SSH. You must set
`WAYLAND_DISPLAY` to the socket of the Jay compositor:

```shell
~$ WAYLAND_DISPLAY=wayland-1 jay unlock
```

---

## Logging

### `jay log`

Open the log file in `less`:

```shell
~$ jay log
~$ jay log -f        # follow mode (like tail -f)
~$ jay log -e        # jump to end of log
~$ jay log --path    # print the log file path instead
```

### `jay set-log-level`

Change the log level at runtime:

```shell
~$ jay set-log-level debug
~$ jay set-log-level info
```

Available levels: `trace`, `debug`, `info`, `warn`, `error`, `off`.

---

## Screenshots

### `jay screenshot`

Take a screenshot of the entire display:

```shell
~$ jay screenshot
~$ jay screenshot --format png
~$ jay screenshot --format qoi
~$ jay screenshot my-screenshot.png
```

If no filename is given, the screenshot is saved as
`%Y-%m-%d-%H%M%S_jay.<ext>` in the current directory. The filename supports
strftime format specifiers.

Capture in HDR10 instead of SDR:

```shell
~$ jay screenshot --hdr10
~$ jay screenshot --hdr10 my-screenshot.png
```

`--hdr10`
: Captures the screen with BT.2020 primaries and the PQ (SMPTE ST 2084)
  transfer function. The result is a 16-bit-per-channel PNG carrying a `cICP`
  chunk that identifies the HDR10 color space, so viewers that understand it
  display the image with the correct colors and brightness. Without this flag,
  screenshots are 8-bit sRGB.

This works whether or not your display is currently in HDR mode -- it controls
how the screenshot is encoded, not how the screen is driven. SDR content is
captured at the ITU reference level of 203 cd/m^2, leaving the range above it
for HDR content.

> [!IMPORTANT]
> `--hdr10` requires the Vulkan renderer. See
> [HDR & Color Management]hdr.md for how to check which renderer is in use.

> [!NOTE]
> `--hdr10` cannot be combined with `--format qoi`; QOI has no way to describe
> a color space.

---

## Clients & Windows

### `jay clients`

List all connected clients:

```shell
~$ jay clients
~$ jay clients show all
```

Show a specific client by ID:

```shell
~$ jay clients show id 42
```

Interactively select a window and show its client:

```shell
~$ jay clients show select-window
```

Kill a client by ID:

```shell
~$ jay clients kill id 42
```

Interactively select a window and kill its client:

```shell
~$ jay clients kill select-window
```

Select clients by their properties instead of by ID, using a
[match expression](#match-expressions):

```shell
~$ jay clients show match -e 'comm = "chromium"'
~$ jay clients kill match -e 'sandbox-app-id = "com.spotify.Client"'
```

### `jay tree query`

Inspect the compositor's surface tree:

```shell
~$ jay tree query root
~$ jay tree query -r root                    # recursive
~$ jay tree query -r --all-clients root      # show client details for every node
~$ jay tree query workspace-name main
~$ jay tree query select-workspace
~$ jay tree query select-window
```

Use every window matching a [match expression](#match-expressions) as a query
root:

```shell
~$ jay tree query match-windows -e 'app-id = "firefox"'
```

### `jay trace`

Print the Wayland messages exchanged between the compositor and one or more
clients, like `strace -p` for Wayland connections:

```shell
~$ jay trace id 42            # the client with ID 42
~$ jay trace select-window    # click a window to trace its client
~$ jay trace all              # every client
```

Clients can also be selected by their properties, using a
[match expression](#match-expressions):

```shell
~$ jay trace match -e 'comm = "chromium"'
```

`--raw-ids` prints the object IDs that appear on the wire instead of Jay's
unique ones, `-o` redirects the output to files or a shell command, and the
global `--json` flag switches the output to JSONL. See
[Tracing Wayland Messages](tracing.md) for the output formats and more
examples.

### Match Expressions

`jay clients show`, `jay clients kill`, `jay trace`, and `jay tree query` can
select clients and windows by the same criteria that
[window and client rules](window-rules.md) use. The criteria are written in
TOML:

`-e <EXPR>`, `--expr <EXPR>`
: An inline TOML expression.

`-f <FILE>`, `--file <FILE>`
: A path to a TOML file, or `-` to read from standard input.

Exactly one of the two is required.

Unlike in the config file, the document *is* the match table -- it is not
nested under a `match` key:

```shell
~$ jay clients show match -e 'comm = "chromium"'
~$ jay tree query match-windows -e 'app-id-regex = "(?i)spotify"'
```

Multiple criteria are AND-combined. Jay's TOML parser treats newlines as
ordinary whitespace, so several of them fit on one line:

```shell
~$ jay clients show match -e 'uid = 1000 comm = "chromium"'
~$ jay tree query match-windows -e 'app-id = "firefox" floating = true'
```

Anything longer is more readable in a file:

```toml
# urgent-scratch.toml
urgent = true
not.workspace = "scratch"
```

```shell
~$ jay tree query -r match-windows -f urgent-scratch.toml
~$ echo 'uid = 1000' | jay clients kill match -f -
```

All fields and combinators from the config file are available, including
`not`, `all`, `any`, and `exactly`. See
[Client Match Criteria](window-rules.md#client-match-criteria),
[Window Match Criteria](window-rules.md#window-match-criteria), and
[Combining Criteria](window-rules.md#combining-criteria) for the full lists.
The one exception is `name`, which cross-references a named rule in the config
file: it has no meaning on the command line and is ignored with a warning.

> [!WARNING]
> A match with no criteria matches *everything*. Be careful with
> `jay clients kill match` -- an expression that turns out to be empty
> disconnects every client. As a safeguard, `jay clients kill match` refuses to
> do anything if parsing produced any warnings, such as a misspelled field name.

> [!NOTE]
> `jay tree query match-windows` matches containers as well as application
> windows. Config rules default to client windows only, but here you have to say
> so explicitly:
>
> ```shell
> ~$ jay tree query match-windows -e 'types = "client-window" title-regex = "VIM"'
> ```

> [!TIP]
> JSON Schemas for both match formats are available at
> [client-match.generated.json](https://github.com/mahkoh/jay/blob/master/toml-spec/spec/client-match.generated.json)
> and
> [window-match.generated.json](https://github.com/mahkoh/jay/blob/master/toml-spec/spec/window-match.generated.json).
> Reference one with a `$schema` key to get autocompletion in your editor:
>
> ```toml
> "$schema" = "https://raw.githubusercontent.com/mahkoh/jay/master/toml-spec/spec/window-match.generated.json"
> app-id = "firefox"
> ```
>
> Jay ignores `$schema` keys.

---

## Xwayland

### `jay xwayland`

Show Xwayland status (scaling mode, implied scale):

```shell
~$ jay xwayland
~$ jay xwayland status
```

### `jay xwayland set-scaling-mode`

```shell
~$ jay xwayland set-scaling-mode default
~$ jay xwayland set-scaling-mode downscaled
```

In `downscaled` mode, X11 windows are rendered at the highest integer scale and
then downscaled, which can improve sharpness on HiDPI displays.

---

## Color Management

### `jay color-management`

Show color management status:

```shell
~$ jay color-management
~$ jay color-management status
```

### `jay color-management enable / disable`

```shell
~$ jay color-management enable
~$ jay color-management disable
```

---

## Other Commands

### `jay control-center`

Open the [Control Center](control-center.md) GUI:

```shell
~$ jay control-center
```

### `jay portal`

Run the Jay desktop portal (provides screen sharing and other XDG desktop
portal interfaces):

```shell
~$ jay portal
```

Normally the portal is started automatically. This command is for running it
manually or debugging.

### `jay seat-test`

Test input events from a seat. Prints all keyboard, pointer, touch, gesture,
tablet, and switch events to stdout:

```shell
~$ jay seat-test
~$ jay seat-test default
~$ jay seat-test -a              # test all seats simultaneously
```

### `jay debugfs`

Expose the internal state of the compositor as a read-only filesystem. The
state is a tree of directories and text files that can be read with ordinary
tools.

Mount the filesystem and print its path:

```shell
~$ jay debugfs mount
/run/user/1000/wayland-1-jay/debugfs
```

The filesystem stays mounted after the command exits, so it can be browsed like
any other directory:

```shell
~$ cat /run/user/1000/wayland-1-jay/debugfs/version
```

Running `jay debugfs mount` again prints the path of the existing mount. Unmount
the filesystem with:

```shell
~$ jay debugfs unmount
```

The whole filesystem can also be written to a gzipped tar archive without
mounting it, for example to attach the state to a bug report:

```shell
~$ jay debugfs snapshot                 # jay-debugfs-<timestamp>.tar.gz
~$ jay debugfs snapshot state.tar.gz
~$ jay debugfs snapshot - | tar tvz     # standard output
```

The filename must end in `.tar.gz`. With the global `--json` flag, the files in
the archive contain JSON instead of human-readable text:

```shell
~$ jay --json debugfs snapshot state.tar.gz
```

> [!NOTE]
> Mounting requires the `fusermount3` program from the FUSE 3 userspace tools.
> `jay debugfs snapshot` works without it.

> [!WARNING]
> The layout of the filesystem and the contents of its files are debugging aids.
> They can change in any release.

### `jay run-privileged`

Run a program with access to a privileged Wayland socket:

```shell
~$ jay run-privileged my-program --arg1
```

### `jay run-tagged`

Run a program with a tagged Wayland connection. All Wayland connections from the
spawned process tree will carry the specified tag, which can be matched in
[client rules](window-rules.md):

```shell
~$ jay run-tagged my-tag firefox
```

### `jay generate-completion`

Generate shell completion scripts:

```shell
~$ jay generate-completion bash
~$ jay generate-completion zsh
~$ jay generate-completion fish
~$ jay generate-completion elvish
~$ jay generate-completion powershell
```