aboutsummaryrefslogtreecommitdiff
path: root/config/polybar/shades/preview.sh
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <anhgelus.morhtuuzh@gmx.com>2023-07-25 23:46:05 +0200
committerAnhgelus Morhtuuzh <anhgelus.morhtuuzh@gmx.com>2023-07-25 23:46:05 +0200
commitc57e8ab185623510e527400a34d729b313daffc4 (patch)
tree7b67d44894255ce4810d8074d68fce88f66d37d0 /config/polybar/shades/preview.sh
parent9f004955033387eebf3f58aec2501fba5020f307 (diff)
feat(polybar): update polybar style
Diffstat (limited to 'config/polybar/shades/preview.sh')
-rwxr-xr-xconfig/polybar/shades/preview.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/config/polybar/shades/preview.sh b/config/polybar/shades/preview.sh
new file mode 100755
index 0000000..894e441
--- /dev/null
+++ b/config/polybar/shades/preview.sh
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+
+DIR="$HOME/.config/polybar/shades"
+
+# Terminate already running bar instances
+killall -q polybar
+
+# Wait until the processes have been shut down
+while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
+
+# Launch the preview bar
+polybar -q top -c "$DIR"/preview.ini &
+polybar -q mid -c "$DIR"/preview.ini &
+polybar -q bottom -c "$DIR"/preview.ini &