fancy bar
This commit is contained in:
parent
2592855aaa
commit
908ff77b13
|
@ -4,7 +4,7 @@ colors = {
|
|||
"bg-light": "#44475a",
|
||||
"on-bg-light": "#f8f8f2",
|
||||
"accent-dark": "#bd93f9",
|
||||
"on-accent-dark": "#f8f8f2",
|
||||
"on-accent-dark": "#282a36",
|
||||
"accent-light": "#50fa7b",
|
||||
"on-accent-light": "#282a36",
|
||||
}
|
||||
|
|
|
@ -6,7 +6,20 @@ import my_globals
|
|||
|
||||
def get_screens():
|
||||
return [
|
||||
Screen(top=_bar),
|
||||
Screen(
|
||||
top=bar.Bar(
|
||||
_get_bar_contents(primary=True),
|
||||
18,
|
||||
background=my_globals.colors["bg"],
|
||||
)
|
||||
),
|
||||
Screen(
|
||||
top=bar.Bar(
|
||||
_get_bar_contents(),
|
||||
18,
|
||||
background=my_globals.colors["bg"],
|
||||
)
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
|
@ -48,6 +61,14 @@ def _get_powerline_arrow(direction: _PowerLineDirection, accent: _Accent, end=Fa
|
|||
)
|
||||
|
||||
|
||||
_weather = widget.OpenWeather(
|
||||
**get_defaults(),
|
||||
background=_Accent.A.value,
|
||||
location="Hamburg",
|
||||
foreground=my_globals.colors["on-accent-dark"],
|
||||
format="{icon} {main_temp}°{units_temperature} {weather_details}",
|
||||
)
|
||||
|
||||
_tray = widget.Systray(
|
||||
**get_defaults(),
|
||||
background=_Accent.A.value,
|
||||
|
@ -81,6 +102,7 @@ _clock = widget.Clock(
|
|||
**get_defaults(),
|
||||
format="%d.%m.%y %H:%M:%S",
|
||||
background=my_globals.colors["accent-dark"],
|
||||
foreground=my_globals.colors["on-accent-dark"],
|
||||
)
|
||||
|
||||
_updates = widget.CheckUpdates(
|
||||
|
@ -93,21 +115,29 @@ _volume = widget.Volume(
|
|||
**get_defaults(),
|
||||
background=my_globals.colors["bg-light"],
|
||||
volume_app="pavucontrol",
|
||||
emoji=True,
|
||||
fmt="蓼 {}",
|
||||
)
|
||||
|
||||
_layout = widget.CurrentLayout(
|
||||
|
||||
def _get_current_layout():
|
||||
return widget.CurrentLayout(
|
||||
**get_defaults(), background=my_globals.colors["bg-light"], fmt=" {}"
|
||||
)
|
||||
|
||||
|
||||
_mpris = widget.Mpris2(
|
||||
**get_defaults(),
|
||||
background=my_globals.colors["bg-light"],
|
||||
display_metadata=[
|
||||
"xesam:title",
|
||||
"xesam:artist",
|
||||
],
|
||||
)
|
||||
|
||||
_mpris = widget.Mpris2(**get_defaults())
|
||||
|
||||
_bar = bar.Bar(
|
||||
[
|
||||
_tray,
|
||||
def _get_bar_contents(primary=False):
|
||||
l = [
|
||||
_get_powerline_arrow(_PowerLineDirection.LEFT, _Accent.A),
|
||||
_layout,
|
||||
_get_current_layout(),
|
||||
_groups,
|
||||
_get_powerline_arrow(
|
||||
_PowerLineDirection.LEFT,
|
||||
|
@ -126,7 +156,10 @@ _bar = bar.Bar(
|
|||
_mpris,
|
||||
_get_powerline_arrow(_PowerLineDirection.RIGHT, _Accent.A),
|
||||
_clock,
|
||||
],
|
||||
24,
|
||||
background=my_globals.colors["bg"],
|
||||
)
|
||||
_weather,
|
||||
]
|
||||
if primary:
|
||||
l.insert(0, _tray)
|
||||
else:
|
||||
pass
|
||||
return l
|
||||
|
|
Loading…
Reference in New Issue