]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - zsh/rc
*/rc: Move umask code from zsh/rc to shell/rc.
[config/dotfiles.git] / zsh / rc
diff --git a/zsh/rc b/zsh/rc
index 4cd696785c37fc1f05edce10e59303bef7a61be2..2d7331ceaf89c95fcd311f327029f229fc632255 100644 (file)
--- a/zsh/rc
+++ b/zsh/rc
@@ -50,10 +50,9 @@ zshrc_resolve_fg_to_resumed_job_name() {
 
 # MISCELLANEOUS SETTINGS
 
-# Be paranoid, new files are readable/writable by me only, but not as root.
-if [[ $UID -ne 0 ]]; then
-    umask 077
-fi
+# Load general shell setup commands. NOTE: Expand this when publishing the
+# config.
+source_config ~/.shell/rc
 
 # Disable beeps.
 setopt nobeep
@@ -563,7 +562,7 @@ if [[ $TERM == screen* || $TERM == xterm* || $TERM == rxvt* ]]; then
             name=.zsh
         fi
 
-        # Prepend prefixes like in window_preexec().
+        # Prepend prefixes like in zshrc_window_preexec().
         if [[ $UID -eq 0 ]]; then
             name="!$name"
         fi
@@ -846,9 +845,13 @@ fi
 
 # LOAD ADDITIONAL CONFIGURATION FILES
 
-# Configuration option for rc.local to use GNU screen/tmux. By default GNU
-# screen is used. Possible values: screen, tmux and empty (no value).
+# Configuration options for rc.local.
+
+# Multiplexer to use. By default GNU screen is used. Possible values: screen,
+# tmux and empty (no multiplexer).
 zshrc_use_multiplexer=screen
+# Additional arguments for fortune.
+zshrc_fortune_arguments=()
 
 source_config ~/.zsh/rc.local
 
@@ -900,7 +903,7 @@ if [[ $TERM != dumb && $TERM != linux && -z $STY && -z $TMUX ]]; then
     fi
 fi
 
-# Colorize stderr in red. Very useful when looking for errors. Thanks to
+# Colorize stderr in bold red. Very useful when looking for errors. Thanks to
 # http://gentoo-wiki.com/wiki/Zsh for the basic script and Mikachu in #zsh on
 # Freenode (2010-03-07 04:03 CET) for some improvements (-r, printf). It's not
 # yet perfect and doesn't work with su and git for example, but it can handle
@@ -929,7 +932,7 @@ fi
 PERIOD=14400
 periodic() {
     # Display fortunes.
-    (( $+commands[fortune] )) && fortune -ac
+    (( $+commands[fortune] )) && fortune -ac "${zshrc_fortune_arguments[@]}"
     # Display reminders.
     (( $+commands[rem] )) && [[ -f ~/.reminders ]] && rem -h
 }