aboutsummaryrefslogtreecommitdiff
path: root/tools/shader_watcher.sh
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2020-07-06 07:17:09 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2020-07-06 07:17:09 +0200
commit29339928d7a05ca11786885643631206a978655e (patch)
treeb8c9f69f807a2002e2ac7649e48734b1c38bea8c /tools/shader_watcher.sh
parente29a9115d185d0b752868a36c8d56f6020bc4134 (diff)
Cleaning code
Diffstat (limited to 'tools/shader_watcher.sh')
-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'