voidrice/.config/bspwm/bspwm/bspwmrc
JameyBear f820ccf4dd
Shellcheck (#676)
Co-authored-by: WhispersOfJ <kaotiks@gmail.com>
2020-06-01 15:29:57 -04:00

40 lines
1.4 KiB
Bash
Executable file

#!/bin/sh
# If refreshing bspwm, remove all previous rules to prevent doubling up.
bspc rule -r "*"
xsetroot -cursor_name left_ptr
# We look for a non-laptop monitor to use for default, but use the laptop
# screen (LVDS) if there's nothing else. This is because I assume that if you
# have an extra screen attached to a laptop, you want to use that.
mainmonitor="$(bspc query --monitors --names | grep -v LVDS | head -n 1)"
# if ! echo "$mainmonitor" | grep LVDS >/dev/null 2>&1; then
# xrandr --output "$mainmonitor" --auto --output LVDS1 --off
# else
# mainmonitor="LVDS1"
# xrandr --output LVDS1 --auto
# fi
# Start workspaces on the main monitor.
bspc monitor "$mainmonitor" -d 1 2 3 4 5 6 7 8 9 10
bspc desktop -f 1
# If you want a multi-monitor display or something else, I leave that to you to
# arrange. I have this sensible default for most people's use cases.
bspc config border_width 3
bspc config window_gap 15
bspc config top_padding 24 # top_padding I set equal to polybar's height
bspc config focus_follows_pointer true
bspc rule -a Zathura state=tiled
dropdownname="dropdown"
bspc query -N -n .hidden >/dev/null || setsid -f "$TERMINAL" -n "$dropdownname" -e dropdown >/dev/null 2>&1
bspc rule -a St:$dropdownname hidden=on
bspc rule -a St:$dropdownname sticky=on
bspc rule -a St:$dropdownname state=floating
bspc config external_rules_command "$(which floaters)"