569: Contextual Computing

For my uses, DEVONthink is 100% research materials for my content creation work. Books, magazines, whitepapers, etc.

Notes in Craft are just for me, and cover all sorts of things from travel docs (haha), server configuration notes, reminders of certain Logic settings, etc.

3 Likes

@MacSparky , I am a music teacher and arranger, and I have an Alesis 49-key MIDI controller on my desk in my home office that is filled with Keyboard Maestro shortcuts. Almost all of my KM shortcuts are assigned to keys on the MIDI Keyboard, from window management to launching contextual workspaces. It is basically like a 49-key StreamDeck from the point of launching macros.

I have all of the macros triggered from a single macro group so whenever I dive into my music writing software or need to use the keyboard, I can just use the F19 key on my keyboard to toggle on and off the macro group, so I can use the keyboard to input or play music.

I have the macros in the “Alesis Controller” Macro Group, use “If application is at front” so each key can be a different macro depending on the app.

I definitely agree @Justin_H about the nanoPad and nanoKey. I have on of those at my desk at work and have a few macros on that for when I don’t have my home setup and just my laptop. At $49 the nanoPad would function great as a “StreamDeck” like product (without the programmable button images, tho)

2 Likes

Doesn’t DT and Drafts have the ability to create a URL with a UUID? Wouldn’t a URL with a UUID, still work even if the file is moved/renamed.

Both Devonthink and Drafts prefer using UUID rather than paths (as Finder does for file:// links), so they don’t break when moving.

Others, like Obsidian and Finder, prefer using absolute/relative paths to a file. Those will break if the file is moved or renamed because the previous path in the link will no longer point to the corresponding file.

A workaround is to use a third party app (such as Hook or Devonthink) that has the ability to create and monitor a database of files and use its own link to refer to the file on the system. That will require for the indexing part of the app to be running when file is moved or renamed.

3 Likes

Do you compartmentalize in such a way due to personal preference (one app for one area of work) or is there a specific practical reason which makes Craft/DT more suitable for one of the two use cases and vice versa?

1 Like

Two thoughts:

  1. Conflict palette is great.
  2. The real problem for me with Contextual Computing is deciding what the contexts are and what goes in them. For me, these are leaky containers.
1 Like

Personal preference, but the Markdown support is more handy for work stuff, too.

1 Like

Regarding Notes support for Hook: This was bugging me, so I looked into it further. Short version: Hook supports Notes in Mavericks and Big Sur, and has partial support for Notes in Catalina. More information:

Interestingly, Hook uses the note creation date and time as a unique identifier for each note, which is very clever indeed!

Awesome tip, Chris! However, you lost me on URL encoding the pathname before putting file:// in front of it. How do you do that?

So, start with the file path:

/Users/chris/Documents/Test File.txt

The problem here is that URLs can’t have spaces in them. When I paste it into Things, it assumes that the space is the end of the URL and tries to link to a file named ‘Test’ instead of ‘Test File.txt’:

Screen Shot 2021-01-07 at 11.24.20 AM

We could just never use spaces in our file paths, but the Mac has supported spaces in file and folder names since time immemorial. Instead, we can get around this by URL encoding the path, replacing the space with %20. You could do this manually, but that would be a pain and we’d also have to replace any other characters that aren’t valid in a URL. Instead, we can use URL encoding software to make all the necessary substitutions for us. If you want to play around with it, there are websites that will URL encode text for you. If this is something you want to make part of your workflow you probably want to script it (this can be done using the Filter action in Keyboard Maestro and setting it to “Percent Encode for URL”).

This gives us:
%2FUsers%2Fchris%2FDocuments%2FTest%20File%2Etxt

In order to make Things or other programs that automatically convert URLs to links recognize this as a URL we need to put file:// in front of the URL-encoded path (just like URLs for websites have “http://” at the front).

file://%2FUsers%2Fchris%2FDocuments%2FTest%20File%2Etxt

Now when I paste this into Things it recognizes the whole string as a URL and doesn’t stop at the space:

Note that when I hover over the link, Things automatically decodes the URL turning %2F into a slash and %20 into a space:

If I click the link it will open my Documents folder in a Finder window with Test File.txt selected. ⌘-O will open it in whatever the default app is for that file type.

3 Likes

Great episode guys!

@MacSparky David, could you explain how your “minimize all windows” Keyboard Maestro macro works or what actions it uses? I can’t find a way to minimize all in the “manipulate a window” action. I was hoping it was a downloadable macro in the Keyboard Maestro Field Guide but couldn’t find it.

Contextual Computing is an amazing concept, I’m looking forward to more development of this!

@ismh I am now doing the same. Once I realized that I could import markdown files and could bulk export any notes from Craft in four formats if and when needed, I made Craft my default note taking application. It is also working well as a PKM app. While I like Obsidian, I’m finding Craft more flexible and better suited to my needs. Very impressed so far and the developer, Viktor, has been helpful and responsive.

There is a minimize all command but tactically use the close specific app command. :slight_smile:

1 Like

Fascinating episode as always. Just a quick note on how I’m using MIDI triggers with BetterTouchTool, Keyboard Maestro, and HomeKit on my Mac.

A few of the knobs on my M-Audio keyboard typically go unused, so I’ve assigned BTT “Value Changed” triggers - which run AppleScript to invoke Keyboard Maestro to send hotkeys to the “Homie” (Menubar app) to control the brightness of the left and right desk lamps.

Homie (or HomeControl) allows you to assign individual hotkeys to Scenes - though HomeControl throws an alert if you send keystrokes faster than it can respond.

@MacSparky said he uses 1Password to generate fake UUIDs for notes.

I need to make UUIDs all the time for work. Fortunately Mac OS X ships with /usr/bin/uuidgen which can help with that.

To turbo charge this, just add a TextExpander snippet, and set the content to Shell Script:

#!/bin/bash
/user/bin/uuidgen

Saves me a lot of time!

12 Likes

Thanks @knowuh. I didn’t know about that. New toy!

2 Likes

Very cool. I didn’t know about this either. Inspired by your Text Expander snippet, I made an Alfred Workflow to do the same thing. I put it here: https://github.com/ethanweed/Alfred-make-UUID

1 Like

@Aaron_Antcliff I’d love to see your workflow on this - I’m still trying to get my head around just how to surface these connections effectively.

I use a TextExpander snipped to make Zettelkasten numbers as unique ids - YYYYMMDDHHMMSS

3 Likes

After some back and forth (since Catalina’s Notes AppleScript brook), Hook [generates URLs for notes based on their date-time stamps]( Using Hook with Apple Notes – Hook). Apple doesn’t directly expose the Notes URLs, but I am hopeful they will follow the trend towards exposing links in a helpful manner.

1 Like