Create spotify setup script

This commit is contained in:
2021-08-07 12:43:38 +01:00
parent 5dbf4cc28a
commit d2df01e840
3 changed files with 33 additions and 6 deletions

26
.local/bin/setup/setupspotify Executable file
View File

@@ -0,0 +1,26 @@
#! /bin/bash
SPOTIFYD=$(enpasscli -vault="$HOME/Documents/Enpass/Vaults/primary" -sort show "Spotify Dev" 2>&1)
CLIENTID=$(echo "$SPOTIFYD" | grep -Po "(?<=login: )\w+")
CLIENTPW=$(echo "$SPOTIFYD" | grep -Po "(?<=pass : ).+(?=\")")
SPOTIFY=$(enpasscli -vault="$HOME/Documents/Enpass/Vaults/primary" -sort show "Spotify" 2>&1)
SPOTIFYUN=$(echo "$SPOTIFY" | grep -Po "(?<=login: )\w+")
SPOTIFYPW=$(echo "$SPOTIFY" | grep -Po "(?<=pass : ).+(?=\")")
echo "$SPOTIFYPW" | xclip -selection clipboard -i
secret-tool store --label='spotifyd' application rust-keyring service spotifyd username "$SPOTIFYUN"
systemctl --user enable --now spotifyd.service
echo "$CLIENTID" | xclip -selection clipboard -i
spt
clipnotify
echo "$CLIENTPW" | xclip -selection clipboard -i
read -n 1 -r -s -p $'Press enter when you have setup Spotify...\n'