I am using Linux Mint 19. Default terminal is gnome-terminal
I created a custom shortcut In
Keyboard -> Shortcut with the command
gnome-terminal -e /home/ismail/Documents/Translate/screen_ts_short.sh. And assigned the shortcut key
The script looks like -
#!/bin/bash xdotool getactivewindow windowminimize .....
My expectation is when I press
Win+Q the bash script will run while the gnome-terminal is minimized.
But what happening is the current selected window gets minimized, and the terminal is wide open.
What can I do?
From the answer, I took suggestion and added
sleep .1 at the top
So, the script looks like
#!/bin/bash sleep .1 xdotool getactivewindow windowminimize .....
It is working now. Please let me know if you find a better solution.