aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/shader_watcher.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/shader_watcher.sh b/tools/shader_watcher.sh
index d32285d..ca507ae 100755
--- a/tools/shader_watcher.sh
+++ b/tools/shader_watcher.sh
@@ -12,7 +12,8 @@
# \_/\_/_/ \_\_| \____|_| |_|_____|_| \_\
#
# This program require xdotool to communicate
-# with the window.
+# with the window. It require entr (http://eradman.com/entrproject/)
+# if you use the refresh on edit feature.
wai=$(dirname $(readlink -f "$0")) # Current script directory
@@ -33,6 +34,7 @@ usage() {
if [ $# -eq 2 ] && [ $1 == "--every" ]
then
+ ##### Periodically refresh shader
shift
time=$1
while [ true ]
@@ -41,7 +43,7 @@ then
refresh
done
else
-
+ ##### Refresh on edit
while [ true ]
do
ls $wai/../resources/shaders/*.glsl | entr -pd -s 'kill $PPID'