Taking screenshots 📸 in GNU/Linux systems like a pro using maim and sxhkd
⌛ 4 months ago | 📖 1 min read
Here we are trying to create our own screenshot workflow in our linux system using minimal FOSS tools like maim, xclip and sxhkd. This is useful for minimal systems that use window managers instead of desktop environments. Although it should work fine on desktop environments also.
Above mentioned tools are available in package managers of popular linux distros like ubuntu, arch, debian and their derivatives. Also there is an option of building from source code in Github repos.
- Get all the required programs installed in your system.
- Add these lines to your
sxhkdrcfile usually located at
Print maim --select | xclip -selection clipboard -t image/png shift + Print maim --select >> ~/Pictures/$(date +%s).png
Now, after restarting the sxhkd process you should be able to take screenshot using
Print Screen key in your keyboard. Which will prompt you for area grab and then capture your selected area. Now, the picture is available in your clipboard.
Also, you can use combination of
Shift + Print Screen to capture an area and save it in
~/Pictures/ directory with name as current date and timestamp.
Please make sure there are no processes listening to
Shift + Print Screenother than sxhkd. Also make sure that directory
~/Pictures/exists. You may need to create one if it does not already exist.
Now you have built your own screen capture workflow using simple and minimal tools like maim, sxhkd and xclip.
Share this on