Skip to content

Instantly share code, notes, and snippets.

@flegfleg
Last active December 8, 2023 22:40
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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