Registered Member
|
Hi,
I would like to be able to take a screenshot and save it to clipboard, similarly as in Windows, without a GUI window appearing. Additionally, it seems that if I do click "copy to clipboard" in the GUI, closing or discarding (maybe only discarding) will also discard the clipboard image contents. However, I would rather the GUI not show at all. Is this a possible setting? Thank you. |
Mentor
|
|
Registered Member
|
Sorry, but I've already tried all of Spectacle's options. I cannot set the default 'save location' to the clipboard - only a folder, without spectacle's GUI. I want to save the image to clipboard, not the file location. |
Registered Member
|
Huh, ever since I found out that FB messanger allows to paste raw image into conversation I started to look for some solution. I worked around the lack of this option in the following way: 0. sudo apt-get install xclip 1. Configure spectacle to use Rectangular Selection, default save to /some/path/Screenshot_%Y%M%D_%H%m%S 2. Configure PrintScreen for rectangular selection via custom shortcuts 3. Try it - once you select the area and hit enter it should show the pop-up notification about saved file. 4. On this notification select the settings button 5. In the notification settings enable "Run command" and set it as /usr/bin/xclip -selection clipboard -target image/png -i $(ls -1tr /some/path/Screenshot_*.png | tail -n 1) You could set the screenshot paths to use /tmp, so it's cleared regularly. Enjoy |
Registered Member
|
You must do this every time when you make a screenshot? I'm joining the question about screenshoting to clipboard without popup window of Spectacle, by default, without any question .... gnome-screenshot can do it perfectly, but only in GNOME session. In KDE it doesn't work too. |
Registered Member
|
I'm also interested in a solution for this.
|
Mentor
|
since 19.04.0 Spectacle has a new commandline option:
-c, --clipboard In background mode, copy screenshot to clipboard see https://cgit.kde.org/spectacle.git/comm ... d47ed70b28 spectacle -bcn will capture the entire desktop and copy the screenshot without gui and notification to the clipboard use the options f, m, a, u, r to specify what to capture |
Registered Member
|
Building on previous answers, you could:
- enter Settings > Shortcuts > Custom Shortcuts - create new custom group ie "Spectacle": Edit > New Group - and create new custom shortcut(s): Edit > New > Global Shortcut > Command/URL - fill the name ie "PrintScreen Clipboard Rectangular" - Trigger: Ctrl+Shift+Print - Command/URL: spectacle -bcr - Apply Now pressing Ctrl+Shift+Print will trigger rectangular printscreen that will be saved directly to clipboard after pressing Enter. You can see all spectacle commands using `spactacle --help`. Note, in order to copy print-screens to clipboard in the background, you should use `-bc`. This will allow you to create Gnome-like print-screen behaviour in KDE5 Hope someone will find it useful! |
Registered Member
|
Wow, fantastic @lpryszcz, worked perfectly, thank you!
|
Registered Member
|
Hi!
You can set a shortcut for that from settings/shorcuts/spectacle |
Registered Member
|
spectacle -c returns "Unknown option 'c'.", please help
|
Manager
|
Read again, it explicitly says that the option -c only works in background mode, so you need to use -bc
Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ... |
Registered Member
|
Just logged in to say a big thank you !!!
Using rectangular screenshot copied to clipboard directly a lot. So it ease my work a lot. Thank you again! |
Registered Member
|
One more step here, make sure to check the checkbox next to that new shortcut. As to why copying to the clipboard isn't easily configurable in the Spectable UI, or even the default, beats me. A lot of tools accept pasting images from clipboard (browser apps, image editors etc.), and usually you want to annotate the screenshot somehow, and name is something meaningful instead of ScreenshotXXX, so saving to disk is rarely what you want. |
Registered Member
|
I really wanted the ability to do a rectangular region capture, and then simultaneously copy it to the clipboard while also saving it to a file. Adjust the Command/URL added to the Custom Shortcut with the command below. Remember to change the saved image path to something meaningful for your environment.
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]