-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.dwmrc
29 lines (26 loc) · 860 Bytes
/
.dwmrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function startdwm() {
# Statusbar loop
while true
do
VOL=$(amixer get Master | tail -1 | sed 's/.*\[\([0-9]*%\)\].*/\1/')
LOCALTIME=$(date +%Z\=%Y-%m-%dT%H:%M)
OTHERTIME=$(TZ=Asia/Tokyo date +%Z\=%H:%M)
IP=$(for i in `ip r`; do echo $i; done | grep -A 1 src | tail -n1) # can get confused if you use vmware
TEMP="$(($(cat /sys/class/thermal/thermal_zone0/temp) / 1000))C"
if acpi -a | grep off-line > /dev/null
then
BAT="Bat. $(acpi -b | awk '{ print $4 " " $5 }' | tr -d ',')"
xsetroot -name "$IP | $BAT | Vol: $VOL | Temp: $TEMP | $LOCALTIME $OTHERTIME"
else
xsetroot -name "$IP | Vol: $VOL | Temp: $TEMP | $LOCALTIME $OTHERTIME"
fi
sleep 20s
done &
wmname LG3D
# Autostart section
feh --bg-scale ~/Pictures/graywall.png
xscreensaver -no-splash &
pcmanfm &
guake &
fcitx &
}