[NetBehaviour] 1441220508

James Morris james at jwm-art.net
Tue Nov 3 23:55:54 CET 2015


#!/bin/bash
# shoot - screenshot script.
# intended usage: bind to two keyboard shortcuts.
# for the second shortcut pass the option 'select'
# (without quotes) to allow user to draw area to shoot.
# requires: maim - screenshot application
#           notify-send - to provide user assurance

DIR="${HOME}/Pictures/Screenshots"
FN="$(date '+%Y%m%d-%H%M%S').png"

if [ "'$1'" == "'select'" ]; then
     maim -s --nokeyboard "$DIR/$FN"
else
     maim "$DIR/$FN"
fi

if [ "$?" -gt 0 ]; then
   notify-send -u critical -t 500 "Screenshot FAIL $FN"
else
   notify-send -t 350 "Wrote screenshot ${FN}"
fi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1441220508.png
Type: image/png
Size: 5764 bytes
Desc: not available
URL: <https://lists.netbehaviour.org/pipermail/netbehaviour/attachments/20151103/ec1b3654/attachment.png>


More information about the NetBehaviour mailing list