from libqtile import bar, widget from colors import colors def base(fg='foreground', bg='background'): return { 'foreground': colors[fg], 'background': colors[bg] } widget_defaults = { 'font': 'FiraCode Mono Nerd Font', 'fontsize': 12, 'padding': 5, 'foreground': colors['black'], 'background': colors['background'] } group_box = { 'fontsize': 28, 'active': colors['purple'], 'inactive': colors['purple'], 'highlight_method': 'line', 'this_current_screen_border': colors['green'] } green = { 'background': colors['green'] } yellow = { 'background': colors['yellow'] } widgets_list = [ widget.GroupBox(**group_box), widget.WindowName(**base(fg='yellow')), widget.Memory(**yellow), widget.Battery(**green), widget.Volume(**yellow), widget.CapsNumLockIndicator(**green), widget.CurrentLayout(**yellow), widget.Clock(format='%A, %B %d (%T)', **green), widget.Systray() ] top = bar.Bar(widgets_list, 30)