X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fskel%2F.zshrc;h=aa1b3e3a83f4ad003c805e46103d7578632971b5;hb=c33a7d6bb7a2314e9d75cdd6d4d90e65314fa259;hp=ebe54feae2ac618f753bf04f8d3b3972a1b90ae6;hpb=f6169af32ab0704dc19c90f82b9755e5375bc417;p=grml-etc-core.git diff --git a/etc/skel/.zshrc b/etc/skel/.zshrc index ebe54fe..aa1b3e3 100644 --- a/etc/skel/.zshrc +++ b/etc/skel/.zshrc @@ -3,7 +3,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Sam Mai 12 23:22:28 CEST 2007 [mika] +# Latest change: Don Mai 17 15:08:21 CEST 2007 [mika] ################################################################################ # source ~/.zshrc.global {{{ @@ -15,6 +15,11 @@ fi # }}} +# autoloading stuff {{{ + # associate types and extensions: + autoload zsh-mime-setup && zsh-mime-setup +# }}} + # completion system {{{ # just make sure it is loaded in this file too type compinit &>/dev/null || { autoload -U compinit && compinit } @@ -934,6 +939,26 @@ | sed 's/value=//;s/"//g' } +# change fluxbox keys from 'Alt-#' to 'Alt-F#' and vice versa + fluxkey-change() { + [ -n "$FLUXKEYS" ] || local FLUXKEYS="$HOME/.fluxbox/keys" + if ! [ -r "$FLUXKEYS" ] ; then + echo "Sorry, \$FLUXKEYS file $FLUXKEYS could not be read - nothing to be done." + return 1 + else + if grep -q 'Mod1 F[0-9] :Workspace [0-9]' $FLUXKEYS ; then + echo -n 'Switching to Alt-# mode in ~/.fluxbox/keys: ' + sed -i -e 's|^\(Mod[0-9]\+[: space :]\+\)F\([0-9]\+[: space :]\+:Workspace.*\)|\1\2|' $FLUXKEYS && echo done || echo failed + elif grep -q 'Mod1 [0-9] :Workspace [0-9]' $FLUXKEYS ; then + echo -n 'Switching to Alt-F# mode in ~/.fluxbox/keys: ' + sed -i -e 's|^\(Mod[0-9]\+[: space :]\+\)\([0-9]\+[: space :]\+:Workspace.*\)|\1F\2|' $FLUXKEYS && echo done || echo failed + else + echo 'Sorry, do not know what to do.' + return 1 + fi + fi + } + # }}} # mercurial related stuff {{{