From 3c9cd46753e1c647758c4e1204edf60ab7c48e8d Mon Sep 17 00:00:00 2001 From: Severin Kaderli Date: Sun, 11 Aug 2019 18:53:02 +0200 Subject: [PATCH] Update screenshot script Signed-off-by: Severin Kaderli --- system/.local/bin/screenshot | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/system/.local/bin/screenshot b/system/.local/bin/screenshot index ce2a6fa..9622554 100755 --- a/system/.local/bin/screenshot +++ b/system/.local/bin/screenshot @@ -18,9 +18,7 @@ PROMPT="Screenshot" # Actions for the menu ACTIONS=( "1: Fullscreen" - "2: Fullscreen (Clipboard)" - "3: Selection" - "4: Selection (Clipboard)" + "2: Selection" ) FILENAME="${HOME}/pictures/Screenshots/%Y-%m-%d-%H%M%S.png" @@ -28,15 +26,12 @@ FILENAME="${HOME}/pictures/Screenshots/%Y-%m-%d-%H%M%S.png" SELECTION=$(printf '%s\n' "${ACTIONS[@]}" | rofi -dmenu -p "${PROMPT}" | cut -d ":" -f1) case "${SELECTION}" in "1") - escrotum "${FILENAME}" + FILE=$(escrotum "${FILENAME}") ;; "2") - escrotum -C "${FILENAME}" - ;; - "3") - escrotum -s "${FILENAME}" - ;; - "4") - escrotum -C -s "${FILENAME}" + FILE=$(escrotum -s "${FILENAME}") ;; esac + +TYPE=$(file -b --mime-type "${FILE}") +xclip -selection clipboard -t "${TYPE}" < "${FILE}" \ No newline at end of file