Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions scripts/menu.tumbler.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/bin/bash
# TUMBLER menu options
# https://github.com/JoinMarket-Org/joinmarket-clientserver/blob/master/docs/tumblerguide.md

source /home/joinmarket/_functions.sh
source /home/joinmarket/joinin.conf

if [ ${RPCoverTor} = "on" ]; then
tor="torsocks"
else
tor=""
fi

checkRPCwallet

# BASIC MENU INFO
HEIGHT=15
WIDTH=52
CHOICE_HEIGHT=22
TITLE="Tumbler options"
MENU=""
OPTIONS=()
BACKTITLE="JoininBox GUI"

# Basic Options
OPTIONS+=(
TUMBLE "Start the Tumbler"
SCHEDULE "Display and edit the schedule"
LOGS "Display the Tumbler logs"
RESTART "Restart an interrupted schedule"
)

CHOICE=$(dialog \
--clear \
--backtitle "$BACKTITLE" \
--title "$TITLE" \
--ok-label "Select" \
--cancel-label "Back" \
--menu "$MENU" \
$HEIGHT $WIDTH $CHOICE_HEIGHT \
"${OPTIONS[@]}" \
2>&1 >/dev/tty)

case $CHOICE in

SCHEDULE)
# [mixdepth, amount-fraction, N-counterparties (requested), destination address, wait time in minutes, rounding, flag indicating incomplete/broadcast/completed (0/txid/1)]
dialog \
--title "Tumbler schedule" \
--prgbox "(echo 'mixdepth,amount-fraction,N-counterparties,destination address,wait time in minutes,rounding,flag (0/txid/1)' ;cat /home/joinmarket/.joinmarket/logs/TUMBLE.schedule) | column -t -s, 2>/dev/null" 30 120
;;

esac