zshrc: Remove fluxkey-change
[grml-etc-core.git] / etc / zsh / zshrc
index 199b897..aeaeb7b 100644 (file)
@@ -3659,72 +3659,6 @@ whatwhen()  {
     esac
 }
 
-# change fluxbox keys from 'Alt-#' to 'Alt-F#' and vice versa
-fluxkey-change() {
-    emulate -L zsh
-    [[ -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
-}
-
-# retrieve weather information on the console
-# Usage example: 'weather LOWG'
-weather() {
-    emulate -L zsh
-    [[ -n "$1" ]] || {
-        print 'Usage: weather <station_id>' >&2
-        print 'List of stations: http://en.wikipedia.org/wiki/List_of_airports_by_ICAO_code'>&2
-        return 1
-    }
-
-    local VERBOSE="yes"    # TODO: Make this a command line switch
-
-    local ODIR=`pwd`
-    local PLACE="${1:u}"
-    local DIR="${HOME}/.weather"
-    local LOG="${DIR}/log"
-
-    [[ -d ${DIR} ]] || {
-        print -n "Creating ${DIR}: "
-        mkdir ${DIR}
-        print 'done'
-    }
-
-    print "Retrieving information for ${PLACE}:"
-    print
-    cd ${DIR} && wget -T 10 --no-verbose --output-file=$LOG --timestamping http://weather.noaa.gov/pub/data/observations/metar/decoded/$PLACE.TXT
-
-    if [[ $? -eq 0 ]] ; then
-        if [[ -n "$VERBOSE" ]] ; then
-            cat ${PLACE}.TXT
-        else
-            DATE=$(grep 'UTC' ${PLACE}.TXT | sed 's#.* /##')
-            TEMPERATURE=$(awk '/Temperature/ { print $4" degree Celcius / " $2" degree Fahrenheit" }' ${PLACE}.TXT | tr -d '(')
-            echo "date: $DATE"
-            echo "temp:  $TEMPERATURE"
-        fi
-    else
-        print "There was an error retrieving the weather information for $PLACE" >&2
-        cat $LOG
-        cd $ODIR
-        return 1
-    fi
-    cd $ODIR
-}
-
 # mercurial related stuff
 if check_com -c hg ; then
     # gnu like diff for mercurial