27 lines
837 B
Plaintext
27 lines
837 B
Plaintext
|
|
#! /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'
|
||
|
|
|