diff --git a/config/barpyrus/config.py b/config/barpyrus/config.py index 07b7340..ace4a5d 100644 --- a/config/barpyrus/config.py +++ b/config/barpyrus/config.py @@ -49,6 +49,14 @@ def frame(content, bg, fg, padding = (3, 3)): # conky specific configuration conky_text = '' +# options for hlwm.HLWMLayoutSwitcher widget +xkblayouts = [ + 'us us -variant altgr-intl us'.split(' '), + 'de de de'.split(' '), +] +setxkbmap = 'setxkbmap -option compose:menu -option ctrl:nocaps' +setxkbmap += ' -option compose:ralt -option compose:rctrl' + # get space for the panel hc(['pad', str(monitor), str(height)]) @@ -70,5 +78,12 @@ bar.widget = W.ListLayout([ W.RawLabel('%{r}'), conky.ConkyWidget(text = conky_text), + W.ShortLongLayout( + W.RawLabel(''), + W.ListLayout([ + hlwm.HLWMLayoutSwitcher(hc, xkblayouts, command = setxkbmap.split(' ')), + W.RawLabel(' '), + ]) + ), frame(W.DateTime('%d. %B, %H:%M'), 'grey', 'white'), ])