summaryrefslogtreecommitdiffstats
path: root/options.c
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2016-10-30 19:10:25 +0100
committerBert Münnich <ber.t@posteo.de>2016-10-30 19:16:51 +0100
commitc772d3c3f3e9cc986e8e0c0242b4d7a8e8dab4c3 (patch)
treebedabe2b7564236ca2fc3ca607eec3e9b7638dcc /options.c
parent0b758e08f2bca283eb930ede8165bfa26e6cacea (diff)
downloadnsxiv-c772d3c3f3e9cc986e8e0c0242b4d7a8e8dab4c3.tar.zst
Use -e for X window embedding
Diffstat (limited to 'options.c')
-rw-r--r--options.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/options.c b/options.c
index d292768..4a9772c 100644
--- a/options.c
+++ b/options.c
@@ -32,8 +32,8 @@ const options_t *options = (const options_t*) &_options;
void print_usage(void)
{
- printf("usage: sxiv [-abcfhioqrtvZ] [-G GAMMA] [-g GEOMETRY] [-n NUM] "
- "[-N NAME] [-S DELAY] [-s MODE] [-z ZOOM] [-w WID] FILES...\n");
+ printf("usage: sxiv [-abcfhioqrtvZ] [-e WID] [-G GAMMA] [-g GEOMETRY] "
+ "[-N NAME] [-n NUM] [-S DELAY] [-s MODE] [-z ZOOM] FILES...\n");
}
void print_version(void)
@@ -71,7 +71,7 @@ void parse_options(int argc, char **argv)
_options.thumb_mode = false;
_options.clean_cache = false;
- while ((opt = getopt(argc, argv, "abcfG:g:hin:N:oqrS:s:tvw:Zz:")) != -1) {
+ while ((opt = getopt(argc, argv, "abce:fG:g:hin:N:oqrS:s:tvZz:")) != -1) {
switch (opt) {
case '?':
print_usage();
@@ -85,6 +85,12 @@ void parse_options(int argc, char **argv)
case 'c':
_options.clean_cache = true;
break;
+ case 'e':
+ n = strtol(optarg, &end, 0);
+ if (*end != '\0')
+ error(EXIT_FAILURE, 0, "Invalid argument for option -e: %s", optarg);
+ _options.embed = n;
+ break;
case 'f':
_options.fullscreen = true;
break;
@@ -139,12 +145,6 @@ void parse_options(int argc, char **argv)
case 'v':
print_version();
exit(EXIT_SUCCESS);
- case 'w':
- n = strtol(optarg, &end, 0);
- if (*end != '\0')
- error(EXIT_FAILURE, 0, "Invalid argument for option -w: %s", optarg);
- _options.embed = n;
- break;
case 'Z':
_options.scalemode = SCALE_ZOOM;
_options.zoom = 1.0;