Limits on values
This commit is contained in:
parent
6aea2e7bdf
commit
317bdc5ff2
1 changed files with 24 additions and 12 deletions
36
wms_value.sh
36
wms_value.sh
|
@ -14,35 +14,47 @@ wms_revalue.sh [ -m, -M ]
|
||||||
|
|
||||||
mp=$(atomx WM_MP $RID) # tiling master area percent from atom
|
mp=$(atomx WM_MP $RID) # tiling master area percent from atom
|
||||||
master_inc() {
|
master_inc() {
|
||||||
atomx WM_MP=$((mp + 5)) $RID
|
if [ $mp -le 80 ]; then
|
||||||
wms_usher.sh -t
|
atomx WM_MP=$((mp + 5)) $RID
|
||||||
|
wms_usher.sh -t
|
||||||
|
fi
|
||||||
} # 5% + calculation
|
} # 5% + calculation
|
||||||
|
|
||||||
master_dec() {
|
master_dec() {
|
||||||
atomx WM_MP=$((mp - 5)) $RID
|
if [ $mp -ge 20 ]; then
|
||||||
wms_usher.sh -t
|
atomx WM_MP=$((mp - 5)) $RID
|
||||||
|
wms_usher.sh -t
|
||||||
|
fi
|
||||||
} # 5% - calculation
|
} # 5% - calculation
|
||||||
|
|
||||||
wp=$(atomx WM_WP $RID) # windows percent size from atom
|
wp=$(atomx WM_WP $RID) # windows percent size from atom
|
||||||
windowperc_inc() {
|
windowperc_inc() {
|
||||||
atomx WM_WP=$((wp + 5)) $RID
|
if [ $wp -le 90 ]; then
|
||||||
wms_usher.sh -w
|
atomx WM_WP=$((wp + 5)) $RID
|
||||||
|
wms_usher.sh -w
|
||||||
|
fi
|
||||||
} # 5% + calculation
|
} # 5% + calculation
|
||||||
|
|
||||||
windowperc_dec() {
|
windowperc_dec() {
|
||||||
atomx WM_WP=$((wp -5)) $RID
|
if [ $wp -ge 60 ]; then
|
||||||
wms_usher.sh -w
|
atomx WM_WP=$((wp -5)) $RID
|
||||||
|
wms_usher.sh -w
|
||||||
|
fi
|
||||||
} # 5% - calculation
|
} # 5% - calculation
|
||||||
|
|
||||||
gap=$(atomx WM_GAP $RID)
|
gap=$(atomx WM_GAP $RID)
|
||||||
gap_inc() {
|
gap_inc() {
|
||||||
atomx WM_GAP=$((gap + 2)) $RID
|
if [ $gap -le 50 ]; then
|
||||||
wms_usher.sh -t
|
atomx WM_GAP=$((gap + 2)) $RID
|
||||||
|
wms_usher.sh -t
|
||||||
|
fi
|
||||||
} # 5 + pixels gaps
|
} # 5 + pixels gaps
|
||||||
|
|
||||||
gap_dec() {
|
gap_dec() {
|
||||||
atomx WM_GAP=$((gap - 2)) $RID
|
if [ $gap -ge 2 ]; then
|
||||||
wms_usher.sh -t
|
atomx WM_GAP=$((gap - 2)) $RID
|
||||||
|
wms_usher.sh -t
|
||||||
|
fi
|
||||||
} # 5 - pixels gaps
|
} # 5 - pixels gaps
|
||||||
|
|
||||||
if [ -n "$FLAG" ]; then
|
if [ -n "$FLAG" ]; then
|
||||||
|
|
Loading…
Reference in a new issue