Comments (7)
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.
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.
Perfect. thanks
from barpyrus.
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.
Thanks for sharing, I'll try that out
from barpyrus.
the solution worked great. Thanks
from barpyrus.
Thanks for your feedback!
from barpyrus.
Related Issues (9)
- TypeError because self.readlines() is None on EOF HOT 2
- barpyrus does not start anymore on Arch HOT 9
- cg.space results in AttributeError: 'LBPainter' object has no attribute 'spacing_font_width' HOT 1
- Siji symbols not displaying in bar HOT 8
- Wrong screen geometry when using xrandr's `--same-as` HOT 3
- Feature request: Only show the bar on mod key down like i3wm HOT 1
- Cilckable areas on conky items HOT 2
- Refresh bar HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from barpyrus.