Newbie here, Polybar is not showing up

hello everyone,
i wanted to switch to polybar from the i3bar but i cant seem to find the reason why polybar is not showing up. it shows up if i run it in my terminal.
my i3 config file i simply added the exec_always --no-startup-id ~/.config/polybar/launch.sh and commented out the bar
here is the i3 config file
config

as for polybar its a basic and simple one

launch.sh

#!/bin/bash

# Terminate already running bar instances

killall -q polybar

# If all your bars have ipc enabled, you can also use

# polybar-msg cmd quit

# Launch Polybar, using default config location ~/.config/polybar/config.ini

polybar mybar 2>&1 | tee -a /tmp/polybar.log & disown

echo "Polybar launched...

and
config.ini
please help me, thank u very much

1 Like

Your polybar name doesn’t match with line 28 in config.ini

[bar/example]

make it like:

[bar/mybar]

6 Likes

… and Welcome to the community @ArchAdventurer

2 Likes

bar {
i3bar_command $HOME/.config/polybar/launch.sh
}

Our change the location to where launch.sh stored. Make sure launch.sh is executable.

I also used to auto start polybar I just changed it to bar command for neatness.

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

1 Like

@ArchAdventurer just use in your i3 config:

exec_always --no-startup-id polybar -r example
3 Likes