This commit is contained in:
rootniformaticaservice 2023-03-14 00:51:11 -03:00
parent 7c0de5922b
commit 1750386f20
3 changed files with 36 additions and 65 deletions

View file

@ -12,4 +12,30 @@ https://git.disroot.org/root_sti/nowm.git
This one is designed to maintain and incorporate from that one, things that are essential for my workflow. Also, this must contain future experiments around the configuration of my scripts, using and taking advantage of the modification and addition of atoms in root window.
I am learning, discovering, experimenting. This makes these scripts very volatile.
**My thanks and credits to the wmutils project. I wish you luck on your way.**
**My thanks and credits to the wmutils project. I wish you luck on your way.**
**FEATURES:**
· switch windows with menú.
-next / prev / wid.
· window border colors.
· move / resize windows.
-fullsize.
-half screen (north, south, est, west).
· clear desktop.
· herds (group windows by herd).
-add individual window.
-add all windows.
-togle herds.
· layouts / arrangements.
-monocule.
-widespread.
-tiled.
· resize windows percentage.
· resize master area in tiling mode.

View file

@ -1,55 +0,0 @@
#!/bin/sh
## send windows to desktop background ##
. $HOME/.config/rootwm/rwm_var
FLAG=$1
FW=$(pfw) # focused window
RID=$(lsw -r) # root widnow id
RW=$(wattr w $RID) # root width
RH=$(wattr h $RID) # root height
SW=$((RW - 2*BW)) # usable screen width
SH=$((RH - 2*BW)) # usable screen height
usage() {
echo "usage:
nowm_ignore.sh [ -b, -r ]
-b) backgroundize focused window
-r) open menu and choose the window/s to restore"
}
# send windows to background
background() {
if [ ! "$(wattr o $FW && echo 1)" ]; then # if override is not set
wtp 0 0 $SW $SH $FW
ignw -s $FW # ignore focused window
chwb -c 000000 $FW # change border color to ignore
else
ignw -r $FW # unignore focused window
chwb -c $FG $FW # change border color to active
fi
}
# restore windows from background
restore() {
if [ -n "$(lsw -o)" ]; then
otarget=$(for wid in $(lsw -o); do # override target
printf '%s\n' "$wid | $(atomx WM_CLASS $wid) | $(wname $wid)"
done | cut -c 1-100 | $XMENU | cut -d ' ' -f 1)
ignw -r $otarget # unignore otarget
fi
}
case $FLAG in
-b)
background
;;
-r)
restore
;;
*)
usage
;;
esac

View file

@ -14,13 +14,13 @@ SH=$((RH - 2*BW)) # usable screen height
usage() {
echo "usage:
nowm_ignore.sh [ -i, -u ]
-i) ignore focused window
-u) open menu and choose the window/s to unignore"
nowm_ignore.sh [ -b, -r ]
-b) backgroundize focused window
-r) open menu and choose the window/s to restore"
}
# send windows to background
ignore() {
background() {
if [ ! "$(wattr o $FW && echo 1)" ]; then # if override is not set
wtp 0 0 $SW $SH $FW
ignw -s $FW # ignore focused window
@ -33,7 +33,7 @@ ignore() {
}
# restore windows from background
unignore() {
restore() {
if [ -n "$(lsw -o)" ]; then
otarget=$(for wid in $(lsw -o); do # override target
printf '%s\n' "$wid | $(atomx WM_CLASS $wid) | $(wname $wid)"
@ -43,11 +43,11 @@ unignore() {
}
case $FLAG in
-i)
ignore
-b)
background
;;
-u)
unignore
-r)
restore
;;
*)
usage