/etc/zsh/zshrc: update swspeak alias
authorMichael Prokop <mika@grml.org>
Fri, 16 Mar 2007 21:19:02 +0000 (22:19 +0100)
committerMichael Prokop <mika@grml.org>
Fri, 16 Mar 2007 21:19:02 +0000 (22:19 +0100)
debian/changelog
etc/zsh/zshrc

index 3b2e143..2e90ad9 100644 (file)
@@ -1,3 +1,13 @@
+grml-etc-core (0.2.31) unstable; urgency=low
+
+  * /etc/zsh/zshrc: update swspeak alias:
+    - set mixer settings to 90 by default when running swspeak
+    - check for present /dev/softsynth and warn otherwise using flite
+    - welcome user via flite with "Finished setting up software synthesizer"
+      when finished execution of swspeak alias
+
+ -- Michael Prokop <mika@grml.org>  Fri, 16 Mar 2007 22:17:27 +0100
+
 grml-etc-core (0.2.30) unstable; urgency=low
 
   * /etc/zsh/zshrc: added rationalise-dot (just type 'cd ...' to
index ba1e3b4..4515b9d 100644 (file)
@@ -577,7 +577,20 @@ ${BLUE}%n${NO_COLOUR}@%m %40<...<%B%~%b%<< %# "
   alias rd='rmdir'
   alias md='mkdir'
 
-  alias swspeak="setopt singlelinezle ; unsetopt prompt_cr ; export PS1='%m%# ' ; speechd-up" # set up software synth.
+# set up software synthesizer via speakup
+  alias swspeak='
+    aumix -w 90 -v 90 -p 90 -m 90
+    if ! [ -r /dev/softsynth ] ; then
+       flite -o play -t "Sorry, software synthesizer not available. Did you boot with swspeak bootoption?"
+       return 1
+    else
+       setopt singlelinezle
+       unsetopt prompt_cr
+       export PS1="%m%# "
+       nice -n -20 speechd-up
+       flite -o play -t "Finished setting up software synthesizer"
+    fi
+  '
 
   # I like clean prompt, so provide simple way to get that
   alias 0 &>/dev/null || functions 0 &>/dev/null || alias 0='return 0'