jaagr / dots

dotfiles for my local setup
529 stars 157 forks source link

Problem when launching polybar via i3 config file #3

Closed gabrielestrela closed 7 years ago

gabrielestrela commented 7 years ago

I followed the wiki instructions but without success... Beyond that problem about starting polybar, I have multiple monitors and I want to know how to setup polybar for each one and have polybar on top and bottom of my screens!

Thanks!!

jaagr commented 7 years ago

This could be caused by everything from a power outage to your monitor being broken making the bar invisible. Could you please supply some more information about what went wrong :-)

gabrielestrela commented 7 years ago

Sorry about that lack of details!! In the tutorial you said that we should create an sh file and make i3 exec it right?

I did that! But the bar does not show up!

After that I went to the i3 config again and changed this: " bar { status_command i3status tray_output primary position top

    colors {
        background $bg-color
        separator #757575
        #                  border             background         text
        focused_workspace  $bg-color          $bg-color

$text-color inactive_workspace $inactive-bg-color $inactive-bg-color $inactive-text-color urgent_workspace $urgent-bg-color $urgent-bg-color $text-color } } "

to this " bar { status_command polybar example tray_output primary position top

    colors {
        background $bg-color
        separator #757575
        #                  border             background         text
        focused_workspace  $bg-color          $bg-color

$text-color inactive_workspace $inactive-bg-color $inactive-bg-color $inactive-text-color urgent_workspace $urgent-bg-color $urgent-bg-color $text-color } } "

On Dec 26, 2016 3:03 PM, "Michael Carlberg" notifications@github.com wrote:

This could be caused by everything from a power outage to your monitor being broken making the bar invisible. Could you please supply some more information about what went wrong :-)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jaagr/dots/issues/3#issuecomment-269227286, or mute the thread https://github.com/notifications/unsubscribe-auth/ALC76u2Azz1qFbz6eGQ2PNdJhjACBSoMks5rL_NwgaJpZM4LV00F .

gabrielestrela commented 7 years ago

continuing the previous reply...

after changing that i got both i3 status bar and polybar! and just by adding the mode invisible i got rid off the i3 status bar!

okay.... but how do I add one more bar to my screen and make polybar extends to both monitors I have!

None of my monitors are broken haha =) I3 status works well by default!

On Mon, Dec 26, 2016 at 3:03 PM, Michael Carlberg notifications@github.com wrote:

This could be caused by everything from a power outage to your monitor being broken making the bar invisible. Could you please supply some more information about what went wrong :-)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jaagr/dots/issues/3#issuecomment-269227286, or mute the thread https://github.com/notifications/unsubscribe-auth/ALC76u2Azz1qFbz6eGQ2PNdJhjACBSoMks5rL_NwgaJpZM4LV00F .

jaagr commented 7 years ago

polybar isn't compliant with i3bar so you shouldn't use the bar sections to configure it. Add a separate call to your script at the root level:

exec_always --no-startup-id /path/to/your/script.sh

In that script you can launch multple bars

for bar in example otherbar; do
    polybar $bar &
done
gabrielestrela commented 7 years ago

That is the point where I want to get! I did as the wiki says, exactly the same as you said now! But it does not launch the polybar!

On Dec 26, 2016 4:32 PM, "Michael Carlberg" notifications@github.com wrote:

polybar isn't compliant with i3bar so you shouldn't use the bar sections to configure it. Add a separate call to your script at the root level:

exec_always --no-startup-id /path/to/your/script.sh

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jaagr/dots/issues/3#issuecomment-269233165, or mute the thread https://github.com/notifications/unsubscribe-auth/ALC76jSufpM1NVg-xyJwo_sTSiaVpjHwks5rMAhOgaJpZM4LV00F .

jaagr commented 7 years ago

Have you tried launching it in a terminal? I'd guess you're probably getting an error then.

You can save a log if you launch it using:

polybar example 2> ~/polybar.log || cat ~/polybar,log
gabrielestrela commented 7 years ago

by using that command on terminal, it returns this: cat: /home/user/polybar,log: No such file or directory

On Mon, Dec 26, 2016 at 4:46 PM, Michael Carlberg notifications@github.com wrote:

Have you tried launching it in a terminal? I'd guess you're probably getting an error then.

You can save a log if you launch it using:

polybar example 2> ~/polybar.log || cat ~/polybar,log

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jaagr/dots/issues/3#issuecomment-269233998, or mute the thread https://github.com/notifications/unsubscribe-auth/ALC76h2DWzmIh0kLWVae5NzFpn_26dMuks5rMAuGgaJpZM4LV00F .

gabrielestrela commented 7 years ago

in addition, the log file have:

polybar|error: Undefined bar: example

On Mon, Dec 26, 2016 at 10:34 PM, Gabriel Estrela < gabrielestrela92@gmail.com> wrote:

by using that command on terminal, it returns this: cat: /home/user/polybar,log: No such file or directory

On Mon, Dec 26, 2016 at 4:46 PM, Michael Carlberg < notifications@github.com> wrote:

Have you tried launching it in a terminal? I'd guess you're probably getting an error then.

You can save a log if you launch it using:

polybar example 2> ~/polybar.log || cat ~/polybar,log

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jaagr/dots/issues/3#issuecomment-269233998, or mute the thread https://github.com/notifications/unsubscribe-auth/ALC76h2DWzmIh0kLWVae5NzFpn_26dMuks5rMAuGgaJpZM4LV00F .

jaagr commented 7 years ago

Looks like your config doesn't have [bar/example]... did you rename it? Get a list using:

$ sed -nr 's|.+bar/([^\]+).+|\1|p' $HOME/.config/polybar/config
gabrielestrela commented 7 years ago

i did rename it!

changed to example again and it showed polybar but only on bottom of the screen!

Thanks for all hte helpp by the way! your are very nice!

Here is the log file content: " polybar|warn: No monitor specified, using "DP-5" polybar|warn: Systray selection already managed (window=0x160000c) polybar|error: Disabling module "bspwm" (reason: Could not find socket: /tmp/bspwm_0_0-socket) polybar|error: Disabling module "backlight" (reason: No backlight data found for "DP-5", stopping module...) polybar|error: Disabling module "battery" (reason: The file '/sys/class/power_supply/ADP1/online' does not exist) polybar|warn: Could not find glyph for 57967 polybar|warn: Could not find glyph for 57384 polybar|warn: Could not find glyph for 57382 polybar|warn: Could not find glyph for 57756 polybar|warn: Could not find glyph for 57546 polybar|warn: Could not find glyph for 57366 polybar|warn: Could not find glyph for 57612 polybar|warn: Could not find glyph for 57967 polybar|warn: Could not find glyph for 57384 polybar|warn: Could not find glyph for 57382 polybar|warn: Could not find glyph for 57756 polybar|warn: Could not find glyph for 57546 polybar|warn: Could not find glyph for 57366 polybar|warn: Could not find glyph for 57612 polybar|warn: Could not find glyph for 57967 polybar|warn: Could not find glyph for 57384 polybar|warn: Could not find glyph for 57382 polybar|warn: Could not find glyph for 57756 polybar|warn: Could not find glyph for 57546 polybar|warn: Could not find glyph for 57366 polybar|warn: Could not find glyph for 57612 polybar|warn: Termination signal received, shutting down...

"

I`m trying to use the daft punk example as a base of what I want to do!!

But I want to make polybar work on both of my two monitors!

On Mon, Dec 26, 2016 at 11:01 PM, Michael Carlberg <notifications@github.com

wrote:

Looks like your config doesn't have [bar/example]... did you rename it? Get a list using:

$ sed -nr 's|.+bar/([^]+).+|\1|p' $HOME/.config/polybar/config

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jaagr/dots/issues/3#issuecomment-269253323, or mute the thread https://github.com/notifications/unsubscribe-auth/ALC76jvE-nRNMphjrHvDXyuac-CCubfFks5rMGN8gaJpZM4LV00F .

jaagr commented 7 years ago

You can find all configuration parameters on the wiki. bottom = false for top bar's.

Note that the daftpunk configuration might be a bit old.

Just launch 2 bars and set different values for the parameter monitor:

$ polybar example &
$ polybar name-of-second-bar & 
gabrielestrela commented 7 years ago

Okay! thanks for helping me out! I found my mistake here! xD! Thank you vety much! By the way. Awesome work !

Just one more thing, can I launch more than two bars?

I will share your work and tell them how nice you were helping me here!

Thanks!!!

jaagr commented 7 years ago

Thanks! Appreciate it. Yes you can launch 3. bars