mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-13 22:02:34 +00:00
Adds raycast scripts directory and pass-copy command.
This commit is contained in:
32
scripts/scripts/raycast/pass-copy.sh
Executable file
32
scripts/scripts/raycast/pass-copy.sh
Executable 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
|
||||
|
||||
17
scripts/scripts/raycast/script-command.template.sh
Executable file
17
scripts/scripts/raycast/script-command.template.sh
Executable 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"
|
||||
Reference in New Issue
Block a user