Jump to content

Recommended Posts

ok so after using it myself i found out that i would like to know the current level of the volume. currently you can get it through a notification but you need to update the workflow to allow for empty argument. it works but i'll add this as a subtext later.

Share this post

Link to post

new version 1.1.0.


i've tried several ways to show the current volume. the good thing with a Script Filter is that i can show the current volume as a subtext. the (very) bad thing is that it takes some milliseconds to register the typing. happened several times that i entered for example 65 and only 6 is registered, and sometimes nothing. in terms of UX it kinda sucks. so i decided to go through a notification. maybe altogether it takes about the same time, maybe even longer, but the whole thing feels more responsive. so, to my taste, more enjoyable.


to get the notification with the current volume, just type `mv` (the new keyword) and enter. to choose your new Music.app volume, type `mv 65` or `mv up` or `mv down`.

Share this post

Link to post
Posted (edited)
6 hours ago, godbout said:

the (very) bad thing is that it takes some milliseconds to register the typing.


Because it takes so long to get the info from Music.app? What you can do is fetch the current volume on the first run, then output it in a top-level workflow variable in your Script Filter JSON feedback. That way, Alfred passes the value back to your script via an environment variable on subsequent runs of the Script Filter, so you can skip calling Music.app when the variable is already set.

Edited by deanishe

Share this post

Link to post

good point, i didn't think of this. but i don't think it comes from this. i had the same issue with my Time workflow. i think it's just the script getting called multiple times, and the time to process the query and generate the item. but i might be wrong? see with the Time workflow below:




if you type like a maniac (like i do, i type my stuff and return immediately) then the script misses what you typed during the last few milliseconds. now i use a PHP package that i made to build my Workflows because i kept forgetting how Alfred works 😂️, so that's totally possible that i'm missing something and my package (or the way I build the Workflows) could be improved. let me know if i'm missing something. any hint would be deeply appreciated!

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...