Last active
August 14, 2021 17:43
-
-
Save sulami/4169a58f99a7b5ca18bdb80c315528e0 to your computer and use it in GitHub Desktop.
Alfred dc RPN Calculator Workflow Script
This file contains hidden or 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
query=$1 | |
result=$( dc -e "$query pq" 2>&1 | tr -d '\\' | head -1 ) | |
echo '{"items": [' | |
echo '{"title":' | |
echo "\"${result}\"" | |
echo ',' | |
echo '"subtitle": "Copy result to clipboard",' | |
echo '"arg":' | |
echo "\"${result}\"" | |
echo '}]}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just add a
script filter
input for a keyword of your choice, paste in this script, connect it to acopy to clipboard
output, and you're done.