#!/bin/bash
# swatch - watch system status

if ! [ -t 0 -a -n "$TERM" ]; then
	if [ -n "$swatch_recurse" ]; then
		exit 1
	fi
	swatch_recurse=1 exec xterm -geometry 100x64 -e swatch
	exit 1
fi
watch -t -c sh -c 'w | head -n1; echo
	free; echo
	top -b | head -n10; echo
	gpustat --color --no-header --gpuname-width 0; echo
	nvidia-smi; echo
	sensors; echo
	cpuspeed | fmt -w 190; echo   # hack!
'
