Add bspwm modes

This commit is contained in:
Tobias Reisinger 2022-01-30 21:29:23 +01:00
parent 9eca41e227
commit f79e4ac0ff
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
3 changed files with 38 additions and 18 deletions
.config/bspwm

View file

@ -2,18 +2,39 @@
. "$HOME/.config/environment"
pgrep -x sxhkd > /dev/null || sxhkd &
pgrep -x xcompmgr > /dev/null || xcompmgr -cnfFn -D3 &
bspc config remove_disabled_monitors true
bspc config remove_unplugged_monitors true
bspc config normal_border_color "#44475a"
bspc config active_border_color "#bd93f9"
bspc config focused_border_color "#ff79c6"
bspc config presel_feedback_color "#6272a4"
host_name=$(cat /proc/sys/kernel/hostname)
if [ "$host_name" = "portalo" ]; then
xrandr --output "$MONITOR_PRIMARY" --mode 2560x1440 --refresh 144
xrandr --output "$MONITOR_SECONDARY" --left-of "$MONITOR_PRIMARY"
mode=$(cat /tmp/bspwm_mode)
bspc monitor "$MONITOR_PRIMARY" -d web terminal 3 4 5 6 focus
bspc monitor "$MONITOR_SECONDARY" -d side-view voip messenger
if [ "$host_name" = "portalo" ]; then
if [ "$mode" = "presenter" ]; then
xrandr --output "$MONITOR_PRIMARY" --mode 2560x1440 --refresh 144
xrandr --output "$MONITOR_SECONDARY" --auto --left-of "$MONITOR_PRIMARY"
pkill xcompmgr;
bspc monitor "$MONITOR_PRIMARY" -d web terminal 3 4 5 6 focus voip messenger presenter1
bspc monitor "$MONITOR_SECONDARY" -d presenter2
elif [ "$mode" = "single" ]; then
xrandr --output "$MONITOR_SECONDARY" --off
bspc monitor "$MONITOR_PRIMARY" -d web terminal 3 4 5 6 focus side-view voip messenger
else
xrandr --output "$MONITOR_PRIMARY" --mode 2560x1440 --refresh 144
xrandr --output "$MONITOR_SECONDARY" --auto --left-of "$MONITOR_PRIMARY"
bspc monitor "$MONITOR_PRIMARY" -d web terminal 3 4 5 6 focus
bspc monitor "$MONITOR_SECONDARY" -d side-view voip messenger
fi
bspc wm -O "$MONITOR_PRIMARY" "$MONITOR_SECONDARY"
sleep 1
@ -85,11 +106,14 @@ bspc rule -a 'Signal' desktop='messenger'
bspc rule -a 'Thunderbird:Mail' desktop='messenger' locked='true'
pgrep -x sxhkd > /dev/null || sxhkd &
pgrep -x xcompmgr > /dev/null || xcompmgr -cnfFn -D3 &
"$HOME/.config/polybar/launch.sh" &
"$HOME/.config/bspwm/swallow.py" &
"$HOME/.config/bspwm/focus-voip.py" &
feh --bg-fill "$XDG_PICTURES_DIR/wallpaper/active_wallpaper"
killall conky
conky --daemonize --config="$HOME/.config/conky/clock.conf"
conky --daemonize --config="$HOME/.config/conky/system.conf"
conky --daemonize --config="$HOME/.config/conky/archlinux-updates.conf"