summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-07-08 18:47:25 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-07-08 18:47:25 +0200
commitda82a60fdbee638601875fbbc4ba8260ed1bf267 (patch)
treec11368a72bd9a888efe51e83ff32ed659ac9b96e /etc
parent99a52ce7a6b7270455c0878e9f368373248a277c (diff)
Cleanup
Diffstat (limited to 'etc')
-rw-r--r--etc/cleanup2
-rw-r--r--etc/completion1
-rw-r--r--etc/functions/check_ac8
-rw-r--r--etc/functions/check_ping21
-rw-r--r--etc/functions/check_ssh8
-rw-r--r--etc/functions/confirm_no3
-rw-r--r--etc/functions/confirm_yes9
-rw-r--r--etc/functions/postpone2
-rw-r--r--etc/functions/progress27
-rw-r--r--etc/functions/recall3
-rw-r--r--etc/functions/xcat5
-rw-r--r--etc/functions/xexport4
12 files changed, 1 insertions, 92 deletions
diff --git a/etc/cleanup b/etc/cleanup
index a942392..defd566 100644
--- a/etc/cleanup
+++ b/etc/cleanup
@@ -4,6 +4,6 @@ echo -n "\r\e[2K"
unalias 'linux:'
unalias 'openbsd:'
unfunction zrc_status zrc_info
-unfunction xexport xsource
+unfunction xsource
unset system distro
unset -m 'mime_*'
diff --git a/etc/completion b/etc/completion
index 15b6508..13b8217 100644
--- a/etc/completion
+++ b/etc/completion
@@ -1,7 +1,6 @@
## vim:ft=zsh
zrc_status completion
-zstyle :compinstall filename ~/.zshrc
zstyle ':completion:*' cache-path $ZCACHEDIR
zstyle ':completion:*' use-cache true
diff --git a/etc/functions/check_ac b/etc/functions/check_ac
deleted file mode 100644
index d97d7da..0000000
--- a/etc/functions/check_ac
+++ /dev/null
@@ -1,8 +0,0 @@
-## vim:ft=zsh
-## check_ac - returns true if machine is running on AC
-typeset file=/sys/class/power_supply/AC/online
-if [[ -f $file ]] {
- [[ $(cat $file) == 1 ]]
- return $?
-}
-return 0
diff --git a/etc/functions/check_ping b/etc/functions/check_ping
deleted file mode 100644
index 015af0b..0000000
--- a/etc/functions/check_ping
+++ /dev/null
@@ -1,21 +0,0 @@
-## vim:ft=zsh
-## check_ping - returns true if a host responds to ICMP echo requests
-## Usage: check_ping [-6] <host>
-typeset -i ipv6 ret
-
-while [[ $1 == -* ]] {
- case $1 in
- -6) ipv6=1 ;;
- esac
- shift
-}
-
-typeset dst=$1
-shift
-
-if ((ipv6)) {
- ping6 -c 1 $dst &> /dev/null
-} else {
- ping -c 1 $dst &> /dev/null
-}
-return
diff --git a/etc/functions/check_ssh b/etc/functions/check_ssh
deleted file mode 100644
index 2c7cca7..0000000
--- a/etc/functions/check_ssh
+++ /dev/null
@@ -1,8 +0,0 @@
-## vim:ft=zsh
-## check_ssh - returns true if a machine is reachable and allowing logins on ssh
-## Usage: check_ssh <host>
-if [[ $(ssh $1 'echo foo' 2> /dev/null < /dev/null ) == foo ]] {
- return 0
-} else {
- return 1
-}
diff --git a/etc/functions/confirm_no b/etc/functions/confirm_no
deleted file mode 100644
index c69b4c6..0000000
--- a/etc/functions/confirm_no
+++ /dev/null
@@ -1,3 +0,0 @@
-## vim:ft=zsh
-echo -n "$* [y/N] "
-read -q
diff --git a/etc/functions/confirm_yes b/etc/functions/confirm_yes
deleted file mode 100644
index 7389d1d..0000000
--- a/etc/functions/confirm_yes
+++ /dev/null
@@ -1,9 +0,0 @@
-## vim:ft=zsh
-echo -n "$* [Y/n] "
-read -k 1
-[[ $REPLY != $'\n' ]] && echo
-if [[ $REPLY == 'y' || $REPLY == 'Y' || $REPLY == $'\n' ]] {
- true
-} else {
- false
-}
diff --git a/etc/functions/postpone b/etc/functions/postpone
deleted file mode 100644
index 452f234..0000000
--- a/etc/functions/postpone
+++ /dev/null
@@ -1,2 +0,0 @@
-## vim:ft=zsh
-cat > $ZCACHEDIR/postponed
diff --git a/etc/functions/progress b/etc/functions/progress
deleted file mode 100644
index d472e54..0000000
--- a/etc/functions/progress
+++ /dev/null
@@ -1,27 +0,0 @@
-## vim:ft=zsh
-## progress - draw a simple progress bar
-## Usage: progress <current> <max> [left description] [right discription]
-## Copyright (C) 2008 by Daniel Friesel <derf@derf.homelinux.org>
-## License: WTFPL <http://sam.zoy.org/wtfpl>
-
-typeset -i current=$1
-typeset -i max=$2
-typeset desc=$3
-typeset desc2=$4
-typeset output=''
-typeset currentper=$(( (current*100)/max ))
-typeset c a
-function item {
- typeset j
- for j in {0..$1}; {
- (( j > 0 )) && output+=$2
- }
-}
-c=$(( currentper/5 ))
-a=$(( 20-c ))
-output+="$desc ["
-item $c '='
-item $a ' '
-output+="] $currentper% $desc2"
-echo -ne "\r\e[2K"
-echo -ne $output
diff --git a/etc/functions/recall b/etc/functions/recall
deleted file mode 100644
index 31253d4..0000000
--- a/etc/functions/recall
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env zsh
-autoload xcat
-xcat $ZCACHEDIR/postponed
diff --git a/etc/functions/xcat b/etc/functions/xcat
deleted file mode 100644
index 3b74fe9..0000000
--- a/etc/functions/xcat
+++ /dev/null
@@ -1,5 +0,0 @@
-## vim:ft=zsh
-while [[ -n $1 ]] {
- [[ -r $1 ]] && cat $1
- shift
-}
diff --git a/etc/functions/xexport b/etc/functions/xexport
deleted file mode 100644
index 6c9235b..0000000
--- a/etc/functions/xexport
+++ /dev/null
@@ -1,4 +0,0 @@
-## vim:ft=zsh
-if [[ -n $1 ]] {
- export $1
-}