quickwrite bash functions using sops

This commit is contained in:
Amarpreet Minhas 2024-12-18 20:55:14 -05:00
parent a6dcb43c60
commit 45ddefb2f6

14
.bashrc
View file

@ -39,16 +39,11 @@ alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# IP
alias ipme='wget -qO - icanhazip.com'
alias speedtest='wget --output-document=/dev/null http://speedtest.wdc01.softlayer.com/downloads/test500.zip'
# Bash Prompt
PS1="\[\033[35m\]\t\[\033[m\]-\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[31;1m\]\w\[\033[m\]\$ "
# Export environmental variables
export EDITOR=vim
export VISUAL=vim
export EDITOR=nvim
export VISUAL=nvim
export BROWSER=firefox
# Source external file
@ -57,3 +52,8 @@ if [[ -f ~/.customrc ]]; then
fi
bash ~/.motd
# quick writing funcs
function unlock() { export SOPS_AGE_KEY=$(age -d ${HOME}/.age/privkey.age); }
function write() { SOPS_AGE_KEY=${SOPS_AGE_KEY} sops $1; }
function j() { SOPS_AGE_KEY=${SOPS_AGE_KEY} sops ${HOME}/journal/$(date +%Y%m%d).txt; }