Tweak polybar start script so bar on primary screen starts first
This commit is contained in:
parent
593b575ccb
commit
9a1b302712
1 changed files with 5 additions and 1 deletions
|
@ -83,9 +83,13 @@ in
|
||||||
${pkgs.polybar}/bin/polybar-msg cmd quit
|
${pkgs.polybar}/bin/polybar-msg cmd quit
|
||||||
while ${pkgs.procps}/bin/pgrep -u ''${UID} -x polybar > /dev/null; do sleep 0.1; done
|
while ${pkgs.procps}/bin/pgrep -u ''${UID} -x polybar > /dev/null; do sleep 0.1; done
|
||||||
|
|
||||||
outputs=$(${pkgs.polybar}/bin/polybar -m | ${pkgs.coreutils}/bin/cut -d ':' -f 1)
|
outputs=$(${pkgs.polybar}/bin/polybar -m | ${pkgs.gnugrep}/bin/grep -v primary | ${pkgs.coreutils}/bin/cut -d ':' -f 1)
|
||||||
primary=$(${pkgs.polybar}/bin/polybar -m | ${pkgs.gnugrep}/bin/grep primary | ${pkgs.coreutils}/bin/cut -d ':' -f 1)
|
primary=$(${pkgs.polybar}/bin/polybar -m | ${pkgs.gnugrep}/bin/grep primary | ${pkgs.coreutils}/bin/cut -d ':' -f 1)
|
||||||
|
|
||||||
|
MONITOR=''${primary} polybar -q main & disown
|
||||||
|
|
||||||
|
sleep 0.5 # Make sure the primary bar is started so the tray appears here
|
||||||
|
|
||||||
for m in ''${outputs}; do
|
for m in ''${outputs}; do
|
||||||
MONITOR=''${m} polybar -q main & disown
|
MONITOR=''${m} polybar -q main & disown
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue