Skip to content

Instantly share code, notes, and snippets.

@lululau
Created December 12, 2019 03:36
Show Gist options
  • Save lululau/61c280aa3477d3640a8329ca33974837 to your computer and use it in GitHub Desktop.
Save lululau/61c280aa3477d3640a8329ca33974837 to your computer and use it in GitHub Desktop.
Safari Assistant Alfred Workflow Components
ALSF_UID=$(cat ~/Library/Safari/Bookmarks.plist | plutil -convert xml1 -o - -- - | grep -A4 '<string>Docs</string>' | tail -1 | sed 's/<\/.*//;s/.*>//')
# Which folder to browse is passed via workflow/environment variables
ALSF_UID=$ALSF_UID ./alsf browse -q "$1"
ALSF_UID=$(cat ~/Library/Safari/Bookmarks.plist | plutil -convert xml1 -o - -- - | grep -A4 '<string>DevSites</string>' | tail -1 | sed 's/<\/.*//;s/.*>//')
# Which folder to browse is passed via workflow/environment variables
ALSF_UID=$ALSF_UID ./alsf browse -q "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment