From 22755e2b7ecd165b605d1682404638034b6a0ac1 Mon Sep 17 00:00:00 2001 From: Shaun Reed Date: Sat, 14 Sep 2019 06:08:28 -0400 Subject: [PATCH] Update Polybar start script --- polybar/.config/polybar/start-polybar.sh | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/polybar/.config/polybar/start-polybar.sh b/polybar/.config/polybar/start-polybar.sh index ad410fd..811701a 100755 --- a/polybar/.config/polybar/start-polybar.sh +++ b/polybar/.config/polybar/start-polybar.sh @@ -1,8 +1,17 @@ -for m in $(polybar --list-monitors | cut -d":" -f1); do - MONITOR=$m polybar --reload top & - MONITOR=$m polybar --reload bottom & -done -#for m in $(polybar --list-monitors | cut -d":" -f1); do -# MONITOR=$m polybar --reload bottom & -#done +#!/bin/bash +## Author: Shaun Reed | Contact: shaunrd0@gmail.com | URL: www.shaunreed.com ## +## A script placed in ~/.config/polybar/ - Uses ${env:MONITOR} ## +## Starts polybars top and bottom on multiple displays ## +############################################################################### +# start-polybar.sh + +# Kill any previous polybars +pkill -f polybar + +# For each monitor in list up to ':' +for m in $(polybar --list-monitors | cut -d":" -f1); do + # Reload polybars with monitor device name + MONITOR=$m polybar --reload top & + MONITOR=$m polybar --reload bottom & +done