diff --git a/config/barpyrus/config.py b/config/barpyrus/config.py index 9d40459..f8b901e 100644 --- a/config/barpyrus/config.py +++ b/config/barpyrus/config.py @@ -26,12 +26,29 @@ else: text_font = '*-*-lucidatypewriter-medium-*-*-*-12-*-*-*-*-*-*-*' symbol_font = '*-wuncon-siji-medium-r-normal-*-12-100-100-*-c-80-iso10646-1' +# create color-dict for often used colors +color = { + 'black': '#000000', + 'grey': '#303030', + 'lightgrey':'#989898', + 'white': '#EFEFEF', + 'orange': '#FFA500', + 'yellow': '#FFFD00', + 'green': '#19CB00', + 'cyan': '#0DCDCD', + 'lightblue':'#8470FF', + 'blue': '#0026FF', + 'magenta': '#CB1ED1', + 'red': '#CC0403', +} + +# function to create colored frames +def frame(content, bg, fg, padding = (3, 3)): + return Theme(bg = color[bg], fg = color[fg], padding = padding)(content) + # get space for the panel hc(['pad', str(monitor), str(height)]) -# theme for grey frame: -grey_frame = Theme(bg = '#303030', fg = '#EFEFEF', padding = (3,3)) - # initialize lemonbar bar = lemonbar.Lemonbar(geometry = (x, y, width, height), font = text_font, symbol_font = symbol_font) @@ -44,10 +61,10 @@ bar.widget = W.ListLayout([ W.RawLabel('%{c}'), hlwm.HLWMMonitorFocusLayout(hc, monitor, # this widget is shown on the focused monitor: - grey_frame(hlwm.HLWMWindowTitle(hc)), + frame(hlwm.HLWMWindowTitle(hc), 'grey', 'white'), # this widget is shown on all unfocused monitors: W.RawLabel('')), W.RawLabel('%{r}'), - grey_frame(W.DateTime('%d. %B, %H:%M')), + frame(W.DateTime('%d. %B, %H:%M'), 'grey', 'white'), ])