2021-11-12 23:04:44 +01:00
|
|
|
#! /bin/bash
|
|
|
|
|
2022-06-22 13:05:22 +02:00
|
|
|
# Enable debug
|
|
|
|
set -x
|
|
|
|
|
2021-11-12 23:04:44 +01:00
|
|
|
# Autostart
|
2022-06-08 22:43:15 +02:00
|
|
|
pgrep -x sxhkd > /dev/null || sxhkd & disown
|
2021-11-12 23:04:44 +01:00
|
|
|
xrdb -load $HOME/.config/.Xresources &
|
|
|
|
dunst -conf $HOME/.config/dunst/dunstrc &
|
2022-06-07 15:18:00 +02:00
|
|
|
picom --experimental-backends &
|
2022-06-07 16:37:32 +02:00
|
|
|
$HOME/.fehbg &
|
2021-12-04 17:24:21 +01:00
|
|
|
/usr/lib/kdeconnectd & disown
|
2022-06-22 13:05:22 +02:00
|
|
|
pgrep 'nextcloud' || nextcloud & disown
|
2022-06-22 15:14:00 +02:00
|
|
|
killall polybar
|
2021-11-12 23:04:44 +01:00
|
|
|
|
|
|
|
xset -b
|
|
|
|
|
2022-06-22 13:05:22 +02:00
|
|
|
DISPLAYS=$(xrandr -q | grep -w 'connected' | grep -v 'primary' | cut -d ' ' -f 1)
|
|
|
|
PRIMARY_DISPLAY=$(xrandr -q | grep -w 'connected primary' | cut -d ' ' -f 1)
|
|
|
|
|
|
|
|
echo "Displays '${DISPLAYS}' have been detected. '${PRIMARY_DISPLAY}' is primary."
|
2021-11-13 23:25:54 +01:00
|
|
|
|
2022-06-22 13:05:22 +02:00
|
|
|
bspc config border_width 0
|
|
|
|
bspc config window_gap 8
|
|
|
|
bspc config top_padding 20
|
|
|
|
bspc config split_ratio 0.6
|
2021-11-13 23:25:54 +01:00
|
|
|
|
2022-06-22 13:05:22 +02:00
|
|
|
EXT_DISPLAY=${DISPLAYS%% *}
|
2021-11-19 14:26:07 +01:00
|
|
|
|
2021-11-14 00:13:17 +01:00
|
|
|
killall -q polybar
|
2022-06-22 13:05:22 +02:00
|
|
|
if [ "${EXT_DISPLAY}" != "" ]; then
|
|
|
|
bspc monitor ${PRIMARY_DISPLAY} -d 1 2 3 4 5
|
|
|
|
bspc monitor ${EXT_DISPLAY} -d 6 7 8 9 0
|
2022-06-22 15:14:00 +02:00
|
|
|
MONITOR=${EXT_DISPLAY} polybar main & disown
|
2021-11-13 23:25:54 +01:00
|
|
|
else
|
2022-06-22 13:05:22 +02:00
|
|
|
bspc monitor ${PRIMARY_DISPLAY} -d 1 2 3 4 5 6 7 8 9 0
|
2021-11-13 23:25:54 +01:00
|
|
|
fi
|
2021-11-12 23:04:44 +01:00
|
|
|
|
2022-06-22 15:14:00 +02:00
|
|
|
MONITOR=${PRIMARY_DISPLAY} polybar main & disown
|
2021-11-12 23:04:44 +01:00
|
|
|
|
2021-11-18 20:02:33 +01:00
|
|
|
# Fix for Java applications
|
|
|
|
wmname LG3D
|