utility/screenshot

10 行
263 B
Bash
実行ファイル

#!/bin/sh
FILENAME="screen_$(date +%Y%m%d_%H%m%S).png"
DIR="$HOME/pictures/screenshots"
[ -z "$DIR" ] && mkdir -p "$DIR"
import -window root "$DIR/$FILENAME" | xclip -selection clipboard -t image/png &&
notify-send --icon="$DIR/$FILENAME" "Screenshot taken"