Add spawninfo patch

This commit is contained in:
Nikita Ivanov
2025-02-14 23:10:09 +01:00
parent 268bee3cee
commit c01728c629
4 changed files with 306 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
#!/bin/sh
# Get client info
read -r PID
read -r TITLE
read -r APPID
read -r TAGS
read -r GEOMETRY
[ -n "$GEOMETRY" ] || exit 1
tempdir="/tmp/screenshots"
mkdir -p "$tempdir"
file="$(mktemp -p "$tempdir" "XXXXXX.png")"
# Grab the screenshot! Very conviniently, GEOMETRY format matches the one
# expected by grim
grim -g "$GEOMETRY" "$file" || exit
wl-copy -t image/png < "$file"
notify-send -i "$file" "Screenshot taken!" "Image copied to clipboard and saved to $file"