dwm update in progress

This commit is contained in:
2023-05-09 20:21:49 +02:00
parent 61775f18e4
commit e65b5d797a
330 changed files with 26354 additions and 16 deletions

View File

@@ -0,0 +1,26 @@
#!/bin/sh
# A dwm_bar function to read the average system load
# Alvar Penning <post@0x21.biz>
# GNU GPLv3
dwm_loadavg () {
# LOAD_FIELDS specifies the load average values to be displayed. Values
# within 1-3 are allowed, passed as a range (-) or comma-separated.
# - 1: load average within the last minute
# - 2: load average within the last five minutes
# - 3: load average within the last fifteen minutes
LOAD_FIELDS=1,2,3
LOAD_AVG=$(cut -d " " -f ${LOAD_FIELDS} /proc/loadavg)
printf "%s" "$SEP1"
if [ "$IDENTIFIER" = "unicode" ]; then
printf "⏱ %s" "$LOAD_AVG"
else
printf "AVG %s" "$LOAD_AVG"
fi
printf "%s\n" "$SEP2"
}
dwm_loadavg