Base configuration for BSPWM (Binary Space Partitioning Window Manager).
The minimalist window manager, very configurable via. bspc. It requires separate tooling to manage every aspect aside from window partitioning..such as
SXHKD (Simple X HotKey Daemon) to manage key inputs and responses.
Rofi to create and manage an application search function and network management system.
Polybar/Limepanel/Lemonbar or an alternative to create and manage any desired panels.
Within these it’s possible to add functionality such as VPN monitoring using any interpreted language such as Python, LUA, bash, Ruby etc. in any combination.
This allows you to tailor your environment down to the lowest lvl.
bspwmrc:
#! /bin/sh
gap=15
PANEL_HEIGHT=25
export gap
export PANEL_HEIGHT
#This creates negative padding equal to window gap so that gaps are shown only between windows and not on desktop edges.
bspc config window_gap $gap;
bspc config top_padding $(($PANEL_HEIGHT-$gap))
bspc config left_padding -$gap
bspc config right_padding -$gap
bspc config bottom_padding -$gap
#Various settings
bspc config gapless_monocle false #Default setup uses negative padding, and gapless monocle looks really weird like that
bspc config borderless_monocle true
bspc config single_monocle true
bspc config paddingless_monocle false
#bspc config ignore_ewmh_focus true
#bspc config initial_polarity second_child
bspc config remove_disabled_monitors true
bspc config remove_unplugged_monitors true
## Honor size hints: do not make windows smaller than they wish to be
#bspc config honor_size_hints true
##Color settings
bspc config focused_border_color "#025db7"
bspc config normal_border_color "#222D32"
#"#000000"
bspc config presel_feedback_color "#1ABB9B"
#"#8F3724"
bspc config border_width 1
bspc config focus_follows_pointer true
#bspc config pointer_follows_focus true #Some keybindings automatically enable and disable this setting
#Settings for manual splitting
bspc config split_ratio 0.52
#bspc monitor -d i ii iii iv v vi vii viii ix x
#bspc monitor -d One Two Three Four Five Six Seven Eight Nine Ten
#bspc monitor -d I II III IV V VI VII VIII IX X
#bspc monitor -d • • • • • • • • • •
#bspc monitor -d I II III IV V VI
#bspc monitor -d
###This creates and names desktops for multiple monitors.
workspaces_multimonitor &
bspc rule -a screenkey --unmanage
bspc rule -a gcolor2 state=floating center=true
bspc rule -a lxappearance state=floating center=true
bspc rule -a gmrun state=floating center=true
bspc rule -a lxterminal state=floating center=true sticky=true
#bspc rule -a urxvt state=floating center=true
bspc rule -a viewnior state=floating center=true
bspc rule -a file-roller state=floating center=true
bspc rule -a floaterm state=floating center=true
bspc rule -a spotify state=pseudo_tiled
#bspc rule -a nautilus state=pseudo_tiled
#bspc rule -a skype state=pseudo_tiled
bspc rule -a file-roller state=pseudo_tiled
bspc rule -a transmission-gtk state=pseudo_tiled
bspc rule -a conky sticky=on manage=off lower=on
bspc rule -a astime sticky=on
bspc rule -a yad state=floating
bspc rule -a Docky layer=above border=off manage=on
bspc rule -a Plank layer=above border=off manage=on
bspc rule -a wbar layer=above
bspc rule -a dockbarx layer=above
bspc rule -a google-chrome-unstable private=on
bspc rule -a google-chrome-stable private=on
bspc rule -a chromium private=on
bspc rule -a firefox private=on
bspc rule -a midori private=on
bspc rule -a gnome-pie border=off manage=off
bspc rule -a wpa_gui state=pseudo_tiled
bspc rule -a libreoffice state=tiled
bspc rule -a '*:libreofficedev' state=tiled
bspc rule -a '*:soffice' state=tiled
#bspc rule -a firefox desktop=I
#bspc rule -a calibre desktop=II
#bspc rule -a geany desktop=II
#bspc rule -a deluge desktop=III
bspc rule -a 9menu border=off manage=off
bspc rule -a tint2 border=off manage=off
#bspc desktop I --layout monocle
#bspc desktop II --layout monocle
## Autogap adjusts windowgap automatically according to the number of
## windows on the desktop. Using it disables negative window gap.
#autogap &
## This script balances all windows when new one is spawned
#euclid_balancer &
##Edge-switcher switches to next workspace when moves moves to the
##edge of the monitor (behavior similar to enlightenment)
#edge-switcher &
###External rules
##Pseudo automatic mode: always splits focused window when opening new window
bspc config external_rules_command /usr/bin/pseudo_automatic_mode
##Adjust new window: splits biggest windows to keep windows about the same size
#bspc config external_rules_command /usr/bin/adjust-new-window
##Autostart apps
#Keybindings daemon
#sxhkd &
#Source autostartfile. Uncomment this if you use bspwm-git
#. $HOME/.config/bspwm/autostart
limepanel &
# Alter picom settings if using intel graphics
GRAPHIC_CARD=$(lspci | grep -i "vga" | sed 's/.*://' | sed 's/(.*//' | sed 's/^[ \t]*//')
if [[ $(echo $GRAPHIC_CARD | grep -i 'intel\|lenovo') != "" ]]; then MCODE='initrd=\intel-ucode.img'
sed -i 's/"xrender"/"glx"/' ~/.config/picom.conf
grep -q 'vsync = true;' ~/.config/picom.conf || echo 'vsync = true;' >> ~/.config/picom.conf
fi