#!/bin/sh # note this script may not work if triggered using a keybinding that # involves a modifier key, because the script will run before the # modifier key has been released (the first 'sleep' ought to mitigate # this problem at least somewhat) set -e emacsclient -eval '(with-current-buffer "*NEW notes*" (gui-set-selection nil (buffer-string)) (erase-buffer))' # select this window ready for processing the next package wmctrl -a "ftp-master GNU mc session" sleep 0.2 wmctrl -a "ftp-master dak command session" sleep 0.2 xdotool getactivewindow mousemove --window %1 --polar 0 0 click 2