~ruther/guix-config

ref: 1636aa9d1ff005482997ee55a6fe29e69ab77598 guix-config/home/dotfiles/dwl/print.sh -rwxr-xr-x 444 bytes
1636aa9d — Rutherther chore: remove my config from gtk service module 1 year, 4 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"