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

View File

@@ -30,10 +30,11 @@ echo "Password set successfuly"
setupvpn
setupssh
setupdev
setupprinter
setupwacom
setupmaptool
setupkeyring
setupspotify
setupfirefox
setupjoplin
setupnextcloud
setupprinter

View File

@@ -6,11 +6,11 @@ TOWERPW=$(echo "$TOWER" | grep -Po "(?<=pass : ).+(?=\")")
path="https://tower.scarif.space/remote.php/dav/files/chris/Joplin"
# joplin config sync.target 5
# joplin config sync.5.path "$path"
# joplin config sync.5.username "$TOWERUN"
# joplin config sync.5.password "$TOWERPW"
# joplin sync
joplin config sync.target 5
joplin config sync.5.path "$path"
joplin config sync.5.username "$TOWERUN"
joplin config sync.5.password "$TOWERPW"
joplin sync
echo "$path" | xclip -selection clipboard -i

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'