My dotfiles (written in Nix, btw!) ❄
at main 21 lines 356 B view raw
1#!/bin/sh 2 3date=$(date) 4file_location=$HOME/Pictures/screenshot+${date}_grim.png 5title="Do you wish to edit your screenshot?" 6 7geometry=$(slurp) 8 9if [ $? -ne 0 ]; then 10 exit $? 11fi 12 13grim -g "$geometry" - | wl-copy && wl-paste > $file_location 14 15output=$(printf "No\nYes" | wofi -d -p "${title}") 16 17case $output in 18 "Yes") 19 gimp "${file_location}" 20 ;; 21esac