code changes
This commit is contained in:
parent
c860699afd
commit
751761aa33
9 changed files with 294 additions and 222 deletions
200
config/sxhkdrc_example
Executable file
200
config/sxhkdrc_example
Executable file
|
@ -0,0 +1,200 @@
|
|||
##############################
|
||||
######## rootwm hotkeys ###################################
|
||||
###################################
|
||||
|
||||
# session and reload sxhkd conf##
|
||||
super + shift + e
|
||||
rwm_session.sh
|
||||
|
||||
#######
|
||||
########## 1 to 9 ##################################
|
||||
######################
|
||||
|
||||
# open
|
||||
super + 0
|
||||
xopen.sh
|
||||
|
||||
# status ##
|
||||
super + 1
|
||||
rt_status.sh
|
||||
|
||||
# browser ##
|
||||
super + 2
|
||||
xlinks.sh
|
||||
|
||||
# musicplayer ##
|
||||
super + 3
|
||||
musicplayer.sh
|
||||
|
||||
# podcastplayer ##
|
||||
super + 4
|
||||
podcastplayer.sh
|
||||
|
||||
# capturemedia ##
|
||||
super + 5
|
||||
capturemedia.sh
|
||||
|
||||
# clock ##
|
||||
super + 6
|
||||
xclock.sh
|
||||
|
||||
# keymap ##
|
||||
super + 8
|
||||
rwm_keymap.sh
|
||||
|
||||
# status ##
|
||||
super + 9
|
||||
herbe_status.sh
|
||||
|
||||
#######
|
||||
########## terminal ############################################
|
||||
#######################
|
||||
|
||||
# terminal ##
|
||||
super + Return
|
||||
xterm -bc -ti vt340
|
||||
|
||||
# rename terminal ##
|
||||
super + r
|
||||
rwm_termrename.sh
|
||||
|
||||
# togle terminal
|
||||
super + Tab
|
||||
rwm_termtogle.sh
|
||||
|
||||
#######
|
||||
########## launcher ##################################
|
||||
######################
|
||||
|
||||
# program launcher ##
|
||||
super + {_,shift +}Menu
|
||||
{fzflauncher.sh, dmenu_run.sh}
|
||||
|
||||
########## proces ###################
|
||||
|
||||
# proces ##
|
||||
super + period
|
||||
proces.sh
|
||||
|
||||
#######
|
||||
########## volume ##################
|
||||
###################
|
||||
|
||||
# volume ##
|
||||
XF86AudioRaiseVolume
|
||||
volup.sh
|
||||
|
||||
XF86AudioLowerVolume
|
||||
voldown.sh
|
||||
|
||||
XF86AudioMute
|
||||
xterm -e alsamixer
|
||||
|
||||
########
|
||||
########## screenshot #####################################
|
||||
#######################
|
||||
|
||||
# screenshot ##
|
||||
Print
|
||||
screenshot.sh
|
||||
|
||||
#######
|
||||
########## clipboard ##################################
|
||||
#######################
|
||||
|
||||
# copi to clipboard ##
|
||||
super + x
|
||||
xtoclip.sh
|
||||
|
||||
#######
|
||||
########## locker #################
|
||||
####################
|
||||
|
||||
# lock screen ##
|
||||
super + BackSpace
|
||||
slock
|
||||
|
||||
####
|
||||
###### saver #######################
|
||||
################
|
||||
|
||||
# zzz ##
|
||||
super + {_,shift + }z
|
||||
{windowsaver.sh,rwm_screensaver.sh}
|
||||
|
||||
#######
|
||||
######### manage windows ########################################
|
||||
############################
|
||||
|
||||
# clear desktop #
|
||||
super + c
|
||||
rwm_clearer.sh
|
||||
|
||||
## backgroundize ##
|
||||
super + {_,shift +}b
|
||||
rwm_backgroundize.sh {-i,-u}
|
||||
|
||||
# kill ##
|
||||
super + {_,shift +}q
|
||||
{killw $(pfw),pkill $(wname $(pfw))}
|
||||
|
||||
# switch focus ##
|
||||
super + space
|
||||
rwm_switcher.sh
|
||||
|
||||
# focus next/prev ##
|
||||
super + {n,p}
|
||||
rwm_mainrole.sh {-n,-p}
|
||||
|
||||
# move ##
|
||||
super + {l,h,j,k}
|
||||
rwm_moveresize.sh {-r,-l,-d,-u}
|
||||
|
||||
# resize ##
|
||||
super + shift + {l,h,j,k}
|
||||
rwm_moveresize.sh {-W,-w,-H,-h}
|
||||
|
||||
# warp ##
|
||||
super + {Up,Down,Right,Left}
|
||||
rwm_moveresize.sh {-n,-s,-e,-o}
|
||||
|
||||
# fullsize ##
|
||||
super + f
|
||||
rwm_moveresize.sh -f
|
||||
|
||||
######
|
||||
######### layouts ########################################
|
||||
###################
|
||||
|
||||
## monocule layout ##
|
||||
super + m
|
||||
rwm_layout.sh -m
|
||||
|
||||
# tilling layout ##
|
||||
super + t
|
||||
rwm_layout.sh -t
|
||||
|
||||
# widespread layout ##
|
||||
super + w
|
||||
rwm_layout.sh -w
|
||||
|
||||
# maximize window percentage and master area
|
||||
super + {_,shift +}{minus,plus}
|
||||
rwm_revalue.sh {-w,-m,-W,-M}
|
||||
|
||||
#######
|
||||
########## shepperd ######################
|
||||
###################
|
||||
|
||||
# add focused window / all windows to group ##
|
||||
super + {_,shift + }a
|
||||
rwm_shepperd.sh {-a,-A}
|
||||
|
||||
# delete focused window / all windows from group ##
|
||||
super + {_,shift +}d
|
||||
rwm_shepperd.sh {-d,-D}
|
||||
|
||||
# map / unmap groups ##
|
||||
super + s
|
||||
rwm_shepperd.sh -t
|
||||
|
|
@ -1,213 +0,0 @@
|
|||
####################################
|
||||
######## wm independent hotkeys ###################################
|
||||
####################################
|
||||
|
||||
# reload hotkeys ##
|
||||
|
||||
# session ##
|
||||
super + shift + e
|
||||
rwm_session.sh
|
||||
|
||||
########################
|
||||
########## 1 to 9 ##################################
|
||||
########################
|
||||
|
||||
# open
|
||||
super + 0
|
||||
xopen.sh
|
||||
|
||||
# status ##
|
||||
super + 1
|
||||
root_status.sh
|
||||
|
||||
# browser ##
|
||||
super + 2
|
||||
xlinks.sh
|
||||
|
||||
# musicplayer ##
|
||||
super + 3
|
||||
musicplayer.sh
|
||||
|
||||
# podcastplayer ##
|
||||
super + 4
|
||||
podcastplayer.sh
|
||||
|
||||
# clock ##
|
||||
super + 5
|
||||
xclock.sh
|
||||
|
||||
# capturemedia ##
|
||||
super + 6
|
||||
capturemedia.sh
|
||||
|
||||
# rainbow ##
|
||||
super + 7
|
||||
rainbow.sh
|
||||
|
||||
# fetch ##
|
||||
super + 8
|
||||
root_fetch.sh
|
||||
|
||||
# keymap ##
|
||||
super + 9
|
||||
herbe_status.sh
|
||||
|
||||
####################
|
||||
########## tools ############################################
|
||||
####################
|
||||
|
||||
# terminal/focus ##
|
||||
super + Return
|
||||
xterm -bc -ti vt340
|
||||
|
||||
# rename terminal ##
|
||||
super + r
|
||||
rwm_terminalrename.sh
|
||||
|
||||
# togle
|
||||
super + Tab
|
||||
rwm_terminaltogle.sh
|
||||
|
||||
#################################################
|
||||
|
||||
# program launcher ##
|
||||
super + {_,shift +}Menu
|
||||
{xlauncher.sh, dmenu_run.sh}
|
||||
|
||||
####################################
|
||||
|
||||
# proces ##
|
||||
super + period
|
||||
proces.sh
|
||||
|
||||
#################################
|
||||
|
||||
# volume ##
|
||||
XF86AudioRaiseVolume
|
||||
volup.sh
|
||||
|
||||
XF86AudioLowerVolume
|
||||
voldown.sh
|
||||
|
||||
XF86AudioMute
|
||||
xterm -e alsamixer
|
||||
|
||||
###################################################
|
||||
|
||||
# screenshot ##
|
||||
Print
|
||||
screenshot.sh
|
||||
|
||||
################################################
|
||||
|
||||
# copi to clipboard ##
|
||||
super + x
|
||||
xtoclip.sh
|
||||
|
||||
###############################
|
||||
|
||||
# lock screen ##
|
||||
super + BackSpace
|
||||
slock
|
||||
|
||||
#############################
|
||||
######### manage windows ########################################
|
||||
#############################
|
||||
|
||||
# maximize ##
|
||||
super + f
|
||||
rwm_maximize.sh
|
||||
|
||||
# monocule layout ##
|
||||
super + m
|
||||
rwm_layout.sh -m
|
||||
|
||||
# tilling layout ##
|
||||
super + t
|
||||
rwm_layout.sh -t
|
||||
|
||||
# maximize master area
|
||||
super + {dead_acute,ccedilla}
|
||||
rwm_settings.sh {-m,-M}
|
||||
|
||||
# widespread layout ##
|
||||
super + w
|
||||
rwm_layout.sh -w
|
||||
|
||||
##################################################################
|
||||
|
||||
# kill ##
|
||||
super + {_,shift +}q
|
||||
{killw $(pfw),pkill $(wname $(pfw))}
|
||||
|
||||
# switch focus ##
|
||||
super + space
|
||||
rwm_switchfocus.sh
|
||||
|
||||
# focus next/prev ##
|
||||
super + {n,p}
|
||||
rwm_starship.sh {-n,-p}
|
||||
|
||||
# zzz ##
|
||||
super + {_,shift + }z
|
||||
{windowsaver.sh,windowblur.sh}
|
||||
|
||||
########################################################################################
|
||||
|
||||
# move ##
|
||||
super + {l,h,j,k}
|
||||
rwm_moveresize.sh {-r,-l,-d,-u}
|
||||
|
||||
# resize ##
|
||||
super + shift + {l,h,j,k}
|
||||
rwm_moveresize.sh {-W,-w,-H,-h}
|
||||
|
||||
# warp ##
|
||||
alt + {y,u,b,n}
|
||||
wmv -a {0 0,1280 0,0 800,1280 800} $(pfw)
|
||||
|
||||
#######################
|
||||
########## groups ######################
|
||||
######################
|
||||
|
||||
# add focused window / all windows to group ##
|
||||
super + {_,shift + }a
|
||||
rwm_groups.sh {-a,-A}
|
||||
|
||||
# delete focused window / all windows from group ##
|
||||
super + {_,shift +}d
|
||||
rwm_groups.sh {-d,-D}
|
||||
|
||||
# map / unmap groups ##
|
||||
super + g
|
||||
rwm_groups.sh -t
|
||||
|
||||
######################
|
||||
########## mourse ##########################################
|
||||
######################
|
||||
|
||||
# mose click ##
|
||||
# super + {8,9,0}
|
||||
# xdotool click {1,2,3}
|
||||
|
||||
################################
|
||||
|
||||
# mouse move relative left ##
|
||||
super + {_,shift + }Left
|
||||
wmp -{r -- -20 0,r -- -200 0}
|
||||
|
||||
# mouse move relative right ##
|
||||
super + {_,shift + }Right
|
||||
wmp -{r 20 0,r 200 0}
|
||||
|
||||
# mouse move relative up ##
|
||||
super + {_,shift + }Up
|
||||
wmp -{r 0 -20,r 0 -200}
|
||||
|
||||
# mouse move relative down ##
|
||||
super + {_,shift + }Down
|
||||
wmp -{r 0 20,r 0 200}
|
||||
|
||||
# mouse banish ##
|
||||
super + b
|
||||
wmp 1280 800
|
|
@ -2,12 +2,25 @@
|
|||
|
||||
## move and resize windows ##
|
||||
|
||||
FLAG=$1 # option
|
||||
FW=$(pfw) # focused window
|
||||
. $HOME/.config/rootwm/rwm_var
|
||||
|
||||
FLAG=$1 # flag
|
||||
FW=$(pfw) # focused window id
|
||||
RID=$(lsw -r) # root window id
|
||||
GAP=$(atomx WM_GAP $RID) # gaps value
|
||||
RW=$(wattr w $RID) # root window width
|
||||
RH=$(wattr h $RID) # root window heigth
|
||||
SW=$((RW - 2 * BW - 2 * GAP)) # screen utilizable width
|
||||
SH=$((RH - 2 * BW - 2 * GAP)) # screen utilizable height
|
||||
|
||||
usage() {
|
||||
echo "usage:
|
||||
rwm_moveresize.sh [ -r, -l, -d, -u, -w, -W, -h, -H ]
|
||||
rwm_moveresize.sh [ -n, -s, -e, -o, -r, -l, -d, -u, -w, -W, -h, -H ]
|
||||
-f) fullsize
|
||||
-n) half north
|
||||
-s) half south
|
||||
-e) half est
|
||||
-o) half west
|
||||
-r) move right
|
||||
-l) move left
|
||||
-d) move down
|
||||
|
@ -18,7 +31,79 @@ rwm_moveresize.sh [ -r, -l, -d, -u, -w, -W, -h, -H ]
|
|||
-H) resize height +"
|
||||
}
|
||||
|
||||
# half north value
|
||||
north() {
|
||||
x=$GAP
|
||||
y=$GAP
|
||||
w=$SW
|
||||
h=$((SH / 2 - GAP - BW))
|
||||
}
|
||||
|
||||
# half south value
|
||||
south() {
|
||||
x=$GAP
|
||||
y=$((SH / 2 + GAP - BW))
|
||||
w=$SW
|
||||
h=$((SH / 2 - BW))
|
||||
}
|
||||
|
||||
# half est value
|
||||
est() {
|
||||
x=$((SW / 2 + BW + GAP))
|
||||
y=$GAP
|
||||
w=$((SW / 2 - BW - GAP))
|
||||
h=$SH
|
||||
}
|
||||
|
||||
# half west value
|
||||
west() {
|
||||
x=$GAP
|
||||
y=$GAP
|
||||
w=$((SW / 2 - BW - GAP))
|
||||
h=$SH
|
||||
}
|
||||
|
||||
# fulsize function
|
||||
fullsize() {
|
||||
fs=$(atomx WM_FS $FW) # atom fullsize and original size position
|
||||
fs_width=$((RW - BW * 2)) # fullsize width
|
||||
fs_height=$((RH - BW * 2)) # fullsize height
|
||||
x=0
|
||||
y=0
|
||||
|
||||
# if atom exist and it is in fullsize
|
||||
if [ -n "$fs" ] & [ "$(wattr wh $FW)" = "$fs_width $fs_height" ]; then
|
||||
wtp $fs $FW # restore size and position
|
||||
atomx -d WM_FS $FW # remove from list
|
||||
|
||||
else # if it's not atom and it's not in fullsize
|
||||
atomx WM_FS="$(wattr xywh $(pfw))" $FW # create atom and save original size an position
|
||||
wtp $x $y $fs_width $fs_height $FW # gets fullsize
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
case $FLAG in
|
||||
-f)
|
||||
fullsize
|
||||
wtp $x $y $w $h $FW
|
||||
;;
|
||||
-n)
|
||||
north
|
||||
wtp $x $y $w $h $FW
|
||||
;;
|
||||
-s)
|
||||
south
|
||||
wtp $x $y $w $h $FW
|
||||
;;
|
||||
-e)
|
||||
est
|
||||
wtp $x $y $w $h $FW
|
||||
;;
|
||||
-o)
|
||||
west
|
||||
wtp $x $y $w $h $FW
|
||||
;;
|
||||
-r) # rigth
|
||||
wmv 10 0 $FW
|
||||
;;
|
||||
|
|
|
@ -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_arrangement.sh -t
|
||||
rwm_layout.sh -t
|
||||
} # 5% + calculation
|
||||
|
||||
master_dec() {
|
||||
atomx WM_MP=$((mp - 5)) $RID
|
||||
rwm_arrangement.sh -t
|
||||
rwm_layout.sh -t
|
||||
} # 5% - calculation
|
||||
|
||||
wp=$(atomx WM_WP $RID) # windows percent size from atom
|
||||
windowperc_inc() {
|
||||
atomx WM_WP=$((wp + 5)) $RID
|
||||
rwm_arrangement.sh -w
|
||||
rwm_layout.sh -w
|
||||
} # 5% + calculation
|
||||
|
||||
windowperc_dec() {
|
||||
atomx WM_WP=$((wp -5)) $RID
|
||||
rwm_arrangement.sh -w
|
||||
rwm_layout.sh -w
|
||||
} # 5% - calculation
|
||||
|
||||
gap=$(atomx WM_GAP $RID)
|
||||
gap_inc() {
|
||||
atomx WM_GAP=$((gap + 2)) $RID
|
||||
rwm_arrangement.sh -t
|
||||
rwm_layout.sh -t
|
||||
} # 5 + pixels gaps
|
||||
|
||||
gap_dec() {
|
||||
atomx WM_GAP=$((gap - 2)) $RID
|
||||
rwm_arrangement.sh -t
|
||||
rwm_layout.sh -t
|
||||
} # 5 - pixels gaps
|
||||
|
||||
if [ -n "$FLAG" ]; then
|
||||
|
|
Loading…
Reference in a new issue