summaryrefslogtreecommitdiff
path: root/.wmii/include.sh
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2012-10-15 20:27:06 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2012-10-15 20:27:06 -0400
commit0ce7b10e4804e1cc5e7410ee0b9817889c7c721c (patch)
tree8fdbc3c24a1d89dae04e0cfe9239b647c7427af6 /.wmii/include.sh
parent33febe8b8a5a6a237d6e3617f7c96e783a548378 (diff)
parent3515a46d330af1d09bf1e0b963c13a86c2dbe8a8 (diff)
Merge branch 'master' into thinkpenguin-par-2
Diffstat (limited to '.wmii/include.sh')
-rw-r--r--.wmii/include.sh67
1 files changed, 4 insertions, 63 deletions
diff --git a/.wmii/include.sh b/.wmii/include.sh
index 36f8f3e..d4e58c3 100644
--- a/.wmii/include.sh
+++ b/.wmii/include.sh
@@ -1,70 +1,11 @@
#!/bin/bash
if [ -z "$WMII_NAMESPACE" ]; then
- export WMII_NAMESPACE=`wmiir namespace`
+ export WMII_NAMESPACE="`wmiir namespace`"
fi
if [ -z "$WMII_DIR" ]; then
- export WMII_DIR=$WMII_NAMESPACE/mnt
+ export WMII_DIR="$HOME/n/wmii"
fi
-# a -- a work-around for buggy IO append in 9pfuse
-# useing '|a' should be just like using '>>', but will work
-# when 9pfuse decides to bug out.
-a() {
- f="${1/#${WMII_DIR}/}"
- if [ "$f" = "$1" ]; then
- cat >> "$1"
- else
- if wmiir ls "$f" &>/dev/null; then
- wmiir write "$f"
- else
- wmiir create "$f"
- fi
- fi
-}
-
-# I like wmiir's setsid better than linux-utils'
-setsid() { wmiir setsid "$@"; }
-
-path_ls() {
- find -L `echo "$@"|sed 'y/:/ /'` -maxdepth 1 -type f -executable -printf '%f\n' 2>/dev/null| sort -u
-}
-
-path_which() {
- mypath=$1
- prog=$2
- which=`which which`
- PATH="$mypath" "$which" -- "$prog" 2>/dev/null
-}
-
-
-lstags() {
- ls $WMII_DIR/tag | sed '/^sel$/d'
-}
-
-scansection() {
- file=`path_which "$WMII_CONFPATH" wmiirc`
- sec=$1
- tmp=`mktemp`
- if [ -n "$sec" ]; then
- < "$file" sed -n "/^\s*$sec\s*()/,/##\s*End $sec/p" | sed '1d;$d'> $tmp
- else
- < "$file" sed "/\s*}\s*##\s*End\s/d" > $tmp
- fi
- < $tmp sed -n '/##/p'|sed -r 's/^\s*(.*)\)\s*## ?/\t\1\t/;s/\s*## ?//'
- rm $tmp
-}
-
-conffile() {
- echo "$HOME/.wmii/$@"
-}
-
-Action() {
- prog=`path_which "$WMII_CONFPATH" $1`; shift
- if [ -n "$prog" ]; then
- "$prog" "$@"
- return $?
- else
- return 1
- fi
-}
+. "$HOME/.wmii/util.sh"
+. "$HOME/.wmii/config.sh"