Polybar | A bar | Frontend Framework library

 by   khanhas C++ Version: 1.0 License: No License

kandi X-RAY | Polybar Summary

kandi X-RAY | Polybar Summary

Polybar is a C++ library typically used in User Interface, Frontend Framework, React applications. Polybar has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

Inspired by famous Polybar from Linux community, I created a playground for anyone with desire finding for a windows taskbar replacement and enhancing everyday workflow. This skin contain many themes which have totally unique looks and design. In each theme contains many modules and some of them have never-seen before functionality. Explore them yourself and help me expand more.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              Polybar has a low active ecosystem.
              It has 405 star(s) with 32 fork(s). There are 17 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 27 open issues and 9 have been closed. On average issues are closed in 0 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of Polybar is 1.0

            kandi-Quality Quality

              Polybar has no bugs reported.

            kandi-Security Security

              Polybar has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              Polybar does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              Polybar releases are available to install and integrate.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Polybar
            Get all kandi verified functions for this library.

            Polybar Key Features

            No Key Features are available at this moment for Polybar.

            Polybar Examples and Code Snippets

            No Code Snippets are available at this moment for Polybar.

            Community Discussions

            QUESTION

            Automatically use desired monitor and the corresponding audio ouput
            Asked 2021-Apr-27 at 14:00

            I'm using manjaro-linux-i3 with polybar and I'm currently working on my multiple monitor setup. I have a TV which I normally use with the amplifier it is connected to. In addition I have my desk with a triple monitor setup which I normally use with my headphones for audio output. One of my screens is in portrait orientation which always messes up my login screen.

            I'm able to change my audio ouput and my active monitor as I wish. But I want it to be more efficient. At the moment I'm using arandr to change my monitor and pavucontrol to change my audio output when needed.

            I want that my login manager(lightdm) is always displayed correctly on my monitors(even on the portrait one). It would be nice if anybody could give me way how to combine changing monitors and the audio output in one blow. So that I don't have to this every time manually.

            ...

            ANSWER

            Answered 2021-Apr-27 at 14:00

            I have similar setup and I got everything working what you might want if I understood you corretely.

            If you setup everything right, then your loginmanager should always be displayed on the monitor which is active at boot and you can switch your monitors&sink with a simple keybind.

            First, you can add a script to lightdm to config your monitors so that everything is displayed correctely. But be aware that a broken script can leed to the effect that your loginmanager won't be loaded correctly (blackscrren).

            in /etc/lightdm/lightdm.conf you can define a script at #greeter-setup-script= . Simply uncomment the line and add the path to your script.

            An easy way to config your monitors the way you want is to use arandr. Simply config your monitor the ways you want and save the setup. You will be saving an usual xrandr command, which can be used in your script.

            Here is my script. It is very basic and actually only checks if a monitor of my desk is active. If so, it initialises the monitors of my desk. If not, it initialises my tv. It also sets the audio output I use with those monitors.

            To get a list of all active monitors use this command:

            xrandr --listactivemonitors | awk '!/Monitors/ {print $4}'

            To get a list off all sinks(audio output) use this command:

            pacmd list-sinks | grep -e 'name:' -e 'index:' | awk '{print $2}'| awk '{print substr($0, 2, length($0) - 2)}'

            Now you can change my commands (sink and monitor names) with the onces you need. You can execute the script in the terminal so get feedback of the choosen sink and monitor (for testing). Don't forget to make your script executable else it won't work.

            I got a similar script to manually change between my tv and my desk (mirroring scrrens, duplicate, tv-only, ect) It too changes the sink according to the selected monitors. As you are using polybar too, you might notice that I relaunch polybar with sh /home/lluks/.config/polybar/launch.sh This is the script. It ensures that my applets are displayed on the main monitor as poylbar can only display them on one monitor. This is archieved by using a 2 diffrent bars for poylbar. For this script to work, you need dmenu and rofi. If I remember corretely, you also need Font Awesome for the icons.

            Source https://stackoverflow.com/questions/67283736

            QUESTION

            I3wm config randomly runs (or not) scripts
            Asked 2021-Feb-08 at 13:16

            In my i3 config file I have many scripts that I want to run when i3 starts, including a script to select a wallpaper and another to run polybar. Both of these scripts worked perfectly for more than a year, but suddenly they started behaving strangely: sometimes none of them run, sometimes just one of them run and sometimes only half of the script runs (wtf).

            What I mean by only running half of the script is that, for example, polybar might kill all instances of polybar (first line) but not run my bar (second line), or the wal script might change the colors as intended, but not set the wallpaper.

            All other scripts in the config run perfectly fine, except for these two. Running them individually in the terminal always works.

            This is a part of .config/i3/config:

            ...

            ANSWER

            Answered 2021-Feb-08 at 13:16

            If, as you say, only half the script runs. Most likely, the parts that apparently don't run, they do actually run, but fail for some reason and you don't see the effect those commands normally have.

            Programs generally write some kind of error messages in these cases. So this is mostly a debugging issue. For polybar, you already redirect the output to a logfile at /tmp/polybar1.log. This file will most likely contain information about why the bar couldn't start.

            I suggest you do the same for your pywal script to see why it fails to set the wallpaper.

            Source https://stackoverflow.com/questions/66100527

            QUESTION

            Is it possible to have one polybar (or any other i3bar) on top and one other on the bottom of the same screen?
            Asked 2020-May-17 at 13:10

            I'm using Polybar 3.4.0 and I would like to know if it was possible to put one bar at the top of the screen and another one at the bottom.

            I would like to display a lot of information at the same time, but my bar isn't large enough.

            If someone knows a better alternative to polybar to perform this, you suggestions are welcome.

            I'm using i3-wm 4.18.1 on Ubuntu 20.04 LTS.

            Thank you for your help.

            ...

            ANSWER

            Answered 2020-May-17 at 13:10

            Yes this is possible.

            You have to create multiple bars and position one of them at the top and the other at the bottom. In the bar section for each bar, there is a bottom setting. So for one bar you would set bottom = true and for the other bottom = false. This could look something like this:

            Source https://stackoverflow.com/questions/61845127

            QUESTION

            Why are Font Awesome characters not rendered or replaced on my terminal shell?
            Asked 2020-Apr-12 at 10:14

            I'm trying to customize my Ubuntus on both of my computers with i3-wm, polybar and zsh (with oh-my-zsh on it)

            I have some issues on one of my computers I haven't on the other one, despite proceeding on the same way and using the same config files for both of them in order to have the same workspace on both of my devices.

            On zsh, I'm using the powerlevel10k/powerlevel10k theme I installed on oh-my-zsh to have a more beautiful terminal.

            The thing is that the shell is showing nice font-awesome icons like the branch icon when I'm on a git project, or the clock icon next to the displayed time, etc.

            This working perfectly on my first computer, but not on the second one. The icons are not displayed, so my terminal is less attractive on it.

            I have the same problem with polybar. Some icons are well rendered on one computer, while on the other one, they are not rendered. Sometimes, they're even replaced by strange Asian (I think it's from an Asian language but I'm not sure) characters.

            I would like to know why I don't have the same result on both devices and how to fix it on computer 2.

            Here is a summary of the used versions:

            ...

            ANSWER

            Answered 2020-Apr-12 at 10:14

            You need to install a capable font and configure your terminal to use. Since you are using powerlevel10k, it's a good idea to use the font that powerlevel10k recommends.

            Meslo Nerd Font patched for Powerlevel10k

            Gorgeous monospace font designed by Jim Lyles for Bitstream, customized by the same for Apple, further customized by André Berg, and finally patched by yours truly with customized scripts originally developed by Ryan L McIntyre of Nerd Fonts. Contains all glyphs and symbols that Powerlevel10k may need. Battle-tested in dozens of different terminals on all major operating systems.

            Automatic font installation

            If you are using iTerm2 or Termux, p10k configure can install the recommended font for you. Simply answer Yes when asked whether to install Meslo Nerd Font.

            If you are using a different terminal, proceed with manual font installation.

            Manual font installation

            Download these four ttf files:

            Double-click on each file and click "Install". This will make MesloLGS NF font available to all applications on your system. Configure your terminal to use this font:

            • iTerm2: Open iTerm2 → Preferences → Profiles → Text and set Font to MesloLGS NF. Alternatively, type p10k configure and answer Yes when asked whether to install Meslo Nerd Font.
            • Apple Terminal Open Terminal → Preferences → Profiles → Text, click Change under Font and select MesloLGS NF family.
            • Hyper: Open Hyper → Edit → Preferences and change the value of fontFamily under module.exports.config to MesloLGS NF.
            • Visual Studio Code: Open File → Preferences → Settings, enter terminal.integrated.fontFamily in the search box and set the value to MesloLGS NF.
            • GNOME Terminal (the default Ubuntu terminal): Open Terminal → Preferences and click on the selected profile under Profiles. Check Custom font under Text Appearance and select MesloLGS NF Regular.
            • Konsole: Open Settings → Edit Current Profile → Appearance, click Select Font and select MesloLGS NF Regular.
            • Tilix: Open Tilix → Preferences and click on the selected profile under Profiles. Check Custom font under Text Appearance and select MesloLGS NF Regular.
            • Windows Console Host (the old thing): Click the icon in the top left corner, then Properties → Font and set Font to MesloLGS NF.
            • Windows Terminal (the new thing): Open Settings (Ctrl+,), search for fontFace and set value to MesloLGS NF for every profile.
            • Termux: Type p10k configure and answer Yes when asked whether to install Meslo Nerd Font.

            IMPORTANT: Run p10k configure after changing terminal font. The old ~/.p10k.zsh may work incorrectly with the new font.

            Source https://stackoverflow.com/questions/61160791

            QUESTION

            How I can get space on top for my window?
            Asked 2019-Sep-18 at 08:16

            I have sfml window. I need to keep space on top (or bottom) of a screen for my window. Like this doing polybar, lemonbar and etc. How can I do this?

            On this step, I just have a simple sfml window:

            ...

            ANSWER

            Answered 2019-Sep-18 at 08:16

            I don't think there is a way to force WMs to reserve space but many WMs support and respect the _NET_WM_STRUT_PARTIAL EWMH property to reserve space at the edge of the screen. This is also what both lemonbar and polybar do.

            From the EWMH Spec:

            _NET_WM_STRUT_PARTIAL

            _NET_WM_STRUT_PARTIAL, left, right, top, bottom, left_start_y, left_end_y, right_start_y, right_end_y, top_start_x, top_end_x, bottom_start_x, bottom_end_x,CARDINAL[12]/32

            This property MUST be set by the Client if the window is to reserve space at the edge of the screen. The property contains 4 cardinals specifying the width of the reserved area at each border of the screen, and an additional 8 cardinals specifying the beginning and end corresponding to each of the four struts. The order of the values is left, right, top, bottom, left_start_y, left_end_y, right_start_y, right_end_y, top_start_x, top_end_x, bottom_start_x, bottom_end_x. All coordinates are root window coordinates. The client MAY change this property at any time, therefore the Window Manager MUST watch for property notify events if the Window Manager uses this property to assign special semantics to the window.

            [...]

            For example, for a panel-style Client appearing at the bottom of the screen, 50 pixels tall, and occupying the space from 200-600 pixels from the left of the screen edge would set a bottom strut of 50, and set bottom_start_x to 200 and bottom_end_x to 600. [...]

            Update: After digging around the SFML documentation a bit, I am not sure how to set EMWH properties via SFML or if it is even possible at all. You will need to figure this out yourself. If it isn't possible, one route would be to somehow get the window handle (xcb_window_t) from SFML and use something like xcb_change_property from libxcb to set the _NET_WM_STRUT_PARTIAL property. See the lemonbar source for reference.

            Update 2: I am not really familiar with Xlib but I often look at the stalonetray source code for reference. For example the ewmh_set_window_strut function in the src/wmh.c file shows how to set the _NET_WM_STRUT_PARTIAL property:

            Source https://stackoverflow.com/questions/57740905

            QUESTION

            Argument list too long error in while loop reading from infinite input stream
            Asked 2019-Jul-19 at 00:33

            I have a script that prints my volume status. It checks the output of pactl subscribe to determine when something has changed. Currently I'm doing this with a while loop, and after the script has been running for a certain period of time (I can replicate quickly by holding a key to toggle mute for about a minute), the only output is "/usr/bin/grep: Argument list too long"

            I've tried using < <(pactl subscribe), piping into the while loop, and also reading from a fifo. None of these work. Is this expected? If so, what would be the way to handle something like pactl subscribe that prints infinite output? Since the first error mentioned ponymix, I thought it might be an issue there, but using pamixer instead fixes nothing either.

            The full script is here. Here is a relevant excerpt:

            ...

            ANSWER

            Answered 2019-Jul-19 at 00:33

            The issue is that inside the print_volume function, I was repeatedly sourcing a file with exports in it. As pointed out by Charles Duffy, this caused the environment size to be too large.

            Source https://stackoverflow.com/questions/57085987

            QUESTION

            i3: .config file error with window variables
            Asked 2019-May-21 at 06:20

            I was editing my config files of polybar and i3, when the arch throw a error

            I customize my ArchLinux with polybar and i3, and i cant undersnteand some errors throwed by system. Therefore, i put a screenshot and my .config bellow:

            ...

            ANSWER

            Answered 2019-Apr-19 at 02:24

            you could enable i3 debugging

            if using ~/.xsession

            Source https://stackoverflow.com/questions/55539673

            QUESTION

            xrandr: How to check if mirroring screens
            Asked 2019-Feb-18 at 13:00

            What's a clean way to check if my monitors are being mirrored or not with xrandr?

            Background
            I'm using polybar and as of now I have a script that launches an extra polybar if my second monitor is connected. Problem is that when I'm mirroring I don't want to launch that second bar. Here's my code if somebody's curious:

            ...

            ANSWER

            Answered 2019-Feb-18 at 13:00

            I ran xrandr --listmonitors on my system, with and without cloned monitors:

            Not cloned:

            Source https://stackoverflow.com/questions/54690490

            QUESTION

            Exporting environmental variables bash
            Asked 2018-Aug-14 at 20:47

            I am trying to create a bash script that toggles the output everytime the script is run (for some functionality in polybar). The easiest way in my mind to do this is based on the value of an environmental variable, but it isn't working as expected.

            This is the script that I have written to test, assume this script is run by something else,and has access to the env variable.

            ...

            ANSWER

            Answered 2018-Aug-14 at 20:47

            Your script runs as a child of your current shell. Child processes cannot directly modify the environment of their parent. That includes environment variables, the current working directory, how signals are handled, etcetera. A process can only modify its environment and, implicitly, the environment of any processes it starts.

            The export in your script works fine. But it only modifies the value for that script or any child processes (e.g., other scripts) it spawns. By definition it cannot change the value in its parent process.

            Solution 1: Implement the script as a shell function. Since functions run in the context of the current shell they can modify its state including its env vars.

            Solution 2: Store the STATE value somewhere like a dot file in the user's home directory.

            Source https://stackoverflow.com/questions/51845219

            QUESTION

            .bashrc alias help command
            Asked 2018-Aug-09 at 19:27

            I want to create a custom help command for my .bashrc aliases heres what I have so far

            this is my custom script so far

            ...

            ANSWER

            Answered 2018-Aug-09 at 19:27
            alias xyz='echo "hi"; #does things'
            alias
            

            Source https://stackoverflow.com/questions/51774131

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install Polybar

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/khanhas/Polybar.git

          • CLI

            gh repo clone khanhas/Polybar

          • sshUrl

            git@github.com:khanhas/Polybar.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link