31 lines
757 B
Bash
Executable File
31 lines
757 B
Bash
Executable File
#! /bin/bash
|
|
|
|
TOWER=$(enpasscli -vault="$HOME/Documents/Enpass/Vaults/primary" -sort show "Scarif: Tower" 2>&1)
|
|
TOWERUN=$(echo "$TOWER" | grep -Po "(?<=login: )\w+")
|
|
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
|
|
|
|
echo "$path" | xclip -selection clipboard -i
|
|
|
|
joplin-desktop &
|
|
|
|
clipnotify
|
|
|
|
echo "$TOWERUN" | xclip -selection clipboard -i
|
|
|
|
clipnotify
|
|
|
|
echo "$TOWERPW" | xclip -selection clipboard -i
|
|
|
|
read -n 1 -r -s -p $'Press enter when you have synced Joplin...\n'
|
|
|
|
echo "" | xclip -selection clipboard -i
|
|
|