summaryrefslogtreecommitdiff
path: root/overlay/overlay.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-08-25 23:37:58 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-08-25 23:44:35 +0100
commit1e65d5ac2f1c3b80444fd3c12e7bfcaf033a117f (patch)
tree6589bc7c15e0fabbcc3c1ef8ce153ddf0ea494be /overlay/overlay.c
parentc9f0173764c5266ebd29a3d57ea8a379440346b4 (diff)
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>
Diffstat (limited to 'overlay/overlay.c')
-rw-r--r--overlay/overlay.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/overlay/overlay.c b/overlay/overlay.c
index 03e6ada8..acbd853b 100644
--- a/overlay/overlay.c
+++ b/overlay/overlay.c
@@ -740,6 +740,7 @@ int main(int argc, char **argv)
{"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 @@ int main(int argc, char **argv)
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 @@ int main(int argc, char **argv)
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;