New backup 2025-12-31 11:00:02
This commit is contained in:
parent
bd8f092e3d
commit
3c0833f0fc
2 changed files with 23 additions and 3 deletions
|
|
@ -1,8 +1,20 @@
|
|||
#!/bin/sh
|
||||
eval "$1 &"
|
||||
pid=$!
|
||||
echo $pid; shift
|
||||
swaymsg "[pid=$pid]" "$@"
|
||||
echo $pid
|
||||
|
||||
active_screen_dim="$(swaymsg -t get_outputs | jq -r '.. | select(.type?) | select(.focused==true).rect')"
|
||||
active_screen_width="$(jq '.width' <<<${active_screen_dim})"
|
||||
active_screen_height="$(jq '.height' <<<${active_screen_dim})"
|
||||
if [[ "${active_screen_width}" -gt "${active_screen_height}" ]];then
|
||||
win_height=$(( active_screen_height * 60 / 100 ))
|
||||
win_width=$(( win_height * 175 / 100 ))
|
||||
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"
|
||||
while [ "$?" = "2" ];do
|
||||
swaymsg "[pid=$pid]" "$@"
|
||||
swaymsg "[pid=$pid]" "floating enable, resize set ${win_width}px ${win_height}px"
|
||||
done
|
||||
|
|
|
|||
8
de/home/.config/sway/scripts/exec-float.bak
Executable file
8
de/home/.config/sway/scripts/exec-float.bak
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
eval "$1 &"
|
||||
pid=$!
|
||||
echo $pid; shift
|
||||
swaymsg "[pid=$pid]" "$@"
|
||||
while [ "$?" = "2" ];do
|
||||
swaymsg "[pid=$pid]" "$@"
|
||||
done
|
||||
Loading…
Add table
Reference in a new issue