-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbspwmrc
executable file
·92 lines (75 loc) · 2.43 KB
/
bspwmrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/bash
# by Miika Nissi, https://miikanissi.com, https://github.com/miikanissi
## Set environment path
export BSPWM_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/bspwm"
### BSPC ###
INTERNAL_MONITOR="eDP"
EXTERNAL_MONITOR="HDMI-A-0"
# on first load setup default workspaces
if [[ "$1" = 0 ]]; then
if [[ $(xrandr -q | grep "${EXTERNAL_MONITOR} connected") ]]; then
bspc monitor "$EXTERNAL_MONITOR" -d 1 2 3 4 5
bspc monitor "$INTERNAL_MONITOR" -d 6 7 8 9 10
bspc wm -O "$EXTERNAL_MONITOR" "$INTERNAL_MONITOR"
else
bspc monitor "$INTERNAL_MONITOR" -d 1 2 3 4 5 6 7 8 9 10
fi
fi
bspc config pointer_modifier mod4
bspc config border_width 5
bspc config window_gap 0
bspc config automatic_scheme longest_side # longest_side, alternate or spiral
bspc config split_ratio 0.52
bspc config top_padding 32
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config single_monocle true
bspc config focus_follows_pointer true
bspc config normal_border_color "$(xrdb -query | grep background1 | awk '{print $2}')"
bspc config focused_border_color "$(xrdb -query | grep color4 | awk '{print $2}')"
# BSPWM window rules
bspc rule -a Gimp state=floating
bspc rule -a Emacs state=tiled
bspc rule -a Zathura state=tiled
bspc rule -a Alacritty:Alacritty:ncmpcpp state=floating
# AUTOSTART
# Helper function to check for active process, if not found starts program on the background
_run() {
if ! pgrep -x "${1}" &>/dev/null; then
"$@" &
fi
}
# Environment
source ~/.bashrc
xrdb .Xresources &
# Fixes Java applications
wmname LG3D
# for bitwarden
keyctl link @u @s
# Turn on notifications
_run dunst --config ~/.config/dunst/dunstrc
# Keyboard, mouse, cursor, fonts
~/.local/bin/keyboard.sh &
xsetroot -cursor_name left_ptr &
xset +fp ~/.fonts &
xset fp rehash &
fc-cache -fv &
_run sxhkd -m -1 > /tmp/sxhkd.log
# File browser daemon (automatic mounting etc)
_run pcmanfm -d
# Music daemon
_run mpd
# Network Manager applet
_run nm-applet
# Signal messenger
_run signal-desktop --start-in-tray --use-tray-icon
# Lock screen
_run light-locker --lock-on-suspend --lock-after-screensaver=30
# Wallpaper
~/.local/bin/setbg.sh &
# Redshift to dim screen temperature
_run redshift
# Compositor
_run picom --config .config/picom/picom.conf --experimental-backends --vsync
# Setup monitors, polybar and wallpaper
~/.local/bin/bspwm_setup_monitors.sh &