There are no windows in the stack

This works find by itself.
xdotool windowminimize $(xdotool getactivewindow)

But not when used in an alias.

There are no windows in the stack
Invalid window '%1'
Usage: windowminimize [options] [window=%1]
--sync    - only exit once the window has minimized (is not visible)
If no window is given, %1 is used. See WINDOW STACK in xdotool(1)

This worked for me:

alias minimize_me="xdotool windowminimize $(xdotool getactivewindow)"

I added this line to ".bash_aliases" but it should work just as good if added to ".bashrc" instead.

Thanks.
I found this also works.

xdotool getactivewindow windowminimize

1 Like