Moves scripts to own folder
This commit is contained in:
parent
36dbfbc689
commit
bcb83fb7be
32 changed files with 69 additions and 645 deletions
42
.config/scripts/anyrun/Bitwarden.sh
Executable file
42
.config/scripts/anyrun/Bitwarden.sh
Executable file
|
|
@ -0,0 +1,42 @@
|
|||
#!/bin/env sh
|
||||
|
||||
declare -A actions
|
||||
actions['Sync']="sync"
|
||||
actions["Logout"]="logout"
|
||||
actions["Lock"]="lock"
|
||||
|
||||
printSelection() {
|
||||
echo "$1"
|
||||
for key in "${!fruits[@]}"
|
||||
do
|
||||
echo "Action: $key"
|
||||
done
|
||||
}
|
||||
|
||||
formattedIDs=$(echo "format:[NAME] ([USERNAME])" | nc -U /tmp/bitwarden-daemon.sock)
|
||||
|
||||
selectionList=$(echo "$formattedIDs" | jq 'keys | map("\(.)\n") | add' -r)
|
||||
actionSelectionList=$(printf "Actions: %s\n" ${!actions[@]})
|
||||
selection=$(printf "%s\n" "$selectionList" "$actionSelectionList" | anyrun --plugins libstdin.so)
|
||||
|
||||
echo "$selection"
|
||||
|
||||
if [[ $selection == '' ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ $selection == Actions:* ]]; then
|
||||
actionKey="${selection:9}"
|
||||
action="${actions[$actionKey]}"
|
||||
echo "Performing: $action"
|
||||
|
||||
echo "$action:" | nc -U /tmp/bitwarden-daemon.sock
|
||||
else
|
||||
id=$(echo "$formattedIDs" | jq ".[\"${selection}\"]" -r)
|
||||
echo "lookupPassword:$id" | nc -U /tmp/bitwarden-daemon.sock | wl-copy
|
||||
|
||||
notify-send "Password copied" "Copied password for '$selection' to clipboard."
|
||||
fi
|
||||
|
||||
exit 0;
|
||||
|
||||
15
.config/scripts/anyrun/Toolkit.sh
Executable file
15
.config/scripts/anyrun/Toolkit.sh
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/env sh
|
||||
|
||||
SCRIPTS_DIR="$HOME/.config/hypr/scripts"
|
||||
|
||||
declare -A scripts
|
||||
scripts["Shutdown"]="systemctl poweroff"
|
||||
scripts["Reboot"]="systemctl reboot"
|
||||
scripts["Logout"]="logout terminate-user $USER"
|
||||
scripts["Lock"]="$SCRIPTS_DIR/LockScreen.sh"
|
||||
scripts["Notification Center (SwayNC)"]="swaync-client -t -sw"
|
||||
|
||||
selected=$(printf "%s\n" "${!scripts[@]}" | anyrun --plugins libstdin.so)
|
||||
|
||||
command="${scripts[$selected]}"
|
||||
$command
|
||||
Loading…
Add table
Add a link
Reference in a new issue