From a0260982b9a09279468cbfedf2d84e3225e0a549 Mon Sep 17 00:00:00 2001 From: Giorgi Gzirishvili Date: Sat, 20 Jan 2018 01:54:41 +0400 Subject: [PATCH] Add instructions for global keyboard shortcuts in Plasma (#84) --- README.md | 81 ++++++++--- docs/shortcuts-config/flameshot-shortcuts-kde | 135 ++++++++++++++++++ 2 files changed, 194 insertions(+), 22 deletions(-) create mode 100644 docs/shortcuts-config/flameshot-shortcuts-kde diff --git a/README.md b/README.md index 8ff1adf8..f332c9ac 100644 --- a/README.md +++ b/README.md @@ -31,27 +31,27 @@ Example commands: - capture with GUI: -`flameshot gui` + `flameshot gui` - capture with GUI with custom save path: -`flameshot gui -p ~/myStuff/captures` + `flameshot gui -p ~/myStuff/captures` - open GUI with a delay of 2 seconds: -`flameshot gui -d 2000` + `flameshot gui -d 2000` - fullscreen capture (asking savepath): -`flameshot full` + `flameshot full` - fullscreen capture with custom save path (no GUI) and delayed: -`flameshot full -p ~/myStuff/captures -d 5000` + `flameshot full -p ~/myStuff/captures -d 5000` - fullscreen capture with custom save path copying to clipboard: -`flameshot full -c -p ~/myStuff/captures` + `flameshot full -c -p ~/myStuff/captures` In case of doubt choose the first or the second command as shortcut in your favorite desktop environment. @@ -64,32 +64,69 @@ You can use the graphical menu to configure Flameshot, but alternatively you can - open the confguration menu: -`flameshot config` + `flameshot config` - show the initial help message in the capture mode: -`flameshot config --showhelp true` + `flameshot config --showhelp true` - for more information about the available options use the help flag: -`flameshot config -h` + `flameshot config -h` -## Shortcuts +## Keyboard shortcuts + +### Local These shortcuts are available in GUI mode: -| Keys | Description | -|--- |--- | -| ←↓↑→ | Move selection 1px | -| SHIFT + ←↓↑→ | Resize selection 1px | -| ESC | Quit capture | -| CTRL + C | Copy to clipboard | -| CTRL + S | Save selection as a file | -| CTRL + Z | Undo the last modification | -| Right Click | Show color picker | -| Mouse Wheel | Change the tool's thickness | +| Keys | Description | +|--- |--- | +| , , , | Move selection 1px | +| Shift + , , , | Resize selection 1px | +| Esc | Quit capture | +| Ctrl + C | Copy to clipboard | +| Ctrl + S | Save selection as a file | +| Ctrl + Z | Undo the last modification | +| Right Click | Show color picker | +| Mouse Wheel | Change the tool's thickness | -Shift + drag a handler of the selection area: mirror redimension in the opposite handler. +Shift + drag a handler of the selection area: mirror redimension in the opposite handler. + +### Global + +If you want use Flameshot as a default screenshot utility, chanses are you want to launch it using the Prt Sc key. Flameshot doesn't yet offer a fully-automated option to do so, but you can configure your system to do so. + +#### On KDE Plasma desktop + +To make configuration easier, there's a [file](docs/shortcuts-config/flameshot-shortcuts-kde) in the repository that more or less automates this process. This file will assign the following keys to the following actions by default: + +| Keys | Description | +|--- |--- | +| Prt Sc | Start the Flameshot screenshot tool and take a screenshot | +| Ctrl + Prt Sc | Wait for 3 seconds, then start the Flameshot screenshot tool and take a screenshot | +| Shift + Prt Sc | Take a full-screen (all monitors) screenshot and save it | +| Ctrl + Shift + Prt Sc | Take a full-screen (all monitors) screenshot and copy it to the clipboard | + +If you don't like the defaults, you can change them manually later. + +Steps for using the configuration: + +1. The configuration file configures shortcuts so that Flameshot automatically saves (without opening the save dialog) screenshots to _~/Pictures/Screenshots_ folder. Make sure you have that folder by running the following command: + ``` + mkdir -p ~/Pictures/Screenshots + ``` + (If you don't like the default location, you can skip this step and configure your preferred directory later.) + +2. Download the configuration file: + ``` + cd ~/Desktop; wget https://raw.githubusercontent.com/lupoDharkael/flameshot/master/docs/shortcuts-config/flameshot-shortcuts-kde + ``` +3. Go to _System Settings_ → _Shortcuts_ → _Custom Shortcuts_. +4. If there's one, you'll need to disable an entry for Spectacle, the default KDE screenshot utility first because its shortcuts might collide with Flameshot's ones; so, just uncheck the _Spectacle_ entry. +5. Click _Edit_ → _Import..._, navigate to the Desktop folder (or wherever you saved the configuration file) and open the configuration file. +6. Now the Flameshot entry should appear in the list. Click _Apply_ to apply the changes. +7. If you want to change the defaults, you can expand the entry, select the appropriate action and modify it as you wish; the process is pretty mush self-explanatory. ## Considerations @@ -99,7 +136,7 @@ Shift + drag a handler of the selection area: mirror redimension in the opposite - In order to speed up the first launch of Flameshot (DBus init of the app can be slow), consider starting the application automatically on boot. -- Press `Enter` or `Ctrl + C` when you are in a capture mode and you don't have an active selection and the whole desktop will be copied to your clipboard! Pressing `Ctrl + S` will save your capture in a file! Check the [Shortcuts](#shortcuts) for more information. +- Press Enter or Ctrl + C when you are in a capture mode and you don't have an active selection and the whole desktop will be copied to your clipboard! Pressing Ctrl + S will save your capture in a file! Check the [Shortcuts](#shortcuts) for more information. - Execute the command `flameshot` without parameters or use the "Launch Flameshot" desktop entry to launch a running instance of the program without taking actions. diff --git a/docs/shortcuts-config/flameshot-shortcuts-kde b/docs/shortcuts-config/flameshot-shortcuts-kde new file mode 100644 index 00000000..408f1498 --- /dev/null +++ b/docs/shortcuts-config/flameshot-shortcuts-kde @@ -0,0 +1,135 @@ +[Data] +DataCount=1 + +[Data_1] +Comment=Shortcuts for taking screenshots with Flameshot +DataCount=4 +Enabled=true +Name=Flameshot +SystemGroup=0 +Type=ACTION_DATA_GROUP + +[Data_1Conditions] +Comment= +ConditionsCount=0 + +[Data_1_1] +Comment=Start the Flameshot screenshot tool and take a screenshot +Enabled=true +Name=Take screenshot +Type=SIMPLE_ACTION_DATA + +[Data_1_1Actions] +ActionsCount=1 + +[Data_1_1Actions0] +Arguments='Pictures/Screenshots' 0 0 +Call=graphicCapture +RemoteApp=org.dharkael.Flameshot +RemoteObj=/ +Type=DBUS + +[Data_1_1Conditions] +Comment= +ConditionsCount=0 + +[Data_1_1Triggers] +Comment=Simple_action +TriggersCount=1 + +[Data_1_1Triggers0] +Key=Print +Type=SHORTCUT +Uuid={65ecb470-7d89-497a-9f9d-406b068f7207} + +[Data_1_2] +Comment=Wait for 3 seconds, then start the Flameshot screenshot tool and take a screenshot +Enabled=true +Name=Take screenshot with delay +Type=SIMPLE_ACTION_DATA + +[Data_1_2Actions] +ActionsCount=1 + +[Data_1_2Actions0] +Arguments='Pictures/Screenshots' 3000 0 +Call=graphicCapture +RemoteApp=org.dharkael.Flameshot +RemoteObj=/ +Type=DBUS + +[Data_1_2Conditions] +Comment= +ConditionsCount=0 + +[Data_1_2Triggers] +Comment=Simple_action +TriggersCount=1 + +[Data_1_2Triggers0] +Key=Ctrl+Print +Type=SHORTCUT +Uuid={cea82966-75d5-437d-afaf-aeba83a4abfd} + +[Data_1_3] +Comment=Take a full-screen (all monitors) screenshot and save it +Enabled=true +Name=Take full-screen screenshot and save +Type=SIMPLE_ACTION_DATA + +[Data_1_3Actions] +ActionsCount=1 + +[Data_1_3Actions0] +Arguments='Pictures/Screenshots' false 0 0 +Call=fullScreen +RemoteApp=org.dharkael.Flameshot +RemoteObj=/ +Type=DBUS + +[Data_1_3Conditions] +Comment= +ConditionsCount=0 + +[Data_1_3Triggers] +Comment=Simple_action +TriggersCount=1 + +[Data_1_3Triggers0] +Key=Shift+Print +Type=SHORTCUT +Uuid={3c7ead73-00ad-4f90-bdba-5d15a70b8b43} + +[Data_1_4] +Comment=Take a full-screen (all monitors) screenshot and copy it to the clipboard +Enabled=true +Name=Take full-screen screenshot and copy it to clipboard +Type=SIMPLE_ACTION_DATA + +[Data_1_4Actions] +ActionsCount=1 + +[Data_1_4Actions0] +Arguments='' true 0 0 +Call=fullScreen +RemoteApp=org.dharkael.Flameshot +RemoteObj=/ +Type=DBUS + +[Data_1_4Conditions] +Comment= +ConditionsCount=0 + +[Data_1_4Triggers] +Comment=Simple_action +TriggersCount=1 + +[Data_1_4Triggers0] +Key=Ctrl+Shift+Print +Type=SHORTCUT +Uuid={a724b514-0cb6-40f0-bf14-c08db726b320} + +[Main] +AllowMerge=false +ImportId=flameshot +Version=2