1xdg-desktop-portal-wlr(5)     File Formats Manual    xdg-desktop-portal-wlr(5)
2
3
4

NAME

6       xdg-desktop-portal-wlr - an xdg-desktop-portal backend for wlroots
7

DESCRIPTION

9       xdg-desktop-portal-wlr (or xdpw for short) allows applications to re‐
10       quest screenshots and screencasts via xdg-desktop-portal in wlroots-
11       based Wayland compositors.
12
13       xdpw will try to load the configuration file from these locations:
14
15       •   $XDG_CONFIG_HOME/xdg-desktop-portal-wlr/$XDG_CURRENT_DESKTOP
16       •   $XDG_CONFIG_HOME/xdg-desktop-portal-wlr/config
17       •   /etc/xdg/xdg-desktop-portal-wlr/$XDG_CURRENT_DESKTOP
18       •   /etc/xdg/xdg-desktop-portal-wlr/config
19
20
21       $XDG_CONFIG_HOME defaults to ~/.config. $XDG_CURRENT_DESKTOP can be a
22       colon separated list. Each element of that list will be tried.
23
24       The configuration files use the INI file format. Example:
25
26           [screencast]
27           output_name=HDMI-A-1
28           max_fps=30
29           exec_before=disable_notifications.sh
30           exec_after=enable_notifications.sh
31           chooser_type=simple
32           chooser_cmd=slurp -f %o -or
33

SCREENCAST OPTIONS

35       These options need to be placed under the [screencast] section.
36
37       output_name = name
38           Select which output will be screencast.
39
40           This option is used with chooser_type = none. The list of available
41           outputs can be obtained via wayland-info(1) (under the zxdg_out‐
42           put_manager_v1 section).
43
44       max_fps = limit
45           Limit the number of frames per second to the provided rate.
46
47           This is useful to reduce CPU usage when capturing frames at the
48           output's refresh rate is unnecessary.
49
50       exec_before = command
51           Execute command before starting a screencast. The command will be
52           executed within sh.
53
54       exec_after = command
55           Execute command after ending all screencasts. The command will be
56           executed within sh.
57
58       chooser_cmd = command
59           Run this command to select an output.
60
61           For more details see OUTPUT CHOOSER.
62
63       chooser_type = type
64           Specifies the input send to the chooser.
65
66           The supported types are:
67           •   default: xdpw will try to use the first chooser found in the
68               list of hardcoded choosers (slurp, wofi, bemenu) and will fall‐
69               back to an arbitrary output if none of those were found.
70           •   none: xdpw will allow screencast either on the output given by
71               output_name, or if empty an arbitrary output without further
72               interaction.
73           •   simple, dmenu: xdpw will launch the chooser given by
74               chooser_cmd. For more details see OUTPUT CHOOSER.
75
76
77       force_mod_linear = bool
78           Force buffers with implicit modifiers to be linear (experimental)
79
80           Setting this option to 1 will force xdpw to allocate dma-bufs with
81           implicit modifier as linear. This option shouldn't be required on
82           single gpu setups, but can increase compatibility especially on
83           setups with multiple gpus.
84
85           This option is experimental and can be removed or replaced in fu‐
86           ture versions.
87
88   OUTPUT CHOOSER
89       The chooser can be any program or script with the following behaviour:
90       •   It returns any error code except 127. The error code 127 is inter‐
91           nally used to signal that no command could be found and all output
92           from it will be ignored.
93       •   It returns the name of a valid output on stdout as given by way‐
94           land-info(1). Everything else will be handled as declined by the
95           user.
96       •   To signal that the user has declined screencast, the chooser should
97           exit without anything on stdout.
98
99
100       Supported types of choosers via the chooser_type option:
101       •   simple: the chooser is just called without anything further on
102           stdin.
103       •   dmenu: the chooser receives a newline separated list (dmenu style)
104           of outputs on stdin.
105
106

SEE ALSO

108       pipewire(1)
109
110
111
112                                  2022-12-13         xdg-desktop-portal-wlr(5)
Impressum