summaryrefslogtreecommitdiffstats
path: root/herbstluftwm/restartpanels.sh
diff options
context:
space:
mode:
authorChristoph Schlosser <christoph@linux.com>2025-09-07 18:48:38 +0200
committerChristoph Schlosser <christoph@linux.com>2025-09-07 18:48:38 +0200
commitfc80d856863589de9d61755860d4394d5c3fd35e (patch)
tree1bcb74be56dd9200d2b6b4d908f344077f4bba58 /herbstluftwm/restartpanels.sh
parent875b3add8f4e265eeabd125472fb6d5186d3f8d5 (diff)
downloaddots-fc80d856863589de9d61755860d4394d5c3fd35e.tar.gz
hlwm: Add config
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..774208d
--- /dev/null
+++ b/herbstluftwm/restartpanels.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env 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