diff options
| author | Peter Son Struschka <me@peter-struschka.com> | 2020-10-11 12:15:08 +0800 |
|---|---|---|
| committer | Peter Son Struschka <me@peter-struschka.com> | 2020-10-11 20:22:03 +0800 |
| commit | e5209aad576fe44d3965fcb94d6709348b0a93bf (patch) | |
| tree | 3f8c4388d5b2511d78debf5e2d9b1357c3187b38 /herbstluftwm/.local/bin/restartpanels.sh | |
| parent | 37dd411698bd6eae8365260dde39b8ae9c7cbd36 (diff) | |
| download | dotfiles-e5209aad576fe44d3965fcb94d6709348b0a93bf.tar.gz dotfiles-e5209aad576fe44d3965fcb94d6709348b0a93bf.tar.bz2 dotfiles-e5209aad576fe44d3965fcb94d6709348b0a93bf.tar.lz dotfiles-e5209aad576fe44d3965fcb94d6709348b0a93bf.tar.xz dotfiles-e5209aad576fe44d3965fcb94d6709348b0a93bf.tar.zst dotfiles-e5209aad576fe44d3965fcb94d6709348b0a93bf.zip | |
all: overhaul
all: Remove old symlinks
herbstluftwm: use polybar instead of dzen2
polybar: update config
doom-emacs: update repository
Diffstat (limited to 'herbstluftwm/.local/bin/restartpanels.sh')
| -rwxr-xr-x | herbstluftwm/.local/bin/restartpanels.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/herbstluftwm/.local/bin/restartpanels.sh b/herbstluftwm/.local/bin/restartpanels.sh new file mode 100755 index 0000000..20d779e --- /dev/null +++ b/herbstluftwm/.local/bin/restartpanels.sh @@ -0,0 +1,27 @@ +#!/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 + +monitors=$(herbstclient list_monitors) + +for i in $(echo "$monitors" | cut -d':' -f1) ; do + "$panelcmd" "$i" & +done + +# wait and restart stalonetray +sleep 1 +killall -q stalonetray +while pgrep -u "$UID" -x stalonetray >/dev/null; do + sleep 1 +done +herbstclient spawn stalonetray --geometry 1x1+1250+0 --window-layer top -c "$XDG_CONFIG_HOME/stalonetray/stalonetrayrc" + |
