#!/bin/sh cmd_exist() { unalias "$1" >/dev/null 2>&1 ; command -v "$1" >/dev/null 2>&1 ;} __kill() { pkill -9 "$1" >/dev/null 2>&1 ; } __start() { sleep 0.5 && "$@" >/dev/null 2>&1 & } if cmd_exist polybar ; then __kill polybar # Open Polybar on all found monitors if type "xrandr"; then for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do MONITOR=$m polybar --reload herbstluftwm & done else polybar --reload herbstluftwm & fi fi if cmd_exist dunst ; then __kill dunst __start dunst fi if cmd_exist unclutter ; then __kill unclutter unclutter -root & fi if cmd_exist redshift ; then # Reset gamma before killing redshift and starting redshift -O 6500 -P __kill redshift __start redshift fi pgrep -x sxhkd > /dev/null || sxhkd & # Setup workspaces if type "xrandr"; then for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do bspc monitor $m -d 1 2 3 4 5 6 7 8 9 10 done else bspc monitor "eDP-1" -d 1 2 3 4 5 6 7 8 9 10 fi # Remove unplugged monitors bspc remove_unplugged_monitors true # Merge overlapping monitors (the bigger remains) bspc merge_overlapping_monitors true #bspc remove_disabled_monitors true bspc config border_width 2 bspc config window_gap 10 bspc config split_ratio 0.50 bspc config borderless_monocle true bspc config gapless_monocle true bspc config focus_follows_pointer true bspc config pointer_follows_focus true bspc config pointer_follows_monitor true # Color of the border of an unfocused window. bspc config normal_border_color \#898989 # Color of the border of a focused window of a focused monitor. bspc config focused_border_color \#33ffcc # Color of the border of a focused window of an unfocused monitor. bspc config active_border_color \#98971a bspc config presel_feedback_color \#33ffcc bspc config presel_feedback true bspc rule -a Gimp desktop='^8' state=floating follow=on bspc rule -a mpv state=floating sticky=on follow=off focus=on rectangle=640x360+1250+690