commit 0103a720d5d8b9f68c304defdfc9806820c0613e
Author: Simon Watson <spw01@protonmail.com>
Date: Wed Nov 17 13:56:21 2021 -0500
Bashrc updates and mutt updates
diff --git a/bashrc/bashrc-all b/bashrc/bashrc-all
index 494f4c8..f36d43f 100644
--- a/bashrc/bashrc-all
+++ b/bashrc/bashrc-all
@@ -53,7 +53,7 @@ export PATH
export HN_PATH=$(which hn)
hnc() {
if [ ! -z "$HN_PATH" ]; then
- hn view -c $1 | $BAT_PATH
+ hn view -c $1 | less -r
else
echo "hn not in path"
fi
@@ -63,6 +63,28 @@ export HIMALAYA_PATH=$(which himalaya)
if [ ! -z $HIMALAYA_PATH ]; then
. ~/Repos/dotfiles/himalaya/himalaya_shell_ui.sh
fi
+
+# GPG Decrypt wrapper
+export GPG_PATH=$(which gpg)
+if [ ! -z $GPG_PATH ]; then
+ function encrypt() {
+ if [ -z $1 ]; then
+ echo "Must pass path to this function"
+ return 1
+ fi
+ gpg -c --armor --cipher-algo AES256 --no-symkey-cache --output $1.asc $1
+ }
+
+ function decrypt() {
+ if [ -z $1 ]; then
+ echo "Must pass path to this function"
+ return 1
+ fi
+
+ gpg --no-symkey-cache -d $1
+ }
+fi
+
# Case defines platform specific configs
# Platform agnostic configs above
case $(hostname) in