19

A programmable tooltip on Mac OS

 4 years ago
source link: https://tanin.nanakorn.com/main/2020/04/19/use-tooltip-to-speed-up-your-workflow.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Home | 19 April 2020

A programmable tooltip on Mac OS

Several months back, I’ve started a new job and immediately found myself perform some repetitive micro-workflows like:

  • Copying an ID, pasting it on the browser URL’s bar, typing some url, and hitting enter
  • Copying a millisecond-from-epoch number, visiting a website that can convert it to human-readable date, pasting the number, and hitting enter

I’d do these workflows many times a day. It was tiresome and required to be quite skilled to perform these flows quickly.

So, I’ve decided to build Tip to speed up these workflows.

Tip is built upon “Services” (or “System-wide Services”) , which allowed one application to send a selected text to another application. Therefore, Tip can only see the text when user explicitly triggers this feature by hitting the configured shortcut.

Tip gets the selected text, calls the user script, and renders the result in a tooltip as shown below:

7VZVnmb.gif

With a user script that you write yourself, this means you can customize Tip to do anything you want.

My favourite technical detail on Tip is that it runs in App Sandbox without requesting for additional permissions. Tip can only execute (and read-only) a user script placed in ~/Library/Application\ Scripts/tanin.tip/ . Privacy-wise, this is a huge win.

I’ve been using Tip for 3-4 months now with many use cases. Surprisingly, the use case I use most frequently is: selecting a file in an error stacktrace and opening that file in IntelliJ.

I’d love it if you try Tip, and I hope it makes you move faster: https://github.com/tanin47/tip


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK