blob: 064fade34ef3a35cc2b05a084d398347c87f2525 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/sh
AW=$( (
xdotool getactivewindow
printf :
xdotool getactivewindow getwindowpid
) | tr -d '[:space:]')
PROC=$(realpath "/proc/${AW#*:}/exe" | xargs basename)
unset REFOCUS
if ! echo "$PROC" | grep -qlE '(thunar|xfdesktop)'; then
REFOCUS=true
xdotool search --onlyvisible --classname Xfdesktop windowfocus
fi
xdotool key F5
"${REFOCUS:-false}" && xdotool windowfocus "${AW%:*}"
|