Coder Social home page Coder Social logo

Comments (2)

GideonWolfe avatar GideonWolfe commented on August 17, 2024 1

It seems like some of those lines were returning more than one color, so it was really messing up the output. Fixing the command to include a colon makes it return one color every time.

COLOR_BATTERY_LOW=$(xrdb -query | grep "*color9:" | cut -f 2) # Battery < 50

from polybar-kdeconnect.

GideonWolfe avatar GideonWolfe commented on August 17, 2024

It seems like the following lines were causing it:

COLOR_DISCONNECTED=$(xrdb -query | grep "*color2" | cut -f 2)       # Device Disconnected
COLOR_NEWDEVICE=$(xrdb -query | grep "*color6" | cut -f 2)          # New Device
COLOR_BATTERY_90=$(xrdb -query | grep "*color2" | cut -f 2)         # Battery >= 90
COLOR_BATTERY_80=$(xrdb -query | grep "*color4" | cut -f 2)         # Battery >= 80
COLOR_BATTERY_70=$(xrdb -query | grep "*color3" | cut -f 2)         # Battery >= 70
COLOR_BATTERY_60=$(xrdb -query | grep "*color10" | cut -f 2)         # Battery >= 60
COLOR_BATTERY_50=$(xrdb -query | grep "*color1" | cut -f 2)         # Battery >= 50
COLOR_BATTERY_LOW=$(xrdb -query | grep "*color9" | cut -f 2)        # Battery <  50

How can I make this work?

from polybar-kdeconnect.

Related Issues (17)

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.