repositories
/
dotfiles.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
better bar with ssid
[dotfiles.git]
/
i3
/
bar
diff --git
a/i3/bar
b/i3/bar
index
24b05f3
..
cdebaf8
100755
(executable)
--- a/
i3/bar
+++ b/
i3/bar
@@
-1,12
+1,6
@@
#!/bin/bash
#!/bin/bash
-function music {
- song=$([ "$(mpc | wc -l)" = "1" ] && echo "[stopped]" || echo $(mpc | head -1))
- status=$(mpc | grep -o "\[p.*\]")
- echo -ne "♪: $song$status | "
-}
-
function net {
function net {
-
cat /run/network/ifstate | grep -q $1 && echo "$2
| "
+
grep -q "$1" /run/network/ifstate && echo "$2 <$(iwconfig "$1" 2>/dev/null | grep -Po "(?<=ESSID:\").*(?=\")")>
| "
}
function volume {
}
function volume {
@@
-30,6
+24,6
@@
function battery {
}
while [ 1 ]; do
}
while [ 1 ]; do
- echo "$(
music)$(
volume)$(net wlan0 W)$(net eth0 E)$(net usb0 U)$(temp)$(battery)$(date +%y-%m-%d\ %H:%M)"
+ echo "$(volume)$(net wlan0 W)$(net eth0 E)$(net usb0 U)$(temp)$(battery)$(date +%y-%m-%d\ %H:%M)"
sleep 5
done
sleep 5
done