summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.config/wmii-hg/rbar_acpi3
-rwxr-xr-x.config/wmii-hg/rbar_clock2
-rwxr-xr-x.config/wmii-hg/rbar_wifi11
-rwxr-xr-x.local/bin/iwdata8
4 files changed, 12 insertions, 12 deletions
diff --git a/.config/wmii-hg/rbar_acpi b/.config/wmii-hg/rbar_acpi
index 6e3e6e5..7c1d18b 100755
--- a/.config/wmii-hg/rbar_acpi
+++ b/.config/wmii-hg/rbar_acpi
@@ -15,7 +15,8 @@ update() {
-e 's/\s*remaining//g' \
-e 's/\s*until charged//g' \
-e 's/charging at zero rate - will never fully charge./∞/g' \
- -e 's/\s*ok,\s*//g' |
+ -e 's/\s*ok,\s*//g' \
+ -e 's/\s+//g' |
cat -n | while read -r n line; do
printf "label %s\n" "$line" | write "${id}.${n}"
done
diff --git a/.config/wmii-hg/rbar_clock b/.config/wmii-hg/rbar_clock
index e84d5c3..c66b21e 100755
--- a/.config/wmii-hg/rbar_clock
+++ b/.config/wmii-hg/rbar_clock
@@ -7,7 +7,7 @@ update() {
while true; do
{
printf 'label '
- date +'%a, %F %T %Z(%:::z)'
+ date +'%a %F %T %Z(%:::z)'
} | write "$id"
sleep .5
done
diff --git a/.config/wmii-hg/rbar_wifi b/.config/wmii-hg/rbar_wifi
index d201152..e740777 100755
--- a/.config/wmii-hg/rbar_wifi
+++ b/.config/wmii-hg/rbar_wifi
@@ -1,14 +1,5 @@
#!/usr/bin/env bash
-iwinfo() {
- local interface=$1
- iwconfig "$interface" |
- sed -r 's/ {2,}/\n/g' |
- sed -e '/^\s*$/d' -e 's/:\s*/=/' \
- -e '1s/^/Interface=/' \
- -e '2s/^/MAC Protocol=/'
-}
-
update() {
local iface=wlp2s0
@@ -18,7 +9,7 @@ update() {
while true; do
IFS=$'\n'
lines=($(
- iwinfo "$iface" | sed -rn 's@^(ESSID|Link Quality)=@@p'
+ iwdata "$iface" | sed -rn 's@^(ESSID|Link Quality)=@@p'
ifdata -pa "$iface"
))
IFS='|'
diff --git a/.local/bin/iwdata b/.local/bin/iwdata
new file mode 100755
index 0000000..a631d6d
--- /dev/null
+++ b/.local/bin/iwdata
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+iwconfig "$1" |
+sed -r 's/ {2,}/\n/g' |
+sed -e '/^\s*$/d' -e 's/:\s*/=/' \
+ -e '1s/^/Interface=/' \
+ -e '2s/^/MAC Protocol=/' \
+ -e 's/^ESSID="\(.*\)"$/ESSID=\1/'