STATUS_FILE__WIFI=$STATUS_DIR/wifi
STATUS_FILE__ENERGY_NOTIFIED_BELLOW_HALF=$STATUS_DIR/notified_energy_bellow_half
+SYMBOL_WIFI='📶'
+
#load=$(cat /proc/loadavg | awk '{printf "%4.2f %4.2f %4.2f", $1, $2, $3}')
fan=$(awk '/^speed:/ {printf "%4d", $2}' /proc/acpi/ibm/fan)
io_net=$(
awk '
BEGIN {
- bytes_per_unit = 1024
+ bytes_per_unit = 1024 * 1024
}
NR > 2 {
print curr_read > prev_read_file;
print curr_write > prev_write_file;
- printf("%s %0.0f▲ %0.0f▼\n", device, diff_write, diff_read);
+ printf("%s %0.3f▲ %0.3f▼\n", device, diff_write, diff_read);
}
' /proc/net/dev
)
| tr -d ' '
)
+mpd_state=$(
+ echo 'status' \
+ | nc 127.0.0.1 6600 \
+ | awk '
+ {
+ status[$1] = $2
+ }
+
+ END {
+ state = status["state:"]
+ symbol = "-"
+ if (state == "play") {
+ symbol = "▶"
+ } else if (state == "pause") {
+ symbol = "❚❚"
+ } else if (state == "stop") {
+ symbol = "⬛"
+ }
+ printf("%s", symbol)
+ }
+ '
+)
+
echo \
"\
E$energy\
M$memory\
\
\
- D$disk\
- \
- \
C=[$cpu ${temp}°C ${fan}rpm]\
\
\
- S=$screen_brightness\
+ D$disk\
\
\
- V=$volume\
+ $SYMBOL_WIFI [$wifi $(echo "$io_net" | awk '/^wlp3s0/ {print $2, $3}')]\
\
\
B:$bluetooth_power\
\
\
- W:[$wifi $(echo "$io_net" | awk '/^wlp3s0/ {print $2, $3}')]\
+ S=$screen_brightness\
+ \
+ \
+ V=$volume\
\
+ $mpd_state\
\
$signal_last_msg_age\
\