aboutsummaryrefslogtreecommitdiff
path: root/src/config/files/polybar/preview.sh
diff options
context:
space:
mode:
authorAaditya Dhruv <[email protected]>2023-09-09 23:09:21 -0500
committerAaditya Dhruv <[email protected]>2023-09-09 23:09:21 -0500
commit39044cddeeba5ad91402f8abfb2a286e48a4f50d (patch)
tree5187a5cba1e6f437e59310f17956f16e3638d291 /src/config/files/polybar/preview.sh
parent1811600f4f2547a6116e1cc1c91f8cf89adcac6b (diff)
Move files for config role
This movement is needed to maintain the role structure
Diffstat (limited to 'src/config/files/polybar/preview.sh')
-rwxr-xr-xsrc/config/files/polybar/preview.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/config/files/polybar/preview.sh b/src/config/files/polybar/preview.sh
new file mode 100755
index 0000000..695d051
--- /dev/null
+++ b/src/config/files/polybar/preview.sh
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+
+DIR="$HOME/.config/polybar/forest"
+
+# 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 &