mirror of
https://github.com/swaywm/sway.git
synced 2026-04-23 06:46:27 -04:00
Consider titlebar in grimshot window mode
This commit is contained in:
parent
2dace6b824
commit
66f33a2a75
1 changed files with 4 additions and 1 deletions
|
|
@ -129,7 +129,10 @@ elif [ "$SUBJECT" = "output" ] ; then
|
||||||
OUTPUT=$(swaymsg -t get_outputs | jq -r '.[] | select(.focused)' | jq -r '.name')
|
OUTPUT=$(swaymsg -t get_outputs | jq -r '.[] | select(.focused)' | jq -r '.name')
|
||||||
WHAT="$OUTPUT"
|
WHAT="$OUTPUT"
|
||||||
elif [ "$SUBJECT" = "window" ] ; then
|
elif [ "$SUBJECT" = "window" ] ; then
|
||||||
GEOM=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp)
|
GEOM=$(swaymsg -t get_tree | jq -r \
|
||||||
|
'.. | select(.pid? and .visible?)
|
||||||
|
| "\(.rect.x),\(.rect.y - .deco_rect.height) \(.rect.width)x\(.rect.height + .deco_rect.height)"' \
|
||||||
|
| slurp)
|
||||||
# Check if user exited slurp without selecting the area
|
# Check if user exited slurp without selecting the area
|
||||||
if [ -z "$GEOM" ]; then
|
if [ -z "$GEOM" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue