Skip to content

Instantly share code, notes, and snippets.

@flegfleg
Last active October 30, 2024 09:39
Show Gist options
  • Save flegfleg/5f4338dac8f1d11e1e9922ada174613a to your computer and use it in GitHub Desktop.
Save flegfleg/5f4338dac8f1d11e1e9922ada174613a to your computer and use it in GitHub Desktop.
Logseq Hookmark integration Applescript
-- Logseq Hookmark integration via Applescript
-- Copies Links to pages only, not blocks.
-- Paste this into Hook -> Preferences -> Scripts -> Logseq -> Get Address
tell application "System Events"
set the clipboard to ""
delay 0.5
-- You need to set a keyboard shortcut for "Copy page Url" in Logseq
-- Here: CMD + CTRL + SHIFT + U
keystroke "u" using {control down, shift down, command down}
delay 0.5
set logseqURL to the clipboard
if (logseqURL contains "logseq://") then
return logseqURL
end if
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment