New backup 2025-12-31 10:30:02
This commit is contained in:
parent
bef08591f9
commit
a5a17866e9
1 changed files with 4 additions and 2 deletions
|
|
@ -1,11 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
active_window_type="$(swaymsg -t get_tree | jq -r '.. | select(.type?) | select(.focused==true).type')"
|
||||
swaymsg floating toggle
|
||||
active_window_scratchstate="$(swaymsg -t get_tree | jq -r '.. | select(.type?) | select(.focused==true).type')"
|
||||
if [[ "${active_window_type}" == "floating_con" ]];then
|
||||
if [[ "${active_window_type}" == "con" ]];then
|
||||
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}
|
||||
if [[ "${active_screen_width}" -gt "${active_screen_height}" ]];then
|
||||
swaymsg resize set 50ppt 50ppt
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue