User Tools

Site Tools


usages:watch-files
Usage: watch-files [OPTION...] [--]
Watch for changes in directories or files and run a script. Configured by
/home/bhepple/.config/watched-files which has the format:

#######################################################################################
# This file is sourced by watched-dirs and also by update-dvd-menu (and
# ...?) and defines what directories and files should be watched and
# what scripts should be run when they change.

add-watch "fluxbox-generate_menu" "/usr/share/applications
/home/bhepple/.fluxbox/menuconfig"

# fluxbox-remote always returns an error status, which is annoying.
# Also, This seems not to work:
#add-watch "pkill -USR1 fluxbox" "/home/bhepple/.fluxbox/keys
/home/bhepple/.fluxbox/apps"
add-watch "fluxbox-remote Reconfig || :" "/home/bhepple/.fluxbox/keys
/home/bhepple/.fluxbox/apps"

add-watch "update-march-menu" "/usr/share/applications"

add-watch "update-dvd-menu" "/home/bhepple/bin/update-dvd-menu
/home/bhepple/tmp /media"

add-watch "update-user-menu" "/home/bhepple/bin/update-user-menu
/home/bhepple/.fluxbox/menuconfig /home/bhepple/.fluxbox/backgrounds
/usr/share/backgrounds"

# re-schedule 'watch-files' if the configuration changes or if the
# script itself changes: run with setsid so it doesn't kill itself
# when it kills the existing watch-files! Note that watch-files adds this
# line implicitly - no need to put in /home/bhepple/.config/watched-files:
# add-watch "setsid watch-files -r" "/home/bhepple/.config/watched-files
/home/bhepple/bin/watch-files"
#######################################################################################
Options:

  -a, --exec-all             execute all the scripts once right now! Does not
                             kill a running watch-files.
  -c, --config=config        use an alternative config file (default
                             /home/bhepple/.config/watched-files)
  -d, --daemonise            daemonise. Default is 'yes'.
  -k, --kill                 Kill an existing watch-files.
  -l, --log                  log actions to syslog (using logger(1))
      --no-notify            don't use notify-send to alert user.
  -n, --no-daemonise         don't daemonise.
  -r, --restart              restart a running or recently deceased watch-files
                             ie use the options in
                             /tmp/watch-files.bhepple.pid.
  -s, --status               print the status of an existing watch-files.
  -t, --timeout=secs         watch-files only starts a script when the changes
                             have settled down (ie stopped) for this time. This
                             prevents thrashing when big files are downloading.
                             Default is '5'.
  -v, --verbose              be verbose
  -h, --help                 print this help message
  -V, --version              print version and exit

Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.
usages/watch-files.txt · Last modified: 2019/07/09 03:57 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki