View Single Post
Old 07-26-2018, 05:56 PM   #3
aleq
Enthusiast
aleq began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Mar 2012
Location: CZ, EU
Device: K4NT (4.0.1), KT (5.3.7.3), KPW1 (sold), KPW2
Wooohooo

Code:
xwininfo -id `./xdotool getactivewindow` | grep "\"L:D" && ./wmctrl -c :ACTIVE:
Uses xdotool (thanks for the right direction) to get the active window.
Then uses xwininfo to get the window name, if it contains L, it is a dialog
Then uses wmctrl to close the active window gracefully

It may be enough to wmctrl -p -G -l and check for any dialog in the list perhaps
aleq is offline   Reply With Quote