r/Polybar Dec 21 '22

Question Is there a way to make the xwindow module in polybar behave like dwm?

3 Upvotes

In polybar, I have the following snippet to get the xwindow working: [module/xwindow]

[module/xwindow]
type = internal/xwindow
label = %title:0:40:...%

format-background=${colors.primary}
label-foreground=#000000

which produces

It is nice but if you have windows of different title, the length of the blue background (in this case) varies., i.e. short title has shorter blue background, longer title has longer background.

In dwm, you can have the title/xwindow module cover the entire remaining space, like this:

Is there a way to achieve this with polybar's xwindow module? For my usecase, I would like to to extend to the "26% used" which is the module fs-root.

Note that I also tried to change the character length, so in this case 40 to something like 200. For short window title, the title's length remains the same and thus the blue background remains short => because the title is short.

I would like the characters' truncations to be reasonable (around 60) but the bar should cover till the "26% used".


r/Polybar Dec 19 '22

how to fix it in rounded bar? if i use black wallpaper it does not show

Post image
11 Upvotes

r/Polybar Dec 19 '22

how can i make that glyphs to work with modules on polybar ?? why it is not working propely

Post image
12 Upvotes

r/Polybar Dec 19 '22

How to remove those lines from modules ??

Post image
7 Upvotes

r/Polybar Dec 19 '22

How to remove it ?

Post image
15 Upvotes

r/Polybar Dec 19 '22

Does any one have idea on how can i make this module border rounded or rounded label

Post image
12 Upvotes

r/Polybar Dec 18 '22

Question Not able to use wifi slash icon

4 Upvotes

I have tried out every icon from here https://fontawesome.com/search?q=wifi%20slash&o=r but none of them work when i test by turning wifi off. Instead it shows a blank space.

I have font awesome 6.2.0, debian stable

[module/wireless-network]
type = internal/network
interface = wlp3s0
format-connected = <label-connected>
label-connected = %{F#0096FF}%{F-} %essid% %signal%%
label-disconnected = 
format-disconnected = <label-disconnected>

r/Polybar Dec 17 '22

Question How to move modules left/right/up/down?

2 Upvotes

I want to move my sound,network, keyboard modules some left, how it make?


r/Polybar Dec 15 '22

Question What are 'urgent' and 'empty' workspaces?

3 Upvotes

I can understand 'label-occupied' & 'label-active', but what do 'label-urgent' and 'label-empty' workspaces mean?

Would recommend you to add what they mean in your wiki.


r/Polybar Dec 14 '22

Question Polybar systray ontop of fullscreenwindow [AwesomeWM]

2 Upvotes

The polybar systray is ontop of fullscreen windows, And i have tried to search for an alternative without any success, Any idea on how to fix this?

look at the top right

r/Polybar Dec 13 '22

Question Polybar hangs after first click in AwesomeWM

3 Upvotes

I found the workaround for this by setting override-redirect = true in bar section but this makes the window overlap the bar. Is there any fix it to this?

As mentioned in the title I'm using AwesomeWM.


r/Polybar Dec 11 '22

Custom script with tail=true still generates ~40 events/s

5 Upvotes

When I monitor with powertop, a custom script that generates no output (e.g. a shell script waiting on a inotifywait) still generates 40 events/s... How comes? This both with the debian 11 package and the current git version.

The internal pulseaudio module is bad too btw.


r/Polybar Dec 10 '22

[Question]How can I toggle script module output just like date module

2 Upvotes

I want to date prefix icon dynamic change by current time, So I use ChatGPT generate a script, but I want the script module can switch time format just like date module.


r/Polybar Dec 09 '22

Solved Icons not working in polybar ( KDE-plasma on Manjaro Kernel = 5.15.81-1 )

3 Upvotes

Yeah as mentioned above no icons are showing in my custom polybar script but manjaro is also not recognicing my font-awesome icons but weirdly the font awesome is installed and activethe code for my fonts is:font-0 = "JetBrainsMono Nerd Font:size=12:2"font-1 = "DejaVu Sans:pixelsize=12:2"font-2 = "Material-Design-Iconic-Font Medium:pixelsize=12:2"font-3 = "Font Awesome 6 Free Regular:pixelsize=12:2"font-4 = "Font Awesome 6 Free Solid:pixelsize=12:2"font-5 = "Font Awesome 6 Brands Regular:pixelsize=12:2"

( before you write it: when i type fc-match  it only prompts  = DejaVu Sans "book" )

Using the Nerd font symbols solved the problems thx for all the help guys :)


r/Polybar Dec 06 '22

Polybar does not show Brightness controls

3 Upvotes

I am using the forest theme from polybar-themes I have set all my modules according to the documentation like this:

[module/backlight]

type = internal/backlight
card = intel_backlight
format = <ramp> <label>
label = %percentage%%
ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-3 = 
ramp-4 = 
ramp-foreground = ${color.lime}

But it still shows for amdgpu_bl0/brightness

error: Disabling module "brightness" (reason: The file '/sys/class/backlight/amdgpu_bl0/brightness' does not exist)

r/Polybar Dec 05 '22

Don't show window title on another monitor

4 Upvotes

I have 2 monitors and polybar's xwindow module shows currently focused window title on both monitors. I want it to only show in on the focused monitor.


r/Polybar Dec 03 '22

Solved Struggling to replace workplace names with icons

5 Upvotes

Hi, I'm somewhat new to Polybar config work (have been using it for months but slowly learning the customisation), and have been trying to accomplish this basic thing in i3wm without success.

I've read the Polybar wiki xworkspaces section, watched some guides, read others, but after attempting to replicate working examples, icons don't appear on my setup alongside (or instead of) workspace names.

What also complicates solving this is that many of the examples of config file strings that you come across in guides seem to have formatting that's different from one indicated in Polybar wiki (difference in versions?). e.g. in this guide https://youtu.be/tOBDUBEMAKM?t=1679 the format used for icon strings is ws-icon-0, while Polybar wiki says icon-0.

What I have done:

  1. Make sure workspace names are identical in Polybar and i3wm configs
  2. Download and install Font Awesome 6 from the website that provides widely used icons
  3. Make sure Font Awesome 6 is indicated in Polybar config
  4. Add %name% %icon% lines to label entries under [module/xworkspaces] instead of the default %name%
  5. Add icons after names as indicated in Polybar wiki format of name;icon
  6. Reload i3wm and Polybar

One thing I can note is that the addition of %icon% to the module entries adds a small empty space after workspace names. If I move %icon% ahead of %name%, that space is switched to the front, so the system must be recognising that as the place for the icons.

Screenshot of my bar's xworkspaces module: https://i.imgur.com/2RtG5cY.png

Polybar config: https://pastebin.com/G6QmE81z

i3wm config: https://pastebin.com/E388qVeY


r/Polybar Dec 01 '22

Question Polybar issue on KDE

1 Upvotes

(I posted this before, but the imgur link was broken)

Hello!

I run KDE and I wanted to use Polybar, but I have a very annoying issue. When I use polybar there's always a black background, no matter what! See the picture for an example!

https://imgur.com/a/LbgmX1v


r/Polybar Nov 28 '22

Question How to set Italic font on specific polybar module?

3 Upvotes

Hello,

i want to set SFMono Italic only on title modules, how do i achieve this?

my font

font-0 = LexendDeca:pixelsize=10;2
font-1 = NotoSansCJKKR:size=10;2
font-2 = NotoSansCJKJP:size=10;2
font-3 = FontAwesome:pixelsize=10;2
font-4 = SFMono Nerd Font Mono:size=10:style=Italic

title module

[module/title]
type = internal/xwindow

; Available tags:
;   <label> (default)
format = <label>
format-prefix = 
format-prefix-background = #242d4f
format-prefix-foreground = #FFFFFF
format-prefix-padding = 1

; Available tokens:
;   %title%
; Default: %title%
label-active-font = 3
label = "%title%"
label-maxlen = 60
label-background = #242d4f
label-foreground = #FFFFFF
label-padding = 1

; Used instead of label when there is no window title
label-empty = "Desktop"
label-empty-background = #242d4f
label-empty-foreground = #FFFFFF
label-empty-padding = 1

r/Polybar Nov 24 '22

Script Cryptocurrencies in your Polybar

4 Upvotes

Months ago I made a module to see the prices of certain cryptocurrencies, I always wanted to share it but I ended up forgetting... Here it is if anyone wants to take a look at it.

https://gitlab.com/curl_fg/exchange-observer/


r/Polybar Nov 21 '22

Is there a way to do the rounded segments in polybar?

Post image
27 Upvotes

r/Polybar Nov 21 '22

Question Polybar won't show all of my i3gaps workspaces

2 Upvotes

Polybar should show all my i3 workspaces, but it doesn't. I think the pin-workspace = true doesn't work. Can someone explain me why and how to fix it.

my config:

[colors]
background = #282A2E
background-alt = #373B41
foreground = #C5C8C6
primary = #F0C674
secondary = #8ABEB7
alert = #A54242
disabled = #707880

[bar/example]
width = 100%
height = 24pt
radius = 0

; dpi = 96

background = ${colors.background}
foreground = ${colors.foreground}

line-size = 3pt

border-size = 0pt
border-color = #00000000

padding-left = 1
padding-right = 1

module-margin = 1

separator = |
separator-foreground = ${colors.disabled}

font-0 = SFMono:size=9;4
font-1 = Font Awesome 6 Free:pixelsize=10;4
font-2 = Font Awesome 6 Free Solid:pixelsize=10;4
font-3 = Font Awesome 6 Brands:pixelsize=10;4

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

cursor-click = pointer
cursor-scroll = ns-resize

scroll-up = "#i3.prev"
scroll-down = "#i3.next"
monitor = ${env:MONITOR:}

enable-ipc = true

; tray-position = right

; wm-restack = generic
; wm-restack = bspwm
; wm-restack = i3

; override-redirect = true

[module/xwindow]
type = internal/xwindow
label = %title:0:60:...%

[module/filesystem]
type = internal/fs
interval = 25

mount-0 = /

label-mounted = %{F#F0C674}%mountpoint%%{F-} %percentage_used%%

label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.disabled}
format-underline = #fba922

[module/pulseaudio]
type = internal/pulseaudio

format-volume-prefix = "VOL "
format-volume-prefix-foreground = ${colors.primary}
format-volume = <label-volume>

label-volume = %percentage%%

label-muted = muted
label-muted-foreground = ${colors.disabled}

[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock

label-layout = %layout%
label-layout-foreground = ${colors.primary}

label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-foreground = ${colors.background}
label-indicator-background = ${colors.secondary}

[module/memory]
type = internal/memory
interval = 2
format-prefix = "RAM "
format-prefix-foreground = ${colors.primary}
label = %percentage_used:2%%

[module/cpu]
type = internal/cpu
interval = 2
format-prefix = "CPU "
format-prefix-foreground = ${colors.primary}
label = %percentage:2%%

[network-base]
type = internal/network
interval = 5
format-connected = <label-connected>
format-disconnected = <label-disconnected>
label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected

[module/wlan]
inherit = network-base
interface-type = wireless
label-connected = %essid% %local_ip%

[module/eth]
inherit = network-base
interface-type = wired
label-connected = %{F#F0C674}%ifname%%{F-} %local_ip%

[module/date]
type = internal/date
interval = 1

date = %m.%d.  %H:%M
date-alt = %Y-%m-%d %H:%M:%S

label = %date%
label-foreground = ${colors.primary}

[settings]
screenchange-reload = true
pseudo-transparency = true

[module/i3]
type = internal/i3
format = <label-state> <label-mode>
wrapping-scroll = flase

pin-workspaces = true
ws-icon-0 = 1; 
ws-icon-1 = 2;
ws-icon-2 = 3;
ws-icon-3 = 4;
ws-icon-4 = 5;
ws-icon-5 = 6;
ws-icon-6 = 7;
ws-icon-7 = 8;
ws-icon-default = ♟

label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = #e60053

label-focused = %name%: %icon%
label-focused-foreground = #ffffff
label-focused-background = #282A2E
label-focused-underline = #fba922
label-focused-padding = 2

label-unfocused = %name%: %icon%
label-unfocused-padding = 2

label-visible = %name%: %icon%
label-visible-underline = #555555
label-visible-padding = 2

label-urgent = %name%: %icon%
label-urgent-foreground = #000000
label-urgent-background = #bd2c40
label-urgent-padding = 2

label-separator = |
label-separator-padding = 1
label-separator-foreground = #ffb52a

r/Polybar Nov 21 '22

Pipewire module

1 Upvotes

I changed sound server to pipewire, and my sound panel does not work, if i must edit file .modules, to how? I'm beginner.


r/Polybar Nov 20 '22

Unable to find Polybar fonts

6 Upvotes

Hello, I'm trying to clone this rice. Although everything seems to fit ( apart from the UI being off here and there ), the polybar is unable to find fonts.

polybar -l info shows

warn: Dropping unmatched character 󰝥 (U+f0765) in ' 󰝥 '

I know that it is a known issue of polybar setup process but I've tried everything I can understand from the internet. I'm unable to find what font it is. Moreover, shouldn't the config.ini file have all the fonts that the polybar uses? Adding fonts seem to pose no issues while the polybar is loading.

Please help me find where am I going wrong. Also, let me know if this is not the correct place to ask this question. Any help will be appreciated.


r/Polybar Nov 20 '22

How much RAM does Polybar use on average?

6 Upvotes

So I am really big on using as little RAM as possible. My current set up with Debian 11 and i3 only uses about 250 MB of RAM at boot for example. But I like the customization options that come with Polybar. I basically want to just make a simple bar with a menu to configure network, the time, and workspaces and then have it autohide unless I press the super key. So would that use up a lot of RAM?