Update .config/sheldon/plugins.toml
Update .config/zsh/env.zsh Add .config/zsh/files/compinit.zsh Add .config/zsh/files/sshcomp.zsh Update .config/zsh/rc.zsh Update .config/zsh/.zprofile Remove .config/zsh/.zsh_plugins.txt Remove .config/zsh/zsh_plugins.txt Update .local/bin/bofh Change attributes of .config/zsh/files/aliases.zsh Change attributes of .config/zsh/files/distroicon.zsh Change attributes of .config/zsh/files/keybinds.zsh Change attributes of .config/zsh/files/transfer.zsh Change attributes of .config/zsh/profile.zsh
This commit is contained in:
parent
1e10bd5622
commit
5c73c42276
14 changed files with 63 additions and 79 deletions
19
dot_config/zsh/files/aliases.zsh
Normal file
19
dot_config/zsh/files/aliases.zsh
Normal file
|
@ -0,0 +1,19 @@
|
|||
alias cd='z'
|
||||
alias grep='rg'
|
||||
alias find='fd'
|
||||
|
||||
# make rm, cp and mv safer
|
||||
alias rm='rm -i'
|
||||
alias cp='cp -i'
|
||||
alias mv='mv -i'
|
||||
|
||||
# misc aliases
|
||||
alias termbin="nc termbin.com 9999"
|
||||
alias ktheme='kitty +kitten themes --reload-in=all'
|
||||
alias wget='wget --hsts-file="$XDG_DATA_HOME"/wget-hsts'
|
||||
if (( ${+commands[nvim]} )); then alias vim="nvim"; fi
|
||||
|
||||
# gdb stuff
|
||||
alias peda="gdb -iex 'source /usr/share/peda/peda.py' --nh -q"
|
||||
alias gef="gdb -iex 'source /usr/share/gef/gef.py' --nh -q"
|
||||
alias pwndbg="gdb -iex 'source /usr/share/pwndbg/gdbinit.py' --nh -q"
|
3
dot_config/zsh/files/compinit.zsh
Normal file
3
dot_config/zsh/files/compinit.zsh
Normal file
|
@ -0,0 +1,3 @@
|
|||
autoload -Uz compinit
|
||||
mkdir -p "$XDG_CACHE_HOME"/zsh &>/dev/null
|
||||
compinit -d "$XDG_CACHE_HOME"/zsh/compdump
|
33
dot_config/zsh/files/distroicon.zsh
Normal file
33
dot_config/zsh/files/distroicon.zsh
Normal file
|
@ -0,0 +1,33 @@
|
|||
# find out which distribution we are running on
|
||||
FILE="/etc/*-release"
|
||||
if [[ -f $FILE ]]; then
|
||||
_distro=$(awk '/^ID=/' /etc/*-release | awk -F'=' '{ print tolower($2) }')
|
||||
fi
|
||||
|
||||
# set an icon based on the distro
|
||||
case $_distro in
|
||||
*kali*) ICON="ﴣ";;
|
||||
*arch*|*endeavouros*) ICON="";;
|
||||
*debian*) ICON="";;
|
||||
*raspbian*) ICON="";;
|
||||
*ubuntu*) ICON="";;
|
||||
*elementary*) ICON="";;
|
||||
*fedora*) ICON="";;
|
||||
*coreos*) ICON="";;
|
||||
*gentoo*) ICON="";;
|
||||
*mageia*) ICON="";;
|
||||
*centos*) ICON="";;
|
||||
*opensuse*|*tumbleweed*) ICON="";;
|
||||
*sabayon*) ICON="";;
|
||||
*slackware*) ICON="";;
|
||||
*linuxmint*) ICON="";;
|
||||
*alpine*) ICON="";;
|
||||
*aosc*) ICON="";;
|
||||
*nixos*) ICON="";;
|
||||
*devuan*) ICON="";;
|
||||
*manjaro*) ICON="";;
|
||||
*rhel*) ICON="";;
|
||||
*) ICON="";;
|
||||
esac
|
||||
|
||||
export DISTROICON="$ICON"
|
7
dot_config/zsh/files/keybinds.zsh
Normal file
7
dot_config/zsh/files/keybinds.zsh
Normal file
|
@ -0,0 +1,7 @@
|
|||
run_ranger () { echo; ranger < $TTY; zle redisplay }
|
||||
zle -N run_ranger
|
||||
bindkey '^f' run_ranger
|
||||
|
||||
pet_select () { BUFFER=$(pet search --query "$LBUFFER"); CURSOR=$#BUFFER; zle redisplay }
|
||||
zle -N pet_select
|
||||
bindkey '^l' pet_select
|
12
dot_config/zsh/files/sshcomp.zsh
Normal file
12
dot_config/zsh/files/sshcomp.zsh
Normal file
|
@ -0,0 +1,12 @@
|
|||
zstyle ':completion:*:(ssh|scp|sshfs|mosh|rsync):*' sort false
|
||||
zstyle ':completion:*:(ssh|scp|sshfs|mosh|rsync):*' group-name ''
|
||||
zstyle ':completion:*:(ssh|scp|sshfs|mosh|rsync):*' verbose yes
|
||||
|
||||
zstyle ':completion:*:(ssh|scp|sshfs|mosh|rsync):*' tag-order 'hosts:-host:host hosts:-domain:domain hosts:-ipaddr:ip\ address *'
|
||||
zstyle ':completion:*:(scp|sshfs|rsync):*' group-order users files all-files hosts-domain hosts-host hosts-ipaddr
|
||||
zstyle ':completion:*:(ssh|mosh):*' group-order users hosts-domain hosts-host users hosts-ipaddr
|
||||
|
||||
zstyle ':completion:*:(ssh|scp|sshfs|mosh|rsync):*:users' ignored-patterns '*'
|
||||
zstyle ':completion:*:(ssh|scp|sshfs|mosh|rsync):*:hosts-host' ignored-patterns '*(.|:)*' loopback localhost broadcasthost 'ip6-*' 'hbz*'
|
||||
zstyle ':completion:*:(ssh|scp|sshfs|mosh|rsync):*:hosts-domain' ignored-patterns '<->.<->.<->.<->' '^[-[:alnum:]]##(.[-[:alnum:]]##)##' '*@*' '*.eeleater.org' '*.hbz-nrw.de'
|
||||
zstyle ':completion:*:(ssh|scp|sshfs|mosh|rsync):*:hosts-ipaddr' ignored-patterns '^(<->.<->.<->.<->|(|::)([[:xdigit:].]##:(#c,2))##(|%*))' '127.0.*' '255.255.255.255' '::1' 'fe80::*' 'ff02::*'
|
26
dot_config/zsh/files/transfer.zsh
Normal file
26
dot_config/zsh/files/transfer.zsh
Normal file
|
@ -0,0 +1,26 @@
|
|||
transfer () {
|
||||
if test $# -eq 0; then
|
||||
echo "No arguments specified.\nUsage:\n transfer <file|directory>\n ... | transfer <file_name>">&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
if tty -s; then
|
||||
file="$1"
|
||||
file_name=$(basename "$file")
|
||||
|
||||
if test ! -e "$file"; then
|
||||
echo "$file: No such file or directory">&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
if test -d "$file"; then
|
||||
file_name="$file_name.zip"
|
||||
(cd "$file" && zip -r -q - .) | curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" | tee /dev/null
|
||||
else
|
||||
cat "$file" | curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" | tee /dev/null
|
||||
fi
|
||||
else
|
||||
file_name=$1
|
||||
curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" | tee /dev/null
|
||||
fi
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue