3 ms·
My time to shine. I have built a programmable tooltip for Mac. It works on any app. I use this hundreds of times a day at work for 2y now. You can select any
by tanin 4y ago
My time to shine.
I have built a programmable tooltip for Mac. It works on any app. I use this hundreds of times a day at work for 2y now.
You can select any text and activate the tooltip with the short key. Then, the tooltip offers a list of options like jumping to URL, showing some extra info.
You are the one who write the script to process the text and return the options.
You can check it out here: github.com/tanin47/tip
PS. I configure a mouse button to trigger the Tip short key, so it is even more convenient.
- al_borland 4y agoThis is pretty interesting. When I was using Windows at work I made something like this with AutoHotKey. I’d highlight text, hit a button on my mouse, it would load that text into a GUI and give me a dozen options for what I wanted to do with it. Some options were basic, just appending it to a URL to do a search, while others were more involved, requiring some config setup in the GUI to open something in a native app. It was fantastic, and many people on my team started using it. Since I moved to macOS at work all of that went away and I haven’t been able to find a good alternative to AutoHotKey for macOS. Although it’s hard to know if I can even attempt to run this at work with how locked down things have become.
- tanin 4y ago> Although it’s hard to know if I can even attempt to run this at work with how locked down things have become. If it helps, Tip runs in App Sandbox without requesting any additional permission. This means Tip cannot read any file on your computer (other than the predefined places in its own sandbox) nor anything on other apps. There are 2 limited things that it can do: 1. It can only execute the script that you provide at ~/Library/Application\ Scripts/tanin.tip/provider.script 2. It can only see the string that you activate Tip on. This is through NSService. The privacy and security is top notch. Kudos to Apple who provides such good frameworks. You can try requesting the app to be allowed from your IT team. I did this at my company (i.e. Stripe) as well.
- al_borland 4y agoThanks. I'll look into it and see how it goes.
- al_borland 4y agoAre you planning to compile this for Apple Silicon? I've been trying hard to avoid installing Rosetta on my new MBP (not that I've heard anything bad, I just don't want to even have to think about it when they finally drop support).
- tanin 4y agoIt should work with M1. I just got M1 last week, and it works. Please let me know if it doesn't.
- al_borland 4y agoIt probably works, but it prompts me to install Rosetta, so I clicked cancel, as I've been trying to avoid that on principle. I'm not sure what principle exactly... Obviously I'm not expecting you to go out of your way, but was wondering if you had plans for native support.
- tanin 4y agoMaybe my work laptop has Rosetta by default. I do have plan to compile a native one. I will see when I can recompile it on M1. Thank you for letting me know.
- coisale13 4y agoI'm very interested that you can open Intellij code. Do you have example code from your GIF you could link? Is Intellij opened with the type url or a script? Can't wait to use this! Thanks
- tanin 4y agoYes. You can open the below URL: idea://open?file=/home/user/file/path.scala&line=56 VSCode has one too vscode://file/home/user/file/path.js:56
- slightwinder 4y agoThat's pretty cool. I wish linux had such abilities. I have a similar app-specific launcher to call scripts, but the best I can use are keys, so I just fire ctrl-c or such, wait some seconds and have something useable in a separate dialog. Such an integrated tooltip seems to be far better than this. Thinking about, MacOS has a long history of well integrated automation, with AppleScript, external callable function per window/app and they even had automator at some point. Not sure what happened to it. Linux had something similar with KDE and dcop, but it died at some point.
- tanin 4y agoI agree. I was thinking about building it for linux, but there's no equivalent mechanism. I was thinking about utilizing clipboard instead. Apart from that, AppSandbox + NSUserUnixTask + NSService reallt enable this use case to have the highest privacy level. Without these 3, I would have had to request pervasive permissions on user's machine.