update screen grab scripts to partially support wayland

This commit is contained in:
Crispy 2024-12-23 01:28:26 +01:00
parent 728c410552
commit 427a0f9ec6
3 changed files with 41 additions and 16 deletions

View file

@ -1,2 +1,8 @@
#!/bin/bash
maim -s -u --color=1.0,0.5,0.0,1.0 -t 16 | xclip -selection clipboard -t image/png
if [ $XDG_SESSION_TYPE = 'wayland' ]; then
grim -g "$(slurp -b#ffff4411 -w0)" - | wl-copy -t image/png
else
maim -s -u --color=1.0,0.5,0.0,1.0 -t 16 | xclip -selection clipboard -t image/png
fi