from libqtile import widget, bar

from defines import base_color, blue_color
from defines import ChassisType, chassis_type
from Widgets import Left_widgets, volume_widget, System_widgets, end_widgets

widget_defaults = dict(
    background=base_color,
    font='UbuntuMono Nerd Font',
    fontsize=18,
    padding=1 if chassis_type == ChassisType.LAPTOP else 5,
)
extension_defaults = widget_defaults.copy()

main_bar_fontsize=22
main_bar_height=24 if chassis_type == ChassisType.LAPTOP else 28
secondary_bar_height=24
secondary_bar_fontsize=18

main_bar = bar.Bar([
    *Left_widgets(main_bar_height,main_bar_fontsize,True),
    widget.Systray(fontsize=main_bar_fontsize),
    *volume_widget(base_color,blue_color,main_bar_height,main_bar_fontsize),
    *System_widgets(blue_color,blue_color,main_bar_height,main_bar_fontsize),
    *end_widgets(blue_color,main_bar_height,main_bar_fontsize),
],main_bar_height)

left_bar = bar.Bar([
    *Left_widgets(secondary_bar_height,secondary_bar_fontsize),
    *volume_widget(base_color,blue_color,secondary_bar_height,secondary_bar_fontsize),
    *end_widgets(blue_color,secondary_bar_height,secondary_bar_fontsize)
],secondary_bar_height)

secondary_bar = bar.Bar([
    *Left_widgets(secondary_bar_height,secondary_bar_fontsize),
    *volume_widget(base_color,blue_color,secondary_bar_height,secondary_bar_fontsize),
    *end_widgets(blue_color,secondary_bar_height,secondary_bar_fontsize)
],secondary_bar_height)

top_bar = bar.Bar([
    *Left_widgets(secondary_bar_height,secondary_bar_fontsize),
    *volume_widget(base_color,blue_color,secondary_bar_height,secondary_bar_fontsize),
    *end_widgets(blue_color,secondary_bar_height,secondary_bar_fontsize)
],secondary_bar_height)