#!/bin/sh main() { dt="$(wmctrl -d | sed -n 's/ * \* .*$//p')" : $((dt += 1)) printf '[%d]\n' ${dt} } main "${@}"