From 274c4c187f199d1c9dc59793f99e50d2d50f01a9 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado <55825613+luevano@users.noreply.github.com> Date: Sun, 20 Dec 2020 13:11:43 -0700 Subject: Add polybar and rename lemonbar --- .local/bin/statusbar/polybar_panel | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 .local/bin/statusbar/polybar_panel (limited to '.local/bin/statusbar/polybar_panel') diff --git a/.local/bin/statusbar/polybar_panel b/.local/bin/statusbar/polybar_panel new file mode 100755 index 0000000..d3e198c --- /dev/null +++ b/.local/bin/statusbar/polybar_panel @@ -0,0 +1,21 @@ +#!/bin/sh + +# Terminate already running bar instances +killall -q polybar + +# Wait until the processes have been shut down +while pgrep -u "$(id -ru)" -x polybar >/dev/null; do sleep 1; done + +# Launch bar1 and bar2 +bar1=main +bar2=second +echo "---" | tee -a /tmp/$bar1.log /tmp/$bar2.log + +polybar $bar1 >>/tmp/$bar1.log 2>&1 & disown + +# externo=$(xrandr --query | grep "HDMI1") +# if [ ! "$externo" = "*disconnected*" ]; then +# MONITOR="HDMI1" polybar --reload $bar2 -c ~/.config/polybar/config >>/tmp/$bar2.log 2>&1 & +# fi + +echo "Bars launched..." -- cgit v1.2.3-54-g00ecf