From 1a2357773586ee8421379de4070f71da40d1c679 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado <55825613+luevano@users.noreply.github.com> Date: Sat, 19 Dec 2020 17:59:51 -0700 Subject: Almost fully using bspwm --- .config/bspwm/bspwmrc | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to '.config/bspwm') diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc index db9b707..b152f41 100755 --- a/.config/bspwm/bspwmrc +++ b/.config/bspwm/bspwmrc @@ -1,13 +1,23 @@ #!/bin/sh -# Check if sxhkd is installed, I guess, -# because bspwm doesn't have keybindings by default. +# Checks if X program is already running, if not, run it. pgrep -x sxhkd > /dev/null || sxhkd & +pgrep -x statusbar > /dev/null || statusbar & # Multihead. -if [ $(hostname) == "arch" ]; then - bspc monitor DP-0 -d I II III IV V - bspc monitor HDMI-0 -d VI VII VIII IX X +if [ $(uname -n) = "arch" ]; then + MAINMON="DP-0" + SECMON="HDMI-0" + + bspc monitor $MAINMON -d 1 2 3 4 5 + bspc monitor $SECMON -d 6 7 8 9 10 + + if [ $(pgrep -f bspwm_enforce_monitor_position) < 2]; then + bspwm_enforce_monitor_position $MAINMON '^1' & + else + killall bspwm_enforce_monitor_position + bspwm_enforce_monitor_position $MAINMON '^1' & + fi else bspc monitor -d I II III IV V VI VII VIII IX X fi -- cgit v1.2.3-54-g00ecf