Sfoglia il codice sorgente

Bashrc updates and mutt updates

Simon Watson 2 anni fa
parent
commit
0103a720d5
1 ha cambiato i file con 23 aggiunte e 1 eliminazioni
  1. 23 1
      bashrc/bashrc-all

+ 23 - 1
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