Last active
October 30, 2024 09:39
-
-
Save flegfleg/5f4338dac8f1d11e1e9922ada174613a to your computer and use it in GitHub Desktop.
Logseq Hookmark integration Applescript
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. | |
-- 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