diff --git a/art/rootwm.png b/art/rootwm.png new file mode 100644 index 0000000..4d1f5b7 Binary files /dev/null and b/art/rootwm.png differ diff --git a/rwm_gaps.sh b/rwm_gaps.sh new file mode 100755 index 0000000..d60dc82 --- /dev/null +++ b/rwm_gaps.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +## gaps for tiling arrangement? NFW! ## +## I made this script just for compromise ## +## It made me so sick that I preferred to segregate the calculation from rwm_arrangement.sh ## +## If it is of interest to you, forgive me and please add it. ## +## Also this is a dumb way to do it. The implementation in rwm_arrangement.sh is very different ## + + +FLAG=$1 +GAPS=$2 # gaps value. can also be: GAPS=$(atomx WM_GAPS $RID) or just GAPS=some_value + +RID=$(lsw -r) # root window id +MV=$GAPS # move value +RS=$((GAPS * 2)) # resize value + +if [ "$GAPS" -ge 1 ]; then # if gaps is greater than zero + for w in $(lsw); do + case $FLAG in + -i) # increase gaps + wmv $MV $MV $w # move window + wrs -$RS -$RS $w # resize window + ;; + -d) # decrease gaps + wmv -$MV -$MV $w + wrs $RS $RS $w + ;; + esac + done +fi