summaryrefslogtreecommitdiff
path: root/src/options.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/options.c')
-rw-r--r--src/options.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/options.c b/src/options.c
index 37fad88..4c34b66 100644
--- a/src/options.c
+++ b/src/options.c
@@ -25,7 +25,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <strings.h>
-
#include "feh.h"
#include "filelist.h"
#include "options.h"
@@ -74,6 +73,9 @@ void init_parse_options(int argc, char **argv)
opt.xinerama = 1;
opt.xinerama_index = -1;
#endif /* HAVE_LIBXINERAMA */
+#ifdef HAVE_INOTIFY
+ opt.auto_reload = 1;
+#endif /* HAVE_INOTIFY */
feh_getopt_theme(argc, argv);
@@ -425,6 +427,9 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)
{"conversion-timeout" , 1, 0, 245},
{"version-sort" , 0, 0, 246},
{"offset" , 1, 0, 247},
+#ifdef HAVE_INOTIFY
+ {"auto-reload" , 0, 0, 248},
+#endif
{0, 0, 0, 0}
};
int optch = 0, cmdx = 0;
@@ -517,6 +522,9 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)
break;
case 'R':
opt.reload = atof(optarg);
+#ifdef HAVE_INOTIFY
+ opt.auto_reload = 0;
+#endif
break;
case 'S':
if (!strcasecmp(optarg, "name"))
@@ -810,6 +818,11 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)
opt.offset_flags = XParseGeometry(optarg, &opt.offset_x,
&opt.offset_y, (unsigned int *)&discard, (unsigned int *)&discard);
break;
+#ifdef HAVE_INOTIFY
+ case 248:
+ opt.auto_reload = 1;
+ break;
+#endif
default:
break;
}
@@ -897,6 +910,10 @@ static void show_version(void)
"exif "
#endif
+#ifdef HAVE_INOTIFY
+ "inotify "
+#endif
+
#ifdef INCLUDE_HELP
"help "
#endif