Commit 78326cff authored by Guilherme Semente's avatar Guilherme Semente 🌱

Remove monocle window gap and borders on wide screens

parent 9615c248
......@@ -6,6 +6,8 @@
# See bspwm(1) and <https://github.com/baskerville/bspwm> for more information.
#
SCREEN_WIDTH=$(xdpyinfo | awk '/dimensions/{print $2}' | cut -dx -f1)
bspc config split_ratio 0.52
bspc config focus_follows_pointer false
bspc config pointer_follows_focus true
......@@ -22,6 +24,13 @@ bspc config normal_border_color "$BSPWM_BORDER_COLOR"
bspc config focused_border_color "$BSPWM_FOCUSED_COLOR"
bspc config presel_feedback_color "$BSPWM_PRESEL_COLOR"
if [ "$SCREEN_WIDTH" -gt 1440 ]; then
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config right_monocle_padding "$(((SCREEN_WIDTH - 1440) / 2))"
bspc config left_monocle_padding "$(((SCREEN_WIDTH - 1440) / 2))"
fi
bspc monitor -d 1 2 3 4
bspc rule -a "*" state=floating
......
......@@ -4,13 +4,11 @@ function query_layout() {
bspc query -T -d | jshon -e layout -u
}
function set_monocle_colors() {
bspc config focused_border_color "#888888"
hsetroot -solid "#222222"
function set_monocle_wallpaper() {
hsetroot -solid "#000000"
}
function set_default_colors() {
bspc config focused_border_color "$BSPWM_FOCUSED_COLOR"
function set_default_wallpaper() {
if [ -f "$X_WALLPAPER" ]; then
hsetroot -fill "$X_WALLPAPER"
else
......@@ -18,11 +16,11 @@ function set_default_colors() {
fi
}
function set_colors() {
function set_wallpaper() {
if [ "$(query_layout)" = "monocle" ]; then
set_monocle_colors
set_monocle_wallpaper
else
set_default_colors
set_default_wallpaper
fi
}
......@@ -31,10 +29,10 @@ bspc subscribe all | while read -a msg ; do
case "${msg[0]}" in
desktop_focus)
#xwrite "$(bspc query -D -d --names)" &
set_colors
set_wallpaper
;;
desktop_layout)
set_colors
set_wallpaper
;;
node_focus)
# if [ -f "$XDG_RUNTIME_DIR/bspwm-scratchpad.wid" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment