Skip to content

Commit

Permalink
keep Bitcoin Core in favorites if sparrow not installed, mk blocksdir…
Browse files Browse the repository at this point in the history
… to fix error
  • Loading branch information
BenWestgate committed Jun 16, 2024
1 parent 915bdad commit fea9e0f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bails/.local/bin/install-core
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ sed -i 's/#rpcport=<port>/rpcport=17600/' "$DOTFILES/.bitcoin/bitcoin.conf"
sed -i "s,#datadir=<dir>,datadir=$DATA_DIR," "$DOTFILES/.bitcoin/bitcoin.conf" # set -datadir for Tails
sed -i "s,#debuglogfile=<file>,debuglogfile=$HOME/.bitcoin/debug.log," "$DOTFILES/.bitcoin/bitcoin.conf" # set log to tmpfs
link-dotfiles
[ -e $DATA_DIR/wallets ] || mkdir -p $DATA_DIR/wallets # TODO: this can be replaced by creating the symlink in panic mode solution
[ -e $DATA_DIR/wallets ] || mkdir -p $DATA_DIR/{wallets,blocks} # TODO: this can be replaced by creating the symlink in panic mode solution
ln --symbolic --force -b /media/"$USER" $DATA_DIR/wallets # links media mount directory to wallets folder for easier loading of watch encrypted or external media wallets
chmod -w $DATA_DIR/wallets # TODO: this can be deleted when panic mode is added
ln --symbolic --force -b {"$HOME"/.bitcoin,$DATA_DIR}/debug.log # symlinks to tmpfs debug.log
Expand Down
5 changes: 4 additions & 1 deletion bails/.local/bin/wrapped
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ persistent-setup # Checks needed persistent features are on.
ln -s /live/persistence/TailsData_unlocked/Persistent/.* ~

# Update favorite apps list
gsettings set org.gnome.shell favorite-apps "['bails.desktop', 'sparrow-Sparrow.desktop', 'tca.desktop', 'org.boum.tails.PersistentStorage.desktop', 'tails-documentation.desktop', 'whisperback.desktop', 'tails-installer.desktop', 'thunderbird.desktop', 'org.keepassxc.KeePassXC.desktop', 'org.kde.kleopatra.desktop']"

favorites="['bails.desktop', 'bitcoin-qt.desktop', 'tca.desktop', 'org.boum.tails.PersistentStorage.desktop', 'tails-documentation.desktop', 'whisperback.desktop', 'tails-installer.desktop', 'thunderbird.desktop', 'org.keepassxc.KeePassXC.desktop', 'org.kde.kleopatra.desktop']"
which Sparrow && favorites=${favorites/bitcoin-qt/sparrow-Sparrow}
gsettings set org.gnome.shell favorite-apps "$favorites"

space=$(( ($(df --output=avail "$DATA_DIR" | tail -1) + \
$(du --summarize "$DATA_DIR/blocks" | cut -f1))/1024 - 10240 ))
Expand Down

0 comments on commit fea9e0f

Please sign in to comment.