From 39722ea19f1b0acd8115b89c94bf37c9b4aa49aa Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Wed, 22 Jan 2025 02:26:14 +0100 Subject: [PATCH] crypto is cool --- .zshrc | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/.zshrc b/.zshrc index 17a325d..44026f6 100644 --- a/.zshrc +++ b/.zshrc @@ -13,8 +13,8 @@ export CLIPBOARD_NOGUI=0 # wayland only allows GUI apps to use the clipboard. # For wayland, set this to `1` # see https://github.com/Slackadays/Clipboard/issues/171 export DATEFMT='+%a %Y-%m-%d %X' -export EDITOR=nvim -export VISUAL=nvim +export EDITOR=$(which nvim) +export VISUAL=$(which nvim) ### Aliases @@ -302,9 +302,32 @@ function load_nvm() { } # zprof +# gpg is cool actually + +# crypto stuff with my gpg keys +export IDENTITY="Christoph J. Scherr " +export KEY_TYPE=ed25519 +export KEYID=0E777B31ACC5B69B7096C050A466E5C5D6792EE9 +gpgencrypt () { + output="${1}".$(date +%s).enc + gpg --encrypt --armor --output ${output} \ + -r $KEYID "${1}" && echo "${1} -> ${output}" +} + +gpgdecrypt () { + output=$(echo "${1}" | rev | cut -c16- | rev) + gpg --decrypt --output ${output} "${1}" && \ + echo "${1} -> ${output}" +} + ### load unversioned zsh code if [ -f ~/.zsh.local ]; then source ~/.zsh.local else touch ~/.zsh.local fi +if [ -f ~/.zshenv ]; then + source ~/.zshenv +else + touch ~/.zshenv +fi