configs/desktop/bin/print-fullscreen
2023-10-09 17:55:47 -03:00

14 lines
315 B
Bash
Executable File

#!/bin/bash
name="$HOME/pics/screenshots/screenshot-$(date -Iseconds | cut -d '+' -f1).png"
if [[ $XDG_SESSION_TYPE == "x11" ]]; then
maim -u -n -l -c 0.157,0.333,0.466,0.4 $name
xclip -selection clipboard -t image/png $name
fi
if [[ $XDG_SESSION_TYPE == "wayland" ]]; then
grim $name
wl-copy < $name
fi