Created
December 15, 2023 10:34
-
-
Save flegfleg/27390a176af4b63c46280ea3f2a9f0d8 to your computer and use it in GitHub Desktop.
Logseq Hookmark integration (Copy URL)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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