After moving to Linux and KDE Plasma from macOS, I only missed one thing that I used all the time: The Screenshot tool. The Shortcuts on macOS have been engraved in my head after probably thausand of uses so I figured I'd give replicating them a try.
Creating new Shortcuts was surprisingly easy so here is a rundown of it
You will need
- A directory to store screenshots in (I use
- An install of maim
- An install of either xclip or copyq (I will go into this in the next secion)
xclip vs. copyq
At first I just used the example from the maim readme to put screenshots into the clipboard, meaning xlip. Sadly this was giving me issues (similar to this) so I decided to switch to copyq.
As I only use copyq for screenshots I set the following config values
autostart true maxitems 1
I also unchecked every option in Clipboard Manipulation in the config menu and hid its tray icon
If xclip does not have issues on your system it is surely a more lightwight solution, I will include command for both tools down below
Adding Custom Shortcuts
As I already said this is surprisingly easy.
Open System Settings, then go to Shortcuts > Custom Shortcuts. Here I created a group called "Screenshot" so that its all tidy.
I added the following:
Comment: Makes a screenshot of an selected area and saves it to a file
Trigger: Shift + Command + 4
maim -su ~/pictures/screenshots/$(date --iso-8601=seconds).png
Comment: Makes a screenshot of an selected area and copies it to the clipboard
Trigger: Shift + Control + Command + 4
maim -su | copyq write image/png - && copyq select 0or
maim -su | xclip -selection clipboard -t image/png
Comment: Makes a screenshot of all screens and saves it to a file
Trigger: Shift + Command + 3
maim -u ~/pictures/screenshots/$(date --iso-8601=seconds).png
Comment: Makes a screenshot of all screens and copies it to the clipboard
Trigger: Shift + Control + Command + 3
maim -u | copyq write image/png - && copyq select 0or
maim -u | xclip -selection clipboard -t image/png
Of course you can also set your own flags for maim, there is a lot to choose from!
I'm just using
-u everywhere, which hides the cursor