From 85be0f5b38500655e0fef14282409f3475b94080 Mon Sep 17 00:00:00 2001 From: Allen <63997543+aaw3@users.noreply.github.com> Date: Wed, 2 Aug 2023 01:24:03 -0500 Subject: [PATCH] Now added the things --- polybar-launcher.sh | 17 +++++++++++++++++ polybar-restart | 2 +- trayer-restart | 4 ++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100755 polybar-launcher.sh create mode 100755 trayer-restart diff --git a/polybar-launcher.sh b/polybar-launcher.sh new file mode 100755 index 0000000..a275dc5 --- /dev/null +++ b/polybar-launcher.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +declare -A screen_map + +screen_map[DP-2]=0 +screen_map[DP-0]=1 + +if type "xrandr"; then + for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do + id=${screen_map[$m]} + MONITOR=$m MONITOR_ID="${screen_map[$m]}" polybar --config=~/.config/polybar/config-$id-top.ini & #TOP + MONITOR=$m MONITOR_ID="${screen_map[$m]}" polybar --config=~/.config/polybar/config-$id-bottom.ini & #BOTTOM + done +fi + +# Spawn trayer from here as Z clipping issue can be fixed from restarting trayer after polybar +/usr/local/bin/trayer-restart diff --git a/polybar-restart b/polybar-restart index c11b8e4..33af6bc 100755 --- a/polybar-restart +++ b/polybar-restart @@ -1,3 +1,3 @@ #!/bin/bash killall polybar > /dev/null 2>&1 -nohup polybar > /dev/null 2>&1 & +nohup /usr/local/bin/polybar-launcher.sh > /dev/null 2>&1 & diff --git a/trayer-restart b/trayer-restart new file mode 100755 index 0000000..57d50bd --- /dev/null +++ b/trayer-restart @@ -0,0 +1,4 @@ +#!/bin/bash + +killall trayer +nohup trayer --edge bottom --align right --widthtype request --padding 6 --SetDockType true --SetPartialStrut true --expand true --monitor 1 --transparent true --alpha 0 --tint 0x282a2e --height 32 --distancefrom top --distance 5 &> /dev/null 2>&1 &