#!/bin/bash if [ -s /tmp/lwa.lock ]; then # On my system, lwa-hot-corners sometimes creates many instances of itself # This way, I kill the unnecessary processes # WORKS ONLY when I give the script $PPID as first argument (refer to .lwarc) kill -KILL $1 exit fi echo "Running" > /tmp/lwa.lock if xprop -root _NET_SHOWING_DESKTOP | egrep '= 1' > /dev/null; then wmctrl -k off else wmctrl -k on fi sleep 0.2 rm /tmp/lwa.lock