Skip to content

Instantly share code, notes, and snippets.

@flegfleg
Created December 15, 2023 10:34
Show Gist options
  • Save flegfleg/27390a176af4b63c46280ea3f2a9f0d8 to your computer and use it in GitHub Desktop.
Save flegfleg/27390a176af4b63c46280ea3f2a9f0d8 to your computer and use it in GitHub Desktop.
Logseq Hookmark integration (Copy URL)
-- Logseq Hookmark integration via Applescript
-- Copies Links to Pages only, not blocks.
tell application "System Events"
-- Press "ESC"
key code 53
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