diff options
author | David Luevano Alvarado <55825613+luevano@users.noreply.github.com> | 2020-12-19 17:59:51 -0700 |
---|---|---|
committer | David Luevano Alvarado <55825613+luevano@users.noreply.github.com> | 2020-12-19 17:59:51 -0700 |
commit | 1a2357773586ee8421379de4070f71da40d1c679 (patch) | |
tree | 0d56955ebb4d28120b9d04942dc59d2a7315bd80 /.config/bspwm | |
parent | ffb920179648bd4fdde1eb8b2e8b8e068fb4eb4b (diff) |
Almost fully using bspwm
Diffstat (limited to '.config/bspwm')
-rwxr-xr-x | .config/bspwm/bspwmrc | 20 |
1 files changed, 15 insertions, 5 deletions
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 |