+
+# When debugging, sometimes I have to reset the preferences for all
+# the savers. Also I like FPS to be turned on, and them all to be
+# pointed at the same image directory.
+#
+show_prefs::
+ @cd build/Debug ; \
+ for f in *.saver ; do \
+ f=`echo "$$f" | sed 's/\..*//'` ; \
+ echo "########################## $$f" ; \
+ defaults -currentHost read org.jwz.xscreensaver."$$f" 2>&- ; \
+ done ; \
+ for f in Apple2 Phosphor updater ; do \
+ echo "########################## $$f" ; \
+ defaults read org.jwz.xscreensaver."$$f" 2>&- ; \
+ done
+
+reset_prefs::
+ @cd build/Debug ; \
+ W1='defaults' ; \
+ W2="$$W1 -currentHost write" ; \
+ img='~/Pictures/Screensaver' ; \
+ for f in *.saver ; do \
+ name=`echo "$$f" | sed 's/\..*//'` ; \
+ echo "########################## $$name" ; \
+ domain="org.jwz.xscreensaver" ; \
+ dd="$$domain.$$name" ; \
+ $$W1 -currentHost delete "$$dd" 2>&- ; \
+ $$W2 "$$dd" doFPS -bool true ; \
+ if [ -f $$f/Contents/Resources/xscreensaver-text ] ; then \
+ $$W2 "$$dd" textMode url ; \
+ fi ; \
+ if [ -f $$f/Contents/Resources/xscreensaver-getimage-file ] ; then \
+ $$W2 "$$dd" chooseRandomImages -bool true ; \
+ $$W2 "$$dd" grabDesktopImages -bool false ; \
+ $$W2 "$$dd" imageDirectory "$$img" ; \
+ fi ; \
+ if ( strings "$$f/Contents/MacOS/$$name" | \
+ grep NSOpenGLContext >/dev/null ) ; then \
+ $$W2 "$$dd" multiSample -bool true ; \
+ fi ; \
+ done ; \
+ \
+ $$W1 delete "$$domain.Apple2" 2>&- ; \
+ $$W1 delete "$$domain.Phosphor" 2>&- ; \
+ $$W1 delete "$$domain.updater" 2>&- ; \
+ $$W1 write "$$domain.updater" SUScheduledCheckIntervalKey 86400; \
+ \
+ $$W2 "$$domain.BoxFit" grab -bool true ; \
+ $$W2 "$$domain.FlipFlop" textured -bool true ; \
+ $$W2 "$$domain.GLSlideshow" titles -bool true ; \
+ $$W2 "$$domain.Photopile" titles -bool true ; \
+ $$W2 "$$domain.SkyTentacles" mode cel ; \
+ $$W2 "$$domain.Sonar" ping \
+ '/etc/hosts,$$HOME/.ssh/known_hosts,$$HOME/.ssh/known_hosts2' ; \
+ $$W2 "$$domain.XMatrix" matrixFont small ; \
+ $$W2 "$$domain.XMatrix" textMode literal ; \
+ $$W2 "$$domain.XMatrix" textLiteral "MONKEY BUTTER" ; \
+
+# defaults -currentHost write org.jwz.xscreensaver.FontGlide debugMetrics -bool true
+# defaults -currentHost write org.jwz.xscreensaver.StarWars debug -bool true
+# defaults -currentHost write org.jwz.xscreensaver.StarWars textMode file
+# defaults -currentHost write org.jwz.xscreensaver.StarWars textFile ~/src/xscreensaver/hacks/glx/zalgo.txt