2021-11-12 23:04:44 +01:00
|
|
|
#! /bin/bash
|
|
|
|
|
|
|
|
# Autostart
|
|
|
|
pgrep -x sxhkd > /dev/null || sxhkd &
|
|
|
|
xrdb -load $HOME/.config/.Xresources &
|
|
|
|
dunst -conf $HOME/.config/dunst/dunstrc &
|
|
|
|
picom &
|
2021-11-19 14:26:07 +01:00
|
|
|
feh --bg-fill ~/Pictures/94176792_p0.png &
|
2021-11-12 23:04:44 +01:00
|
|
|
|
|
|
|
xset -b
|
|
|
|
|
2021-11-14 00:13:17 +01:00
|
|
|
DISPLAYS=$(xrandr -q | grep -w 'connected' | cut -d ' ' -f 1)
|
2021-11-13 23:25:54 +01:00
|
|
|
EXT_PRIMARY=""
|
|
|
|
|
|
|
|
for DISP in ${DISPLAYS}; do
|
|
|
|
if [ ${DISP} != 'eDP' ]; then
|
|
|
|
EXT_PRIMARY=${DISP}
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2021-11-19 14:26:07 +01:00
|
|
|
|
2021-11-14 00:13:17 +01:00
|
|
|
killall -q polybar
|
2021-11-18 12:21:01 +01:00
|
|
|
if [ "${EXT_PRIMARY}" != "" ]; then
|
2021-11-13 23:25:54 +01:00
|
|
|
xrandr --output ${EXT_PRIMARY} --primary --output eDP --right-of ${EXT_PRIMARY}
|
2021-11-19 14:26:07 +01:00
|
|
|
bspc monitor ${EXT_PRIMARY} -d 一 二 三 四 五
|
|
|
|
bspc monitor eDP -d 六 七 八 九 十
|
2021-11-18 12:21:01 +01:00
|
|
|
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
|
2021-11-13 23:25:54 +01:00
|
|
|
else
|
2021-11-19 14:26:07 +01:00
|
|
|
bspc monitor eDP -d 一 二 三 四 五 六 七 八 九 十
|
2021-11-13 23:25:54 +01:00
|
|
|
fi
|
2021-11-12 23:04:44 +01:00
|
|
|
|
2021-11-18 12:21:01 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2021-11-12 23:04:44 +01:00
|
|
|
bspc config border_width 0
|
2021-11-16 16:17:54 +01:00
|
|
|
bspc config window_gap 8
|
2021-11-18 20:02:33 +01:00
|
|
|
bspc config top_padding 30
|
2021-11-12 23:04:44 +01:00
|
|
|
bspc config split_ratio 0.6
|
|
|
|
|
2021-11-18 20:02:33 +01:00
|
|
|
# Fix for Java applications
|
|
|
|
wmname LG3D
|