new sensible name

This commit is contained in:
rootniformaticaservice 2023-03-19 22:46:41 -03:00
parent e30026b40b
commit 583f0a44fc
17 changed files with 103 additions and 64 deletions

30
config/names Normal file
View File

@ -0,0 +1,30 @@
arigram
audio
chat
code
config
demo
edit
emacs
files
game
group-1
group-2
group-3
group-4
mail
matrix
movie
music
paint
photo
read
reddit
script
study
system
text
tox
typing
video
web

View File

@ -4,7 +4,7 @@
# session and reload sxhkd conf##
super + shift + e
rwm_session.sh
wms_session.sh
#######
########## 1 to 9 ##################################
@ -19,8 +19,8 @@ super + 1
rt_status.sh
# browser ##
super + 2
xlinks.sh
super + {_,shift +}2
{xbrowser.sh -d,xbrowser.sh -t}
# musicplayer ##
super + 3
@ -56,11 +56,11 @@ super + Return
# rename terminal ##
super + r
rwm_termrename.sh
wms_termrename.sh
# togle terminal
super + Tab
rwm_termtogle.sh
wms_termtogle.sh
#######
########## launcher ##################################
@ -120,19 +120,19 @@ super + BackSpace
# zzz ##
super + {_,shift + }z
{windowsaver.sh,rwm_screensaver.sh}
{windowsaver.sh,wms_screensaver.sh}
#######
######### manage windows ########################################
############################
# clear desktop #
super + {_,shift +}c
rwm_clearer.sh {-c,-u}
super + c
wms_clearer.sh
## backgroundize ##
super + {_,shift +}b
rwm_backgroundize.sh {-b,-r}
wms_backgroundize.sh {-b,-r}
# kill ##
super + {_,shift +}q
@ -140,61 +140,57 @@ super + {_,shift +}q
# switch focus ##
super + space
rwm_switcher.sh
wms_switcher.sh
# focus next/prev ##
super + {n,p}
rwm_mainrole.sh {-n,-p}
wms_mainrole.sh {-n,-p}
# move ##
super + {l,h,j,k}
rwm_moveresize.sh {-r,-l,-d,-u}
wms_moveresize.sh {-r,-l,-d,-u}
# resize ##
super + shift + {l,h,j,k}
rwm_moveresize.sh {-W,-w,-H,-h}
wms_moveresize.sh {-W,-w,-H,-h}
# warp ##
super + {Up,Down,Right,Left}
rwm_moveresize.sh {-n,-s,-e,-o}
wms_moveresize.sh {-n,-s,-e,-o}
# fullsize ##
super + f
rwm_moveresize.sh -f
wms_moveresize.sh -f
######
######### layouts ########################################
###################
## monocule layout ##
super + m
rwm_layout.sh -m
## monocule / tilling / widespread ##
super + {m,t,w}
wms_usher.sh {-m,-t,-w}
# tilling layout ##
super + t
rwm_layout.sh -t
# widespread layout ##
super + w
rwm_layout.sh -w
# maximize window percentage and master area
# maximize / minimize window percentage and master area
super + {_,shift +}{minus,plus}
rwm_revalue.sh {-w,-m,-W,-M}
wms_revalue.sh {-w,-m,-W,-M}
# maximize / minimize gaps ##
super + {dead_acute,ccedilla}
wms_revalue.sh {-g,-G}
#######
########## shepperd ######################
###################
# add focused window / all windows to group ##
super + {_,shift + }a
rwm_shepperd.sh {-a,-A}
wms_shepperd.sh {-a,-A}
# delete focused window / all windows from group ##
super + {_,shift +}d
rwm_shepperd.sh {-d,-D}
wms_shepperd.sh {-d,-D}
# map / unmap groups ##
super + s
rwm_shepperd.sh -t
wms_shepperd.sh -t

12
config/wms_var Normal file
View File

@ -0,0 +1,12 @@
NAME=rootwm # wm name
TERMINAL=xterm # terminal command
XMENU=fzfmenu.sh # menu command
XMENU_XL=fzfmenu_xl.sh # large menu command
XMENU_G=60x10+300+300 # menu geometry
XMENU_XL_G=80x20+180+180 # large menu geometry
BW=2 # border width
FG=A2A6A6
BG=393D41
WP=80 # windows percentage
MP=60 # tiling master area percentage
GAP=6 # tiling gaps

View File

@ -1,6 +1,6 @@
#!/bin/sh
rwm_revalue.sh &
wms_revalue.sh &
xrdb -merge .Xresources &
@ -8,4 +8,4 @@ sxhkd &
wallpaper.sh &
exec rwm_voyeur.sh
exec wms_voyeur.sh

View File

@ -2,7 +2,7 @@
## send windows to desktop background ##
. $HOME/.config/rootwm/rwm_var
. $HOME/.config/wms/wms_var
FLAG=$1
FW=$(pfw) # focused window
@ -14,7 +14,7 @@ SH=$((RH - 2*BW)) # usable screen height
usage() {
echo "usage:
nowm_ignore.sh [ -b, -r ]
wms_backgroundize.sh [ -b, -r ]
-b) backgroundize focused window
-r) open menu and choose the window/s to restore"
}

View File

@ -2,7 +2,7 @@
## clean screen ##
. $HOME/.config/rootwm/rwm_var
. $HOME/.config/wms/wms_var
FLAG=$1
FW=$(pfw) # focused window

View File

@ -2,14 +2,14 @@
## give windows the stardom ##
. $HOME/.config/rootwm/rwm_var
. $HOME/.config/wms/wms_var
FLAG=$1
FW=$(pfw)
usage() {
echo "usage:
rwm_starship.sh [ -n, -p, -l, wid ]
wms_mainrole.sh [ -n, -p, -l, wid ]
-n) next in order stack
-p) prev in order stack
-t) focus the top window in the servers window stack

View File

@ -2,7 +2,7 @@
## move and resize windows ##
. $HOME/.config/rootwm/rwm_var
. $HOME/.config/wms/wms_var
FLAG=$1 # flag
FW=$(pfw) # focused window id
@ -15,7 +15,7 @@ SH=$((RH - 2 * BW - 2 * GAP)) # screen utilizable height
usage() {
echo "usage:
rwm_moveresize.sh [ -n, -s, -e, -o, -r, -l, -d, -u, -w, -W, -h, -H ]
wms_moveresize.sh [ -n, -s, -e, -o, -r, -l, -d, -u, -w, -W, -h, -H ]
-f) fullsize
-n) half north
-s) half south

View File

@ -1,13 +1,13 @@
#!/bin/sh
. $HOME/.config/rootwm/rwm_var
. $HOME/.config/wms/wms_var
FLAG=$1
RID=$(lsw -r) # root window id
usage() {
echo "usage:
rwm_setting.sh [ -m, -M ]
wms_revalue.sh [ -m, -M ]
-m) minimize tiling master area
-M) maximize tiling master area"
}
@ -15,34 +15,34 @@ rwm_setting.sh [ -m, -M ]
mp=$(atomx WM_MP $RID) # tiling master area percent from atom
master_inc() {
atomx WM_MP=$((mp + 5)) $RID
rwm_layout.sh -t
wms_usher.sh -t
} # 5% + calculation
master_dec() {
atomx WM_MP=$((mp - 5)) $RID
rwm_layout.sh -t
wms_usher.sh -t
} # 5% - calculation
wp=$(atomx WM_WP $RID) # windows percent size from atom
windowperc_inc() {
atomx WM_WP=$((wp + 5)) $RID
rwm_layout.sh -w
wms_usher.sh -w
} # 5% + calculation
windowperc_dec() {
atomx WM_WP=$((wp -5)) $RID
rwm_layout.sh -w
wms_usher.sh -w
} # 5% - calculation
gap=$(atomx WM_GAP $RID)
gap_inc() {
atomx WM_GAP=$((gap + 2)) $RID
rwm_layout.sh -t
wms_usher.sh -t
} # 5 + pixels gaps
gap_dec() {
atomx WM_GAP=$((gap - 2)) $RID
rwm_layout.sh -t
wms_usher.sh -t
} # 5 - pixels gaps
if [ -n "$FLAG" ]; then

View File

@ -9,14 +9,14 @@ FW=$(pfw) # focused window
SW=$(wattr w $(lsw -r)) # screen width
SH=$(wattr h $(lsw -r)) # screen height
WW=$((SW * 40 / 100)) # windows width = 80% of the screen
WH=$((SH * 40 / 100)) # windows height = 80% of the screen
WH=$((SH * 40 / 100)) # windows height = 80% of the screen
MAXX=$((SW - WW)) # max X coordinate
MAXY=$((SH - WH)) # max Y coordinate
FREQ=20 # refresh frequency
usage() {
echo "usage:
wrm.sh [ -a, -f ]
wms_screensaver.sh [ -a, -f ]
-a) all windows
-f) focused window"
}

View File

@ -2,7 +2,7 @@
## manage session and some more things ##
. $HOME/.config/rootwm/rwm_var
. $HOME/.config/wms/wms_var
KBRELOAD="pkill -usr1 -x sxhkd" # keybindings reload
LOCK="slock" # lock screen monitor

View File

@ -2,16 +2,16 @@
## sort windows by herds/flock ##
. $HOME/.config/rootwm/rwm_var
. $HOME/.config/wms/wms_var
NAMES="$HOME/.config/rootwm/names" # disponible names
NAMES="$HOME/.config/wms/wms_names" # disponible names
FLAG=$1 # input
FW=$(pfw) # focused window id
AMW=$(lsw) # all maped windows
usage() {
echo "usage:
rwm_shepperd.sh [ -a, -r, -t ]
wms_shepperd.sh [ -a, -r, -t ]
-a) add
-A) add all
-d) delete

View File

@ -2,11 +2,12 @@
## switch between windows ##
. $HOME/.config/rootwm/rwm_var
. $HOME/.config/wms/wms_var
TARGET=$(\
for wid in $(lsw); do # print id, class and name in xmenu
printf '%s\n' "$wid | $(atomx WM_CLASS $wid) | $(wname $wid)"
done | cut -c 1-100 | $XMENU | cut -d '|' -f 1)
rwm_mainrole.sh "$TARGET" # focus target
sleep 1;
wms_mainrole.sh "$TARGET" # focus target

View File

@ -2,10 +2,10 @@
## rename terminals ##
. $HOME/.config/rootwm/rwm_var
. $HOME/.config/wms/wms_var
TARGET=$(pfw) # focused window
NAMES="$HOME/.config/rootwm/names"
NAMES="$HOME/.config/wms/wms_names"
if [ "$(atomx WM_CLASS $TARGET)" = "$TERMINAL" ]; then # if any terminal is focused
atomx WM_NAME="$($XMENU < $NAMES)" $TARGET # change atom name

View File

@ -2,7 +2,7 @@
## toggle between terminals ##
. $HOME/.config/rootwm/rwm_var
. $HOME/.config/wms/wms_var
TNAME=$(echo $TERMINAL | cut -d ' ' -f 1) # terminal name
@ -11,5 +11,5 @@ TARGET=$(
printf '%s\n' "$wid $(atomx WM_CLASS $wid)"
done | grep "$TNAME" | cut -d ' ' -f 1 | head -n 1)
rwm_mainrole.sh $TARGET # focus terminal
wms_mainrole.sh $TARGET # focus terminal

View File

@ -2,7 +2,7 @@
## some layouts to order the windows ##
. $HOME/.config/rootwm/rwm_var
. $HOME/.config/wms/wms_var
FLAG=$1 # input
RID=$(lsw -r) # root window id
@ -15,7 +15,7 @@ SH=$((RH - 2 * BW)) # usable screen height
usage() {
echo "usage:
rwm_layout.sh [ -m, -t, -w ]
wms_usher.sh [ -m, -t, -w ]
-m) monucule
-t) tiled
-w) widespread"

View File

@ -5,11 +5,11 @@
wew | while read ev wid args; do
case $ev in
MAP) # focus on mappng requests
wattr o $wid || rwm_mainrole.sh -t
wattr o $wid || wms_mainrole.sh -t
;;
UNMAP) # focus the top window in the servers window stack
if [ ! "$(pfw)" ]; then
rwm_mainrole.sh -t
wms_mainrole.sh -t
fi
;;
esac