Code Monkey home page Code Monkey logo

xpp's Introduction

Polybar Polybar

A fast and easy-to-use tool for creating status bars.

GitHub All Releases

Documentation | Installation | Support | Donate

Polybar aims to help users build beautiful and highly customizable status bars for their desktop environment, without the need of having a black belt in shell scripting.

default configuration screenshot

Table of Contents

Introduction

The main purpose of Polybar is to help users create awesome status bars. It has built-in functionality to display information about the most commonly used services. Some of the services included so far:

  • Systray icons
  • Window title
  • Playback controls and status display for MPD using libmpdclient
  • ALSA and PulseAudio volume controls
  • Workspace and desktop panel for bspwm and i3
  • Workspace module for EWMH compliant window managers
  • Keyboard layout and indicator status
  • CPU and memory load indicator
  • Battery display
  • Network connection details
  • Backlight level
  • Date and time label
  • Time-based shell script execution
  • Command output tailing
  • User-defined menu tree
  • Inter-process messaging
  • And more...

See the wiki for more details.

Getting Help

If you find yourself stuck, have a look at our Support page for resources where you can find help.

Contributing

Read our contributing guidelines for how to get started with contributing to polybar.

Getting started

Installation

Packaging status

Polybar is already available in the package manager for many repositories. We list some of the more prominent ones here. Also click the image on the right to see a more complete list of available polybar packages.

If you are using Debian (bullseye/11/stable) or later, you can install polybar using sudo apt install polybar. Newer releases of polybar are sometimes provided in the backports repository for stable users, you need to enable backports and then install using sudo apt -t bullseye-backports install polybar.

If you are using Ubuntu 20.10 (Groovy Gorilla) or later, you can install polybar using sudo apt install polybar.

If you are using Arch Linux, you can install polybar to get the latest stable release using sudo pacman -S polybar. The latest unstable changes are also available in the polybar-git package in the AUR.

If you are using Manjaro, you can install polybar to get the latest stable release using sudo pacman -S polybar.

If you are using Void Linux, you can install polybar using xbps-install -S polybar.

If you are using NixOS, polybar is available in both the stable and unstable channels and can be installed with the command nix-env -iA nixos.polybar.

If you are using Slackware, polybar is available from the SlackBuilds repository.

If you are using Source Mage GNU/Linux, polybar spell is available in test grimoire and can be installed via cast polybar.

If you are using openSUSE Leap or openSUSE Tumbleweed, polybar is available from the official repositories and can be installed via zypper install polybar. The package is available for openSUSE Leap 15.3 and above.

If you are using FreeBSD, polybar can be installed using pkg install polybar. Make sure you are using the latest package branch.

If you are using Gentoo, both release and git-master versions are available in the main repository.

If you are using Fedora, you can install polybar using sudo dnf install polybar.

If you can't find your distro here, you will have to build from source.

First Steps

See the wiki for details on how to run and configure polybar.

Community

Want to get in touch?

Contributors

Maintainers

Owner

Former Maintainers

Logo Design by

Donations

Polybar accepts donations through open collective.

Become a backer and support polybar!

Sponsors

Backers

License

Polybar is licensed under the MIT license. See LICENSE for more information.

Signatures

Release archives and tags are signed by a maintainer using GPG. Currently everything is signed by Patrick Ziegler with fingerprint 1D5791352D51A228D4DDDBA4521E5E03AEBCA1A7

xpp's People

Contributors

besser82 avatar corngood avatar jaagr avatar jchnkl avatar jeremyong avatar lomadriel avatar patrick96 avatar skystrife avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xpp's Issues

No license specified

Hey,
i couldn't find a license file in this repo and i'm wondering which license applies to the code.

Unable to build if xcbgen is part of python 3

As I have already mentioned in polybar/polybar#58, xpp fails to build when xcbgen is part of python 3 and not python 2 (e.g. on arch). I have tracked down the issue to 1f1da8d. The reason that this commit breaks the build on arch is because before the location of xcbgen was hardcoded and arch users just had to change the path to work on their system by simply replacing python2.7 with python3.5 in the path, after that commit is that not possible anymore because of the python script that searches for the path using the python 2 executable, which will not yield any results if xcbgen is only available in python3.
But we can also not change the line

find_package(PythonInterp 2.7 REQUIRED)

to

find_package(PythonInterp 3.5 REQUIRED)

because xpp needs python 2.

As I see it, there are three ways to resolve this:

  1. Revert back to hardcoding the path (not a very good idea)
  2. Hardcode a list of python executables, run the script to search for xcbgen with each of the executables and use the path the first successful execution gives us (slightly better idea)
  3. Somehow retrieve a list of all python executables in a system and run the script against each of them like in 2. (this is probably the best solution but I don't know how you would go about that in cmake)

I'm gonna try to go for the second option and just hardcoding the python, python2 and python3 executables which should be symlinked to the actual python executables (python2.7 etc) on most systems. I can't make any promises though, since I have never done anything with cmake.

For completion's sake, here is the log of running cmake ..; make after I had replaced

find_package(PythonInterp 2.7 REQUIRED)

with

find_package(PythonInterp 3.5 REQUIRED)

in the CMakeLists.txt:

-- The C compiler identification is GNU 6.1.1
-- The CXX compiler identification is GNU 6.1.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'xcb-proto'
--   Found xcb-proto, version 1.12
-- Found PythonInterp: /usr/bin/python3.5 (found suitable version "3.5.2", minimum required is "3.5") 
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib64/libX11.so
-- Found X11_XCB: /usr/lib64/libX11-xcb.so  
-- XCB[XCB]: Found component XCB
-- Found XCB_XCB: /usr/lib64/libxcb.so  
-- XCB[COMPOSITE]: Found component COMPOSITE
-- Found XCB_COMPOSITE: /usr/lib64/libxcb-composite.so  
-- XCB[DAMAGE]: Found component DAMAGE
-- Found XCB_DAMAGE: /usr/lib64/libxcb-damage.so  
-- XCB[DRI2]: Found component DRI2
-- Found XCB_DRI2: /usr/lib64/libxcb-dri2.so  
-- XCB[EWMH]: Found component EWMH
-- Found XCB_EWMH: /usr/lib64/libxcb-ewmh.so  
-- XCB[GLX]: Found component GLX
-- Found XCB_GLX: /usr/lib64/libxcb-glx.so  
-- XCB[ICCCM]: Found component ICCCM
-- Found XCB_ICCCM: /usr/lib64/libxcb-icccm.so  
-- XCB[IMAGE]: Found component IMAGE
-- Found XCB_IMAGE: /usr/lib64/libxcb-image.so  
-- XCB[KEYSYMS]: Found component KEYSYMS
-- Found XCB_KEYSYMS: /usr/lib64/libxcb-keysyms.so  
-- XCB[RANDR]: Found component RANDR
-- Found XCB_RANDR: /usr/lib64/libxcb-randr.so  
-- XCB[RENDER]: Found component RENDER
-- Found XCB_RENDER: /usr/lib64/libxcb-render.so  
-- XCB[RENDERUTIL]: Found component RENDERUTIL
-- Found XCB_RENDERUTIL: /usr/lib64/libxcb-render-util.so  
-- XCB[SHAPE]: Found component SHAPE
-- Found XCB_SHAPE: /usr/lib64/libxcb-shape.so  
-- XCB[SHM]: Found component SHM
-- Found XCB_SHM: /usr/lib64/libxcb-shm.so  
-- XCB[SYNC]: Found component SYNC
-- Found XCB_SYNC: /usr/lib64/libxcb-sync.so  
-- XCB[UTIL]: Found component UTIL
-- Found XCB_UTIL: /usr/lib64/libxcb-util.so  
-- XCB[XFIXES]: Found component XFIXES
-- Found XCB_XFIXES: /usr/lib64/libxcb-xfixes.so  
-- XCB[XTEST]: Found component XTEST
-- Found XCB_XTEST: /usr/lib64/libxcb-xtest.so  
-- XCB[XV]: Found component XV
-- Found XCB_XV: /usr/lib64/libxcb-xv.so  
-- XCB[XINERAMA]: Found component XINERAMA
-- Found XCB_XINERAMA: /usr/lib64/libxcb-xinerama.so  
-- Found XCB: /usr/lib64/libxcb.so;/usr/lib64/libxcb-composite.so;/usr/lib64/libxcb-damage.so;/usr/lib64/libxcb-dri2.so;/usr/lib64/libxcb-ewmh.so;/usr/lib64/libxcb-glx.so;/usr/lib64/libxcb-icccm.so;/usr/lib64/libxcb-image.so;/usr/lib64/libxcb-keysyms.so;/usr/lib64/libxcb-randr.so;/usr/lib64/libxcb-render.so;/usr/lib64/libxcb-render-util.so;/usr/lib64/libxcb-shape.so;/usr/lib64/libxcb-shm.so;/usr/lib64/libxcb-sync.so;/usr/lib64/libxcb-util.so;/usr/lib64/libxcb-xfixes.so;/usr/lib64/libxcb-xtest.so;/usr/lib64/libxcb-xv.so;/usr/lib64/libxcb-xinerama.so  
-- xpp: including xcb proto bigreq.xml
-- xpp: including xcb proto composite.xml
-- xpp: including xcb proto damage.xml
-- xpp: including xcb proto dpms.xml
-- xpp: including xcb proto dri2.xml
-- xpp: including xcb proto dri3.xml
-- xpp: including xcb proto glx.xml
-- xpp: including xcb proto present.xml
-- xpp: including xcb proto randr.xml
-- xpp: including xcb proto record.xml
-- xpp: including xcb proto render.xml
-- xpp: including xcb proto res.xml
-- xpp: including xcb proto screensaver.xml
-- xpp: including xcb proto shape.xml
-- xpp: including xcb proto shm.xml
-- xpp: including xcb proto sync.xml
-- xpp: including xcb proto xc_misc.xml
-- xpp: including xcb proto xevie.xml
-- xpp: including xcb proto xf86dri.xml
-- xpp: including xcb proto xfixes.xml
-- xpp: including xcb proto xinerama.xml
-- xpp: including xcb proto xinput.xml
-- xpp: including xcb proto xkb.xml
-- xpp: including xcb proto xprint.xml
-- xpp: including xcb proto xproto.xml
-- xpp: including xcb proto xselinux.xml
-- xpp: including xcb proto xtest.xml
-- xpp: including xcb proto xv.xml
-- xpp: including xcb proto xvmc.xml
-- Configuring done
-- Generating done
-- Build files have been written to: /home/patrick96/Projects/github.com/jaagr/xpp/build
Scanning dependencies of target xpp
[100%] Linking CXX static library libxpp.a
Traceback (most recent call last):
  File "/home/patrick96/Projects/github.com/jaagr/xpp/generators/cpp_client.py", line 3191, in <module>
    module.generate()
  File "/usr/lib/python3.5/site-packages/xcbgen/state.py", line 108, in generate
    self.close()
  File "/home/patrick96/Projects/github.com/jaagr/xpp/generators/cpp_client.py", line 250, in c_close
    _h("%s", _cpp_request_objects[name].make_class())
  File "/home/patrick96/Projects/github.com/jaagr/xpp/generators/cpprequest.py", line 185, in make_class
    return cppreply.make() + "\n\n" + _reply_request_function(self.request_name)
  File "/home/patrick96/Projects/github.com/jaagr/xpp/generators/cppreply.py", line 137, in make
    self.cookie, "\n".join(accessors))
  File "/home/patrick96/Projects/github.com/jaagr/xpp/generators/cppreply.py", line 66, in _reply_class
    , cookie.make_static_getter()
  File "/home/patrick96/Projects/github.com/jaagr/xpp/generators/cppcookie.py", line 138, in make_static_getter
    default = self.static_reply_methods(self.protos(False, False), self.calls(False))
  File "/home/patrick96/Projects/github.com/jaagr/xpp/generators/cppcookie.py", line 81, in protos
    return self.parameter_list.protos(sort, defaults)
  File "/home/patrick96/Projects/github.com/jaagr/xpp/generators/parameter.py", line 66, in protos
    return "" if len(protos) == 0 else ", ".join(protos)
TypeError: object of type 'map' has no len()
make[2]: *** [CMakeFiles/xpp.dir/build.make:70: libxpp.a] Error 1
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/xpp.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

No real issue, just curiosity.

Hi Michael,

did you pick up the project, i.e. do you actively work on it?

Or do you even use it in a different project?

Anyway, just wanted to say that it makes me very happy that you took care of it. Thank you very much! :)

xpp::connection segfaults when there is a problem connecting to X

I have identified 2 possible scenarios so far. #1 is when we create a connection and specify extensions, then the segfault seems to happen in the extension.

dispatcher(const xpp::shape::extension & extension)
      : dispatcher(extension->first_error)  <--- this line
    {}

If no extensions are specified, the segfault happens because the connection objects tries to fetch the root screen, without checking for a successful connection first.

The second segfault is pretty simple to fix, but the first one requires more c++ skills than I currently have :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.