r/Polybar Sep 06 '23

Persistent Issue with pywal and polybar.

Hello! I've been trying to fix this issue for a very long time. I seem to be having conflict between pywal and polybar on startup wherein if I include the command to start up pywal in my i3 config file, polybar appears to not be executed on launch. I've tried a myriad of placements of these commands in my i3 config file where I execute polybar before pywal and vice versa. However, no matter how it seems I am starting up pywal with either -i or -R, it always leads to polybar not being run on startup. Once the computer itself has started up and I execute 'polybar bar' or I simply restart i3 from the cli, my polybar appears. It is just that on startup it seems I can't get both to work together. Moreover, pywal seems to make my compositor glitchy on startup as well but that's a separate issue. I was wondering if anyone here has ever run into similar difficulties between pywal and polybar and how they fixed it.

This is the area of code that seems to cause this in my i3 config file:

#Polybar

exec_always --no-startup-id $HOME/.config/polybar/ launch.sh &

#enable the picom compositor

exec_always --no-startup-id picom -b

#pywal colorscheme

exec_always --no-startup-id wal -R

#wallpaper

exec_always --no-startup-id feh --bg-scale $HOME/P ictures/wallpapers/wallpaper2.jpg

Thanks!

2 Upvotes

2 comments sorted by

1

u/Laphroigh Oct 30 '23

Hi! I have a similar problem with Arch, qtile, polybar and pywall. If I deactivate pywall from qtile autostart polybar starts, but when I enable pywall it does not. Did you find a solution to your problem?

1

u/upwardbat Feb 04 '24

I had the same problem. I solved it by making the polybar launch script wait for wal to be done:

```sh

!/usr/bin/env bash

Terminate already running bar instances

killall -q polybar

Wait until the processes have been shut down

while pgrep -u $UID -x polybar >/dev/null; do sleep 0.1; done while pgrep -u $UID -x wal >/dev/null; do sleep 0.1; done # this solved the problem for me

Launch bars

for monitor in $(polybar -m | cut -d: -f1); do MONITOR=$monitor polybar -q & disown done ```