Collecting posts on useful workflows for macOS. Link posts in this thread and I’ll consolidate.
Keyboard Maestro
Here is another potentially useful Keyboard Maestro macro. This time for creating a TOC from headings within the text. You have to be in editor mode, with the cursor in the text. Once triggered, it will select all the text, copy it, parse it and return a structured TOC in a display window and to the clipboard.
Example:
# Markdown
#LoremIpsum
[[Lorem Ipsum]]
# H1
## H2
### H3
#### H4
##### H5
###### H6
##### H5
#### H4
### H3
## H2
# H1
The macro will return:
## Content
- [[#Markdown]]
-…
Folks have been hoping for a Table of Contents plugin for a while. This isn’t that, but if you’re on a Mac and have Keyboard Maestro, I’ve created a simple macro that will produce a Table of Contents from a selection of files.
To use it, you select a few files in Finder and activate the macro. The macro copies a bulleted list to your clipboard where each line corresponds with each selected file in link format.
E.g., if you have two files named A.md and B.md, the macro copies the following bull…
There are many solutions out there for clipping text from the web into Obsidian. If you use Keyboard Maestro on macOS, this one might be the simplest and most customizable of all.
This Keyboard Maestro macro takes selected text in either Safari or Chrome and places it in your clipboard in the following form:
> quoted text
- [Website title](website link)
The result looks like:
[Screen Shot 2020-07-09 at 11.15.29 AM]
(Depending, of course, on your theming!)
Here’s what the macro looks l…
This is a trivial macro to build, but just in case someone else hasn’t considered it, I thought I’d share it here.
If you’re on macOS, Keyboard Maestro is an incredibly powerful automation tool. This little macro simply uses the keyboard shortcut assigned to Today’s Note to open it in Obsidian, and will work even if you’re currently working anywhere else on the OS.
Here’s what it looks like:
[Screen Shot 2020-07-09 at 10.15.36 AM]
Using Keyboard Maestro’s URL triggers, it’s pretty easy to a…
To celebrate the creation of a macOS meta post , another km macro for quickly changing Obsidian’s appearance and default font.
There are 3 macros, actually. They work in the following way:
set up a md file with the path of all your vaults.
set up a md file with the path of all your favorite skins (a.k.a. CSS files)
add your favorite font names to the fonts macro and make sure to adjust the css selectors.
adjust the path to these files on the macros.
But WATCH OUT:
the CSS macro will DELETE …
The now-available upgraded search features afford a neat new capability: you can search across a range of dates!
This Keyboard Maestro macro is a bit of a quilt, made of patched-together ideas from across the Internet.
Once it’s enabled, if you trigger it, it presents a window where you can input a start date and an end date using natural language. For example: “Yesterday” and “July 30.”
After a moment, it will set your clipboard to a range of dates in the Daily Notes format, formatted to be …
For everyone: this is a simple reminder that you should back up your notes. Cloud services are not a replacement for backups—in particular because changes to files synced to e.g., Dropbox or OneDrive propagate to the “backups,” too. Some of these services have quasi-backup features, like file rollback, but nothing beats the simple dependability of keeping a copy of your stuff somewhere else.
If you’re on macOS using Keyboard Maestro, I’ve created a simple macro that will create regular backups…
Macro 1: Vault Snapshot
Instructions
Just input the path of both the vault and the desired backup location to the designated locations.
What it will do
Zip the Vault folder, timestamp it and move it to the backup folder.
Macro 2: Quick git
Instructions
Change the first line of the shell script to the correct vault path.
What it will do
Commit all changes using a timestamp as commit msg.
Warning
Obviously you can only do it in a folder that is also a git repository. There are plenty of instru…
An even dumber version of https://forum.obsidian.md/t/search-a-range-of-dates-with-keyboard-maestro-on-macos/3456:
Want to insert the Daily Note-formatted date for e.g., next Monday? Too lazy to figure out what that means and type it manually? Me too.
With this macro, just type ./date (or set up whatever triggers you desire), enter the target date with natural language, and presto—your date will be inserted in your daily note format, already nestled comfortably within a double-[ hug.
The macr…
What this is
Want to be able to do this?
[2020-07-29 13.38.38]
Do It Yourself
Requirements
Follow the tweaking instructions provided here to develop a set of CSS that can recolour your interface so that only your active line is emphasized. You will need to have colours for your usual interface, and then faint versions of those colours for text you want dimmed.
Instructions
The basic logic of this automation is:
on some trigger:
find the obsidian.css file
if the file already conta…
Here’s three macros for Keyboard Maestro on macOS. As ever, this is provided as-is, but I’ve tried to make it easy to set up.
Change the location of the vault in the yellow action on each macro before use.
Save workspace
Save Workspace asks you to specify a name for the current layout, then stores a copy of .obsidian/workspace in your Obsidian Vault in a new workspaces folder.
Open workspace
Open Workspace asks you to choose one of the workspaces you’ve saved. It looks up the workspac…
While curating one’s notes, it is not uncommon to realize that some portion of text in current note actually merits being its own new atomic ‘topic’ (note).
TranscludeMe makes this easy: it cuts the selected text, replacing it with a transclusion link to a new note that contains the cut selection.
TranscludeMe is a working proof-of-concept of a future Obsidian plugin (or better, feature), prototyped as a Keyboard Maestro macro.
For me, it works well enough as a macro to be useful today as is;…
This is the world’s smallest KM script, and it is custom to my vault name, but it could be useful. The trick is KM’s ability to alter clipboard contents. I’m just running the percentage filter so it adds all the necessary code for spaces and symbols in the name.
[Screen Shot 2020-10-17 at 12.22.50 PM]
You may have noticed how difficult/convoluted it is to create Markdown links, even with different helpers, plugins, etc. So I’ve come with a personal solution programmed in Keyboard Maestro. I’m offering it in the form of a macro library, attached. (I’m not at all familiar with this sharing part of Keyboard Maestro and I hope I did it correctly). → Create Markdown link.kmlibrary.zip|attachment (2.8 KB)
The problem is that we have different configurations to adress, when we hit the “Make Link” k…
Alfred
Hi.
Ever since I started using Obsidian, I’ve been setting up some Alfred automations that allow me to use the app more efficiently. The workflow was messy and hardcoded with my own info, but I’ve cleaned it up and it’s ready to share.
Obsidian Utilities
Usage
v (no arguments)
Open vault folder in VS Code
s [search tearms]
Search note titles and contents with Alfred.
Open results in Obsidian or VS Code (Cmd modifier)
j [journal entry]
Append journal entry to daily note. Adds timestamped he…
@mitzimb describes their Daily Notes scheme including a breadcrumb trail created using espanso. I really liked the idea of the breadcrumb trail but I’m a dedicated Alfred user, so I made a Snippet to populate it.
Here’s the snippet that will create the breadcrumb trail:
< [[{date -1D}]] [[{date +1D}]] >
which inserts this into the edit pane (imagine it’s purple except the < and >):
< [[2020-07-10 Friday]] [[2020-07-12 Sunday]] >
and shows like this in preview
< 2020-07-10 Friday 2020-07-12…
This is a trivial macro to build, but just in case someone else hasn’t considered it, I thought I’d share it here.
If you’re on macOS, Keyboard Maestro is an incredibly powerful automation tool. This little macro simply uses the keyboard shortcut assigned to Today’s Note to open it in Obsidian, and will work even if you’re currently working anywhere else on the OS.
Here’s what it looks like:
[Screen Shot 2020-07-09 at 10.15.36 AM]
Using Keyboard Maestro’s URL triggers, it’s pretty easy to a…
Obsidian 0.8.15 introduced URL scheme (“obsidian://” and “obsidian:///”) and it makes building Alfred workflows so much easier! I’ve created a really simple workflow that uses URL schemes to open vaults, open daily note, and search for notes (all notes, recent notes, or today’s notes).
Download it here and check out my Github repo for some instructions on how to set it up on your own computer.
Edit: The workflow has been updated to work with Obsidian 0.9.0’s new url scheme.
I wanted a way to toggle between monospace and sans serif fonts via keyboard shortcut. Thankfully Dean Jackson of the Alfred community got it up and running, it’s really nifty. To set it up you need to have 2 additional css files (reference files) next to your obsidian.css. These can be named whatever you like, you just need to make sure the script has the right file names. Now whenever the script is run, it will populate the contents of your obsidian.css with that of your reference files, toggl…
Working with other apps
Correct it is a workaround that was actually always possible - but this makes it easier and more elegant compared to the crude way I had to do it.
The writing experience in Obsidian keeps getting better, but I really like writing in Ulysses: it’s beautiful, syncs fast between iPad and Mac, has great grammar and spelling support, enables merging/splitting notes, offers great export options, and it can be set to work with an external folder of Markdown files, such as an Obsidian vault. Unfortunately, it doesn’t play well with [[Wikilinks]]-syntax. One day, I hope that Ulysses will modify its quirky Markdown syntax to accommodate it, but for …
Incentive
I index my Obsidian notes inside DEVONthink (DT) to take advantage of its algorithms to analyze the contents and suggest related documents to me. But when I’m viewing the indexed notes in DT, I often need to open it in Obsidian, which was cumbersome to do manually.
After URL schemes were released, I realized I could reduce the friction in my workflow by somehow automatically populating the URL metadata field of the indexed notes with their URL schemes. This way, jumping from DT to Obs…
This alfred workflow opens/creates a daily note with the Date on top (as a breadcrumb) as well as Opens the daily note in your Obsidian app.
.md file would open as
< [[2020-10-03]] | [[2020-10-05]] >
Sunday, October 04 2020
Download:
AlfredWorkFlowLink
Good to Know
Just for information: this is a known issue with Electron apps in general. Something to do with Electron not using proper macOS text fields.
42 Likes
phlind
October 10, 2020, 7:36am
6
Hi, in case some of you also use or plan to use Obsidian and Vim (resp. vimwiki) side by side as two different viewports on the same notebase, this might be useful[^1] (the following describes solutions for macOS; maybe someone else could provide infos on how to do this on Linux or Windows):
Open note in Vim from within Obsidian
If you use Vim in iTerm, you can just create an App with Automator:[^2]
-- TerminalVim.app
-- This creates a shim Application that will enable you to open files from t…
Maybe this is relevant, since it talks about solutions for macOS specifically.
2 Likes
KevinR
November 13, 2020, 5:29pm
7
This is a great great great thread. I’m thinking of buying Keyboard Maestro. Hoping these still work.
1 Like
How to take advantage of autocompletion (and aliases) when wiki-wrap existing text (with Keyboard Maestro)
When I’m wiki-wrapping existing text, it’s easy to select, hit [[
and – boom! – that text is now a link. It’s magic. But sometimes, I’m not sure what the exact text is, or the text is “Luhmann” and I want it to link to a page entitled “Niklas Luhmann”, which has the alias, [Luhmann]
. When I’m typing Luhmann, Obsidian’s brilliant autocorrection includes that option – [[Niklas Luhmann|Luhmann]] – but there is no autocorrection offered if you simply wrap the text.
But there is a simple workaround:
Select the text
⌘X - Cut
[[
⌘V - Paste
To make it even faster, I’ve created a Keyboard Maestro shortcut ⌘⌥[
that cuts the selected text to a named clipboard, prepends [[
and then pastes the cut text, at which point the autocorrection kicks in and you can see several possibilities. Here is a screenshot of the KM macro.
4 Likes
ShaneNZ
November 29, 2020, 7:21pm
9
I’ve proposed this Small but big QoL: When linking a pre-existing word or phrase, display the note suggestion menu as a feature for Obsidian, which is very close to what you’ve built for KM here. Thank you, I’ll be using this until (hopefully) the devs implement the feature request!
2 Likes
This is a great little workaround! I re-created it as an Alfred workflow in MacOS:
7 Likes
Here is my Alfred workflow file itself for importing:
Shared with Dropbox
3 Likes
Is it just me, or is KM unable to move or resize Obsidian?
Working here. Any chance you’re in full screen mode?
No, I’m actually I’m trying to get it to open in fullscreen! I’m a KM novice, just testing it out. I have no problems getting the actions to work with other programs.
Maybe someone can help me out. I’d like to start the day with Obsidian and Safari side-by-side, with Safari opened to a particular URL and Obsidian opened to the daily note. Extra points if it opens to a particular workspace. How would you approach this?
Here are the steps, substituting “workspace1” in the next-to-last action for the name of your desired workspace. I have the Obsidian hotkey for Load Workspace set to ⌘1.
1 Like
Thank you! This is great.
ijd65
May 19, 2021, 10:42am
17
Here is my first attempt at Obsidian Mac Automation, hope it is of interest.
I recently moved my Daily Journal process from DEVONthink to Obsidian.
Through a combination of Applescript and Shell commands I have automated the creation of the Journal via a Keyboard Maestro macro.
Along with some standard Categories such as Weather (via wttr.in ), Daily Quotes and News Headlines (via DEVONthink RSS feeds) I wanted to add in Today’s Events from Calendar and due tasks from Reminders.
Unfortunately the process to extract Calendar Events via Applescript is notoriously slow. …
Iain
3 Likes
There’s an amazingly powerful new plug-in that Federico Viticci and Finn Voorhees just posted, called “Obsidian Shortcut Launcher”. It allows macOS/iOS/iPadOS users to run Apple Shortcuts on input from within Obsidian. I’m particularly excited about using this plugin to access the powerful actions in Drafts, which can be run via Shortcuts, and now with selected text in Obsidian as the input. The sky’s the limit. For a recent discussion of this plugin, you might like to listen to Federico discuss…
(The thread doesn’t go into the detail suggested by the title — it just calls attention to Obsidian Shortcut Launcher and one class of its possibilities.)
1 Like
Andrew1
September 18, 2023, 1:22pm
20
I use Espanso.
I have an expansion called e-edit… Which opens
subl to edit the Espanso confog files,
Then another expansion to make a new entry.
Hook needs A LOT more attention.
Want to reference a file to someone? Hook to that file on the server, create a hook file and send it to them over WhatsApp or whatever
1 Like
jms1
July 15, 2024, 11:26am
22
I wasn’t aware this thread existed … my response in this thread might fit in the Keyboard Maestro list above. It shows a macro where, if I type [ABC-123]
(a jira ticket number) it automatically types (https://xxx.atlassian.net/browse/ABC-123)
to turn it into a link.