diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-10-15 14:33:31 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-10-15 20:22:26 -0400 |
commit | f5f19ca8e8d46ba1087f8531e2309ac392c24112 (patch) | |
tree | 009c0b9baf3d024347a3149e698a1b8313d8d900 /.wmii/include.sh | |
parent | 4493d30ac4c747b08b2107a440084245a9157bd4 (diff) |
wmii: phase out wmiir
Diffstat (limited to '.wmii/include.sh')
-rw-r--r-- | .wmii/include.sh | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/.wmii/include.sh b/.wmii/include.sh index 29d4d67..b1ec901 100644 --- a/.wmii/include.sh +++ b/.wmii/include.sh @@ -7,20 +7,22 @@ if [ -z "$WMII_DIR" ]; then 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 +# Linux's 9p kernel module sometimes omits entries in directory listings +unalias ls 2>/dev/null +ls() { + real_ls="`which ls` -1F" + [ $# = 0 ] && set -- "`pwd`" + case $# in + 1) + f="${1/#${WMII_DIR}/}" + if [ "$f" = "$1" ]; then + $real_ls "$f" + else + wmiir ls "$f" + fi + ;; + *) $real_ls "$f";; + esac } # I like wmiir's setsid better than linux-utils' @@ -37,9 +39,8 @@ path_which() { PATH="$mypath" "$which" -- "$prog" 2>/dev/null } - lstags() { - ls $WMII_DIR/tag | sed '/^sel$/d' + ls $WMII_DIR/tag | sed -e 's@/@@' -e '/^sel$/d' } scansection() { @@ -70,6 +71,6 @@ Action() { } connected_to_x_server() { - xdpyinfo &>/dev/null - return $? + xdpyinfo &>/dev/null + return $? } |