...
 
Commits (2)
......@@ -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
......
#!/bin/bash
function query_layout() {
bspc query -T -d | jshon -e layout -u
}
function set_monocle_wallpaper() {
hsetroot -solid "#000000"
}
function set_default_wallpaper() {
if [ -f "$X_WALLPAPER" ]; then
hsetroot -fill "$X_WALLPAPER"
else
hsetroot -solid "$X_WALLPAPER"
fi
}
function set_wallpaper() {
if [ "$(query_layout)" = "monocle" ]; then
set_monocle_wallpaper
else
set_default_wallpaper
fi
}
bspc subscribe all | while read -a msg ; do
echo "${msg[@]}"
case "${msg[0]}" in
desktop_focus)
#xwrite "$(bspc query -D -d --names)" &
set_wallpaper
;;
desktop_layout)
layout="${msg[3]}"
#xwrite "$layout" &
if [ "$layout" == "monocle" ]; then
bspc config focused_border_color "#888888"
hsetroot -solid "#222222"
else
bspc config focused_border_color "$BSPWM_FOCUSED_COLOR"
if [ -f "$X_WALLPAPER" ]; then
hsetroot -fill "$X_WALLPAPER"
else
hsetroot -solid "$X_WALLPAPER"
fi
fi
set_wallpaper
;;
node_focus)
if [ -f "$XDG_RUNTIME_DIR/bspwm-scratchpad.wid" ]; then
id=$(cat "$XDG_RUNTIME_DIR/bspwm-scratchpad.wid")
bspc node "$id" --flag hidden
fi
# if [ -f "$XDG_RUNTIME_DIR/bspwm-scratchpad.wid" ]; then
# id=$(cat "$XDG_RUNTIME_DIR/bspwm-scratchpad.wid")
# bspc node "$id" --flag hidden
# fi
;;
node_activate)
;;
......