this post was submitted on 31 May 2025
16 points (100.0% liked)

KDE

6753 readers
60 users here now

KDE is an international technology team creating user-friendly free and open source software for desktop and portable computing. KDE’s software runs on GNU/Linux, BSD and other operating systems, including Windows.

Plasma 6 Bugs

If you encounter a bug, proceed to https://bugs.kde.org/, check whether it has been reported.

If it hasn't, report it yourself.

PLEASE THINK CAREFULLY BEFORE POSTING HERE.

Developers do not look for reports on social media, so they will not see it and all it does is clutter up the feed.

founded 2 years ago
MODERATORS
 

Hi,

I configured Spectacle with the following keyboard shortcuts :

  • Print Screen = selected area ;
  • Win + Print Screen = active window ;
  • Ctrl + Print Screen = entire screen.

However, that only works for saving to file. Enabling copying to clipboard in settings only works when opening the full Spectacle app where it takes a full screen picture by default while having to retake when needing something else.

Is there any way to make the keyboard shortcut copy to clipboard at the same time as saving to file ?

Thanks

top 5 comments
sorted by: hot top controversial new old
[–] cyborganism@lemmy.ca 3 points 2 weeks ago

Oohh this is something I'd love to have as well.

[–] FauxLiving@lemmy.world 1 points 1 week ago* (last edited 1 week ago)

You'd need to write a script, for example:

#!/bin/bash

# Set the directory where screenshots will be saved
SCREENSHOT_DIR=~/Pictures/Screenshots

# Create the directory if it doesn't exist
mkdir -p "$SCREENSHOT_DIR"

# Get the current date and time in the format MM-DD-YYYY_HH:MM:SS
DATETIME=$(date +"%m-%d-%Y_%H-%M-%S")

# Build the filename using the datetime
FILENAME="screenshot_$DATETIME.png"

# Take a fullscreen screenshot, save it to the specified directory, and copy it to the clipboard
spectacle -f -b -c -o "$SCREENSHOT_DIR/$FILENAME"

# Optional: Notify the user (requires notify-send)
notify-send "Screenshot taken" "$FILENAME saved to $SCREENSHOT_DIR"

You can change the -f to change the screenshot mode. From spectacle --help:


  -f, --fullscreen                        Capture the entire desktop (default)
  -m, --current                           Capture the current monitor
  -a, --activewindow                      Capture the active window
  -u, --windowundercursor                 Capture the window currently under
                                          the cursor, including parents of
                                          pop-up menus
  -t, --transientonly                     Capture the window currently under
                                          the cursor, excluding parents of
                                          pop-up menus
  -r, --region                            Capture a rectangular region of the
                                          screen

Save the script somewhere. It's safest to make it owned by root and put somewhere like /usr/scripts so random user-access programs can't edit the script. Use chmod +x to make it executable.

Then go to Plasma -> Settings -> Keyboard -> Shortcuts, Click 'Add New' -> Command or Script. For the command, give it the path to your script, give it a name click Add and then set a hotkey by clicking the Add butoon.

[–] claymore@pawb.social 1 points 1 week ago* (last edited 1 week ago)

Are you closing the spectacle window after taking a screenshot? I found that you need to keep it open for the image to stay in the clipboard. When I have the time I can check how I've set it up if that doesn't work for you. Although I only copy to clipboard, not save as well.

[–] nuzzle5504@lemmy.ml 1 points 2 weeks ago (1 children)

I have my spectacle configured to open "save a rectangle" or whatever it's called. It lets me select the part of the screen that I want, then I double click in the area and I have it copied to my clipboard, and from memory there is a setting somewhere that automatically saves it to ~/Pictures/Screenshots

[–] nuzzle5504@lemmy.ml 1 points 3 days ago

I now use flameshot, which has a similar auto save when copying feature