mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
Compare commits
4 commits
2b5f43668c
...
6ebac00f43
Author | SHA1 | Date | |
---|---|---|---|
6ebac00f43 | |||
47d365b837 | |||
b7454a658b | |||
84ad770f3d |
2 changed files with 33 additions and 0 deletions
|
@ -6,6 +6,8 @@ bytecount() { wc -c "$@" | numfmt --to=iec-i; }
|
|||
|
||||
mkcd() { mkdir -p "$@" && cd "${@[-1]}"; }
|
||||
|
||||
silence() { $1 &>/dev/null }
|
||||
|
||||
viscd() {
|
||||
setopt local_options err_return
|
||||
local temp_file chosen_dir
|
||||
|
@ -102,3 +104,25 @@ sudoedit() {
|
|||
}
|
||||
alias sudoe="sudoedit"
|
||||
alias sue="sudoedit"
|
||||
|
||||
# gpg-crypt {{{
|
||||
# Encrypt the given file or directory to a given recipient
|
||||
function gpg-encrypt() {
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Usage: $0 FILE/DIRECTORY RECIPIENT" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
tar -c `basename $1` | gpg --encrypt --recipient $2 -o `basename $1`.tar.gpg
|
||||
}
|
||||
|
||||
# Decrypt the given tar.gpg file
|
||||
function gpg-decrypt() {
|
||||
if [ "$#" -ne 1 ] || [[ "$1" != *.tar.gpg ]]; then
|
||||
echo "Usage: $0 FILE.tar.gpg" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
gpg --quiet --decrypt $1 | tar -x
|
||||
}
|
||||
# }}}
|
||||
|
|
|
@ -105,6 +105,15 @@ _plugin completions 'zsh-users/zsh-completions' "$_checkout_latest_version"
|
|||
|
||||
# }}}
|
||||
|
||||
# Apache2 {{{
|
||||
# Crappy solution, but only run if it's on a Raspberry Pi 4 B
|
||||
if grep -q BCM2711 /proc/cpuinfo; then
|
||||
_plugin apache2 'voronkovich/apache2.plugin.zsh'
|
||||
fi
|
||||
# }}}
|
||||
|
||||
_plugin gitio 'denysdovhan/gitio-zsh'
|
||||
|
||||
# _plugin fzf 'junegunn/fzf' "$_checkout_latest_version" \
|
||||
# build='./install --bin' \
|
||||
# after_load='plugin-cfg-path path prepend bin' \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue