diff options
author | David Luevano Alvarado <55825613+luevano@users.noreply.github.com> | 2020-12-20 09:43:09 -0700 |
---|---|---|
committer | David Luevano Alvarado <55825613+luevano@users.noreply.github.com> | 2020-12-20 09:43:09 -0700 |
commit | b8e8d75bdfb7017deb46249f2b3fb9725f2713ab (patch) | |
tree | 10688277521b34f0bc08c5253e4bee2a3c3dd57a /.local | |
parent | a3c9e885a626d33fd7dab2a83a7cb6b33740b46a (diff) |
Add comments
Diffstat (limited to '.local')
-rwxr-xr-x | .local/bin/bspwm_enforce_monitor_position | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/.local/bin/bspwm_enforce_monitor_position b/.local/bin/bspwm_enforce_monitor_position index 75ba358..8dfff3c 100755 --- a/.local/bin/bspwm_enforce_monitor_position +++ b/.local/bin/bspwm_enforce_monitor_position @@ -2,11 +2,14 @@ # Taken from: # https://github.com/baskerville/bspwm/issues/679 +# Get monitor id and monitor position from passed arguments. MON_ID=$(bspc query -M -m "$1") MON_POS="$2" +# Initial swap to main monitor. [ $(bspc query -M -m "$MON_POS") != "$MON_ID" ] && bspc monitor "$MON_POS" -s "$MON_ID" +# Keep checking for monitor swaps. bspc subscribe monitor_swap | while read msg ; do [ $(bspc query -M -m "$MON_POS") != "$MON_ID" ] && bspc monitor "$MON_POS" -s "$MON_ID" done |