godbout Posted September 26, 2020 Author Posted September 26, 2020 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.
deanishe Posted September 28, 2020 Posted September 28, 2020 (edited) 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 September 28, 2020 by deanishe
godbout Posted September 28, 2020 Author Posted September 28, 2020 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.
godbout Posted October 4, 2020 Author Posted October 4, 2020 @deanishe any experience with Swift? having a look around and types available seem very similar to Python.
deanishe Posted October 5, 2020 Posted October 5, 2020 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.
godbout Posted October 5, 2020 Author Posted October 5, 2020 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.
deanishe Posted October 5, 2020 Posted October 5, 2020 14 minutes ago, godbout said: then i thought maybe i can also compile stuff for Alfred? You definitely can. I just don't know how to.
nikivi Posted October 6, 2020 Posted October 6, 2020 14 hours ago, godbout said: i'm thinking about building something for macOS Take a look at Jordan Singer's SwiftUI apps (need to scroll down a bit). All are open source, all macOS apps using SwiftUI.
nikivi Posted October 6, 2020 Posted October 6, 2020 (edited) Also check this lib for Alfred Swift: https://github.com/kiliankoe/Alfred. Not as extensive as AwGo but it's a start.https://github.com/kiliankoe/alfred_emeal is the only workflow that uses it though. 😐 Edited October 6, 2020 by nikivi
godbout Posted October 6, 2020 Author Posted October 6, 2020 hey thanks! only scratching the surface for now, i'm going through 100 days of Swift (https://www.hackingwithswift.com/100) at slow pace. not in a rush, and need to get used to the syntax. keeping your links for dessert!
psaintemarie Posted November 3, 2020 Posted November 3, 2020 Hi, thanks for the great workflow. I can confirm that when controlling an AirPlay 2 device (like a HomePod), the volume is not changed by the workflow. Not sure if this is something you can implement.
godbout Posted November 3, 2020 Author Posted November 3, 2020 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?
godbout Posted February 5, 2021 Author Posted February 5, 2021 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. ✌🏼️✌🏼️✌🏼️
godbout Posted February 13 Author Posted February 13 2.0.0 out: https://github.com/godbout/alfred-music-volume/releases/tag/2.0.0
godbout Posted February 13 Author Posted February 13 (edited) @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 February 13 by godbout
vitor Posted February 29 Posted February 29 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!
godbout Posted February 29 Author Posted February 29 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! charla 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now