This commit is contained in:
rootniformaticaservice 2023-03-08 00:10:19 -03:00
parent 51d458a88b
commit ba9d2a2d65
2 changed files with 14 additions and 16 deletions

View file

@ -21,14 +21,14 @@ rwm_layout.sh [ -m, -t, -w ]
-w) widespread"
}
if [ -n "$FW" ]; then
if [ -n "$FW" ]; then # if there is a focused window
case $FLAG in
-m) # all windows at full screen
for wid in $(lsw); do
wtp 0 0 $SW $SH $wid
done
;;
-t) # master and stack
-t) # tiling. Master and stack
wunfocus=$((CMW - 1)) # count unfocused windows
mp=$(atomx WM_MP $RID) # tiling master area percentage
master=$((SW * mp / 100)) # tilling master area
@ -38,7 +38,7 @@ if [ -n "$FW" ]; then
wstack=$((SW - master)) # stack width
hstack=$(((SH - (wunfocus - 1) * 2*BW) / wunfocus)) # stack heigth
wtp 0 0 $wmaster $SH $FW # focused window in master
wtp 0 0 $wmaster $SH $FW # put focused window as master
for wid in $(lsw | grep -v $FW); do # unfocused windows in stack
wtp $xstack $ystack $wstack $hstack $wid

View file

@ -1,7 +1,5 @@
#!/bin/sh
## change variables contained between the qualities of root window ##
. $HOME/.config/rootwm/rwm_var
FLAG=$1
@ -18,36 +16,36 @@ mp=$(atomx WM_MP $RID) # tiling master area percent from atom
master_inc() {
atomx WM_MP=$((mp + 5)) $RID
rwm_arrangement.sh -t
} # increase master area percent
} # 5% + calculation
master_dec() {
atomx WM_MP=$((mp - 5)) $RID
rwm_arrangement.sh -t
} # decrease master area percent
} # 5% - calculation
wp=$(atomx WM_WP $RID) # windows percent size from atom
windowperc_inc() {
atomx WM_WP=$((wp + 5)) $RID
rwm_arrangement.sh -w
} # increase windows percent size
} # 5% + calculation
windowperc_dec() {
atomx WM_WP=$((wp -5)) $RID
rwm_arrangement.sh -w
} # decrease windows percent size
} # 5% - calculation
if [ -n "$FLAG" ]; then
case $FLAG in
-m) # minimize tiling master area
-m) # reduce tiling master area
master_dec
;;
-M) # maximize tiling master area
-M) # increase tiling master area
master_inc
;;
-w) # minimize window size
-w) # reduce window size
windowperc_dec
;;
-W) # maximize window size
-W) # increase window size
windowperc_inc
;;
*)
@ -56,9 +54,9 @@ if [ -n "$FLAG" ]; then
esac
else
atomx WM_NAME=$NAME $RID
atomx WM_WP=$WP $RID
atomx WM_MP=$MP $RID
atomx WM_NAME=$NAME $RID # set root window name
atomx WM_WP=$WP $RID # set window percent atom
atomx WM_MP=$MP $RID # set tiling master area percent atom
fi