Cleaning code

This commit is contained in:
Loic Guegan 2020-07-06 07:17:09 +02:00
parent e29a9115d1
commit 29339928d7
7 changed files with 58 additions and 29 deletions

View file

@ -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'