new installation setup
[~bandali/configs] / bspwm / .local / bin / panel
diff --git a/bspwm/.local/bin/panel b/bspwm/.local/bin/panel
new file mode 100755 (executable)
index 0000000..a981f43
--- /dev/null
@@ -0,0 +1,30 @@
+#! /bin/sh
+
+if [ $(pgrep -cx panel) -gt 1 ] ; then
+       printf "%s\n" "The panel is already running." >&2
+       exit 1
+fi
+
+trap 'trap - TERM; kill 0' INT TERM QUIT EXIT
+
+[ -e "$PANEL_FIFO" ] && rm "$PANEL_FIFO"
+mkfifo "$PANEL_FIFO"
+
+bspc config top_padding $PANEL_HEIGHT
+bspc control --subscribe > "$PANEL_FIFO" &
+#xtitle -sf 'T%s' > "$PANEL_FIFO" &
+#clock -sf 'S%a %H:%M' > "$PANEL_FIFO" &
+
+#pamixer --get-volume > /tmp/volinfo
+#if $(pamixer --get-mute) ; then
+    echo ⮝ > /tmp/spkicon
+#else
+#    echo ⮟ > /tmp/spkicon
+#fi
+conky > "$PANEL_FIFO" &
+
+. panel_colors
+
+cat "$PANEL_FIFO" | panel_bar | bar -g x$PANEL_HEIGHT -f "$PANEL_FONT_FAMILY1","$PANEL_FONT_FAMILY2" -F "$COLOR_FOREGROUND" -B "$COLOR_BACKGROUND" &
+
+wait