dotfiles/.config/bspwm/bspwmrc
Louis Vallat 35232e4781
Changed wallpaper
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
2021-11-24 10:21:21 +01:00

46 lines
1.3 KiB
Bash
Executable File

#! /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/wallhaven-g7pw73.jpg &
xset -b
DISPLAYS=$(xrandr -q | grep -w 'connected' | cut -d ' ' -f 1)
EXT_PRIMARY=""
for DISP in ${DISPLAYS}; do
if [ ${DISP} != 'eDP' ]; then
EXT_PRIMARY=${DISP}
fi
done
killall -q polybar
if [ "${EXT_PRIMARY}" != "" ]; then
xrandr --output ${EXT_PRIMARY} --primary --output eDP --right-of ${EXT_PRIMARY}
bspc monitor ${EXT_PRIMARY} -d 一 二 三 四 五
bspc monitor eDP -d 六 七 八 九 十
MONITOR=${EXT_PRIMARY} polybar left 2>&1 | tee -a /tmp/polybar.log & disown
MONITOR=${EXT_PRIMARY} polybar center 2>&1 | tee -a /tmp/polybar.log & disown
MONITOR=${EXT_PRIMARY} polybar right 2>&1 | tee -a /tmp/polybar.log & disown
else
bspc monitor eDP -d 一 二 三 四 五 六 七 八 九 十
fi
MONITOR="eDP" polybar left 2>&1 | tee -a /tmp/polybar.log & disown
MONITOR="eDP" polybar center 2>&1 | tee -a /tmp/polybar.log & disown
MONITOR="eDP" polybar right 2>&1 | tee -a /tmp/polybar.log & disown
bspc config border_width 0
bspc config window_gap 8
bspc config top_padding 30
bspc config split_ratio 0.6
# Fix for Java applications
wmname LG3D