Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
apps:xfce4-screenshooter:custom-actions [2024/02/04 23:07] – [Examples] andreldm | apps:xfce4-screenshooter:custom-actions [2025/02/15 12:52] (current) – [Hosting on Imgur™] Update about client id andreldm | ||
---|---|---|---|
Line 1: | Line 1: | ||
~~NOTOC~~ | ~~NOTOC~~ | ||
- | {{ :xfce:xfce.screenshooter.png? | + | {{ :apps:xfce4-screenshooter.png? |
====== xfce4-screenshooter - Custom Actions ====== | ====== xfce4-screenshooter - Custom Actions ====== | ||
* **[[#Adding custom actions|Adding custom actions]]** | * **[[#Adding custom actions|Adding custom actions]]** | ||
* **[[# | * **[[# | ||
+ | * **[[# | ||
+ | * **[[#Read QR Code|Read QR Code]]** | ||
+ | * **[[# | ||
===== Adding custom actions ===== | ===== Adding custom actions ===== | ||
- | TODO | + | <figure " |
+ | {{: | ||
+ | </ | ||
+ | |||
+ | Custom actions can be added, removed and editing in the Preferences dialog. | ||
+ | |||
+ | * Add: click on the plus(+) button and a new blank custom action is added at the bottom of the list. | ||
+ | * Remove: click on the minus(-) button and the selected custom action will be removed. | ||
+ | * Edit: add a new custom action or select an existing one, changes made to the name and command entries are saved as soon as the preferences dialog is closed. | ||
+ | |||
+ | Custom actions are composed of: | ||
+ | * Name: a friendly name that will be shown in the Actions dialog. | ||
+ | * Command: command to be executed, it can be an inline command or a call to script. The screenshot file can be referenced by passing '' | ||
+ | |||
+ | ---- | ||
===== Examples ===== | ===== Examples ===== | ||
Line 14: | Line 31: | ||
The following examples assume the necessary dependencies are already installed. | The following examples assume the necessary dependencies are already installed. | ||
- | **Extract text with OCR** | + | ==== Extract text with OCR ==== |
'' | '' | ||
- | **Read QR Code** | + | ---- |
+ | |||
+ | ==== Read QR Code ==== | ||
Save the following script somewhere and set as command: ''< | Save the following script somewhere and set as command: ''< | ||
Line 37: | Line 56: | ||
</ | </ | ||
- | ** Host on Imgur™ ** | + | [[|Back to Top]] |
- | Save the following script somewhere and set as command: ''< | + | ---- |
- | For the time being, screenshooter provides its own client id as '' | + | |
+ | ==== Hosting on Imgur™ ==== | ||
+ | |||
+ | ! This custom action allows you to host your screenshot on this free online hosting service, so that you can share it easily with other people. Imgur automatically generates a tiny, medium, and full-size image of your screenshot, which can be used to create thumbnails pointing to the full size screenshot. | ||
+ | |||
+ | |||
+ | <note important> | ||
+ | |||
+ | |||
+ | Save the following script somewhere and set as command: ''< | ||
< | < | ||
- | #!/bin/sh | + | #!/usr/bin/env bash |
URL=' | URL=' | ||
Line 51: | Line 79: | ||
if [ -z " | if [ -z " | ||
zenity --error --text=" | zenity --error --text=" | ||
+ | exit 1 | ||
+ | fi | ||
+ | |||
+ | if ! command -v jq >&2; then | ||
+ | zenity --error --text=" | ||
exit 1 | exit 1 | ||
fi | fi | ||
Line 56: | Line 89: | ||
# | # | ||
# | # | ||
- | RESPONSE=$(curl --silent --location " | + | RESPONSE=$(curl --silent --location " |
+ | | ||
+ | | ||
+ | tee >(zenity --progress --pulsate --no-cancel --auto-close --text=" | ||
STATUS=$(echo " | STATUS=$(echo " | ||
Line 67: | Line 103: | ||
LINK=" | LINK=" | ||
DELETE=" | DELETE=" | ||
- | LOG_DIRECTORY=" | + | LOG_DIRECTORY=" |
LOG=" | LOG=" | ||
Line 87: | Line 123: | ||
$LOG" | $LOG" | ||
</ | </ | ||
+ | |||
+ | The dialog below will give you the links to delete the image off of the Imgur website. The link will only be shown once. Make sure to save it if you think you might be deleting this image: | ||
+ | |||
+ | <figure "Imgur Deletion Dialog Window"> | ||
+ | {{: | ||
+ | </ | ||
+ | |||
+ | |||
+ | [[|Back to Top]] | ||
+ | |||
+ | ---- | ||
+ | [[: |