restartpanels.sh 379 B

1234567891011121314151617
  1. #!/usr/bin/env bash
  2. installdir=/
  3. XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
  4. defaultpanel="$XDG_CONFIG_HOME/herbstluftwm/panel.sh"
  5. [ -x "$defaultpanel" ] || defaultpanel="$installdir/etc/xdg/herbstluftwm/panel.sh"
  6. panelcmd="${1:-$defaultpanel}"
  7. herbstclient emit_hook quit_panel
  8. for i in $(herbstclient list_monitors | cut -d':' -f1) ; do
  9. "$panelcmd" $i &
  10. done