summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2010-07-09 12:04:39 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2010-07-09 12:04:39 +0200
commitdf9d13bdabcd4f8ef96340413d457d4c381f169d (patch)
treeb9f028f489672f2a7987de2ae504e4034cab7afb
parente13301d07dc117273b10e8f372e3e65ef7349120 (diff)
Add new short options -P, -K, -G, -J
-rw-r--r--ChangeLog4
-rw-r--r--man/feh.18
-rw-r--r--src/help.raw8
-rw-r--r--src/options.c19
4 files changed, 22 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index c9aeb07..37aecbb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,10 @@ git HEAD
* Add --fullscreen option, --full-screen is now deprecated
* Removed --menu-border option, it is largely useless
+ * Add short options: -P for --cache-thumbnails,
+ -K for --caption-papth,
+ -G for --draw-actions
+ and -J for --thumb-redraw
Fri, 25 Jun 2010 16:07:20 +0200 Daniel Friesel <derf@chaosdorf.de>
diff --git a/man/feh.1 b/man/feh.1
index 7d58ce8..47fc76d 100644
--- a/man/feh.1
+++ b/man/feh.1
@@ -124,11 +124,11 @@ Create borderless windows.
.It Cm -Q , --builtin
Use builtin HTTP client to grab remote files instead of
.Xr wget 1 .
-.It Cm --cache-thumbnails
+.It Cm -P , --cache-thumbnails
Enable (experimental) thumbnail caching in
.Pa ~/.thumbnails .
Only works with thumbnails <= 256x256 pixels.
-.It Cm --caption-path Ar path
+.It Cm -K , --caption-path Ar path
Path to directory containing image captions. This turns on caption viewing,
and if captions are found in
.Ar path ,
@@ -154,7 +154,7 @@ for list output. See
.Sx FORMAT SPECIFIERS .
.It Cm --cycle-once
Exit feh after one loop through the slideshow.
-.It Cm --draw-actions
+.It Cm -G , --draw-actions
Draw the defined actions and what they do at the top-left of the image.
.It Cm -d , --draw-filename
Draw the filename at the top-left of the image.
@@ -441,7 +441,7 @@ is specified.
Set thumbnail height.
.It Cm -y , --thumb-width Ar pixels
Set thumbnail width.
-.It Cm --thumb-redraw Ar n
+.It Cm -J , --thumb-redraw Ar n
Only relevant for
.Cm --thumbnails :
Redraw thumbnail window every
diff --git a/src/help.raw b/src/help.raw
index 451d74f..2c9bf67 100644
--- a/src/help.raw
+++ b/src/help.raw
@@ -38,7 +38,7 @@ OPTIONS
-R, --reload NUM Reload images after NUM seconds
-Q, --builtin Use builtin http client instead of wget
-k, --keep-http Keep local copies when viewing HTTP/FTP files
- --caption-path PATH Path to caption directory, enables caption display
+ -K, --caption-path PATH Path to caption directory, enables caption display
-j, --output-dir With -k: Output directory for saved files
-l, --list list mode: ls-style output with image information
-L, --customlist FORMAT list mode with custom output, see FORMAT SPECIFIERS
@@ -50,14 +50,14 @@ OPTIONS
-A, --action ACTION Specify action to perform when pressing <return>.
Executed by /bin/sh, may contain FORMAT SPECIFIERS
--action[1-9] Extra actions triggered by pressing keys <1>to <9>.
- --draw-actions Show the defined actions in the image window
+ -G, --draw-actions Show the defined actions in the image window
-m, --montage Enable montage mode
-c, --collage Montage mode with randomly distributed thumbnails
-i, --index Create an index print of all images
-t, --thumbnails Show images as clickable thumbnails
- --cache-thumbnails Enable thumbnail caching for thumbnail mode.
+ -P, --cache-thumbnails Enable thumbnail caching for thumbnail mode.
Only works with thumbnails <= 256x256 pixels
- --thumb-redraw N Redraw thumbnail window every N images
+ -J, --thumb-redraw N Redraw thumbnail window every N images
-~, --thumb-title STRING Title for windows opened from thumbnail mode
-I, --fullindex Index mode with additional image information
--index-name BOOL Show/Don't show filename in index/thumbnail mode
diff --git a/src/options.c b/src/options.c
index 0c14a36..0ad6a1f 100644
--- a/src/options.c
+++ b/src/options.c
@@ -316,7 +316,8 @@ char *feh_string_normalize(char *str)
static void feh_parse_option_array(int argc, char **argv)
{
static char stropts[] =
- "a:A:b:B:cC:dD:e:E:f:Fg:hH:iIj:klL:mM:nNo:O:pqQrR:sS:tT:uUvVwW:xXy:zZ0:1:2:4:5:8:9:.@:^:~:):|:_:+:";
+ "a:A:b:B:cC:dD:e:E:f:Fg:GhH:iIj:J:kK:lL:mM:nNo:O:pPqQrR:sS:tT:uUvVwW:xXy:zZ"
+ "0:1:2:4:5:8:9:.@:^:~:):|:_:+:";
static struct option lopts[] = {
{"help" , 0, 0, 'h'},
{"version" , 0, 0, 'v'},
@@ -348,8 +349,8 @@ static void feh_parse_option_array(int argc, char **argv)
{"scale-down" , 0, 0, '.'},
{"no-jump-on-resort", 0, 0, 220},
{"hide-pointer" , 0, 0, 221},
- {"draw-actions" , 0, 0, 222},
- {"cache-thumbnails", 0, 0, 223},
+ {"draw-actions" , 0, 0, 'G'},
+ {"cache-thumbnails", 0, 0, 'P'},
{"cycle-once" , 0, 0, 224},
{"no-xinerama" , 0, 0, 225},
{"no-rotate-ctrl-mask", 0, 0, 226},
@@ -399,7 +400,7 @@ static void feh_parse_option_array(int argc, char **argv)
{"menu-style" , 1, 0, 204},
{"zoom" , 1, 0, 205},
{"no-screen-clip", 0, 0, 206},
- {"caption-path" , 1, 0, 208},
+ {"caption-path" , 1, 0, 'K'},
{"action1" , 1, 0, 209},
{"action2" , 1, 0, 210},
{"action3" , 1, 0, 211},
@@ -413,7 +414,7 @@ static void feh_parse_option_array(int argc, char **argv)
{"index-name" , 1, 0, 230},
{"index-size" , 1, 0, 231},
{"index-dim" , 1, 0, 232},
- {"thumb-redraw" , 1, 0, 233},
+ {"thumb-redraw" , 1, 0, 'J'},
{0, 0, 0, 0}
};
@@ -691,7 +692,7 @@ static void feh_parse_option_array(int argc, char **argv)
case 206:
opt.screen_clip = 0;
break;
- case 208:
+ case 'K':
opt.caption_path = estrdup(optarg);
break;
case 209:
@@ -727,10 +728,10 @@ static void feh_parse_option_array(int argc, char **argv)
case 221:
opt.hide_pointer = 1;
break;
- case 222:
+ case 'G':
opt.draw_actions = 1;
break;
- case 223:
+ case 'P':
opt.cache_thumbnails = 1;
break;
case 224:
@@ -757,7 +758,7 @@ static void feh_parse_option_array(int argc, char **argv)
case 232:
opt.index_show_dim = atoi(optarg);
break;
- case 233:
+ case 'J':
opt.thumb_redraw = atoi(optarg);
break;
default: