~ruther/guix-config

ref: d6793e0a8bb74b5bce4188b5efc707879242afa4 guix-config/home/dotfiles/dwl/print.sh -rwxr-xr-x 398 bytes
d6793e0a — Rutherther feat: add printscreen script 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh -e

out="$HOME/screens/$(date +%Y/%Y%m%d_%H%M%S).png"

while getopts o:s arg; do case $arg in
                            o) out="$OPTARG" ;;
                            s) sel="$(slurp -o)" ;;
                            ?|*) echo "usage: shot [-s] [-o out]" >&2; exit 1 ;;
                          esac; done

grim ''${sel:+ -g "$sel"} "$out"
echo "$out"
wl-copy -t image/png < "$out"
Do not follow this link