This is a Lubuntu 16.04 running in live mode, that opens up at startup three windows (lxterminal, geany editor, and a graphic window). The user is intended to switch from the terminal to the editor and back, to command the system, and edit a file. The Nextwindow and PreviousWindow would make it, but the user has to avoid the graphic window. Is there any way to identify these windows and switch from one to the other by some keybinding?

for id in $(xprop -root _NET_CLIENT_LIST | cut -f2 -d'#' | tr -d ',') ; do
    echo -en "$id:\t"
    xprop -id $id _NET_WM_NAME | sed 's/^.* = //'

xdotool windowactivate --sync $idofyourwindow

The for loop prints a list of your window names and ids. You could use commands like 'xwininfo -children' or 'xdotool search' to find the id of the window you want to activate.

When you know this id use 'xdotool' to activate the window.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.