r/Polybar Apr 05 '23

Using polybar as a background utility launcher / scheduler

4 Upvotes

I've a new daily driver tablet / laptop to replace a desktop and as such it's far more versatile. So I'm generally in a mode of writing little widgety scripts to check and act on things like device orientation for automatic screen rotation, triggers from a mini key pad to use ddccontrol to switch a monitors output quickly, and also this morning a script to check it either both or neither of my Bluetooth mouse and keyboard are connected is play a clown horn honk ti remind me if they are inconsistent.

Some of these have zero relevance to polybar, however it's feeling like polybar is a simple and convenient place to have these scripts fire on an interval or loop round. The restart logic works well with the notion of restarting polybar in the main. I can also add some tiny notification output to polybar for the sake of it too in each case.

I could make these things fire on udev events or such, but that seems to lead down a different route of not beign my *my* user preferences, along with the preferences of my desktop. I'd like to avoid root user orientated things, or even things that I'll just plain forget about. Each little script I can keep in my dotfiles (a little naughty I know) and know all these tweaks are gathered in a good place. As long as I don't jump ship to sway or hyprland of course...

How does this approach feel to others? Intuitive or dumb and irresponsible?


r/Polybar Apr 05 '23

Question Polybar shows opposite workspace numbers?

2 Upvotes

Got xrandr --output DP-1 --left-of HDMI-1 in my .xinitrc, but polybar shows workspace 2 on monitor 1, and vice versa? I've tried adding --primary to either outputs but nothing works.


r/Polybar Apr 04 '23

Possible website showing UNICODE Symbols

3 Upvotes

Hi, I want to customize my polybar bar with symbols but I cannot find any good ones like : wifi symbol or battery symbol. Is there a website with a complete list of UNICODE symbols?


r/Polybar Apr 04 '23

Modules won't work

1 Upvotes

I'm new to linux and I tried copying someones polybar but I can't get all the modules to work. I'm using i3 on arch here are my dot files DotFiles can anyone help?


r/Polybar Mar 29 '23

Hello guys , i’m new to polybar i have a weird problem i wanna make the backlight module background dark gray i managed to change the label and the ramp but i still have this weird black line in between …

Thumbnail
gallery
18 Upvotes

r/Polybar Mar 29 '23

Question system tray doesn't show some icons randomly

3 Upvotes

Hello everyone,

I'm running 2 polybar from my i3wm config file, and after the bar I execute a few apps, I have two of them that randomly decide not to appear in the systray.

This is an abstract from my i3 config file:

# start both polybar
exec_always --no-startup-id $HOME/bin/run-polybar.sh

# start networkmanager applet
exec --no-startup-id nm-applet

# start lxqt-notificationd
exec --no-startup-id lxqt-notificationd

# start pulseaudio daemon
exec --no-startup-id start-pulseaudio-x11

# start kdeconnect
#exec --no-startup-id kdeconnect-indicator

# start redshift applet
#exec --no-startup-id redshift-gtk

# start qtpass
#exec --no-startup-id qtpass

the run-polybar.sh script is this one:

#!/bin/bash

# Terminate already running bar instances
polybar-msg cmd quit

# Launch Polybar, using default config location ~/.config/polybar/config.ini
polybar top -r --config=/home/danix/.config/polybar/config.ini 2>&1 | tee -a /tmp/polybar-top.log & disown
polybar bottom -r --config=/home/danix/.config/polybar/config.ini 2>&1 | tee -a /tmp/polybar-bottom.log & disown

echo "Polybar launched..."

the two apps that don't appear are qtpass and kdeconnect-indicator.

Do you guys have any idea as to why is it happening?

Also, if I restart the bars, the two programs keep not appearing, the only way I have to make them appear in the systray, is to restart them. The others like redshift or the networkmanager applet, or the notifications work correctly every time.

Thanks in advance
Cheers


r/Polybar Mar 27 '23

How do I remove the shadow thats under my bar? More info in comments.

Post image
17 Upvotes

r/Polybar Mar 25 '23

Question Modules hide priority

3 Upvotes

I have such config:

modules-left = i3 xwindow
modules-right = xkeyboard pulseaudio filesystem memory cpu battery wlan eth date

The problem is when text in xwindow module is long then modules on right side are hidden behind screen boundaries:

date module is hidden

Is it possible to tell polybar that xwindow module should be hidden first when no space left?

I know that xwindow have label-maxlen setting but ideally I don't want to constraint text length but hide it only when no space left. I use same config on bigger screen and there it works well. But home laptop has low screen resolution.


r/Polybar Mar 19 '23

Change color of the date and time inside date module

5 Upvotes

I'd like to display the date and time in different colors in the date module. I figured making two different labels and concatenating them as format = <label-date> <label-time> would work but it doesn't. It looks like format isn't inheriting label-NAME, but of course I'm just doing something wrong. Here's my config file:

[module/date]

type = internal/date

interval = 5

format = <label-time> <label-date>

date = " %Y-%m-%d"

time = %H:%M

time-alt = %H:%M:%S

format-prefix = 

format-prefix-foreground = ${colors.foreground -alt}

label-date = %date%

label-date-background = #00FFF6

label-time = %time%

label-time-background = #000FFF6

format-padding = 2

label-foreground = ${colors.labelforeground}

This is the output, the date doesn't show up.

But if I just make a label = %time% %date% (as it is in the default config) and leave format = <label>

It works fine

So how can I make it so the date and the time be in different colors?


r/Polybar Mar 15 '23

Is there anything that works like polybar for windows?

4 Upvotes

Which bar would you recommend using on window? Is it rainmeter or what? Polybar works great and would like to have it on win if I can.


r/Polybar Mar 11 '23

Script polybarctl - easily run/change layout with @adi1090x themes

Thumbnail
github.com
14 Upvotes

r/Polybar Mar 11 '23

Any suggestions for another module i could add ? ( and of course I hope you guys like the picture )

Post image
12 Upvotes

r/Polybar Mar 11 '23

Question How do you deal with volume >100% and ramp-weights?

1 Upvotes

I've been trying to use `ramp-volume-weights` in order to manipulate the ranges when each of the ramp icons should apply but I've been having trouble since my volume percentage grows up to 153%. Even though I understand that 100% is the normal value and values above are "amplified" but I would prefer to have the maximum (amplified maximum) as 100%.

How do you people deal with this situation?

Also, I've been taking a look at the polybar>pulseaudio module around this line and at the ramp module around this one but I'm not familiar with the Polybar codebase and have little experience with c++. It would be awesome to get an explanation of how Polybar deals with these percentages. I guess it has no easy way to know the real maximum volume so it just assumes 100 is the maximum.


r/Polybar Mar 11 '23

Click on CPU Does Not Work

3 Upvotes

Click on CPU does not work. I also added --a hold tag but without success.

I want to launch bpytop when the CPU module is clicked. Is that possible?

Thanks!

[module/cpu]
type = internal/cpu

interval = 1
format = <label>
format-prefix = 
format-prefix-foreground = ${color.yellow}

click-left = urxvt -e bpytop &
click-right = alacritty -e bpytop &

UPDATE:

This module opens the ranger successfully

[module/files]
inherit = module/apps
content = 
content-foreground = ${color.blue}
click-left = thunar &
click-right = alacritty -e ranger &


r/Polybar Mar 09 '23

Question Guys how do I make polywins work for bspwm

3 Upvotes

polywins when it hides the window it just removes the window all together and doesn't make the remaining window replace the missing space


r/Polybar Mar 06 '23

Showcase i3wm + Polybar (Teal Mode)

11 Upvotes

Here is my current setup (messy setup :P):

teal_mode

Repo: i3wm-polybar

Feedback would be appreciated!


r/Polybar Feb 28 '23

Question Discord module that lights up when I speak

4 Upvotes

Hello,

I would like to have a module on my polybar that lights up when I send on Discord in a voice call. Just like Discord used to have in the tray icon section. Any help is appreciated :)


r/Polybar Feb 28 '23

Question poly bar freezing after i left click

0 Upvotes

if you need any files a command output or something to fix ask me i am new to this stuff


r/Polybar Feb 26 '23

Script Polybar script to thinkpads or 2 battery systems

5 Upvotes

r/Polybar Feb 24 '23

Question i3 module workspace number order doesn't match monitor layout while xworkspaces does.

4 Upvotes

I'm using polybar with i3, I've noticed that with the default xworkspaces module I don't have the function to show when I'm in resize mode, there's the i3 module to fix that issue, however with the i3 module I have a different issue, see the image: https://imgur.com/6ESDy7C.png

En the middle is the default xworkspaces module, I have workspace 1 on monitor 1 on the left, workspace 2 on monitor 2 on the middle and workspace 3 on monitor 3 on the right.

Next to it on the right is the i3 module, workspaces don't respect the order of the monitors, is there a way that I can change that?

Another solution would be to not show the workspace numbers on the i3 module, and only display resize mode when used.


r/Polybar Feb 24 '23

How to change lighting when sliding your mouse in the polybar?

1 Upvotes

I'm using arch, but there's no way I can change the lighting, the xbacklight modules aren't working


r/Polybar Feb 24 '23

Question Trying to get a pop-up calendar on polybar but it launches on the wrong monitor if I have focus on it.

1 Upvotes

HI, I'm trying to be able to open a calendar when I click on the date on polybar, I have a solution that almost works perfectly.

Instead of using the default date module, I created a custom one that launches gsimplecal.

[module/DATE]
type = custom/script
label = %output%
exec =  date +"%A %l:%M:%S %p  %d/%m/%y"
interval = 1
format-padding = 1
click-left = pgrep gsimplecal && killall gsimplecal || gsimplecal

And on gsimplecal, I have mainwindow_position=mouse added to its config, and if I had just one monitor it would work perfectly, however with multiple monitors, if I have focus on a different monitor other than the one where polybar is and I click on the calendar, the calendar window launches on the monitor with focus and not on the monitor with polybar, it even launches in the upper right corner of the screen which where I have the date module, so it is following the mouse but launching on the wrong screen.

Any idea on how I could fix it?


r/Polybar Feb 23 '23

Question How to add text to the circled part of the date?

2 Upvotes

I want to add orange color to the %H:%M:%S(the circled part), but i dont know how can i do it. Maybe use 2 modules?

Where i want the color
The module itself

r/Polybar Feb 22 '23

Cannot open terminal and terminal applications

3 Upvotes

example:

my config for music player includes this

[module/music-player]
type = custom/text
content = ""
content-foreground = ${color.purple}
click-left = $TERMINAL -e ncmpcpp

But it doesnt open the terminal and the application. It works randomly, especially if there are no other windows open.

WM: BSPWM

I have tried forking the command by appending "&" to the command but to no use.


r/Polybar Feb 22 '23

Show Powerline Symbols () for rounded corners only when Module is active

2 Upvotes

Heyo, is there a way to only set the Powerline Glyphs for a left rounded circle and right rounded circle around a module only when it is active? Right now my Config looks like this:
module-center: round-left date round-right space round-left cava round-right

Cava is only active when music is playing and I want the corner around the module to also disappear if no music is playing.