Compare commits

..

2 commits

Author SHA1 Message Date
f3a1f61dc6 remove redundant comments 2022-08-15 13:02:27 -05:00
402eee2e2b formatting 2022-08-15 13:02:26 -05:00
2 changed files with 32 additions and 43 deletions

View file

@ -13,28 +13,28 @@ HELP
} }
header() { header() {
echo "=============" echo "============="
} }
updates_output() { updates_output() {
notify=$1 notify=$1
if ! [[ -z $updates_arch ]]; then if ! [[ -z $updates_arch ]]; then
header header
echo "ARCH: $(echo "$updates_arch" | wc -l)" echo "ARCH: $(echo "$updates_arch" | wc -l)"
header header
[[ -z $notify ]] && echo "$updates_arch" [[ -z $notify ]] && echo "$updates_arch"
fi fi
if ! [[ -z $updates_aur ]]; then if ! [[ -z $updates_aur ]]; then
header header
echo "AUR: $(echo "$updates_aur" | wc -l)" echo "AUR: $(echo "$updates_aur" | wc -l)"
header header
[[ -z $notify ]] && echo "$updates_aur" [[ -z $notify ]] && echo "$updates_aur"
fi fi
echo echo
} }
update_system() { update_system() {
echo echo
read -p "Would you like to update? (y/N): " confirm && [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]] || exit 1 read -p "Would you like to update? (y/N): " confirm && [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]] || exit 1
pikaur -Syu --noedit --nodiff pikaur -Syu --noedit --nodiff
} }

View file

@ -1,60 +1,49 @@
#!/usr/bin/env zsh #!/usr/bin/env zsh
# system usage
#########################################
alias reload="source ~/.zshrc"
alias rr="rm -rf"
#########################################
#ls type aliases
#########################################
#alias ls='ls -F'
alias l='ls -lh --color=auto'
alias ll="ls -lhA"
alias left='ls -t -1'
alias ls='ls --color=auto'
alias lsl="ls -lhFA | less"
#########################################
# List declared aliases, functions, paths
#########################################
alias aliases="alias | sed 's/=.*//'" alias aliases="alias | sed 's/=.*//'"
alias functions="declare -f | grep '^[a-z].* ()' | sed 's/{$//'" alias functions="declare -f | grep '^[a-z].* ()' | sed 's/{$//'"
alias paths='echo -e ${PATH//:/\\n}' alias paths='echo -e ${PATH//:/\\n}'
#########################################
# program dependent aliases alias reload="source ~/.zshrc"
######################################### alias rr="rm -rf"
alias code2="code-insiders" alias c="clear"
# ls -> lsd | swap ls for ls-deluxe
# ls -> lsd | swap ls for ls-deluxe if it exists
alias ls='ls --color=auto'
alias l='ls -lh'
alias la="ls -a"
alias ll="ls -lhA"
alias lr='ls -R'
alias lla="ls -la"
alias lsl="ls -lhFA | less"
alias left='ls -t -1'
if is-executable lsd; then if is-executable lsd; then
is-tty && alias lsd="lsd --icon never" is-tty && alias lsd="lsd --icon never"
alias ls='lsd' alias ls='lsd'
alias l='lsd -l'
alias la='lsd -a'
alias lla='lsd -la'
alias lt='lsd --tree --depth=3' alias lt='lsd --tree --depth=3'
alias lr='lsd -R' else
alias lt="tree -L 3"
fi fi
#lazygit
is-executable lazygit && alias lg=lazygit is-executable lazygit && alias lg=lazygit
# source custom tmux.conf with older tmux # source custom tmux.conf with older tmux
alias tmux="tmux -f ~/.config/tmux/tmux.conf" alias tmux="tmux -f ~/.config/tmux/tmux.conf"
alias rc="rclone --filter-from ~/.config/rclone/filter-file.txt" alias rc="rclone --filter-from ~/.config/rclone/filter-file.txt"
# prefer nvim if installed
# prefer lvim > nvim > vim
if is-executable lvim; then if is-executable lvim; then
alias vim=lvim alias vim=lvim
elif is-executable nvim; then elif is-executable nvim; then
alias vim=nvim alias vim=nvim
fi fi
# gdu defualts
is-executable gdu && alias gdu -I '.*node_modules' -H is-executable gdu && alias gdu -I '.*node_modules' -H
# more fzf
alias fzf-bat="fzf --preview 'bat --style=numbers --color=always --line-range :500 {}'" alias fzf-bat="fzf --preview 'bat --style=numbers --color=always --line-range :500 {}'"
alias vivaldi="vivaldi-stable" alias vivaldi="vivaldi-stable"
#zellij
if is-executable zellij; then if is-executable zellij; then
alias zs="zellij -s" alias zs="zellij -s"
@ -62,8 +51,8 @@ if is-executable zellij; then
alias za="zellij a" alias za="zellij a"
fi fi
#zenith
alias zenith="zenith -d 0 -n 0" alias zenith="zenith -d 0 -n 0"
# pdm
alias pdm-start='eval "$(pdm shell)"' alias pdm-start='eval "$(pdm shell)"'
##########################################