#!/usr/bin/bash # # Appearance # declare -A COLOR END=15 for ((i=0;i<=END;i++)); do COLOR[$i]=$(xrdb -query | awk "/^\*\.color$i:/ {print \$2}") done bspc config normal_border_color "${COLOR[0]}" bspc config active_border_color "${COLOR[0]}" bspc config focused_border_color "${COLOR[4]}" bspc config split_ratio 0.50 bspc config gapless_monocle true bspc config borderless_monocle true bspc config paddingless_monocle true bspc config click_to_focus true bspc config pointer_modifier mod4 bspc config pointer_action1 move bspc config pointer_action2 resize_side bspc config pointer_action3 resize_corner bspc config remove_disabled_monitors false bspc config remove_unplugged_monitors true bspc config border_width 0 # bspc config window_gap 16 # bspc config top_padding 32 # bspc config bottom_padding 34 # bspc config left_padding 32 # bspc config right_padding 32 bspc config window_gap 1 bspc config top_padding 0 bspc config bottom_padding 0 bspc config left_padding 0 bspc config right_padding 0 # # Displays # nmon=$(bspc query -M | wc -l) primary=$(bspc query -M -m prmary) host=$(hostname) case $host in triton*) MONITOR=DVI-I-1 [[ $nmon > 1 ]] && bspc monitor HDMI-0 -d HDMI-0/1 [[ $nmon > 2 ]] && bspc monitor DVI-D-0 -d DVI-D-0/1 ;; proteus*) MONITOR=LVDS-0 ;; halimede*) MONITOR=HDMI-0 ;; esac if [[ $MONITOR ]]; then bspc config -m $MONITOR top_padding 30 bspc monitor $MONITOR -d {1,2,3,4,5} ~/.config/polybar/run.sh export MONITOR fi # # Rules # bspc rule -r '*' bspc rule -a URxvt:urxvt-scratch state=floating sticky=on center=on monitor=C bspc rule -a URxvt:urxvt-fuzzy state=floating sticky=on center=on monitor=C bspc rule -a Emacs split_ratio=0.25 border=off state=fullscreen bspc rule -a Emacs:org-capture border=off state=floating bspc rule -a Gimp desktop=^6 bspc rule -a mplayer2 state=floating bspc rule -a Vlc state=floating monitor=C center=on bspc rule -a feh state=fullscreen bspc rule -a Kupfer.py focus=on bspc rule -a Screenkey manage=off bspc rule -a love state=floating center=on sticky=on bspc rule -a SimpleScreenRecorder state=floating center=on sticky=on bspc rule -a Chromium monitor=L bspc rule -a Firefox monitor=L