Skip to content
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

How to specify a custom image? #60

Open
juriSacchetta opened this issue Sep 14, 2023 · 3 comments
Open

How to specify a custom image? #60

juriSacchetta opened this issue Sep 14, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@juriSacchetta
Copy link

Hi,

I'm trying to define a custom notification for the play-pause button, I didn't undestand how to pass an image to display.

Reading the help command output, I saw that there are two parameters --image-base-dir=PATH and --image-path=PATH.
I tried to pass both, the absolute path without the base-dir, and the relavite one.

I also tried to understand where the already given images are stored, but I suspect that are deployed inside the elf.

Can you give me some advice about it?
Thank you

@heyjuvi
Copy link
Owner

heyjuvi commented Nov 5, 2023

So you made a custom script calling avizo-client with said parameters, correct?

Looking at the code, my suspicion is that --image-resource has a default value and overwrites the image you want to set. If you pass --image-resource "" i think it should work. But for sure that's a bug and it appears #59 once merged will solve this.

@heyjuvi heyjuvi added the bug Something isn't working label Nov 5, 2023
@MOIS3Y
Copy link

MOIS3Y commented Jul 9, 2024

It seems avizo-client ignores image-base-dir=
I've tried different options, including forcing --image-base-dir as an option.
2024-07-09-12-11-58

~/.local/share/avizo contains images from the source code simply with the color overridden.

@bash-ful
Copy link

bash-ful commented Aug 6, 2024

https://github.com/heyjuvi/avizo/blob/master/src/avizo_client.vala#L171-L178
i think the issue is mainly in there and it only checks image-base-dir for the --image-path argument, but not for --image-resource, which i think defaults to the images/icons compiled with the avizo_client bin itself, and is why #60 (comment) still shows the unedited image.

it appears that a fix is on pull request #59, but the PR contributor hasn't responded/updated since

for now though, using #60 (comment), we can patch the volumectl and lightctl scripts to circumvent the issue by changing the last line
avizo-client --image-resource="$image" --progress="$progress'=" --monitor="$monitor"
to
avizo-client --image-resource="" --image-path="${image}.png" --progress="$progress'=" --monitor="$monitor"
where you can also optionally add --image-base-dir if you're not using the default one

the issue with this as well is that on initial launch of avizo-client, the default volume_muted icon will continue appearing until the next image update (i.e volume/brightness gets lowered enough to change icons, muted/unmuted etc.), probably because it's the default image
https://github.com/heyjuvi/avizo/blob/master/src/avizo_client.vala#L38
https://github.com/heyjuvi/avizo/blob/master/src/avizo_service.vala#L293

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants