Sometimes you need a screenshot of an application window with specific dimensions.
On Linux, you can use the
xdotool commandline tool, which is a fake keyboard/mouse input and window management tool for x11.
xdotool, resizing a Firefox window to 1024 x 768 pixels is as easy as this command:
xdotool search "Mozilla Firefox" windowsize 1024 768
However, knowing the right window name might fail you, there's a even better solution:
xdotool selectwindow windowsize 1024 768
Now you can just run the command, click a window - and 💥 - the selected window is resized.
⚠️ Note: If you are using Wayland, please be aware this software will not work correctly. ⚠️