screenkey-toggle (442B)
1 #!/bin/sh 2 composer=xcompmgr 3 screenkey="$(which screenkey)" 4 5 die() 6 { 7 printf '%s: error: %s\n' "${0##*/}" "$1" >&2 8 exit 1 9 } 10 11 if pgrep -f "${screenkey}" >/dev/null 2>&1; then 12 if pgrep "${composer}" >/dev/null 2>&1; then 13 pkill "${composer}" 14 fi 15 pkill -f "${screenkey}" 16 else 17 if ! pgrep "${composer}" >/dev/null 2>&1; then 18 nohup "${composer}" >/dev/null 2>&1 & 19 fi 20 nohup "${screenkey}" --font-color red --opacity 0.0 >/dev/null 2>&1 & 21 fi