From 005ac5e9a00be835f5bb28d5f13a8123125c4b16 Mon Sep 17 00:00:00 2001 From: Ian Mancini Date: Wed, 2 Dec 2020 02:23:41 -0300 Subject: [PATCH] Add maim-area script --- maim-area | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 maim-area diff --git a/maim-area b/maim-area new file mode 100755 index 0000000..4b9fb8b --- /dev/null +++ b/maim-area @@ -0,0 +1,11 @@ +#!/bin/sh +DIR="$HOME/Pictures/screenshots/" +DATE=$(date +%Y-%m-%d-%H-%M-%S) +FILENAME="$DIR$DATE.png" + +maim -s "$FILENAME" +[[ $? = 1 ]] && notify-send "Screenshot cancelled" && exit 1 + +xclip -selection clipboard -t image/png "$FILENAME" + +notify-send -i $FILENAME "Saved screenshot" "$DATE.png"