#!/bin/sh if wmctrl -m | grep -q '"showing the desktop" mode: ON'; then exec wmctrl -k off else exec wmctrl -k on fi