guest@dotshare [~/groups/wms/bspwm] $ ls bspwm/ | cat

bspwm

stbandera Nov 19, 2020 (wms/bspwm)

bspwmrc(raw, dl)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/usr/bin/env sh

setup_monitors () {
  if [ "$(bspc query -M | wc -l)" -eq "2" ]; then
    bspc monitor ^1 -d 1 2 3 4 5
    bspc monitor ^2 -d 1 2 3 4 5
  else
    bspc monitor ^1 -d 1 2 3 4 5
  fi
}

bspc config border_width 3
bspc config window_gap 0
bspc config -m ^1 top_padding 28

bspc config split_ratio 0.55
bspc config focus_follows_pointer true
bspc config focused_border_color '#ffffff'
# bspc config pointer_follows_focus true
bspc config automatic_scheme spiral
bspc config initial_polarity first_child
bspc config pointer_follows_monitor true
bspc config remove_disabled_monitors true
bspc config remove_unplugged_monitors true
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config external_rules_command "$HOME/.config/bspwm/external-rules.sh"

bspc rule -a Gimp state=floating follow=on
bspc rule -a mplayer2 state=floating
bspc rule -a '*:pop-up' state=floating sticky=on
bspc rule -a Kupfer.py focus=on
bspc rule -a Screenkey manage=off

setup_monitors

ps -C bspc -o cmd,user,pid | grep "${USER:0:7}" | awk '/bspc subscribe report/ {print $(NF)}' | xargs kill
bspc subscribe report > "$STATUS_BAR_FIFO" &

# ps -C bspc -o cmd,pid | awk '/bspc subscribe/ {print $(NF)}' | xargs kill
# bspc subscribe node_{remove,add} | while read _; do sh $HOME/.config/bspwm/stack-layout.sh; done
#  bash -c 'bspc subscribe node_{add,remove} | while read _; do sh $HOME/.config/bspwm/equalize.sh; done'

ps -C bspc -o cmd,user,pid | grep "${USER:0:7}" | awk '/bspc subscribe monitor/ {print $(NF)}' | xargs kill
bspc subscribe monitor | while read -r line; do
  case $line in
    monitor_add*|monitor_geometry*) setup_monitors;;
    *) ;;
  esac
done &

# ps -C bspc -o cmd,user,pid | grep "${USER:0:7}" | awk '/bspc subscribe node_add/ {print $(NF)}' | xargs kill
# bspc subscribe node_add | while read -r line; do
#   nodes="$(bspc query -N -n '.leaf.!floating.!hidden' -d .focused | wc -l)"
#   if (( nodes > 3 )); then
#     smallest="$(bspc query -N -n '@/2/2/2/brother' -d .focused)"
#     bspc node "$smallest" -g hidden
#   fi
# done &

# ps -C bspc -o cmd,user,pid | grep "${USER:0:7}" | awk '/bspc subscribe node_remove/ {print $(NF)}' | xargs kill
# bspc subscribe node_remove | while read -r line; do
#   nodes="$(bspc query -N -n '.leaf.!floating.!hidden' -d .focused | wc -l)"
#   if (( nodes < 3 )); then
#     hidden_node=`bspc query -N -n 'any.leaf.hidden' -d .focused`
#     bspc node $hidden_node -g hidden=off
#   fi
# done &

if [ -d $XDG_DATA_HOME/autoload.d ]; then
  for f in $XDG_DATA_HOME/autoload.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

CLICK TO VIEW

x

sxhkd(raw, dl)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
###############
####### GENERAL
###############

super + a; {a,n,l,p,o,t,k,K,c,C,j,N,w,W}
  dim {actions,network-manager,launcher,pass,app-launcher,translate,fkill,fkill-unknown-or-bad,calendar,clipboard-edit,japanese,notes,nodes,weather}

super + A
  dim hotkeys

super + d
  dim

super + p
  dim launcher

super + {_,shift + }Return
  {TMUX= alacritty,qutebrowser-quick-launch}

XF86MonBrightness{Up,Down}
  light -{A,U} 15

super + XF86MonBrightness{Up,Down}
	for monitor_name in $(sh $XDG_DATA_HOME/scripts/monitors.sh names); do xrandr --output $monitor_name --brightness {1, 0.5}; done
  

XF86Audio{RaiseVolume,LowerVolume}
  pactl set-sink-volume @DEFAULT_SINK@ {+5%,-5%}

XF86AudioMute
  pactl set-sink-mute @DEFAULT_SINK@ toggle

XF86{AudioPlay,Forward,Back}
  sh $XDG_DATA_HOME/scripts/media-control.sh {play-pause,next,previous}

# super + o ; {e,w,m}
#   {gvim,firefox,thunderbird}

super + alt + l
  pexec sh $XDG_DATA_HOME/scripts/i3-lock-with-blur.sh;

super + u
  sh $XDG_DATA_HOME/scripts/status-bars/refresh-status-bar.sh

##########
####### WM
##########

##
## wm hotkeys
##

super + slash
  case "$(sh $XDG_DATA_HOME/scripts/get-currect-wm.sh)" in \
    "awesome") awesome-client 'require("awful").layout.inc(1)';; \
    "bspwm") dim nodes;; \
  esac

super + shift + slash
  case "$(sh $XDG_DATA_HOME/scripts/get-currect-wm.sh)" in \
    "awesome") awesome-client 'require("awful").layout.inc(1)';; \
  esac

super + alt + q
  case "$(sh $XDG_DATA_HOME/scripts/get-currect-wm.sh)" in \
    "bspwm") bspc quit;; \
    "qtile") qtile-cmd -o cmd -f shutdown;; \
  esac

super + alt + r
  case "$(sh $XDG_DATA_HOME/scripts/get-currect-wm.sh)" in \
    "bspwm") bspc wm -r;; \
    "qtile") qtile-cmd -o cmd -f restart;; \
  esac
 

x