Update bspwm, sxhkd setup

This commit is contained in:
fanyx 2022-06-09 13:53:30 +02:00
parent 05f42e9d6e
commit 00e1b15521
2 changed files with 54 additions and 62 deletions

View File

@ -1,21 +1,21 @@
#! /bin/bash #! /bin/bash
# [ -z "$WALLPAPER" ] && # set outputs
export WALLPAPER="/mnt/win/d/Sync/Pictures/Public/Wallpapers/365242.jpg" xrandr --output DP-0 --primary --mode 2560x1440 --rate 165.08 --left-of DP-4 --output DP-4 --mode 2560x1440 --rate 74.92
: ${WALLPAPER:="/mnt/win/d/Sync/Pictures/Public/Wallpapers/365242.jpg"}
# feh --bg-scale $WALLPAPER
~/.fehbg
pgrep -x sxhkd > /dev/null || sxhkd & pgrep -x sxhkd > /dev/null || sxhkd &
pgrep -x redshift > /dev/null || redshift &
pgrep -x picom > /dev/null || picom & pgrep -x picom > /dev/null || picom &
$HOME/.config/polybar/launch.sh # $HOME/.config/polybar/launch.sh
xwallpaper --zoom $WALLPAPER
xsetroot -cursor_name left_ptr & xsetroot -cursor_name left_ptr &
wpg -s "$WALLPAPER" setxkbmap -model evdev -layout eu
xrdb -merge "$HOME/.cache/wal/colors.Xresources"
setxkbmap -model evdev -layout us -variant altgr-intl
bspc monitor DP-4 -d I II III IV V bspc monitor DP-0 -d term browser game code mail
bspc monitor DP-2 -d VI VII VIII IX X bspc monitor DP-4 -d browser2 comm music server misc tmp
bspc config border_width 2 bspc config border_width 2
bspc config window_gap 12 bspc config window_gap 12
@ -24,6 +24,8 @@ bspc config split_ratio 0.5
bspc config borderless_monocle true bspc config borderless_monocle true
bspc config gapless_monocle true bspc config gapless_monocle true
bspc config focus_follows_pointer true
# -------------------------------------------------------- Rules # -------------------------------------------------------- Rules
# #
#---------------------------------------------- Default to float #---------------------------------------------- Default to float
@ -36,11 +38,12 @@ bspc rule -a kitty state=tiled
bspc rule -a Firefox state=tiled bspc rule -a Firefox state=tiled
bspc rule -a Firefox:*:"Save Image" state=floating bspc rule -a Firefox:*:"Save Image" state=floating
# --------------------------------------- Discord => Workspace 7 # ------------------------------------ Discord => Workspace Comm
bspc rule -a discord follow=on state=tiled desktop=VII bspc rule -a discord state=tiled desktop=comm
# ----------------------------------------- Steam => Workspace 4 # -------------------------------------- Steam => Workspace Game
bspc rule -a Steam follow=on state=tiled desktop=IV bspc rule -a Steam state=tiled desktop=game
bspc rule -a 'Steam:*:Friends List' split_ratio=0.3
# ------------------------------------------- sxiv => Fullscreen # ------------------------------------- Coding => Workspace Code
bspc rule -a Sxiv state=fullscreen bspc rule -a "code - oss" state=tiled desktop=code

View File

@ -19,12 +19,12 @@ super + alt + {q,r}
bspc {quit,wm -r} bspc {quit,wm -r}
# close and kill # close and kill
super + shift + {w,q} super + {w,q}
bspc node -{c,k} bspc node -{c,k}
# alternate between the tiled and monocle layout # alternate between the tiled and monocle layout
super + m # super + m
bspc desktop -l next # bspc desktop -l next
# send the newest marked node to the newest preselected node # send the newest marked node to the newest preselected node
super + y super + y
@ -46,6 +46,13 @@ super + {t,shift + t,s,f}
super + ctrl + {m,x,y,z} super + ctrl + {m,x,y,z}
bspc node -g {marked,locked,sticky,private} bspc node -g {marked,locked,sticky,private}
# send node to left tree and rotate 90 degrees
ctrl + alt + {h,j,k,l}
bspc node -n {west,south,north,east}
ctrl + alt + r
bspc node -r 90
# #
# focus/swap # focus/swap
# #
@ -54,31 +61,33 @@ super + ctrl + {m,x,y,z}
super + {_,shift + }{h,j,k,l} super + {_,shift + }{h,j,k,l}
bspc node -{f,s} {west,south,north,east} bspc node -{f,s} {west,south,north,east}
# focus the node for the given path jump # focus paired desktop
super + {p,b,comma,period} super + {1-5}
bspc node -f @{parent,brother,first,second} select={1-5}; \
current="$(bspc query -M -m focused)"; \
opposite="$(bspc query -M -m 'any.!focused')"; \
bspc desktop -f "$opposite:^$select"; \
bspc desktop -f "$current:^$select"
# focus the next/previous window in the current desktop # focus or move node to single desktop
super + {_,shift + }c super + ctrl + {1-9,0}
bspc node -f {next,prev}.local.!hidden.window bspc desktop -f "^{1-9,0}"
# focus the next/previous desktop in the current monitor # send note to single desktop
super + bracket{left,right} super + shift + {1-9,0}
bspc desktop -f {prev,next}.local bspc node -d "^{1-9,0}" --follow
# focus the last node/desktop # swap current desktop with target desktop and switch to paired desktop afterwards
super + {grave,Tab} super + alt + {1-5}
bspc {node,desktop} -f last select={1-5}; \
current="$(bspc query -M -m focused)"; \
opposite="$(bspc query -M -m 'any.!focused')"; \
bspc desktop -s "$current:^$select" --follow; \
bspc desktop -f "$opposite:^$select"
# focus the older or newer node in the focus history # move current window to tmp desktop // or recall tmp windows
super + {o,i} super + m
bspc wm -h off; \ bspc node -d "tmp"
bspc node {older,newer} -f; \
bspc wm -h on
# focus or send to the given desktop
super + {_,shift + }{1-9,0}
bspc {desktop -f,node -d} '^{1-9,10}'
# #
# preselect # preselect
@ -88,30 +97,10 @@ super + {_,shift + }{1-9,0}
super + ctrl + {h,j,k,l} super + ctrl + {h,j,k,l}
bspc node -p {west,south,north,east} bspc node -p {west,south,north,east}
# preselect the ratio
super + ctrl + {1-9}
bspc node -o 0.{1-9}
# cancel the preselection for the focused node # cancel the preselection for the focused node
super + ctrl + space super + ctrl + space
bspc node -p cancel bspc node -p cancel
# cancel the preselection for the focused desktop # cancel the preselection for the focused desktop
super + ctrl + shift + space # super + ctrl + shift + space
bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel # bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
#
# move/resize
#
# expand a window by moving one of its side outward
super + alt + {h,j,k,l}
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
# contract a window by moving one of its side inward
super + alt + shift + {h,j,k,l}
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
# move a floating window
super + {Left,Down,Up,Right}
bspc node -v {-20 0,0 20,0 -20,20 0}