All Projects → tanin47 → Tip

tanin47 / Tip

Licence: mit
Programmable tooltip that can be used with any Mac OS app

Projects that are alternatives of or similar to Tip

Slowquitapps
Add a global delay to Command-Q to stop accidental app quits.
Stars: ✭ 916 (+14.79%)
Mutual labels:  productivity, utility, shortcut
linearmouse
🖱 The mouse and trackpad utility for Mac.
Stars: ✭ 1,151 (+44.24%)
Mutual labels:  productivity, utility
micSwitch
macOS menu bar application for the mic mute/unmute with single click or shortcut with walkie-talkie style support
Stars: ✭ 37 (-95.36%)
Mutual labels:  utility, shortcut
pino-caller
🌲 Include call site of pino log messages
Stars: ✭ 35 (-95.61%)
Mutual labels:  productivity, utility
Ridereceipts
🚕 Simple automation desktop app to download and organize your receipts from Uber/Lyft. Try out our new Ride Receipts PRO !
Stars: ✭ 117 (-85.34%)
Mutual labels:  productivity, utility
Synth Shell
Boost your terminal, script by script
Stars: ✭ 217 (-72.81%)
Mutual labels:  productivity, utility
flawesome
Productivity Tool
Stars: ✭ 56 (-92.98%)
Mutual labels:  productivity, utility
powerlet
⚡️ Chrome Extension to quickly find and run bookmarklets
Stars: ✭ 17 (-97.87%)
Mutual labels:  productivity, utility
vscode-jump
🏃‍♂️ Jump/Select to the Start/End of a word in VSCode
Stars: ✭ 67 (-91.6%)
Mutual labels:  productivity, utility
react-hotkey-tooltip
A global Hotkey provider with built in tooltip for React
Stars: ✭ 34 (-95.74%)
Mutual labels:  tooltip, shortcut
Autohotkey
⚙️ My Autohotkey productivity suite that includes shortcuts, hotstrings, hotkeys, apps/utilities, AutoCorrect
Stars: ✭ 113 (-85.84%)
Mutual labels:  productivity, shortcut
Tooltip Sequence
A simple step by step tooltip helper for any site
Stars: ✭ 287 (-64.04%)
Mutual labels:  utility, tooltip
Xcactionbar
"Alfred for Xcode" plugin
Stars: ✭ 1,217 (+52.51%)
Mutual labels:  productivity, shortcut
UnitySettings
Runtime debugging menu (like setting on Android) for Unity.
Stars: ✭ 26 (-96.74%)
Mutual labels:  productivity, utility
Goat
POSIX-compliant shell movement boosting hack for real ninjas (aka `cd x` and `cd ...`)
Stars: ✭ 27 (-96.62%)
Mutual labels:  productivity, utility
DropPoint
Make drag-and-drop easier using DropPoint. Drag content without having to open side-by-side windows
Stars: ✭ 303 (-62.03%)
Mutual labels:  productivity, utility
Archivemounter
Mounts archives like disk images (macOS)
Stars: ✭ 77 (-90.35%)
Mutual labels:  utility, macosx
Powerkey
Remap your Macbook's power key to Forward Delete
Stars: ✭ 212 (-73.43%)
Mutual labels:  utility, macosx
Codist
A visual studio extension which enhances syntax highlighting, quick info (tooltip), navigation bar, scrollbar, display quality and brings smart tool bar to code editor.
Stars: ✭ 134 (-83.21%)
Mutual labels:  productivity, tooltip
vscode-snippet-generator
📜 Generate snippets from code in VSCode
Stars: ✭ 31 (-96.12%)
Mutual labels:  productivity, utility

Universal Tip icon Universal Tip

Download from Mac App Store

Tip (or its full name, Universal Tip) is a programmable tooltip that can be used with any Mac OS app. You can select the text and hit the shortcuts to activate a tooltip with useful info.

"Useful info" is programmed by you using your favourite programming language.

For me, who is prone to Repetitive strain injury and Carpal tunnel syndrome, Tip reduces hand movement which helps reduce the risk of the injury.

I'd love for you to try it!

Questions? please don't hesitate to open a Github issue.

Examples

Convert the seconds from epoch to the human-readable time and copy it to clipboard

Tip is used within Chrome.

Convert seconds from epoch to time and copy

Open Github code search on the selected text

Tip is used within Sublime.

Open Github code search with the selected text

Open a file on Github from an error stacktrace line

Tip is used within Terminal.

Open file on Github from an error stacktrace line

Open a JIRA ticket on the selected text

Tip is used within Terminal.

Open JIRA with the selected text

You can make your own info provider. The possibility is endless!

Installation

  1. Install Tip from Mac App Store
    • You can also download it from the release page and move Tip.app to under /Applications
  2. Download and copy scripts/provider.script to ~/Library/Application\ Scripts/tanin.tip/provider.script. Run chmod 755 ~/Library/Application\ Scripts/tanin.tip/provider.script.
    • Or you can simply run: curl -o ~/Library/Application\ Scripts/tanin.tip/provider.script --create-dirs https://raw.githubusercontent.com/tanin47/tip/master/scripts/provider.script && chmod 755 ~/Library/Application\ Scripts/tanin.tip/provider.script
  3. Go to System Preferences > Keyboard > Shortcuts > Services > Scroll down to the "Text" section. You should see "Tip: open tips" under the "Text" section.
    • Please make sure to check it.
    • You can also set the shortcuts here.

The sample provider script is in Ruby, so you need Ruby to run it. Otherwise, you can make your own provider as well.

See how to develop the provider script here.

Usage

  1. Select the text
  2. Hit the configured short key. The default shortcut is Cmd + &.
  3. The tooltip with relevant info will show
  4. Use arrow keys to choose an item in the tooltip and hit 'Enter' to perform the appropriate action. Alternatively, you can click an item as well

Currently, Tip supports 3 actions: (1) Copy to clipboard if the item is text, (2) Open URL if the item is URL, and (3) Execute a command.

See how to develop the provider script here.

Customize the shortcut

Go to System Preferences > Keyboard > Shortcuts > Services and set the shortcut for "Tip: open tips".

If your shortcut doesn't include the Command key, you will need to activate it manually by:

  1. Selecting a text
  2. Clicking on the application menu > Services > "Tip: open tips"

Now you'll be able to use the new shortcut for Tip.

Choosing a good shortcut

I've found that Cmd + F3 is a good shortcut. I haven't encountered an application that uses this shortcut yet.

My setup, which enables me to use Tip seamlessly, is:

  • An extra mouse button emits Cmd + F3
  • 4-finger touch on the trackpad emits Cmd + F3

I use Noo.app to configure my mouse buttons and trackpad.

Privacy

There are 3 components that enables Tip to maintain a high degree of privacy: App Sandbox, NSService, and NSUserUnixTask

  1. Tip runs in App Sandbox without requesting for an additional permission. With App Sandbox, Tip can only read/write files from a few predefined directories and, specifically, can only execute (not write) the files within ~/Library/Application\ Scripts/tanin.tip. This is the reason why the provider script is under ~/Library/Application\ Scripts/tanin.tip/.

  2. Tip is based on NSServices. Tip doesn't (and cannot) see the content of other applications. When you explicit trigger Tip, Mac OS gives Tip the selected text.

  3. Tip uses NSUserUnixTask, which is intended to execute user-supplied scripts, and will execute them outside of the application's sandbox, if any. This enables provider.script (a user-supplied script) many more use cases because it runs outside of the sandbox.

Great design by Apple. It is a huge win in terms of privacy.

Technical detail

Tip is an NSServices. When user selects text and hits the shortcut, the selected text is sent to Tip. Then, Tip invokes the command-line tool with the selected text as the first argument, i.e ~/Library/Application\ Scripts/tanin.tip/provider.script [selected-text] --bundle-id [the-app-that-you-activate-tip-on].

The command-line tool processes the input, decides which info to show, and prints the tip items as JSON that looks like below:

[
  {"type": "text", "value": "Some text"},
  {"type": "url", "label": "Go to JIRA", "value": "https://your-jira-url/JIRA-0001"},
]

Tip processes the JSON and renders the tooltip at the mouse location.

Tip on the internet

FAQ

Why is Tip written in Objective-C instead of Swift?

Because I don't know how to write Swift. I'd like to switch to Swift though.

What does Tip mean?

Tip is a Thai word that means magical and divine. The word is derived from the word, divya, which exists in both Pali and Sanskrit.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].