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

View File

@ -19,12 +19,12 @@ super + alt + {q,r}
bspc {quit,wm -r}
# close and kill
super + shift + {w,q}
super + {w,q}
bspc node -{c,k}
# alternate between the tiled and monocle layout
super + m
bspc desktop -l next
# super + m
# bspc desktop -l next
# send the newest marked node to the newest preselected node
super + y
@ -46,6 +46,13 @@ super + {t,shift + t,s,f}
super + ctrl + {m,x,y,z}
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
#
@ -54,31 +61,33 @@ super + ctrl + {m,x,y,z}
super + {_,shift + }{h,j,k,l}
bspc node -{f,s} {west,south,north,east}
# focus the node for the given path jump
super + {p,b,comma,period}
bspc node -f @{parent,brother,first,second}
# focus paired desktop
super + {1-5}
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
super + {_,shift + }c
bspc node -f {next,prev}.local.!hidden.window
# focus or move node to single desktop
super + ctrl + {1-9,0}
bspc desktop -f "^{1-9,0}"
# focus the next/previous desktop in the current monitor
super + bracket{left,right}
bspc desktop -f {prev,next}.local
# send note to single desktop
super + shift + {1-9,0}
bspc node -d "^{1-9,0}" --follow
# focus the last node/desktop
super + {grave,Tab}
bspc {node,desktop} -f last
# swap current desktop with target desktop and switch to paired desktop afterwards
super + alt + {1-5}
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
super + {o,i}
bspc wm -h off; \
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}'
# move current window to tmp desktop // or recall tmp windows
super + m
bspc node -d "tmp"
#
# preselect
@ -88,30 +97,10 @@ super + {_,shift + }{1-9,0}
super + ctrl + {h,j,k,l}
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
super + ctrl + space
bspc node -p cancel
# cancel the preselection for the focused desktop
super + ctrl + shift + space
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}
# super + ctrl + shift + space
# bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel