diff options
| author | Justine Smithies <justine@smithies.me.uk> | 2026-08-06 18:56:42 +0100 |
|---|---|---|
| committer | Justine Smithies <justine@smithies.me.uk> | 2026-08-06 18:56:42 +0100 |
| commit | 34264a23ec358baae0e27a32aebba8c28d9dcaee (patch) | |
| tree | 0f91072d70f6f0deb0d75f575a385146d8bfe448 /.local/bin/screenshot.sh | |
| parent | ae55f7166d16da1298c2cfed52f008cd531837c6 (diff) | |
Updated to work with Cow ( FVWM for Wayland ).
Diffstat (limited to '.local/bin/screenshot.sh')
| -rwxr-xr-x | .local/bin/screenshot.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/.local/bin/screenshot.sh b/.local/bin/screenshot.sh index 19a9157..3a6eee2 100755 --- a/.local/bin/screenshot.sh +++ b/.local/bin/screenshot.sh @@ -1,7 +1,8 @@ #!/bin/sh # Get focused output -output="$(mmsg get all-monitors | jq -r '.monitors[] | select(.active == true) | .name')" +#output="$(mmsg get all-monitors | jq -r '.monitors[] | select(.active == true) | .name')" +output="$( moocow show windows | jq -r '.data[] | select(.focused == true) | .output')" case $1 in selected-region) @@ -14,8 +15,10 @@ case $1 in ;; focused-window) # Take a screenshot of the focused window - geometry=$(mmsg get focusing-client | jq -r '"\(.x),\(.y) \(.width)x\(.height)"') - grim -g "$geometry" -t jpeg ~/Pictures/Screenshots/"$(date +%Y-%m-%d_%H-%m-%s)".jpg + # geometry=$(mmsg get focusing-client | jq -r '"\(.x),\(.y) \(.width)x\(.height)"') + geometry=$(moocow winops -I | jq -r '.data.frame | "\(.x),\(.y) \(.width)x\(.height)"') + + grim -g "$geometry" -t jpeg ~/Pictures/Screenshots/"$(date +%Y-%m-%d_%H-%m-%s)".jpg ;; *) # Take a screenshot of the currently focused output and save it into screenshots |
