2020-08-01 12:05:15 +00:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
###
|
|
|
|
# AUTOSTART
|
|
|
|
###
|
2021-05-12 10:46:32 +00:00
|
|
|
# TODO launch apps based on the hostname
|
|
|
|
# TODO stop using `hostname` and use the $HOSTNAME variable instead
|
2020-08-13 10:58:36 +00:00
|
|
|
xsetroot -cursor_name left_ptr #fix background cursor being different
|
2020-08-01 12:05:15 +00:00
|
|
|
sxhkd &
|
|
|
|
~/.config/polybar/launch.sh &
|
|
|
|
nitrogen --restore
|
2021-02-06 10:46:32 +00:00
|
|
|
picom --experimental-backends &
|
2020-08-01 12:05:15 +00:00
|
|
|
dunst &
|
2020-08-01 19:12:56 +00:00
|
|
|
copyq &
|
|
|
|
nm-applet &
|
2021-03-23 07:57:44 +00:00
|
|
|
#blueman-applet &
|
2020-08-01 19:12:56 +00:00
|
|
|
xfce4-power-manager &
|
|
|
|
numlockx on &
|
2020-08-13 10:58:36 +00:00
|
|
|
/usr/bin/lxqt-policykit-agent &
|
2020-08-01 12:05:15 +00:00
|
|
|
|
2020-08-13 10:58:36 +00:00
|
|
|
###
|
|
|
|
# MONITORS
|
|
|
|
###
|
2021-04-10 15:25:23 +00:00
|
|
|
if [ "`hostname`" = "setsuna" ]; then
|
|
|
|
bspc monitor "HDMI-A-1" -d 1 2 3 4 5 6 7
|
|
|
|
bspc monitor "DVI-D-0" -d 8 9
|
|
|
|
elif [ "`hostname`" = "beef-book" ]; then
|
2021-03-23 07:57:44 +00:00
|
|
|
if [ -n "`polybar -m | grep "DP-1"`" ]; then
|
2020-11-05 08:26:43 +00:00
|
|
|
# for docked desktop use: assign 2 workspaces to the second VGA monitor accordingly if it is connected
|
|
|
|
if [ -n "`polybar -m | grep "VGA-0"`" ]; then
|
2021-03-23 07:57:44 +00:00
|
|
|
bspc monitor "DP-1" -d 1 2 3 4 5 6 7
|
2020-11-05 08:26:43 +00:00
|
|
|
bspc monitor "VGA-0" -d 8 9
|
|
|
|
else
|
2021-03-23 07:57:44 +00:00
|
|
|
bspc monitor "DP-1" -d 1 2 3 4 5 6 7 8 9
|
2020-11-05 08:26:43 +00:00
|
|
|
fi
|
2021-02-06 10:46:32 +00:00
|
|
|
#elif [ -n "`polybar -m | grep "VGA-0"`" ]; then
|
|
|
|
# if [ -n "`polybar -m | grep "LVDS-1-1"`" ]; then
|
|
|
|
# bspc monitor "LVDS-1-1" -d 1 2 3 4 5 6 7
|
|
|
|
# bspc monitor "VGA-0" -d 8 9
|
|
|
|
# else
|
|
|
|
# bspc monitor "VGA-0" -d 1 2 3 4 5 6 7 8 9
|
|
|
|
# fi
|
2020-11-05 08:26:43 +00:00
|
|
|
else
|
|
|
|
bspc monitor -d 1 2 3 4 5 6 7 8 9
|
|
|
|
#bspc monitor "DP-1" -d 1 2 3 4 5 6 7 8 9
|
|
|
|
#bspc monitor "LVDS1" -d 1 2 3 4 5 6 7 8 9
|
|
|
|
#bspc monitor "LVDS-1-1" -d 1 2 3 4 5 6 7 8 9
|
|
|
|
fi
|
2020-08-13 18:06:13 +00:00
|
|
|
elif [ "`hostname`" = "salad-book" ]; then
|
|
|
|
bspc monitor "eDP-1" -d 1 2 3 4 5 6 7 8 9
|
2020-08-13 10:58:36 +00:00
|
|
|
bspc monitor "HDMI-0" -d 1 2 3 4 5 6 7 8 9
|
|
|
|
bspc monitor "VGA-0" -d 1 2 3 4 5 6 7 8 9
|
|
|
|
fi
|
2020-08-01 12:05:15 +00:00
|
|
|
|
2020-08-13 10:58:36 +00:00
|
|
|
###
|
|
|
|
# GLOBAL SETTINGS
|
|
|
|
###
|
2020-08-01 12:05:15 +00:00
|
|
|
bspc config focus_follows_pointer true
|
|
|
|
bspc config remove_disabled_monitors true
|
|
|
|
bspc config remove_unplugged_monitors true
|
|
|
|
bspc config merge_overlapping_monitors true
|
|
|
|
bspc config pointer_follows_monitor true
|
2020-11-05 08:26:43 +00:00
|
|
|
bspc config center_pseudo_tiled false
|
2020-08-01 12:05:15 +00:00
|
|
|
|
|
|
|
#bspc config bottom_padding 25
|
|
|
|
#bspc config top_monocle_padding 0
|
|
|
|
bspc config border_width 2
|
|
|
|
bspc config window_gap 10
|
|
|
|
|
|
|
|
bspc config split_ratio 0.50
|
|
|
|
bspc config borderless_monocle true
|
|
|
|
bspc config gapless_monocle true
|
|
|
|
|
|
|
|
|
2020-08-13 10:58:36 +00:00
|
|
|
###
|
|
|
|
# COLORS
|
|
|
|
###
|
2020-08-22 16:04:56 +00:00
|
|
|
|
|
|
|
# Read colors from Xresources and use them upfront
|
|
|
|
# I am sorry for how cursed this is
|
|
|
|
|
|
|
|
clist=`xrdb -query`
|
|
|
|
echo "$clist" | while read line
|
|
|
|
do
|
|
|
|
name=$(echo $line | cut -d: -f1)
|
|
|
|
color=$(echo $line | cut -d: -f2)
|
|
|
|
case "$name" in
|
|
|
|
"*.color6") bspc config active_border_color $color \
|
|
|
|
&& bspc config presel_feedback_color $color ;;
|
|
|
|
"*.background") bspc config normal_border_color $color ;;
|
|
|
|
"*.foreground") bspc config focused_border_color $color ;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
|
2020-08-01 12:05:15 +00:00
|
|
|
###
|
2020-08-13 10:58:36 +00:00
|
|
|
# RULES
|
2020-08-01 12:05:15 +00:00
|
|
|
###
|
|
|
|
|
2020-08-01 19:12:56 +00:00
|
|
|
bspc rule -a Gimp desktop='^6' state=floating follow=on
|
2020-08-01 12:05:15 +00:00
|
|
|
bspc rule -a Pavucontrol state=floating
|
2020-08-01 19:12:56 +00:00
|
|
|
bspc rule -a copyq state=floating
|
|
|
|
bspc rule -a Blueman-manager state=floating
|
2020-08-03 18:59:39 +00:00
|
|
|
bspc rule -a Arandr state=floating
|
2020-11-05 08:26:43 +00:00
|
|
|
bspc rule -a Galculator state=floating
|
2020-11-22 12:38:26 +00:00
|
|
|
bspc rule -a Nitrogen state=floating
|
2021-02-13 12:49:36 +00:00
|
|
|
bspc rule -a Emacs state=tiled
|
2020-08-01 12:05:15 +00:00
|
|
|
bspc rule -a Screenkey manage=off
|
2020-08-13 10:58:36 +00:00
|
|
|
bspc rule -a Navigator desktop='^1'
|
|
|
|
bspc rule -a discord desktop='^4'
|
2021-02-06 10:46:32 +00:00
|
|
|
bspc rule -a lightcord desktop='^4'
|
|
|
|
bspc rule -a Element desktop='^4'
|
|
|
|
bspc rule -a dosbox state=floating
|
2020-08-01 19:12:56 +00:00
|
|
|
bspc rule -a AlarmWindow state=floating
|
|
|
|
bspc rule -a pop-up state=floating
|
|
|
|
bspc rule -a setup state=floating
|