This repository has been archived on 2023-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
2022-05-01 18:37:27 +02:00
|
|
|
#!/usr/bin/env sh
|
2022-05-03 20:23:13 +02:00
|
|
|
|
|
|
|
######################################################################
|
|
|
|
# @author : swytch
|
|
|
|
# @file : screenshot
|
|
|
|
# @license : GPLv3
|
|
|
|
# @created : Wednesday May 20, 2020 17:52:58 CEST
|
|
|
|
#
|
|
|
|
# @description : grab a screenshot
|
|
|
|
# @deps : scrot xclip dunstify
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
|
|
|
|
sleep .1
|
2022-05-01 18:37:27 +02:00
|
|
|
if [ "-w" = "$1" ]; then
|
|
|
|
scrot -e 'xclip -selection clipboard -t image/png -i $f && rm $f'
|
|
|
|
else
|
|
|
|
if [ ! "" = "$1" ]; then
|
|
|
|
dunstify -u "normal" " Wrong parameter. No screenshot taken" && exit 1
|
|
|
|
else
|
|
|
|
scrot -s -e 'xclip -selection clipboard -t image/png -i $f && rm $f'
|
|
|
|
fi
|
|
|
|
fi
|