~ruther/guix-config

ref: fa400522de86632ffe9b41c03932c676aba53bf9 guix-config/home/dotfiles/dwl/print.sh -rwxr-xr-x 444 bytes
fa400522 — Rutherther feat: add cups printing service 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env -S guix shell slurp grim wl-clipboard -- bash

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