From 9385c245df13ad126e8c91bf95800e8d0d4ccbea Mon Sep 17 00:00:00 2001 From: Patrick Date: Sun, 11 Jun 2017 19:04:07 +0800 Subject: add support for make install to make everything, init x-focus-topmost script --- scripts/x-focus-topmost | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 scripts/x-focus-topmost (limited to 'scripts') diff --git a/scripts/x-focus-topmost b/scripts/x-focus-topmost new file mode 100755 index 0000000..8931d64 --- /dev/null +++ b/scripts/x-focus-topmost @@ -0,0 +1,7 @@ +#!/bin/sh +# focus the top-most window, i.e. the window just mapped +topmost() { + xwininfo -root -children | awk '/^ *0x/{ print $1; exit; }' +} +[[ "$1" != "" ]] && sleep 0.5 +xdotool windowfocus $( topmost ) -- cgit v1.2.3