aboutsummaryrefslogtreecommitdiffstats
path: root/.config/herbstluftwm/restartpanels.sh
blob: 1d14f1dbc7568c954f4a70456580416d2f15abba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/zsh

installdir=/

XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
defaultpanel="$XDG_CONFIG_HOME/herbstluftwm/panel.sh"

[ -x "$defaultpanel" ] || defaultpanel="$installdir/etc/xdg/herbstluftwm/panel.sh"

panelcmd="${1:-$defaultpanel}"

herbstclient emit_hook quit_panel

for i in $(herbstclient list_monitors | cut -d':' -f1) ; do
    "$panelcmd" $i &
done