Author: Kyle Fuller <kyle@fuller.li> 2024-02-29 06:00:38 +0000 +0000
Committer: Kyle Fuller <kyle@fuller.li> 2024-02-29 06:00:38 +0000 +0000
Commit: 76df730f4ae0976f4ac290e5c0ac865208ae2e8d
Parent: 92286b859b9c9ca2f4747ceafc90532c5faa31b3
feat(bspwm): use smaller borders for smaller displays
diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc
index db1daa391c0bdf5fa18b86b9dfe051d54601fc4f..779fe48f175170a593e3a0fb67fcac1aac5f49ff 100755
--- a/.config/bspwm/bspwmrc
+++ b/.config/bspwm/bspwmrc
@@ -8,11 +8,18 @@ systemctl --user start bspwm.service
bspc monitor -d 1 2 3 4 5 6 7 8 9 0
-bspc config border_width 4
-bspc config window_gap 40
+primary_resolution="$(xrandr | grep 'primary' | awk '{ print $4 }')"
+if [[ "$primary_resolution" = "1366x"* ]]; then
+ bspc config split_ratio 0.60
+ bspc config border_width 2
+ bspc config window_gap 5
+else
+ bspc config split_ratio 0.50
+ bspc config border_width 4
+ bspc config window_gap 40
+fi
bspc config top_padding 10
-bspc config split_ratio 0.50
bspc config borderless_monocle true
bspc config gapless_monocle true