Score:0

How to run polybar ubuntu 22.04 with apt

gw flag

I've been trying to install polybar on my Ubuntu laptop using:

sudo apt install polybar

or

sudo snap install polybar-git --edge

but with both I can't seem to get the example running and get the error: error: Define configuration using --config=PATH.

By default I did not have the folder ~/.config/polybar so I created it and added a config.ini file but was never able to specify the path like the error said. Does someone know what's going on ?

David avatar
cn flag
Please clarity did you install it or not? Title says you can not install it and body of the question says it is installed and you can not run it.
Terrance avatar
id flag
You might want to read through https://github.com/polybar/polybar/wiki
Zachary Gagnou avatar
gw flag
Yes my probleme has to do with runing rather than install
Score:0
cn flag

The package polybar does not automatically install a configuration file. You need to create one yourself.

At least one bar must be configured in the configuration file. In contrast to previous versions, you need to specify the name of the defined bar, even if there is a single one, when launching polybar. The man page, man polybar, points to resources on the internet for how to set it up.

Zachary Gagnou avatar
gw flag
That was my asumption so I did try to create a the folder with a config file in it. I think my problem is that I don't know how to properly indicate the path with the command ```polybar --config=PATH``` every time I try to use it just displays the help information and I still get the same error, am I not doing that correctly ?
vanadium avatar
cn flag
You do not need the --config option if your config file is in either of the locations I indicated.
Zachary Gagnou avatar
gw flag
Okay that makes more sense so I copied the example file from the location you specified and I added it to ```/etc/polybar/``` and I tried to run ```polybar example``` but still the same error, is there some more steps to take ?
Patrick Ziegler avatar
us flag
The polybar version in ubuntu 22.04 (polybar 3.5.7) does not load from `/etc/polybar` by default, it only looks at `~/.config/polybar/config`.
vanadium avatar
cn flag
Indeed, you will need to consult the documention for the current version. The crucial point of my answer is that no default config is installed, so that should help you forward.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.