mirror of
https://github.com/GRFreire/dotfiles.git
synced 2026-03-06 11:09:41 +00:00
update qtile config
This commit is contained in:
parent
14a7b63eb2
commit
b84e308a9e
@ -153,8 +153,8 @@ extension_defaults = widget_defaults.copy()
|
|||||||
|
|
||||||
|
|
||||||
def generate_bar(left=[], right=[]):
|
def generate_bar(left=[], right=[]):
|
||||||
current_bg_color = colors["background"]
|
bg_color = colors["background"]
|
||||||
current_fg_color = colors["text"]
|
fg_color = colors["text"]
|
||||||
|
|
||||||
widgets = []
|
widgets = []
|
||||||
|
|
||||||
@ -164,23 +164,7 @@ def generate_bar(left=[], right=[]):
|
|||||||
padding=0,
|
padding=0,
|
||||||
size_percent=100,
|
size_percent=100,
|
||||||
linewidth=width,
|
linewidth=width,
|
||||||
foreground=current_bg_color,
|
foreground=bg_color,
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
def create_arrow(bg=current_bg_color, fg=current_fg_color):
|
|
||||||
widgets.append(
|
|
||||||
widget.Sep(
|
|
||||||
padding=0,
|
|
||||||
size_percent=100,
|
|
||||||
linewidth=10,
|
|
||||||
background=fg,
|
|
||||||
foreground=bg,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
widgets.append(
|
|
||||||
widget.TextBox(
|
|
||||||
text="", background=bg, foreground=fg, padding=-8, fontsize=60
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -189,39 +173,20 @@ def generate_bar(left=[], right=[]):
|
|||||||
for w in left:
|
for w in left:
|
||||||
widgets.append(w)
|
widgets.append(w)
|
||||||
|
|
||||||
create_sep(4)
|
|
||||||
|
|
||||||
is_even = True
|
|
||||||
is_first_widget = True
|
|
||||||
for g in right:
|
|
||||||
if is_even:
|
|
||||||
current_bg_color = colors["accent_color_dark"]
|
|
||||||
is_even = False
|
|
||||||
else:
|
|
||||||
current_bg_color = colors["accent_color_light"]
|
|
||||||
is_even = True
|
|
||||||
|
|
||||||
if is_first_widget:
|
|
||||||
create_arrow(colors["background"], colors["accent_color_dark"])
|
|
||||||
|
|
||||||
is_first_widget = False
|
|
||||||
else:
|
|
||||||
create_arrow(
|
|
||||||
colors["accent_color_dark"]
|
|
||||||
if is_even
|
|
||||||
else colors["accent_color_light"],
|
|
||||||
colors["accent_color_light"]
|
|
||||||
if is_even
|
|
||||||
else colors["accent_color_dark"],
|
|
||||||
)
|
|
||||||
|
|
||||||
for w in g:
|
|
||||||
w.background = current_bg_color
|
|
||||||
w.foreground = current_fg_color
|
|
||||||
widgets.append(w)
|
|
||||||
|
|
||||||
create_sep()
|
create_sep()
|
||||||
|
|
||||||
|
bg_color = colors["accent_color_dark"]
|
||||||
|
fg_color = colors["text"]
|
||||||
|
|
||||||
|
create_sep(5)
|
||||||
|
|
||||||
|
for g in right:
|
||||||
|
for w in g:
|
||||||
|
w.background = bg_color
|
||||||
|
w.foreground = fg_color
|
||||||
|
widgets.append(w)
|
||||||
|
create_sep(15)
|
||||||
|
|
||||||
return widgets
|
return widgets
|
||||||
|
|
||||||
|
|
||||||
@ -304,6 +269,7 @@ def main_bar():
|
|||||||
text="⏻",
|
text="⏻",
|
||||||
fontsize=22,
|
fontsize=22,
|
||||||
mouse_callbacks={"Button1": lambda: qtile.spawn(POWER_MENU)},
|
mouse_callbacks={"Button1": lambda: qtile.spawn(POWER_MENU)},
|
||||||
|
padding=10
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user