Spectacle/Tutorials/Invoking Spectacle with custom shortcuts

From KDE UserBase Wiki
Revision as of 08:17, 5 August 2014 by ThorstenStaerk (talk | contribs)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

The default way to capture your screen to a file is to press the PrintScreen key. The program ksnapshot will pop up. It allows you to capture

  • the complete screen
  • single windows
  • a rectangular region on the screen

However many people want their screenshots to be stored without any further interaction. This can be useful during documentation work when you want to do a lot of screenshots without interrupting work. One solution is to set up Shift_PrintScreen to trigger a screenshot. To do this

  • install the import command, e.g. for SUSE Linux:
yast -i ImageMagick
  • start systemsettings, navigate to Shortcuts and Gestures -> Custom Shortcuts -> Edit -> New -> Global Shortcut -> Command/URL
  • enter a name for your action, for example Screenshot_batch
  • click on Trigger -> Shortcut and press Shift_Printscreen. Shift+Print appears in the button:
  • click on "Action" and enter the command
import -window root "snapshot-$(date --rfc-3339=seconds).jpg"
  • click on "Apply"

Now whenever you press Shift_PrintScreen your screen will be saved to your home folder with a timestamp in its name, e.g. snapshot-2014-08-05 10:06:09+02:00.jpg