summaryrefslogtreecommitdiff
path: root/home/.selfconfigs/sway/capture_current_window
blob: 4a5d428cf24129d9fa41c07fd0f9ea734f589056 (plain)
1
2
3
#!/usr/bin/bash -eu

grim -g "$(swaymsg -t get_tree | jq -r '.. | select(.focused?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"')" ~/screenshot.png