dotfiles/.config/bspwm/bspwmrc

40 lines
1.1 KiB
Plaintext
Raw Normal View History

#! /bin/bash
# Autostart
pgrep -x sxhkd > /dev/null || sxhkd &
xrdb -load $HOME/.config/.Xresources &
dunst -conf $HOME/.config/dunst/dunstrc &
picom &
feh --bg-fill ~/Pictures/nordic-obsession.png &
killall -q polybar
# xrandr --output DisplayPort-2 --primary --mode 1920x1080 --rotate normal --output eDP --mode 1920x1080 --rotate normal --right-of DisplayPort-2
xset -b
DISPLAYS=$(bspc query -M --names)
EXT_PRIMARY=""
for DISP in ${DISPLAYS}; do
if [ ${DISP} != 'eDP' ]; then
EXT_PRIMARY=${DISP}
fi
done
if [ -n ${EXT_PRIMARY} ]; then
xrandr --output ${EXT_PRIMARY} --primary --output eDP --right-of ${EXT_PRIMARY}
bspc monitor ${EXT_PRIMARY} -d I II III IV V
bspc monitor eDP -d VI VII VIII IX X
MONITOR="eDP" polybar main 2>&1 | tee -a /tmp/polybar.log & disown
MONITOR=${EXT_PRIMARY} polybar ext 2>&1 | tee -a /tmp/polybar.log & disown
else
bspc monitor eDP -d I II III IV V VI VII VIII IX X
MONITOR="eDP" polybar main 2>&1 | tee -a /tmp/polybar.log & disown
fi
bspc config border_width 0
bspc config top_padding 34
bspc config window_gap 16
bspc config split_ratio 0.6