Code Monkey home page Code Monkey logo

Comments (7)

t-wissmann avatar t-wissmann commented on May 29, 2024 2

Ah. Due to lack of time, I can't look into it right now. But the following should work and is in fact more flexible:

Define a function in your config.py that renders a tag, e.g. I have:

def simple_tag_renderer(self, painter): # self is a HLWMTagInfo object
    self.activecolor = '#86AB5F'
    if self.empty:
        return
    #painter.ol('#ffffff' if self.focused else None)
    painter.set_flag(painter.underline, True if self.visible else False)
    painter.fg('#a0a0a0' if self.occupied else '#909090')
    if self.urgent:
        painter.ol('#FF7F27')
        painter.fg('#FF7F27')
        painter.set_flag(painter.underline, True)
        painter.bg('#57000F')
    elif self.here:
        painter.fg('#ffffff')
        painter.ol(self.activecolor if self.focused else '#ffffff')
        painter.bg(self.emphbg)
    else:
        painter.ol('#454545')
    painter.space(1)
    painter += self.name
    painter.space(1)
    painter.bg()
    painter.ol()
    painter.set_flag(painter.underline, False)
    painter.space(1)

And in the widget list of the bar, you can then pass it to the HLWMTags widget:

    hlwm.HLWMTags(hc, monitor, tag_renderer = simple_tag_renderer),

from barpyrus.

t-wissmann avatar t-wissmann commented on May 29, 2024 1

They are hard-wired to use the colors https://github.com/t-wissmann/barpyrus/blob/master/barpyrus/colors.py which you can modify:

import colors
colors.BG1 = 'red'

from barpyrus.

jsav0 avatar jsav0 commented on May 29, 2024

Perfect. thanks

from barpyrus.

jsav0 avatar jsav0 commented on May 29, 2024

They are hard-wired to use the colors https://github.com/t-wissmann/barpyrus/blob/master/barpyrus/colors.py which you can modify:

import colors
colors.BG1 = 'red'

I imagine it needs to be: from barpyrus import colors
i'm making the change in my config.py, but that doesn't appear to affect a color change of the tags either. They are still defaulting to the hardcoded colors.

from barpyrus.

jsav0 avatar jsav0 commented on May 29, 2024

Thanks for sharing, I'll try that out

from barpyrus.

jsav0 avatar jsav0 commented on May 29, 2024

the solution worked great. Thanks

from barpyrus.

t-wissmann avatar t-wissmann commented on May 29, 2024

Thanks for your feedback!

from barpyrus.

Related Issues (9)

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.