update mmsg usecase in docs

This commit is contained in:
DreamMaoMao 2026-05-26 14:25:51 +08:00
parent caf36397fb
commit f33e21aec7
6 changed files with 15 additions and 14 deletions

View file

@ -90,7 +90,7 @@ Uses `mmsg` (ships with mango) to capture the focused window.
```bash
#!/usr/bin/env bash
geometry=$(mmsg -x | awk '/x / {x=$3} /y / {y=$3} /width / {w=$3} /height / {h=$3} END {print x","y" "w"x"h}')
geometry=$(mmsg get focusing-client | jq -r '"\(.x),\(.y) \(.width)x\(.height)"')
[ -z "$geometry" ] && exit 1
grim -g "$geometry" "$HOME/Pictures/Screenshots/$(date +%Y%m%d%H%M%S).png"
```