Skip to content
This repository has been archived by the owner on Apr 29, 2022. It is now read-only.
tagplus5 edited this page Oct 23, 2016 · 8 revisions

Config options are explained below.

The default config can be overridden at ~/.config/imgur-screenshot/settings.conf:

imgur_anon_id="ea6c0ef2987808e"
imgur_icon_path="${HOME}/Pictures/imgur.png"

imgur_acct_key=""
imgur_secret=""
login="false"
album_title=""
album_id=""
credentials_file="${HOME}/.config/imgur-screenshot/credentials.conf"

file_name_format="imgur-%Y_%m_%d-%H:%M:%S.png" # when using scrot, must end with .png!
file_dir="${HOME}/Pictures"

upload_connect_timeout="5"
upload_timeout="120"
upload_retries="1"

screenshot_select_command="scrot -s %img"
screenshot_window_command="scrot -u %img"
screenshot_full_command="scrot %img"
open_command="xdg-open %url"
open="true"

mode="select"
edit_command="gimp %img"
edit="false"
exit_on_album_creation_fail="true"

log_file="${HOME}/.imgur-screenshot.log"

auto_delete=""
copy_url="true"
keep_file="true"
check_update="true"
  • imgur_anon_id

    The imgur API key used for anonymous upload. Don't change this unless you have a valid key. Note that you can put your API key (client id) here to upload anonymously using that.

  • imgur_acct_key

    The imgur API key (client id) used to upload to your account.

  • imgur_secret

    The imgur API secret (client secret). Don't change this unless you have a valid secret and would like to upload to your account.

  • imgur_icon_path

    The path to the imgur favicon file (download here).
    Has to be a file in your file system, links do not work.
    example Will be shown as icon for notifications.

  • login

    If set to true, the script will upload to your account

  • album_title

    If set, the script will create a new album and upload to that specific album

  • album_id

    If set, the script will upload to that specific album on your account.
    Use the delete hash for anonymous albums.

  • credentials_file

    The file used to store your account credentials

  • file_name_format

    The format used for saved screenshots. more info

  • file_dir

    Optional. The path to the directory where you want your images saved.

  • upload_connect_timeout

    Maximum time in seconds until the connection to imgur should be established.

  • upload_timeout

    Maximum time the whole upload procedure may take.

  • upload_retries

    Amount of retries that will be done if the upload failed.

  • screenshot_select_command

    Command to create a selective screenshot and save it to %img

    scrot has some issues with updating windows such as terminals (see here), in which case you can install maim with slop and set this to maim -s %img.

  • screenshot_window_command

    Command to grab the active window and save it to %img On debian, you can use scrot -u %img to capture the active window instead of the whole screen (Used when selective screenshot cannot be taken, see #1)

  • edit

    If set to true, make use of edit_command

  • edit_command

    An executable that is run before the image is uploaded.
    The image will be uploaded when the program exits.
    %img is replaced with the image's filename.

  • exit_on_selection_fail

    If set to false and a selective screenshot can't be taken, take a full screen shot instead.

  • edit_on_selection_fail

    When exit_on_selection_fail is false and the selective screenshot fails, open the (full screen) image with edit_command.

  • exit_on_album_creation_fail

    If set to false upload images even if the album creation failed.

  • open_command

    An executable that is run after the image was uploaded.
    %img is replaced with the image's filename.
    %url is replaced with the image's URL.

  • open

    If set to true, open url after image uploaded.

  • log_file

    The path to the logfile.
    The logfile contains filenames, URLs and errors.

  • auto_delete

    Number of seconds after which the image will be automatically deleted. Leave empty to disable

  • copy_url

    If set to true, the image URL will be copied to clipboard.

  • keep_file

    If set to false, the file will be deleted. Only deletes screenshots.

  • check_update

    If set to true, it will check for updates after the upload. This will not apply the update, just notify you if there's a new version.

Clone this wiki locally