subscribes.sh 341 B

1234567891011121314151617
  1. #!/usr/bin/env bash
  2. # BSPWM
  3. # Set border_width to 1 for floating nodes and 3 to others
  4. bspc subscribe node_state | while read line
  5. do
  6. is_floating=$(echo "$line" | awk '{print $5, $6}')
  7. if [[ "$is_floating" == "floating on" ]]; then
  8. bspc config -n focused border_width 1
  9. else
  10. bspc config -n focused border_width 3
  11. fi
  12. done