-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Irregular Visibility of Drop-Down Button #12
Comments
Cannot reproduce it. Can you paste your kargos script? Could you try without latte-dock? My environment is |
Sure, I created an empty panel and added a kargos applet with default settings except for the script: Here's the script: #!/usr/bin/env python3
from time import localtime, strftime
from donuts import Donut
fmt = " | font=Iosevka size=24"
lt = localtime()
hour, minute = lt[3:5]
anchor = Donut(hour + minute / 60)
surplus = minute % 5
anchor += Donut('.1') if surplus else 0
lead = f"{5 - surplus}→" if surplus else ''
print(f"{lead}{(anchor % 12).places(1, True)}{fmt}")
print('---')
print(f"{strftime('%I:%M %p', lt)}{fmt}") |
I do wish the button could be hidden altogether, as displaying it on each click as in (1) disrupts the location of every other item on that panel. |
I'm not python expert, I get
|
When:
The dropdown button appears and displaces other widgets. The only alternative is an always visible dropdown button, like the one in the "Status & Notifications" widget, whose dropdown button is always visible. |
Sorry, I didn't realize you wanted to run my script, I didn't include a custom library it uses anyway. But I get the same behavior with: #!/bin/bash
echo "1→2.5 | font=Iosevka size=24"
echo "---"
echo "2:24 | font=Iosevka size=24"
Is it a specific design decision to rule out a never-visible dropdown button? |
Ok, I have tested it. I've set Dropdown always visible to killall plasmashell
plasmashell And the dropdown button appears from the very beginning. When you restart plasmashell from the console, a lot of output is seen (logs |
I'm no longer experiencing this bug. |
Shoot, it just re-appeared. I have the box unchecked, but the icon appears sometimes when the cursor starts or stops hovering. Interestingly, this behavior stopped while I disabled compositing, and resumed when I re-enabled it. Right now I'm using this script, with rotation at
#!/usr/bin/env python3
from plumbum.cmd import playerctl
from plumbum import ProcessExecutionError
fmt = " | font='Iosevka Light' size=21"
get = playerctl['metadata']
def resize(txt, size, pre='» ', post=' «', ellipsis='center'):
free = size - len(txt)
if free >= 0:
a, b = divmod(free, 2)
return f"{pre}{' ' * a}{txt}{' ' * (a + b)}{post}"
elif ellipsis == 'end':
return f"{pre}{txt[:size - 1]}…{post}"
elif ellipsis == 'center':
a, b = divmod(size - 1, 2)
return f"{pre}{txt[:a + b]}…{txt[-a:]}{post}"
try:
title, artist = get('title'), get('artist')
except ProcessExecutionError:
print(f"{fmt} iconName=spotify-indicator bash=spotify onclick=bash")
else:
size = min(15, max(len(artist), len(title)))
print(f"{resize(artist, size)}{fmt}")
print(f"{resize(title, size)}{fmt}")
print('---')
print(f"{title} {fmt}", "iconName=media-album-track")
print(f"{artist} {fmt}", "iconName=view-media-artist")
print(f"{get('album')}{fmt}", "iconName=media-album-cover") |
kargos
0.6.0
latte-dock
0.6.0.r316.g85eae84
plasma-desktop
5.10.0
qt5-base
5.8.0
With "Dropdown always visible" unchecked, the following behaviors are observed:
I know (2) is not as intended, but I'm not sure about (1).
The text was updated successfully, but these errors were encountered: