Based on this answer I can activate or minimalize window: how to bring up keepassX window with keyboard shortcut?
xdotool search --onlyvisible --name "My window name" windowactivate
xdotool search --onlyvisible --name "My window name" windowminimize
I assign these commands to two keyboard shortcuts, for example Ctrl+Shift+K and Ctrl+Shift+M.
But I want to have only one keyboard shortcut for toggle window, it means:
if minimalized:
activate
else:
minimalize
I don't see any "toggle" option in xdotool: http://manpages.ubuntu.com/manpages/trusty/man1/xdotool.1.html
OS: Ubuntu, UI: Unity