Adds raycast scripts directory and pass-copy command.

This commit is contained in:
2024-04-06 11:03:50 -04:00
parent 6e33524859
commit b860ff8858
2 changed files with 49 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
#!/bin/bash
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title pass-copy
# @raycast.mode compact
# Optional parameters:
# @raycast.icon 🤖
# @raycast.argument1 { "type": "text", "placeholder": "name" }
# @raycast.packageName Password
# Documentation:
# @raycast.description Copy password from password-store
# @raycast.author Michael Housh
# @raycast.authorURL https://github.com/m-housh
#echo "Hello World! Argument1 value: "$1""
PREFIX="$HOME/.local/share/password-store"
selected=$(find "$PREFIX" -type f -name "$1".gpg)
echo "Selected find: $selected" > /tmp/pass-copy.out
if [[ -n "$selected" ]]; then
selected="${selected//$PREFIX/}"
selected="${selected//.gpg/}"
echo "Selected cleaned: $selected" >> /tmp/pass-copy.out
pass -c "$selected"
else
exit 1
fi

View File

@@ -0,0 +1,17 @@
#!/bin/bash
# Raycast Script Command Template
#
# Duplicate this file and remove ".template." from the filename to get started.
# See full documentation here: https://github.com/raycast/script-commands
#
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title My First Script
# @raycast.mode fullOutput
#
# Optional parameters:
# @raycast.icon 🤖
# @raycast.packageName Raycast Scripts
echo "Hello from My First Script"