Polybar: List of feature requests

Created on 14 Oct 2016  ·  78Comments  ·  Source: polybar/polybar

Hi,

While my main focus right now is to fix bugs so that we can release a stable version of 2.0 I'd still like to know what kind of features or changes people would like to add to the project. Now when lemonbar has been dropped and all rendering is done internally it opens up alot of doors.

My list of things to change:

  • Drop xft and implement all text handling using pango
  • Add include directive to the configuration
  • Add inherit directive to the configuration
feature

Most helpful comment

Ability to hide the bar when not needed?
A keymap would show the bar when needed.

All 78 comments

Personally, I'd like to see some features like:

  • Allowing click-left, click-right, etc... on custom/script to change directly the output on the bar
  • The interval field for the same module should have an option never (ie. only updated by click, so related to the above suggestion)
  • I didn't saw any internal/disk-space module, that would be nice
  • Add a field format-extended which would work like the date-detailed field but on every module
  • Don't know if it's possible but an overriding --output option would be great since inheritance isn't already implemented (that would avoid duplicating bar configs when using multi-monitor setup)

And for the repository itself:

  • Move the README.md documentation into the wiki (configuration has been moved //jaagr)

New module: keyboard

Show the current layout and active modifiers (caps, etc) using the XKB extension

New module: xwindow

Show details about the focused X window (title, atom values, etc).

Add the ability to pause/resume the running bar process. Useful when launching a game, etc.

A system tray would be awesome. Would love to ditch stalonetray

@ashleymcdonald It's been implemented.

I would love to have some more features like below

  • Ability to automatically set padding of bspwm depend on bar height setting (and try reset when exiting bar)
  • Custom mouse action for all module (Right/Left/Middle/Scroll Up/Scroll Down)
  • Reload when received signal for custom script (Like i3blocks)
  • Documentation for modules developing?

Awesome. Would it be possible to have it work like a module regarding positioning?

Ie. module-right = label tray clock

It's possible yeah, but it's not a small task and I don't think it's something I'll look into in the near future so don't hold your breath :-) Pull requests are always welcome tho.

How do I write my own module?

You have two options @mrkgnao:

  • Define a script module that executes an external command (see the wiki)
  • Implement it and create a pull-request

WM specific configuration

  • New sections that will contain extra support for various window managers.
  • No overhead if it's not set.
[wm/bspwm]
; Will reserve space for the bar by updating padding-top or bottom
; The previous value will be restored when terminating
reconfigure-workspaces = true

; Will replace the option defined at `[bar/mybar.wm-restack]`
restack-window = true
[wm/i3]
; Define ipc commands to execute on launch
ipc-command-0 = gaps inner 5
ipc-command-1 = border pixel 2
ipc-command-2 = ...

; Will replace the option defined at `[bar/mybar.wm-restack]`
restack-window = true
  • Ability to override tray client settings
[trayclient/name]
wm-name = identifier
offset-x = 5
icon = /path/to/replacement/icon.png

Ability to offset in percentage would allow easy centering

[bar/example]
width = 90%
offset-x = 5%

What I miss most : Keyboard support, especially for the "menu" module.
I would be fine with a small cli that can interact with lemonbuddy, and we'd call it with window manager or sxhkd for example

The interval field for the same module should have an option never (ie. only updated by click, so related to the above suggestion)

Could we have an option let script only run once by putting 0 or -1 in interval?

@BenoitAverty it's now possible to control the menu modules using ipc messages.

Request: A vertical bar. That'd allow one to have a bar on the side of the screen, instead of top or bottom. Could come in handy to save vertical space.

An animation function to make i3/bspwm flash with label-urgent icons/text.

[module/i3]
type = internal/i3
animation-urgent-0 = ♚
animation-urgent-0-foreground = #fff
animation-urgent-1 = ♚
animation-urgent-1-foreground = #000
animation-urgent-framerate = 500

Network module to show total amount of downloaded and uploaded MB,GB for network interface. Something like: %totaldown% %totalup%

A new module: load average.

I would really like to see my mode strings from i3 next to the workspaces

Custom popups, I'm doing this with dzen2 right now, but would be great to do this with lemonbuddy itself.
This may be a lot of work for now, but could be interesting later.

(For example next to my mpd module I have a button which displays a menu with my current playlist in it, so I can select a song to play)

Expansion of <ramp> into a generalized prefix/suffix/etc tag, or a creation of a separate tag for this use.
I'm pretty sure I'm abusing <ramp> right now by using only a single value.

My main issue is that I can't assign foreground colors with local variables _inside_ labels, but only to prefix icons/text.

@NBonaparte Not quite sure I understand what you mean. Could you give an example of how you would define the tag in the config?

Sorry for my terrible explanation. Here's an example:

format = <prefix> <label>
prefix = MEM
prefix-foreground = ${colors.foo}

This way, I can change the color of a certain block of text using color variables.

@NBonaparte yeah that would be nice... could probably add <prefix> and <suffix> to all formats

Is it currently possible to add spacing between bspwm workspaces without creating multiple instances? i.e. like this:
like this

Instead of this:
not this

@glssn yeah, using raw tags

~ dosini
[module/bspwm]
label-focused = %{B#f00} %{B-}
label-focused-padding = 2
label-occupied = %{B#0f0} %{B-}
label-occupied-padding = 2
label-empty = %{B#00f} %{B-}
label-empty-padding = 2
label-urgent = %{B#00f} %{B-}
label-urgent-padding = 2
~

VPN information in the network module would be really useful!

Ability to hide the bar when not needed?
A keymap would show the bar when needed.

It would be nice if xkeyboard module had actions to switch between keyboard layouts specified in configuration file when clicked. Maybe similarly as how the menu module works. Not a necessity though, since lemonbar syntax is recognized, and one can just bind a script there.

MPRIS player support would be great. That would enable a LOT of players to be controlled/displayed on taskbar. From the top of my head I know spotify, xmms, vlc, clementine and rhytmbox all supports it.

A Github notifications module that would display the number of notifications and maybe pop up a menu or open the browser on click.

This could be also used for email notifications.

Option to hide specific desktop in [module/bspwm] would be nice

A module for showing disk read / write activity would be very nice and needed. Before polybar I was piping a conkyscript to dzen2 and this feature was very useful to see when something was intensely writing to hdd or to ssd, how much of that was going on and at what speed.

It would be nice to have a 'battery-alt' label that would be shown on click, like 'date-alt' works. This way we could add, for example, the remaining time on alt.

Option to place the systray as a normal module, thus be able to put it between other modules, like: volume tray date.

It would also be nice with more formatting options for the tray. A way to easily toggle it on and off because it might not be relevant to have it showing all the time. Using a way to style it like time and time-alt where alt could be left empty to "toggle" it on/off?

Hey @jaagr, are you planning on switching to Pango anytime soon? If so, would we use the Xft or Cairo backend?

IMHO, switching to Cairo might be better because we could draw everything using it, rather than using XCB graphic contexts.

@NBonaparte The plan is to use cairo+pango. I've started to work on the switch but haven't had time to finish it yet.

@glssn wow, do you have a dotfiles repo anywhere?

Request: option to activate specific modules based on ipc messages, allowing you to create collapsible bars by binding a key to a polybar-msg command.

Request: I wish there was a progress-bar for downloads and uploads, for wired network. Exactly as it has bar-load for CPU, and bar-used for RAM.

It's possible?

Request: Ability to load network module even if interface is absent, marking it as disconnected. This would be useful for USB network interfaces (especially since more laptop manufacturers are dropping ethernet ports)

Possibly an ignore-absent = true option?

Autosizing would be great!

So the width of the bar extends with the amount of content on it.

+1 for ability to hide the bar -- actually, if only the systray visibility[1] followed the bar visibility - or at least moved with the bar[2] position - it would solve it for me.

I can make my WM hide and show any non-override-redirect window.

[1] With override-redirect on the _bar_ off
[2] Seems there's an hardcoded assumtption about the bar position? That is - if I move the bar the systray just stays in the same position.

(if its not there already ) Concatenate operation of strings in label . Ex ->
date-alt = ${glyphs.calender} " %Y-%m-%d".
This above one doesn't work . Maybe implement this in later version.

@MMR-Burhan you could use the prefix parameter to accomplish the same thing, for example:

~ dosini
format-prefix = ${glyphs.calendar}
~

@jaagr I'm using it this way . Not always customisable.
Say I want to use this on label-song = "%{A:urxvt -e ncmpcpp&:} %artist% - %title%%{A}" . But without defining icon there, rather as local variable. This doesn't seem possible now

@MMR-Burhan yeah currently the ref variables cannot be used in a string. Shouldn't be a big change to make that work though.

@jaagr and other maintainers, could you please improve the wiki? Mainly the formatting section feels like it's missing plenty of additional information, and also a samples section with screenshots + corresponding polybar.conf files would be really good for someone who is testing polybar for the first time. :)

@jaagr Could you add the format-prefix, format-prefix-foreground, format-prefix-background, format-foreground, format-background, format-underline, ... etc. formatting options to the "internal/mpd" module?

I tried adding it myself by working off of the "custom/text" module, but your formatter doesn't like me and I didn't manage to do it (the code compiles, but nothing appears...)

Here's an example of how I configured a custom/text to work (because I was using the spotify client), which is now unfortunately impossible because those formatting options don't exist anymore:

new_wp

I second the feature request to hide the bar when not needed. Basically a copy of i3bar's hide mode[1]: on keydown the bar is shown and hidden on keyup again. Also the bar should be suspended when hidden (using SIGSTOP and SIGCONT).

Edit: this stops me from using polybar currently. So it's basically the only feedback I can provide.

[1] https://i3wm.org/docs/userguide.html#_display_mode

I want to suggest a passive option for the volume module

Right now, scrolling over the volume or clicking on it does things. On some systems, such as mine, where volume control is done on a physical knob on my amplifier, that's pointless, especially since accidentally scrolling over it in the "louder" direction, it increases the gain to achieve a perceived higher volume, which actually only distorts the sound. It's difficult to tell when the slider is at 100% and I often have to check manually with alsamixer if the volume is at 100% or above or below.

I'd think it would improve usability if there were an option like "volume-passive = true" where all input on the volume module is ignored and the volume slider only shows the volume or if it's muted.

@d3rrial You can now disable events for the volume module by defining handle-events = false

0xC0FFEE: I second the feature request to hide the bar when not needed. Basically a copy of i3bar's hide mode[1]: on keydown the bar is shown and hidden on keyup again. Also the bar should be suspended when hidden (using SIGSTOP and SIGCONT).

Me likes this.
I've implemented something like that in sxhkd:

# Show bar when super is pressed, release to hide
Super_L
    xdotool search --class polybar windowmap
@Super_L
    sleep 3 && xdotool search --class polybar windowunmap && bspc config top_padding 0

It works kinda well, but I also think there should be official support for this. Cheers!

@0xC0FFEE and @pellettiero: I've been getting requests for this pretty frequently lately so it will be added even though I can't say when due to dev time limitations.

I might have a little more time of you, i might look at this next week, since i expect it to be easy.. Right?

Il 5 aprile 2017 20:27:48 CEST, Michael Carlberg notifications@github.com ha scritto:

@0xC0FFEE and @pellettiero: I've been getting requests for this pretty
frequently lately so it will be added even though I can't say when due
to dev time limitations.

--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jaagr/polybar/issues/84#issuecomment-291952720

--
Inviato dal mio dispositivo Android con K-9 Mail. Perdonate la brevità.

@nico202 I can't really comment on it being easy before I've had a closer look but I'd guess the biggest change would involve suspending all the separate threads.

edit: It actually seems easier than I thought since SIGSTOP will handle the process suspension.

Is there currently support for spacing/padding between menu items? I'm currently leaning on raw tags, just wondering if there is a more straightforward approach for accomplishing the same effect e.g.

[module/powermenu]
type = custom/menu
format-padding = 2

label-open =                                                                    
label-open-foreground = ${colors.red}                                                  
label-close =                                                                    
label-separator = %{B}  %{B-} 

; ...

@hansondr You could use:

~ dosini
label-separator = " "
~

showing total network throughout over all interfaces would be great!

Support to duplicate on multiple monitors, so that only one instance has to be run.

The battery module could use some sort of dynamic text, that changes based on the current level of charge. Use case: a battery icon that changes with the discharge of the battery. It could use the fields from animation-charging-*

Update: This is already done with . Didn't immediately grasp what it was.

Am I missing a way to have an ipc module update? I'm trying to do a module that displays overall CPU temperature and displays individual CPU core temperatures on click-left.

If you change your mind and want monitoring without click-left, see:

Https://github.com/jaagr/polybar/wiki/User-contributed-modules#per-core-temperatures

@kobayash1 have a look at the ipc example on the wiki on how to use it.

fix the tray overlaying over everything?

@jaagr I have seen the ipc example given in the wiki. The output does not update by whatever interval = x however. Here is what I am trying to accomplish:

[module/coretemps]
type = custom/ipc
format-prefix = " "
format = <output>°C
interval = 2
hook-0 = cat /sys/devices/platform/coretemp.0/hwmon/hwmon?/temp1_input | rev | cut -c 4- | rev
hook-1 = cat /sys/devices/platform/coretemp.0/hwmon/hwmon?/temp?_input | rev | cut -c 4- | rev | tr '\n' ' ' | cut -d' ' -f2-5
initial = 1
click-left = polybar-msg -p %pid% hook coretemps 2
double-click-left = polybar-msg -p %pid% hook coretemps 1
click-right = polybar-msg -p %pid% hook coretemps 1

I wouldn't know how difficult it would be to implement interval = x to the ipc module as it stands, but a feature addition like this would make my example module work.

EDIT: syntax

I second the suggestion of @kobayash1.

I have a module that periodically checks my RSS unread article count and I use the user-contributed Arch Linux updates module. It would be great if I could click on the RSS module to update it or have the Arch module refresh after an update (by sending the module a polybar-msg). Right now I relaunch the whole bar to refresh either module on demand.

The script module allows for an interval to be set, but cannot refresh on click or receive a polybar-msg (as far as I can tell) and the ipc module does not have an interval setting. The combination of these features would give users complete control over custom script modules.

The simplest idea may be to give the ipc module an interval after which it executes the current (or initial) hook again with a default of never to maintain current functionality.

@shanewstone You can actually refresh a module on click / when an external event occurs, but you need to use a trick.

The script module can be used with tail=true, then you just need as a command to run tail -F to a custom bus file in which you would write changes. Here is how I did my redshift module script (based on the one in the wiki) : redshift.sh.

I then use two redshifts modules : one to update the icon and handle click events, and another to run redshift at a specified interval of time in order to check for updates (for instance at the sun set when the screen's temperature is changing). Here is the relevant part of the polybar config.

Using that trick, a module can be updated when a click event occurs (the click action calls your script with some arguments and it writes to the temp file, thus updating the icon). It can also be updated with an interval using a second module, or by an external program, you just need to run your script or to write manually in the temp file.

I used the same process for the caffeine module, in order to be able to toggle caffeine by clicking the coffee icon and having it brown when it's enabled and white when it's disabled. This is very cpu efficient as it uses only tail.

Hope this helped !

P.S. Where will we be able to add multiple menus on a bar ? I know almost every module including a menu could be done with a script module with my method, but that would be really cool anyway.

How about format-underline for the volume plugin?

If a module is used on more than one bar, only run the module script once and just display the same output on all bars.

It's be nice if the label of the builtin temperature module could be customized to remove the unit. For numbers I see all the time, sometimes a unit like 'degree' or 'ampere' is not necessary.

I would love to be able to send some text via IPC and have that text displayed on the bar in a module. I know that IPC can be used to hook an action but as far as I can tell, there doesn't appear to be a way to display the IPC message itself.

Here's the use case: I have a weather station on my property and I wrote some software that pulls current weather readings from it every 3 seconds. I want my polybar to display this live weather. I don't want to fork a process every 3s, though. I would rather have my updater process running in the background and pulling the weather from my server and sending IPC to polybar with the updated readings.

I'm going to close this. This format may have been a good idea when the project was rather small, but now things would get rather confusing and having a discussion about multiple features in the same thread can quickly become a mess.

If you still want your request addressed please open a new issue. We cannot guarantee that it will be implemented but we'll try our best to respond.

option for the menus to display in a drop-down format might be useful, though i understand it might need some tweaking & hacking due to the bar being a single line of text and all that

Underline progress bars for mpd, volume, or other percentage-based modules.

Actually, even the date could have an underline progress bar depending on the day of the month, day of the week, and so on.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlecsFerra picture AlecsFerra  ·  3Comments

matjaz132 picture matjaz132  ·  4Comments

guncha picture guncha  ·  3Comments

eoli3n picture eoli3n  ·  3Comments

amirashabani picture amirashabani  ·  3Comments