X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fskel%2F.zshrc;h=aa1b3e3a83f4ad003c805e46103d7578632971b5;hb=222006c939694a8d6f20543cfb1d24a37e74e5de;hp=c0cd5d9cfeb0552aabcd9fcb35f872edd91b7f88;hpb=3c1a5fc9746a1562f1f7c204b9dadc6336efd4a7;p=grml-etc-core.git diff --git a/etc/skel/.zshrc b/etc/skel/.zshrc index c0cd5d9..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 } @@ -166,7 +171,7 @@ [ -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 @@ -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 {{{