#!/bin/bash statusText () { TOTALMEM=$(free -m | head -n 2 | tail -n 1 | cut -c 10-20 | sed 's/ *//g'); SEPERATOR=" || "; while true; do TIME=$(date '+%a %-d %b %T'); CPULOAD=$(echo "CPU: `uptime | sed 's/.*: \([0-9.]*\).*/\1/'`"); RAM=$(echo "RAM: `free -m | head -n 3 | tail -n 1 | cut -c 19-29 | sed 's/ *//g'`/${TOTALMEM}M"); echo "${TIME}${SEPERATOR}${CPULOAD}${SEPERATOR}${RAM}" sleep 1 done } export DISPLAY=:0.0 statusText | dwm & export DISPLAY=:0.1 statusText | exec dwm