overlay: Allow simple positioning and resizing
Using window.size=<width>x<height> or window.size=<scale>% in
the config file, or --size=<scale>% or --size=<width>x<height>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
diff --git a/overlay/overlay.c b/overlay/overlay.c
index 03e6ada..acbd853 100644
--- a/overlay/overlay.c
+++ b/overlay/overlay.c
@@ -740,6 +740,7 @@
{"config", 1, 0, 'c'},
{"geometry", 1, 0, 'G'},
{"position", 1, 0, 'P'},
+ {"size", 1, 0, 'S'},
{NULL, 0, 0, 0,}
};
struct overlay_context ctx;
@@ -751,7 +752,7 @@
config_init(&config);
opterr = 0;
- while ((i = getopt_long(argc, argv, "c:f", long_options, &index)) != -1) {
+ while ((i = getopt_long(argc, argv, "c:f:", long_options, &index)) != -1) {
switch (i) {
case 'c':
config_parse_string(&config, optarg);
@@ -762,6 +763,9 @@
case 'P':
config_set_value(&config, "window", "position", optarg);
break;
+ case 'S':
+ config_set_value(&config, "window", "size", optarg);
+ break;
case 'f':
daemonize = 0;
break;