summaryrefslogtreecommitdiff
path: root/herbstluftwm/restartpanels.sh
diff options
context:
space:
mode:
authorMatias Linares <matiaslina@openmailbox.org>2015-10-23 03:14:36 -0300
committerMatias Linares <matiaslina@openmailbox.org>2015-10-23 03:14:36 -0300
commit5b132bf1244a008ad3ce67688030a7678831f77d (patch)
tree501aa27e89f81d5f4bdfaab31c72378991a9c749 /herbstluftwm/restartpanels.sh
downloaddotfiles-5b132bf1244a008ad3ce67688030a7678831f77d.tar.gz
Initial commit
Diffstat (limited to 'herbstluftwm/restartpanels.sh')
-rwxr-xr-xherbstluftwm/restartpanels.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/herbstluftwm/restartpanels.sh b/herbstluftwm/restartpanels.sh
new file mode 100755
index 0000000..9d9110c
--- /dev/null
+++ b/herbstluftwm/restartpanels.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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