fix
This commit is contained in:
129
assets/popups/mpris2_layout.py
Normal file
129
assets/popups/mpris2_layout.py
Normal file
@@ -0,0 +1,129 @@
|
||||
from colors import gruvbox_dark
|
||||
from qtile_extras.popup.toolkit import (
|
||||
PopupRelativeLayout,
|
||||
PopupImage,
|
||||
PopupText,
|
||||
PopupSlider,
|
||||
)
|
||||
|
||||
image = "/home/cerberus/.config/qtile/assets/images/no_cover.svg"
|
||||
|
||||
MPRIS2_LAYOUT = PopupRelativeLayout(
|
||||
None,
|
||||
width=400,
|
||||
height=200,
|
||||
opacity=0.7,
|
||||
background=gruvbox_dark["bg0_soft"],
|
||||
hide_on_mouse_leave=True,
|
||||
controls=[
|
||||
PopupText(
|
||||
"",
|
||||
name="title",
|
||||
font="Open Sans Bold",
|
||||
fontsize=18,
|
||||
pos_x=0.35,
|
||||
pos_y=0.1,
|
||||
width=0.55,
|
||||
height=0.14,
|
||||
h_align="left",
|
||||
v_align="top",
|
||||
),
|
||||
PopupText(
|
||||
"",
|
||||
name="artist",
|
||||
font="Open Sans Medium",
|
||||
fontsize=14,
|
||||
pos_x=0.35,
|
||||
pos_y=0.24,
|
||||
width=0.55,
|
||||
height=0.14,
|
||||
h_align="left",
|
||||
v_align="middle",
|
||||
),
|
||||
PopupText(
|
||||
"",
|
||||
name="album",
|
||||
font="Open Sans",
|
||||
fontsize=14,
|
||||
pos_x=0.35,
|
||||
pos_y=0.38,
|
||||
width=0.55,
|
||||
height=0.14,
|
||||
h_align="left",
|
||||
v_align="bottom",
|
||||
),
|
||||
PopupImage(
|
||||
name="artwork",
|
||||
filename=image,
|
||||
pos_x=0.1,
|
||||
pos_y=0.1,
|
||||
width=0.21,
|
||||
height=0.42,
|
||||
),
|
||||
PopupSlider(
|
||||
name="progress", pos_x=0.1, pos_y=0.6, width=0.8, height=0.1, marker_size=0
|
||||
),
|
||||
PopupText(
|
||||
name="previous",
|
||||
text="",
|
||||
fontsize=30,
|
||||
mask=True,
|
||||
pos_x=0.125,
|
||||
pos_y=0.8,
|
||||
width=0.15,
|
||||
height=0.1,
|
||||
v_align="middle",
|
||||
h_align="center",
|
||||
highlight_method="text",
|
||||
foreground=gruvbox_dark["fg0"],
|
||||
highlight=gruvbox_dark["green"],
|
||||
),
|
||||
PopupText(
|
||||
name="play_pause",
|
||||
text="",
|
||||
fontsize=30,
|
||||
mask=True,
|
||||
pos_x=0.325,
|
||||
pos_y=0.8,
|
||||
width=0.15,
|
||||
height=0.1,
|
||||
v_align="middle",
|
||||
h_align="center",
|
||||
highlight_method="text",
|
||||
foreground=gruvbox_dark["fg0"],
|
||||
highlight=gruvbox_dark["green"],
|
||||
),
|
||||
PopupText(
|
||||
name="stop",
|
||||
text="",
|
||||
fontsize=30,
|
||||
mask=True,
|
||||
pos_x=0.525,
|
||||
pos_y=0.8,
|
||||
width=0.15,
|
||||
height=0.1,
|
||||
v_align="middle",
|
||||
h_align="center",
|
||||
highlight_method="text",
|
||||
foreground=gruvbox_dark["fg0"],
|
||||
highlight=gruvbox_dark["green"],
|
||||
),
|
||||
PopupText(
|
||||
name="next",
|
||||
text="",
|
||||
fontsize=30,
|
||||
mask=True,
|
||||
pos_x=0.725,
|
||||
pos_y=0.8,
|
||||
width=0.15,
|
||||
height=0.1,
|
||||
v_align="middle",
|
||||
h_align="center",
|
||||
highlight_method="text",
|
||||
foreground=gruvbox_dark["fg0"],
|
||||
highlight=gruvbox_dark["green"],
|
||||
),
|
||||
],
|
||||
close_on_click=False,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user