summaryrefslogtreecommitdiff
path: root/.config/wmii-hg
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-03-27 17:30:22 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-03-27 17:30:22 -0400
commit86b1a11dfcbab990a07a236f41deefe0aaf4ed5e (patch)
tree00b1b50d9b616fd1c22ef5c51c007e24d1644ccc /.config/wmii-hg
parent9e79a6c3bbc37c2eec19e055566440f0b1173c5c (diff)
post-merge clean
Diffstat (limited to '.config/wmii-hg')
-rwxr-xr-x.config/wmii-hg/autostart2
-rw-r--r--.config/wmii-hg/include.sh71
-rwxr-xr-x.config/wmii-hg/quit4
-rwxr-xr-x.config/wmii-hg/rbar_battery7
-rwxr-xr-x.config/wmii-hg/rbar_clock7
-rwxr-xr-x.config/wmii-hg/rbar_cpu9
-rwxr-xr-x.config/wmii-hg/rbar_wifi7
7 files changed, 21 insertions, 86 deletions
diff --git a/.config/wmii-hg/autostart b/.config/wmii-hg/autostart
index aae23f4..f329a5e 100755
--- a/.config/wmii-hg/autostart
+++ b/.config/wmii-hg/autostart
@@ -1,4 +1,2 @@
#!/bin/bash
daemon lxpanel &> /dev/null
-daemon wicd-client -t &> /dev/null
-daemon notifyd &> /dev/null
diff --git a/.config/wmii-hg/include.sh b/.config/wmii-hg/include.sh
index 36f8f3e..bd9456f 100644
--- a/.config/wmii-hg/include.sh
+++ b/.config/wmii-hg/include.sh
@@ -1,70 +1,11 @@
#!/bin/bash
-if [ -z "$WMII_NAMESPACE" ]; then
- export WMII_NAMESPACE=`wmiir namespace`
+if [[ -z "$WMII_NAMESPACE" ]]; then
+ export WMII_NAMESPACE="`wmiir namespace`"
fi
-if [ -z "$WMII_DIR" ]; then
- export WMII_DIR=$WMII_NAMESPACE/mnt
+if [[ -z "$WMII_DIR" ]]; then
+ export WMII_DIR="$HOME/n/wmii${DISPLAY}"
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
-}
+. util.sh
+. config.sh
diff --git a/.config/wmii-hg/quit b/.config/wmii-hg/quit
index 54f64e7..27d9052 100755
--- a/.config/wmii-hg/quit
+++ b/.config/wmii-hg/quit
@@ -1,3 +1,3 @@
#!/bin/bash
-. "$HOME/.wmii/include.sh"
-echo quit |a $WMII_DIR/ctl
+. include.sh
+echo quit >> $WMII_DIR/ctl
diff --git a/.config/wmii-hg/rbar_battery b/.config/wmii-hg/rbar_battery
index 7a7f24f..f632f7e 100755
--- a/.config/wmii-hg/rbar_battery
+++ b/.config/wmii-hg/rbar_battery
@@ -1,10 +1,9 @@
#!/bin/bash
-. "$HOME/.wmii/include.sh"
+. include.sh
priority=$1
-set -e
-while true; do
- acpi -b |a "$WMII_DIR/rbar/${priority}_battery"
+while connected_to_x_server; do
+ printf 'label %s\n' "$(acpi -b)" >> "$WMII_DIR/rbar/${priority}_battery"
sleep 1
done
diff --git a/.config/wmii-hg/rbar_clock b/.config/wmii-hg/rbar_clock
index 8e7d2a4..6aecb92 100755
--- a/.config/wmii-hg/rbar_clock
+++ b/.config/wmii-hg/rbar_clock
@@ -1,10 +1,9 @@
#!/bin/bash
-. "$HOME/.wmii/include.sh"
+. include.sh
priority=$1
-set -e
-while true; do
- date |a "$WMII_DIR/rbar/${priority}_clock"
+while connected_to_x_server; do
+ printf 'label %s\n' "$(date)" >> "$WMII_DIR/rbar/${priority}_clock"
sleep .5
done
diff --git a/.config/wmii-hg/rbar_cpu b/.config/wmii-hg/rbar_cpu
index 7f891da..5531e60 100755
--- a/.config/wmii-hg/rbar_cpu
+++ b/.config/wmii-hg/rbar_cpu
@@ -1,13 +1,12 @@
#!/bin/bash
-. "$HOME/.wmii/include.sh"
+. include.sh
priority=$1
-set -e
-while true; do
+while connected_to_x_server; do
# This doesn't work for me, it shows capacity
- #echo -n 'Core MHz:' $(cat /proc/cpuinfo | grep 'cpu MHz' | sed 's/.*: //g; s/\..*//g;') |a "$WMII_DIR/rbar/${priority}_cpu"
+ #echo -n 'Core MHz:' $(cat /proc/cpuinfo | grep 'cpu MHz' | sed 's/.*: //g; s/\..*//g;') >> "$WMII_DIR/rbar/${priority}_cpu"
# This actually displays %idle
- echo 'CPU: [ '$(tail -n3 ~/tmp/cputime|sed -ur 's/\s\s+/\t/g'|cut -f2,11|sed 's/\t\(.*\)/(\1)/')' ]' |a "$WMII_DIR/rbar/${priority}_cpu"
+ echo 'label CPU: [ '$(tail -n3 ~/tmp/cputime|sed -ur 's/\s\s+/\t/g'|cut -f2,11|sed 's/\t\(.*\)/(\1)/')' ]' >> "$WMII_DIR/rbar/${priority}_cpu"
sleep 1
done
diff --git a/.config/wmii-hg/rbar_wifi b/.config/wmii-hg/rbar_wifi
index 608b164..18395a3 100755
--- a/.config/wmii-hg/rbar_wifi
+++ b/.config/wmii-hg/rbar_wifi
@@ -1,10 +1,9 @@
#!/bin/bash
-. "$HOME/.wmii/include.sh"
+. include.sh
priority=$1
-set -e
-while true; do
- echo 'Wlan0:' $(iwconfig wlan0 | sed 's/ /\n/g' | grep Quality) |a "$WMII_DIR/rbar/${priority}_wifi"
+while connected_to_x_server; do
+ echo 'label Wlan0:' $(iwconfig wlan0 | sed 's/ /\n/g' | grep Quality) >> "$WMII_DIR/rbar/${priority}_wifi"
sleep 1
done