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 seperated 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   OUTPUT CHOOSER
78       The chooser can be any program or script with the following behaviour:
79       •   It returns any error code except 127. The error code 127 is inter‐
80           nally used to signal that no command could be found and all output
81           from it will be ignored.
82       •   It returns the name of a valid output on stdout as given by way‐
83           land-info(1). Everything else will be handled as declined by the
84           user.
85       •   To signal that the user has declined screencast, the chooser should
86           exit without anything on stdout.
87
88
89       Supported types of choosers via the chooser_type option:
90       •   simple: the chooser is just called without anything further on
91           stdin.
92       •   dmenu: the chooser receives a newline separated list (dmenu style)
93           of outputs on stdin.
94
95

SEE ALSO

97       pipewire(1)
98
99
100
101                                  2021-11-05         xdg-desktop-portal-wlr(5)
Impressum