From e6acbe0648a6455650c032e12e2b8267f90fa860 Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Fri, 7 Dec 2018 05:06:04 -0500 Subject: [PATCH] Added GPG aliases --- aliases/zsh_aliases | 21 +++++++++++++++++++-- configs/ranger/rc.conf | 1 + configs/ranger/rifle.conf | 2 ++ configs/ranger/scope.sh | 7 +++++++ dotfiles/.vimrc | 1 + dotfiles/.zshrc | 1 + txt/key_dirs.txt | 1 + txt/pacman-pkgs/nzxt-pkgs.txt | 6 ++++++ 8 files changed, 38 insertions(+), 2 deletions(-) diff --git a/aliases/zsh_aliases b/aliases/zsh_aliases index 59acb49..e45b4da 100644 --- a/aliases/zsh_aliases +++ b/aliases/zsh_aliases @@ -49,7 +49,6 @@ alias mkex="chmod 777" alias ctle="systemctl enable" alias ctls="systemctl start" - # mounting {{{ # alias udm="udisksctl mount -b" @@ -59,6 +58,13 @@ alias udub="udisksctl unmount -b /dev/sdc2" # }}} mounting # +alias tc="touch" +shrm() { + for file in "$@"; do + shred "$file" && rm "$file" + done +} + # }}} command line related # # directory-related {{{ # @@ -185,6 +191,17 @@ alias rmsw="rm .sw*" function rs(){ redshift -P -O $(echo "scale=2;$1*1000" | bc) ; } alias rx="redshift -x" +alias gpe="gpg --encrypt --recipient" +alias gpd="gpg --decrypt" + +alias ps="pass" +alias psc="pass -c" +alias pse="pass edit" +alias psi="pass insert -m" +alias psg="pass generate -c" +alias yh="echo 'kevin.mok@live.ca' | xclip -selection clipboard" +alias yg="xclip -selection clipboard ~/.password-store/social/gmail" + # python related {{{ # function grpy() { grep $1 *.py ; } alias p3="python3" @@ -234,7 +251,7 @@ alias gcamp="ga && git commit --amend --no-edit -S && gpsf" # todo: fix function gcm(){ echo git commit -m \""$1"\" ; } -function psg() { +function psgi() { git add . git commit -m '.' git push diff --git a/configs/ranger/rc.conf b/configs/ranger/rc.conf index 347baee..6a270fe 100644 --- a/configs/ranger/rc.conf +++ b/configs/ranger/rc.conf @@ -164,6 +164,7 @@ set show_cursor false # One of: size, natural, basename, atime, ctime, mtime, type, random set sort natural +# set sort extension # Additional sorting options set sort_reverse false diff --git a/configs/ranger/rifle.conf b/configs/ranger/rifle.conf index b542dd6..9a0802b 100644 --- a/configs/ranger/rifle.conf +++ b/configs/ranger/rifle.conf @@ -223,5 +223,7 @@ label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1" label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@" label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@" +# ext gpg = pass edit -- "$1" + # The very last action, so that it's never triggered accidentally, is to execute a program: mime application/x-executable = "$1" diff --git a/configs/ranger/scope.sh b/configs/ranger/scope.sh index 13a25b4..c1cdcc0 100755 --- a/configs/ranger/scope.sh +++ b/configs/ranger/scope.sh @@ -83,6 +83,13 @@ handle_extension() { lynx -dump -- "${FILE_PATH}" && exit 5 elinks -dump "${FILE_PATH}" && exit 5 ;; # Continue with next handler on failure + + # htm|html|xhtml) + # # Preview as text conversion + # w3m -dump "${FILE_PATH}" && exit 5 + # lynx -dump -- "${FILE_PATH}" && exit 5 + # elinks -dump "${FILE_PATH}" && exit 5 + # ;; # Continue with next handler on failure esac } diff --git a/dotfiles/.vimrc b/dotfiles/.vimrc index 2c8377c..7b35885 100644 --- a/dotfiles/.vimrc +++ b/dotfiles/.vimrc @@ -154,6 +154,7 @@ Plug 'PotatoesMaster/i3-vim-syntax' " vim file explorer Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } Plug 'terryma/vim-multiple-cursors' + let g:multi_cursor_select_all_word_key='' call plug#end() diff --git a/dotfiles/.zshrc b/dotfiles/.zshrc index f83a504..e01bd9d 100644 --- a/dotfiles/.zshrc +++ b/dotfiles/.zshrc @@ -164,6 +164,7 @@ source /home/kevin/.shortcuts add-zsh-hook -Uz chpwd (){ ls -a; } export GPG_TTY=$(tty) +export PASSWORD_STORE_CLIP_TIME=120 # perl {{{ # diff --git a/txt/key_dirs.txt b/txt/key_dirs.txt index ecca95c..84e21e0 100644 --- a/txt/key_dirs.txt +++ b/txt/key_dirs.txt @@ -9,6 +9,7 @@ k /home/kevin/ lc /home/kevin/linux-config/ m /run/media o / +p /home/kevin/.password-store # }}} sys * diff --git a/txt/pacman-pkgs/nzxt-pkgs.txt b/txt/pacman-pkgs/nzxt-pkgs.txt index f236bca..5b11de7 100644 --- a/txt/pacman-pkgs/nzxt-pkgs.txt +++ b/txt/pacman-pkgs/nzxt-pkgs.txt @@ -45,6 +45,7 @@ htop-vim-git i3-gaps i3blocks-git i3status +imv imwheel inetutils iniparser @@ -73,7 +74,9 @@ netctl noto-fonts ntfs-3g nvidia +openssh pacman +pass patch pciutils pdfgrep @@ -88,6 +91,7 @@ python-pip python-pywal python-setuptools qdirstat +qrencode ranger redshift reiserfsprogs @@ -110,6 +114,7 @@ texlive-local-algorithmicx texlive-local-algorithms texlive-local-enumitem texlive-local-hyperref +texlive-local-multirow texlive-local-numprint texlive-local-pgfplots texlive-local-tkz-base @@ -183,4 +188,5 @@ xorg-xwininfo xorg-xwud zathura zathura-pdf-poppler +zbar zsh