태그:

bspwm 명령

1   bspwm 단축키

윈도 매니져를 Fluxbox에서 bspwm으로 바꾸면서 단축키가 익숙하지 않아서 여기에 기록해 놓고 찾아 보기로 했다.

단축키설명
명령
wm independent hotkeys
super + Returnterminal emulator
xterm -ls
super + @spaceprogram launcher
dmenu_run
super + Escapemake sxhkd reload its configuration files
pkill -USR1 -x sxhkd
bspwm hotkeys
super + alt + {q,r}quit/restart bspwm
pkill -x panel; bspc {quit,wm -r}
super + {_,shift + }wclose and kill
child=$(tabc.sh $(xdo id) list | head -n1); \
if [ "$child" != "" ]; then \
        xdotool window{close,kill} $child; \
else \
        bspc node -{c,k}; \
fi
super + malternate between the tiled and monocle layout
bspc desktop -l next
super + ysend the newest marked node to the newest preselected node
bspc node newest.marked.local -n newest.!automatic.local
super + shift + ysend the current node to the newest preselected node
bspc node -n newest.!automatic.local
super + gswap the current node and the biggest local node
bspc node -s biggest.local
state/flags
super + {t,shift + t,s,f}set the window state
bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
super + ctrl + {m,x,y,z}set the node flags
bspc node -g {marked,locked,sticky,private}
focus/swap
super + {_,shift + }{h,j,k,l}focus the node in the given direction
bspc node -{f,s} {west,south,north,east}
super + {p,b,comma,period}focus the node for the given path jump
bspc node -f @{parent,brother,first,second}
super + {_,shift + }c
alt + {_,shift + }Tab
focus the next/previous window in the current desktop
bspc node -f {next,prev}.local.!hidden.window
super + bracket{left,right}focus the next/previous desktop in the current monitor
bspc desktop -f {prev,next}.local
super + {grave,Tab}focus the last node/desktop
bspc {node,desktop} -f last
super + {o,i}focus the older or newer node in the focus history
bspc wm -h off; bspc node {older,newer} -f; bspc wm -h on
super + {_,shift + }{1-9,0}focus or send to the given desktop
bspc {desktop -f,node -d} '^{1-9,10}'
super + alt + {1-9,0}send all nodes in the current desktop to the given desktop
bspc node -f @/; bspc node -d '^{1-9,10}'
preselect
super + ctrl + {h,j,k,l}preselect the direction
bspc node -p {west,south,north,east}
super + ctrl + {1-9}preselect the ratio
bspc node -o 0.{1-9}
super + ctrl + spacecancel the preselection for the focused node
bspc node -p cancel
super + ctrl + shift + spacecancel the preselection for the focused desktop
bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
move/resize
super + alt + {h,j,k,l}expand a window by moving one of its side outward
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
super + alt + ctrl + {h,j,k,l}expand a window by moving one of its side outward by 1 pixel
bspc node -z {left -1 0,bottom 0 1,top 0 -1,right 1 0}
super + alt + shift + {h,j,k,l}contract a window by moving one of its side inward
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
super + alt + ctrl + shift + {h,j,k,l}contract a window by moving one of its side inward by 1 pixel
bspc node -z {right -1 0,top 0 1,bottom 0 -1,left 1 0}
super + shift + minustoggle the width to the max or default xterm width
w=$(xwininfo -id $(xdo id) | sed '/Width:/!d; s/^.* //'); \
if [ $w -eq 499 ]; then \
        root_w=$(xwininfo -root | sed '/Width:/!d; s/^.* //'); \
        w=$(expr $root_w - 2); \
        w=$root_w; \
        xdo move -x 0; \
else \
        w=499; \
fi; \
xdo resize -w $w
super + minustoggle the height to the max or default xterm height
h=$(xwininfo -id $(xdo id) | sed '/Height:/!d; s/^.* //'); \
if [ $h -eq 316 ]; then \
        icon_size=$(sed '/^icon_size/!d; s/.* //' ~/.stalonetrayrc); \
        root_h=$(xwininfo -root | sed '/Height:/!d; s/^.* //'); \
        h=$(expr $root_h - $icon_size - 2); \
        xdo move -y $icon_size; \
else \
        h=316; \
fi; \
xdo resize -h $h
super + equaltoggle the size to the max or default xterm size
w=$(xwininfo -id $(xdo id) | sed '/Width:/!d; s/^.* //'); \
h=$(xwininfo -id $(xdo id) | sed '/Height:/!d; s/^.* //'); \
if [ $w -eq 499 -a $h -eq 316 ]; then \
        icon_size=$(sed '/^icon_size/!d; s/.* //' ~/.stalonetrayrc); \
        root_w=$(xwininfo -root | sed '/Width:/!d; s/^.* //'); \
        root_h=$(xwininfo -root | sed '/Height:/!d; s/^.* //'); \
        w=$(expr $root_w - 2); \
        h=$(expr $root_h - $icon_size - 2); \
        xdo move -x 0 -y $icon_size; \
else \
        w=499; \
        h=316; \
fi; \
xdo resize -w $w -h $h
super + {Left,Down,Up,Right}move a floating window
bspc node -v {-20 0,0 20,0 -20,20 0}
super + ctrl + {Left,Down,Up,Right}move a floating window by 1 pixel
bspc node -v {-20 0,0 20,0 -20,20 0}
super + alt + {Left,Down,Up,Right}snap a floating window to root edges
xdo move -x 0
xdo move -y $(xwininfo -id $(xdo id) |
  sed '/Corners:/!d;
       s/.*: *//; s/  */ /g; s/\([^ ]* \)*//; s/^[+-]*[0-9]*//;
       s/--/+-/; s/^-/+/; s/+-/-/')
xdo move -y $(sed '/^icon_size/!d; s/.* //' ~/.stalonetrayrc)
xdo move -x $(xwininfo -id $(xdo id) |
  sed '/Corners:/!d;
       s/.*: *//; s/  */ /g; s/^[^ ]* \| .*$//g; s/[+-]*[0-9]*$//;
       s/--/+-/; s/^-/+/; s/+-/-/')
super + alt + shift + {Left,Down,Up,Right}snap a floating window to root edge centers
root_h=$(xwininfo -root | sed '/Height:/!d; s/^.* //'); \
h=$(xwininfo -id $(xdo id) | sed '/Height:/!d; s/^.* //'); \
x=0; \
y=$(expr \( $root_h - $h \) / 2 - 1); \
xdo move -x $x -y $y
root_w=$(xwininfo -root | sed '/Width:/!d; s/^.* //'); \
w=$(xwininfo -id $(xdo id) | sed '/Width:/!d; s/^.* //'); \
x=$(expr \( $root_w - $w \) / 2 - 1); \
y=$(xwininfo -id $(xdo id) |
  sed '/Corners:/!d;
       s/.*: *//; s/  */ /g; s/\([^ ]* \)*//; s/^[+-]*[0-9]*//;
       s/--/+-/; s/^-/+/; s/+-/-/'); \
xdo move -x $x -y $y
root_w=$(xwininfo -root | sed '/Width:/!d; s/^.* //'); \
w=$(xwininfo -id $(xdo id) | sed '/Width:/!d; s/^.* //'); \
x=$(expr \( $root_w - $w \) / 2 - 1); \
y=$(sed '/^icon_size/!d; s/.* //' ~/.stalonetrayrc); \
xdo move -x $x -y $y
root_h=$(xwininfo -root | sed '/Height:/!d; s/^.* //'); \
h=$(xwininfo -id $(xdo id) | sed '/Height:/!d; s/^.* //'); \
x=$(xwininfo -id $(xdo id) |
  sed '/Corners:/!d;
       s/.*: *//; s/  */ /g; s/^[^ ]* \| .*$//g; s/[+-]*[0-9]*$//;
       s/--/+-/; s/^-/+/; s/+-/-/'); \
y=$(expr \( $root_h - $h \) / 2 - 1); \
xdo move -x $x -y $y
super + alt + Homesnap a floating window to the root center
root_w=$(xwininfo -root | sed '/Width:/!d; s/^.* //'); \
root_h=$(xwininfo -root | sed '/Height:/!d; s/^.* //'); \
w=$(xwininfo -id $(xdo id) | sed '/Width:/!d; s/^.* //'); \
h=$(xwininfo -id $(xdo id) | sed '/Height:/!d; s/^.* //'); \
x=$(expr \( $root_w - $w \) / 2 - 1); \
y=$(expr \( $root_h - $h \) / 2 - 1); \
xdo move -x $x -y $y
rotate
super + {_,shift + }rrotate the parent/desktop
bspc node {@parent, @/} -R 90
hide/unhide
super + n; mhide the current window
bspc node -g hidden
super + n; uunhide the last hidden window for the current desktop
node=$(bspc query -N -d -n .hidden.window | tail -1); \
if [ "$node" != "" ]; then \
        bspc node $node -g hidden; \
        bspc node -f $node; \
fi
super + n; super + uunhide selected hidden windows for the current desktop
nodes=$(bspc query -N -d -n .hidden.window |
  xargs -I ID xwininfo -id ID |
  sed '/^xwininfo:.*: /!d;
       s/^\([^:]*: \)\\\{2\\\}\([^ ]*\) "\(.*\)"$/\2 \3/'); \
if [ "$nodes" != "" ]; then \
        nodes=$(echo "$nodes" | dmenu -i -l 10 | cut -d' ' -f1 |
          sed '/^0x[0-9a-f]*$/!d'); \
        echo "$nodes" | xargs -I ID bspc node ID -g hidden; \
        echo "$nodes" | tail -1 | xargs -I ID bspc node -f ID; \
fi
super + n; super + shift + uunhide all windows for the current desktop
nodes=$(bspc query -N -d -n .hidden.window); \
echo "$nodes" | xargs -I ID bspc node ID -g hidden; \
echo "$nodes" | tail -1 | xargs -I ID bspc node -f ID
tabbed
super + n; nstart a new tabbed instance
tabbed -c
super + n; super + nstart a new tabbed instance and add the current window
child=$(xdo id); \
tabc.sh $(tabbed -cd) add $child
super + n; super + Returnstart a new tabbed instance with xterm
tabc.sh $(tabbed -cd) term
super + n; Returnstart a new tab with xterm
tabc.sh $(xdo id) term
super + n; {h,j,k,l}add focused window to a tabbed instance in given direction
tabc.sh $(bspc query -N -n {west,south,north,east}) add $(xdo id)
super + n; rremove one tab from tabbed
tabbed=$(xdo id); \
child=$(tabc.sh $tabbed list | head -n1); \
tabc.sh $tabbed remove $child
split ratio
super + n; {1-9}change the split ratio
bspc config split_ratio 0.{1-9}
layer
super + z; {b,n,a}change layer
bspc node -l {below,normal,above}
receptacle
super + ainsert a new receptacle
bspc node -i
super + shift + akill all receptacles in the current monitor
for node in $(bspc query -N -n .local.leaf.!window); do \
        bspc node $node -k; \
done
utilities
super + Deletelock
myxlock
Printscreenshot the entire desktop
ksnapshot
alt + Printscreenshot the current window
ksnapshot --current
super + estart Thunar
Thunar
super + alt + {minus,equal}decrease/increase the current window’s opacity
transset -p --{dec,inc} 0.1
laptop
XF86AudioMutemute audio
osd_volume mute
XF86AudioLowerVolumelower volume
osd_volume down
XF86AudioRaiseVolumeraise volume
osd_volume up
XF86AudioMicMutemute mic
osd_volume mic_mute
XF86MonBrightnessDowndecrease brightness
osd_brightness down
XF86MonBrightnessUpincrease brightness
osd_brightness up
XF86Toolsswitch the screen mode between laptop and tablet
screenmode
XF86Displayswitch the monitor setting between single and dual
mon auto

2   노드 선택 후 회전

bspc node -f @parent # 부모 노드에 포커스
bspc node -R 90      # 포커스된 부모 노드 회전

3   리셉터클(포커스되지 않는 빈 노드) 생성

Introduce receptacles

bspc node -i              # 형제 리셉터클 생성
bspc node @/ -p east -i   # 루트 노드의 동쪽에 리셉터클 생성
bspc node @/2 -p north -i # 루트 노드 두번째 자식 노드의 북쪽에 리셉터클 생성

bspc rule -a Abc:abc -o node=@/1
bspc rule -a Ijk:ijk -o node=@/2/1
bspc rule -a Xyz:xyz -o node=@/2/2

참고문헌

이 칸을 비워 두세요.