X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fskel%2F.zshrc;h=aa1b3e3a83f4ad003c805e46103d7578632971b5;hb=222006c939694a8d6f20543cfb1d24a37e74e5de;hp=4a6b6e243f2d8eae2cd9890708f4600d63c9f7f1;hpb=575c92ff4335c1fb35a8dc4995ff12e298058eee;p=grml-etc-core.git diff --git a/etc/skel/.zshrc b/etc/skel/.zshrc index 4a6b6e2..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: Fre Mai 11 00:35:57 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 } @@ -160,12 +165,13 @@ # ignore ~/.ssh/known_hosts entries # alias insecssh='ssh -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null" -o "PreferredAuthentications=keyboard-interactive"' alias insecssh='ssh -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null"' + alias insecscp='scp -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null"' # use colors when browsing man pages (if not using pinfo or PAGER=most) [ -d ~/.terminfo/ ] && alias man='TERMINFO=~/.terminfo/ LESS=C TERM=mostlike PAGER=less man' # check whether Debian's package management (dpkg) is running - alias check_dpkg_running="$SUDO dpkg_running" + salias check_dpkg_running="dpkg_running" # work around non utf8 capable software in utf environment if [ -x /usr/bin/mrxvt ] ; then @@ -933,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 {{{