New backup 2025-12-31 11:45:02
This commit is contained in:
parent
37e1d5c45e
commit
f0ef911303
3 changed files with 6 additions and 13 deletions
|
|
@ -4,7 +4,7 @@ bindsym {
|
|||
#terminal
|
||||
$mod+Return exec $term
|
||||
#floating terminal
|
||||
$mod+Shift+Return exec $HOME/.config/sway/scripts/exec-float $term floating toggle
|
||||
$mod+Shift+Return exec $HOME/.config/sway/scripts/exec-float $term
|
||||
#launcher
|
||||
$mod+d exec $menu
|
||||
#launcher reload
|
||||
|
|
|
|||
|
|
@ -13,19 +13,12 @@ else
|
|||
win_width=$(( active_screen_width * 60 / 100 ))
|
||||
win_height=$(( win_width * 57 / 100 ))
|
||||
fi
|
||||
swaymsg "[pid=$pid]" "floating enable, resize set ${win_width}px ${win_height}px, move position center"
|
||||
swaymsg "[pid=$pid]" "floating enable, resize set ${win_width}px ${win_height}px"
|
||||
while [ "$?" = "2" ];do
|
||||
swaymsg "[pid=$pid]" "floating enable, resize set ${win_width}px ${win_height}px, move position center"
|
||||
swaymsg "[pid=$pid]" "floating enable, resize set ${win_width}px ${win_height}px"
|
||||
done
|
||||
swaymsg -t get_tree | jq ".. | select(.type?) | select(.pid==${pid})"
|
||||
sleep 2
|
||||
swaymsg -t get_tree | jq ".. | select(.type?) | select(.pid==${pid})"
|
||||
exit
|
||||
swaymsg -t get_tree | jq ".. | select(.type?) | select((.pid==${pid}) and (.type==\"floating_con\")).id" | grep ''
|
||||
swaymsg -t get_tree | jq ".. | select(.type?) | select((.pid==${pid}) and (.rect.height==${win_height} | not)).id" | grep ''
|
||||
while [ "$?" = "1" ];do
|
||||
swaymsg -t get_tree | jq ".. | select(.type?) | select((.pid==${pid}) and (.type==\"floating_con\")).id" | grep ''
|
||||
swaymsg -t get_tree | jq ".. | select(.type?) | select((.pid==${pid}) and (.rect.height==${win_height} | not)).id" | grep ''
|
||||
done
|
||||
#sleep 0.1
|
||||
swaymsg "[pid=$pid]" "resize set ${win_width}px ${win_height}px, move position center"
|
||||
#echo "floating enable, resize set ${win_width}px ${win_height}px"
|
||||
#sleep 0.3;swaymsg -t get_tree | jq -r '.. | select(.type?) | select(.focused).window_rect'
|
||||
|
|
|
|||
|
|
@ -15,5 +15,5 @@ if [[ "${active_window_type}" == "con" ]];then
|
|||
win_width=$(( active_screen_width * 60 / 100 ))
|
||||
win_height=$(( win_width * 57 / 100 ))
|
||||
fi
|
||||
swaymsg resize set "${win_width}px" "${win_height}px"
|
||||
swaymsg "resize set ${win_width}px ${win_height}px, move position center"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue