-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathconfig.ml
42 lines (35 loc) · 935 Bytes
/
config.ml
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
type t = {
tag : string;
xwayland_binary : string;
xrdb : string list; (* Config lines for xrdb *)
xunscale : int;
}
open Cmdliner
let tag =
Arg.value @@
Arg.(opt string) "" @@
Arg.info
~doc:"Tag to prefix to window titles"
["tag"]
let xwayland_binary =
Arg.value @@
Arg.(opt string) "Xwayland" @@
Arg.info
~doc:"Xwayland binary to execute if an X11 application tries to connect"
["xwayland-binary"]
let xrdb =
Arg.value @@
Arg.(opt_all string) [] @@
Arg.info
~doc:"Initial xrdb config (e.g. 'Xft.dpi:150')"
["xrdb"]
let xunscale =
Arg.value @@
Arg.(opt int) 1 @@
Arg.info
~doc:"Compensate for Wayland's attempts to scale X11 apps (e.g. 2 for a HiDPI display)"
["x-unscale"]
let make_config tag xwayland_binary xrdb xunscale =
{ tag; xwayland_binary; xrdb; xunscale }
let cmdliner =
Term.(const make_config $ tag $ xwayland_binary $ xrdb $ xunscale)