Jump to content

Alfred Music Volume


Recommended Posts

fuck. instant feedback. your SSH Workflow. amazing. both on my 2020 MacBook Pro but also on my late 2012 iMac 27. my Time Workflow is slow on both machines 😂️ that's excellent. i had no idea. it's very hard with your Workflow to miss the last few letters typed. super nice experience.

 

dilemma. i've been through several books of Python in order to develop and help maintain some plugins for Sublime Text. thought it might help for Alfred Workflows too, but now it doesn't seem so. i have zero knowledge of Go, and not sure i wanna go through another language. thought my PHP libraries to create Workflows were a good idea, but ultimately it worsen the user experience when needing to grab the user input. hmm. have some digestion to do.

Link to comment

Workflows written in scripting languages should run very fast on a 2020 Mac, too. Not almost instant, like a workflow written in Go, but still very fast.

 

I've had a look at the workflow, and it's slow because it connects to www.toggl.com every time you run it. On my machine, it takes 0.3–0.5s per run. If I block it from connecting to toggl.com using Little Snitch, it runs in 0.1s, which is plenty fast enough for a responsive workflow.

Edited by deanishe
Link to comment

ahhhh yes, you're right. i probably check if there's a timer already running each time the script is launched.

 

now it's coming back to me. the first version of the Workflow had a lame cache system that would avoid this, but that brought other problems. i decided to go for less issues, but also less optimized, matching selfishly the way i use the Workflow (restart past timers). makes me thing i should add comments in my code, not about what the code does, but about why it does it. thanks!

 

although, the Alfred Music Volume one should be another totally different issue. maybe as you said, time it takes to grab the volume from Music. haven't had time to dig into it, but curious.

 

thanks again! lots of new stuff in here for me.

Link to comment
On 10/4/2020 at 9:51 AM, godbout said:

any experience with Swift?

 

Minimal. I never figured out how to compile static binaries (i.e. my binaries don't run on other people's machines), and I never cared enough to work it out.

 

I don't like Swift, tbh. I mean, I like the language, but there are breaking changes in every new version. It seems that every time I re-open something I wrote in Swift, I get a bunch of errors about stuff that's changed since I wrote it, and I have to spend 3x the time fixing the errors this causes than making the change I wanted to.

 

Swift is also a very complex language compared to Go.

 

If I have to write something in macOS-native code, I use Objective-C. It's not as nice a language as Swift, but at least it's stable.

Link to comment

alright, thanks. i like learning new things but i also only learn things i'm gonna use for use. i'm thinking about building something for macOS, so i'm wondering. seems Swift should be the way to go. i played a bit with Objective-C a few years back but definitely not enough knowledge, so it would make sense to go directly for Swift i guess. then i thought maybe i can also compile stuff for Alfred? anyways, just thinking out loud. thanks again.

Link to comment
  • 4 weeks later...

hi. can you report on the repository here: https://github.com/godbout/alfred-music-volume/issues

 

thanks.

 

i'll try to have a look. but no AirPlay 2 devices here. but basically the Workflow just tells Music or iTunes to change its master volume. it should change all the volumes for all the devices ticked under AirPlay icon. can you check that all that setup seems correct?

Link to comment
  • 3 months later...

sooooo... got something working in Swift. i think i'm gonna rewrite the Alfred Workflow ScriptFilter in Swift and create my new Workflows (and maybe rewrite some old ones) in Swift. way faster, and i don't need users to have PHP on their mac. already having troubles with bundled PHP being an old version, before it disappears completely. ✌🏼️✌🏼️✌🏼️

Link to comment
  • 3 years later...

@vitor i've made this Workflow Alfred Gallery compliant and i would love to have it in there. as far as i'm concerned i would love to have all my Workflows in the Gallery (knowing it's not possible due to the nature of some Workflows) but i love that it's integrated in Alfred and that there's a common place now for people to find stuff. obrigado!

 

edit: please lemme know if there's something i've missed and that needs to be changed. obrigadinho.

Edited by godbout
Link to comment
  • 3 weeks later...

This will be live in the Gallery soon at https://alfred.app/workflows/godbout/music-volume/.

 

On 2/13/2024 at 5:36 AM, godbout said:

obrigado!

 

You’re welcome!

 

On 2/13/2024 at 5:36 AM, godbout said:

obrigadinho.

 

I know you mean nothing by it—but just as a reference to avoid a faux pas if you’re ever interacting with another Portuguese—we almost exclusively use that word (the diminutive of “thank you”) sarcastically. Think “yeah, thanks a lot” in English. I’m not sure if that connotation is shared by other countries with Portuguese as the first language, though. Either way, no harm no foul. Since you went through the trouble of learning the words, I thought you might like the context.

 

Have a great weekend!

Link to comment
34 minutes ago, vitor said:

This will be live in the Gallery soon at https://alfred.app/workflows/godbout/music-volume/.

 

thank you Vitor!

 

34 minutes ago, vitor said:

I know you mean nothing by it—but just as a reference to avoid a faux pas if you’re ever interacting with another Portuguese—we almost exclusively use that word (the diminutive of “thank you”) sarcastically. Think “yeah, thanks a lot” in English. I’m not sure if that connotation is shared by other countries with Portuguese as the first language, though. Either way, no harm no foul. Since you went through the trouble of learning the words, I thought you might like the context.

 

oh. hahahhahahahhahha. my bad. definitely didn't mean it. there's a bunch of Portuguese people where i live and they tend to add "inho" everywhere. but maybe not to obrigado yeah. but also maybe old locals (Macanese) do. they tend to use very old Portuguese grammar and speaking style. but again, maybe i'm wrong. claro que o meu Chines e muito melhor que o meu Portugues. (as you can see.)

 

have a great weekend too!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...