bin/sway_move: include the current scale for the output
This commit is contained in:
parent
c3d0af22cd
commit
f449ba5b02
1 changed files with 3 additions and 4 deletions
|
@ -43,9 +43,10 @@ initialise() {
|
|||
initialise "$@"
|
||||
dimensions=$( swaymsg -t get_outputs |
|
||||
jq -r '.. | select(.focused?) | .current_mode | "\(.width)x\(.height)"' )
|
||||
scale=$(swaymsg -t get_outputs | jq -r '.. | select(.focused?) | .scale' )
|
||||
|
||||
monitor_width=${dimensions%x*}
|
||||
monitor_height=${dimensions#*x}
|
||||
monitor_width=$(echo "${dimensions%x*}/$scale / 1" | bc)
|
||||
monitor_height=$(echo "${dimensions#*x}/$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' ) )
|
||||
|
@ -54,8 +55,6 @@ win_width=${win_dim[0]}
|
|||
win_height=${win_dim[1]}
|
||||
deco_height=${win_dim[2]}
|
||||
|
||||
#echo "$win_height $win_width $deco_height"
|
||||
|
||||
spacing_x=5
|
||||
spacing_y=35
|
||||
new_x=$spacing_x
|
||||
|
|
Loading…
Reference in a new issue