Source file modification.
This commit is contained in:
parent
8e8b0922df
commit
e5b2cad050
14 changed files with 28 additions and 31 deletions
|
@ -1,4 +1,4 @@
|
|||
wms_value.sh &
|
||||
cp $HOME/.config/wms/mws_var /tmp/wms_var &
|
||||
|
||||
xrdb -merge .Xresources &
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
## send windows to desktop background ##
|
||||
## it depends of wms_mainrole.sh ##
|
||||
|
||||
. $HOME/.config/wms/wms_var
|
||||
. /tmp/wms_var
|
||||
|
||||
FLAG=$1
|
||||
FW=$(pfw) # focused window
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
## alternating window border colors depending on battery charge ##
|
||||
## this script depends on power.sh which is in the /others repo ##
|
||||
|
||||
. $HOME/.config/wms/wms_var
|
||||
. /tmp/wms_var
|
||||
|
||||
FREQ=0.5 # freq
|
||||
COLORS="aa0000 $AC" # alternate colors
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## clean screen ##
|
||||
|
||||
. $HOME/.config/wms/wms_var
|
||||
. /tmp/wms_var
|
||||
|
||||
FLAG=$1
|
||||
FW=$(pfw) # focused window
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## give windows the stardom ##
|
||||
|
||||
. $HOME/.config/wms/wms_var
|
||||
. /tmp/wms_var
|
||||
|
||||
FLAG=$1
|
||||
FW=$(pfw)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## move and resize windows ##
|
||||
|
||||
. $HOME/.config/wms/wms_var
|
||||
. /tmp/wms_var
|
||||
|
||||
FLAG=$1 # flag
|
||||
FW=$(pfw) # focused window id
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## use the windows on the desktop as screensavers by moving them randomly
|
||||
|
||||
. $HOME/.config/wms/wms_var
|
||||
. /tmp/wms_var
|
||||
|
||||
INPUT=$1 # input
|
||||
FW=$(pfw) # focused window
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
|
||||
## manage session and some more things ##
|
||||
|
||||
. $HOME/.config/wms/wms_var
|
||||
. /tmp/wms_var
|
||||
|
||||
KBRELOAD="pkill -usr1 -x sxhkd" # keybindings reload
|
||||
LOCK="slock" # lock screen monitor
|
||||
MOFF="xset dpms force off" # poweroff monitor
|
||||
HB="doas pm-hibernate" # hibernate
|
||||
HB="doas zzz -Z" # hibernate
|
||||
RB="doas shutdown -r now" # reboot
|
||||
POFF="doas shutdown -h now" # poweroff
|
||||
EXIT="pkill wew && pkill sxhkd" # exit session
|
||||
PROMPT="reload-key\nlock\nmonitor-off\nhalt\nreboot\nsuspend\nlogout"
|
||||
PROMPT="reload-key\nlock\nmonitor-off\nhalt\nreboot\nhibernate\nexit"
|
||||
|
||||
option=`echo $PROMPT | $XMENU`
|
||||
if [ ${#option} -gt 0 ]; then
|
||||
|
@ -25,7 +25,7 @@ if [ ${#option} -gt 0 ]; then
|
|||
monitor-off)
|
||||
$MOFF
|
||||
;;
|
||||
suspend)
|
||||
hibernate)
|
||||
$HB
|
||||
;;
|
||||
halt)
|
||||
|
@ -34,7 +34,7 @@ if [ ${#option} -gt 0 ]; then
|
|||
reboot)
|
||||
$RB
|
||||
;;
|
||||
logout)
|
||||
exit)
|
||||
$EXIT
|
||||
;;
|
||||
*)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## sort windows by herds/flock ##
|
||||
|
||||
. $HOME/.config/wms/wms_var
|
||||
. /tmp/wms_var
|
||||
|
||||
FLAG=$1 # input
|
||||
FW=$(pfw) # focused window id
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## switch between windows ##
|
||||
|
||||
. $HOME/.config/wms/wms_var
|
||||
. /tmp/wms_var
|
||||
|
||||
TARGET=$(\
|
||||
for wid in $(lsw); do # print id, class and name in xmenu
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## rename terminals ##
|
||||
|
||||
. $HOME/.config/wms/wms_var
|
||||
. /tmp/wms_var
|
||||
|
||||
TARGET=$(pfw) # focused window
|
||||
NAMES="$HOME/.config/wms/wms_names"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## toggle between terminals ##
|
||||
|
||||
. $HOME/.config/wms/wms_var
|
||||
. /tmp/wms_var
|
||||
|
||||
TNAME=$(echo $TERMINAL | cut -d ' ' -f 1) # terminal name
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## some layouts to order the windows ##
|
||||
|
||||
. $HOME/.config/wms/wms_var
|
||||
. /tmp/wms_var
|
||||
|
||||
FLAG=$1 # input
|
||||
RID=$(lsw -r) # root window id
|
||||
|
|
25
wms_value.sh
25
wms_value.sh
|
@ -1,9 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
. $HOME/.config/wms/wms_var
|
||||
. /tmp/wms_var
|
||||
|
||||
FLAG=$1
|
||||
RID=$(lsw -r) # root window id
|
||||
WMSVAR="/tmp/wms_var"
|
||||
|
||||
usage() {
|
||||
cat<<EOF
|
||||
|
@ -14,32 +15,30 @@ wms_revalue.sh [ -m, -M ]
|
|||
EOF
|
||||
}
|
||||
|
||||
mp=$(atomx WM_MP $RID) # tiling master area percent from atom
|
||||
master_inc() {
|
||||
if [ $mp -le 80 ]; then
|
||||
atomx WM_MP=$((mp + 5)) $RID
|
||||
if [ $MP -le 80 ]; then
|
||||
sed -i "s/^.*\bMP=\b.*$/MP=$((mp + 5))/" $WMSVAR
|
||||
wms_usher.sh -t
|
||||
fi
|
||||
} # 5% + calculation
|
||||
|
||||
master_dec() {
|
||||
if [ $mp -ge 20 ]; then
|
||||
atomx WM_MP=$((mp - 5)) $RID
|
||||
if [ $MP -ge 20 ]; then
|
||||
sed -i "s/^.*\bMP=\b.*$/MP=$((mp - 5))/" $WMSVAR
|
||||
wms_usher.sh -t
|
||||
fi
|
||||
} # 5% - calculation
|
||||
|
||||
wp=$(atomx WM_WP $RID) # windows percent size from atom
|
||||
windowperc_inc() {
|
||||
if [ $wp -le 90 ]; then
|
||||
atomx WM_WP=$((wp + 5)) $RID
|
||||
if [ $WP -le 90 ]; then
|
||||
sed -i "s/^.*\bWP=\b.*$/WP=$((wp + 5))/" $WMSVAR
|
||||
wms_usher.sh -w
|
||||
fi
|
||||
} # 5% + calculation
|
||||
|
||||
windowperc_dec() {
|
||||
if [ $wp -ge 60 ]; then
|
||||
atomx WM_WP=$((wp -5)) $RID
|
||||
if [ $WP -ge 60 ]; then
|
||||
sed -i "s/^.*\bWP=\b.*$/WP=$((wp + 5))/" $WMSVAR
|
||||
wms_usher.sh -w
|
||||
fi
|
||||
} # 5% - calculation
|
||||
|
@ -64,9 +63,7 @@ if [ -n "$FLAG" ]; then
|
|||
esac
|
||||
|
||||
else
|
||||
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
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue