New backup 2025-07-14 12:15:07
This commit is contained in:
parent
d98fb66848
commit
60599409f0
1 changed files with 10 additions and 1 deletions
|
@ -1,3 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
swaymsg scratchpad show
|
active_window_type="$(swaymsg -t get_tree | jq -r '.. | select(.type?) | select(.focused==true).type')"
|
||||||
|
if [[ "${active_window_type}" == "floating_con" ]];then
|
||||||
|
echo 'active window is floating'
|
||||||
|
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})"
|
||||||
|
echo ${active_screen_width}
|
||||||
|
echo ${active_screen_height}
|
||||||
|
fi
|
||||||
|
#swaymsg scratchpad show
|
||||||
|
|
Loading…
Add table
Reference in a new issue