aboutsummaryrefslogtreecommitdiff
path: root/.config/bspwm/bspwmrc
blob: 7a1ce04acb4c6bdac36aee5e7b634ec6c22082da (plain) (blame)
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
#!/bin/sh

cmd_exist() { unalias "$1" >/dev/null 2>&1 ; command -v "$1" >/dev/null 2>&1 ;}
__kill() { pkill -9 "$1" >/dev/null 2>&1 ; }
__start() { sleep 0.5 && "$@" >/dev/null 2>&1 & }

if cmd_exist polybar ; then
  __kill polybar
  # Open Polybar on all found monitors 
  if type "xrandr"; then
    for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
      MONITOR=$m polybar --reload herbstluftwm &
    done
  else
    polybar --reload herbstluftwm &
  fi
fi

if cmd_exist dunst ; then
  __kill dunst
  __start dunst
fi

if cmd_exist unclutter ; then
  __kill unclutter
  unclutter -root &
fi

if cmd_exist redshift ; then
  # Reset gamma before killing redshift and starting
  redshift -O 6500 -P
  __kill redshift
  __start redshift
fi

pgrep -x sxhkd > /dev/null || sxhkd &

# Setup workspaces
if type "xrandr"; then
  for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
    bspc monitor $m -d 1 2 3 4 5 6 7 8 9 10
  done
else
  bspc monitor "eDP-1" -d 1 2 3 4 5 6 7 8 9 10
fi

# Remove unplugged monitors
bspc remove_unplugged_monitors true
# Merge overlapping monitors (the bigger remains)
bspc merge_overlapping_monitors true
#bspc remove_disabled_monitors true

bspc config border_width         2
bspc config window_gap          10

bspc config split_ratio          0.50
bspc config borderless_monocle   true
bspc config gapless_monocle      true
bspc config focus_follows_pointer true
bspc config pointer_follows_focus true
bspc config pointer_follows_monitor true

# Color of the border of an unfocused window.
bspc config normal_border_color \#898989
# Color of the border of a focused window of a focused monitor.
bspc config focused_border_color \#33ffcc
# Color of the border of a focused window of an unfocused monitor.
bspc config active_border_color \#98971a

bspc config presel_feedback_color \#33ffcc
bspc config presel_feedback true

bspc rule -a Gimp desktop='^8' state=floating follow=on
bspc rule -a mpv state=floating sticky=on follow=off focus=on rectangle=640x360+1250+690