sway_move: fix on transformed output
This commit is contained in:
parent
a55965ddcd
commit
766a844a51
1 changed files with 6 additions and 6 deletions
|
@ -41,13 +41,13 @@ initialise() {
|
|||
}
|
||||
|
||||
initialise "$@"
|
||||
dimensions=$( swaymsg -t get_outputs |
|
||||
jq -r '.. | select(.focused?) | .current_mode | "\(.width)x\(.height)"' )
|
||||
width=$( swaymsg -t get_outputs |
|
||||
jq -r '.. | select(.focused?) | .rect | .width' )
|
||||
height=$( swaymsg -t get_outputs |
|
||||
jq -r '.. | select(.focused?) | .rect | .height' )
|
||||
scale=$(swaymsg -t get_outputs | jq -r '.. | select(.focused?) | .scale' )
|
||||
|
||||
monitor_width=$(echo "${dimensions%x*}/$scale / 1" | bc)
|
||||
monitor_height=$(echo "${dimensions#*x}/$scale / 1" | bc)
|
||||
|
||||
monitor_width=$(echo "${width}/$scale / 1" | bc)
|
||||
monitor_height=$(echo "${height}/$scale / 1" | bc)
|
||||
win_dim=( $( swaymsg -t get_tree |
|
||||
jq '.. | select(.type?) | select(.type=="floating_con") | select(.focused?)|.rect.width, .rect.height, .deco_rect.height' ) )
|
||||
|
||||
|
|
Loading…
Reference in a new issue