move all existing stuff to old/

This commit is contained in:
Mark Riedesel 2023-11-07 13:13:11 -06:00
parent c215878777
commit 35f5e8472b
49 changed files with 0 additions and 0 deletions

24
old/_bin/screengrab Executable file
View file

@ -0,0 +1,24 @@
#!/bin/sh
with_maim() {
mkdir -p ${HOME}/screenshot
TARGET="${HOME}/screenshot/grab-$(date +'%Y%m%d%H%M%S').png"
maim -s -n -o -p 1 -f png -m 10 -u | tee $TARGET | xclip -selection clipboard -t image/png
[ -s ${TARGET} ] || rm ${TARGET}
}
with_grim() {
# requires: grim, wl-clipboard, and slurp.
mkdir -p ${HOME}/screenshot
TARGET="${HOME}/screenshot/grab-$(date +'%Y%m%d%H%M%S').png"
grim -g "$(slurp)" $TARGET
if [ -s $TARGET ]; then
wl-copy < $TARGET
fi
}
case "${XDG_SESSION_TYPE}" in
wayland) with_grim;;
*) with_maim;;
esac