summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2012-12-26 14:40:51 +0100
committerDaniel Friesel <derf@finalrewind.org>2012-12-26 14:40:51 +0100
commit8ed98997287b6a197ad7b97a013cb2b49ef9682b (patch)
tree69da0ced39b5d6f7499865edc7d1dc66a957f248 /etc
parent366b0f5a225088472b36302285e86c3e9871a8bd (diff)
zshrc: only set up suffix aliases if X11 is running
Diffstat (limited to 'etc')
-rw-r--r--etc/.zshrc41
1 files changed, 21 insertions, 20 deletions
diff --git a/etc/.zshrc b/etc/.zshrc
index 49804d4..daafafa 100644
--- a/etc/.zshrc
+++ b/etc/.zshrc
@@ -243,26 +243,6 @@ bindkey -e
# }}}
# {{{ Aliases
-# {{{ Suffix
-
-typeset -A alias_apps
-alias_apps=(
- archive extract
- audio mplayer
- document okular
- image feh
- video mplayer
-)
-
-for meta in ${parameters[(I)mime_*]#mime_}; {
- for format in $(eval echo '$'mime_${meta}); {
- alias -s ${format}=${alias_apps[$meta]}
- }
-}
-
-unset filetypes meta format alias_apps
-
-# }}}
# {{{ Defaults
# To evade these defaults, use '=command' instead of 'command'
@@ -511,6 +491,27 @@ done
fi #}}}
if [[ -e /tmp/.x-started ]] { #{{{
+ # {{{ Suffix
+
+ typeset -A alias_apps
+ alias_apps=(
+ archive extract
+ audio mplayer
+ document okular
+ image feh
+ video mplayer
+ )
+
+ for meta in ${parameters[(I)mime_*]#mime_}; {
+ for format in $(eval echo '$'mime_${meta}); {
+ alias -s ${format}=${alias_apps[$meta]}
+ }
+ }
+
+ unset filetypes meta format alias_apps
+
+ # }}}
+
alias 4d=4chan-dl
alias 4v=4chan-view