diff options
Diffstat (limited to 'config/essentials')
| -rw-r--r-- | config/essentials/shell/aliases.sh | 4 | ||||
| -rw-r--r-- | config/essentials/shell/functions.sh | 13 | 
2 files changed, 9 insertions, 8 deletions
diff --git a/config/essentials/shell/aliases.sh b/config/essentials/shell/aliases.sh index 51bc0e6..63a6f12 100644 --- a/config/essentials/shell/aliases.sh +++ b/config/essentials/shell/aliases.sh @@ -99,7 +99,7 @@ alias doprm='dopac -Rns'  alias mpkg='makepkg -si'  which pikaur >/dev/null 2>&1 && alias yay='MAKEFLAGS="-j $(nproc)" pikaur' -alias yup='yay -Syu' +alias yup='yay -Syua'  alias ysi='yay -Si'  alias yss='yay -Ss'  alias yqs='yay -Qs' @@ -276,7 +276,7 @@ alias czo='cd ~/zot/'  alias cdpw='cd ${PASSWORD_STORE_DIR:-~/.password-store}'  alias cdng='cd /etc/nginx'  alias cdnv='cd ~/.config/nvim' -alias cdvi='cd ~/.config/vis' +alias cdvis='cd ~/.config/vis'  alias cdrs='cd /srv/'  alias cdv='cd ~/vids'  alias god='cd "$(find . -mindepth 1 -maxdepth 1 -type d | fzf)"' diff --git a/config/essentials/shell/functions.sh b/config/essentials/shell/functions.sh index 464126b..fd2226d 100644 --- a/config/essentials/shell/functions.sh +++ b/config/essentials/shell/functions.sh @@ -168,18 +168,19 @@ function git_develop_branch() {  }  # gpg backup +# $1: key  gpg_backup()  { -    # $1: option -    # $2: output file (without .asc) -    gpg_command() { gpg "$1" --armor > "$2".asc; } -    gpg_command --export-secret-keys "private" -    gpg_command --export "public" -    gpg_command --export-ownertrust "trust" +    key="$(gpg --list-keys --with-colons | awk -F: '/^uid/ {print $10}' |sort|uniq | fzf)" +    [ "$key" ] || exit 1 +    gpg --armor --export-secret-keys "$key" > private.asc +    gpg --armor --export "$key" > public.asc +    gpg --armor --export-ownertrust > trust.asc      tar -czvf gpg_backup.tar.gz public.asc private.asc trust.asc      shred -uz public.asc private.asc trust.asc  } +# $1: backup tar  gpg_import()  {  	tar xf $1  | 
