X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/blobdiff_plain/186423fe66144fbe2335fd9ca716fdea6cb55712..abd1eae8291c91fe62bcf22fc15a93178f1ab491:/base/.zshrc diff --git a/base/.zshrc b/base/.zshrc index e06c318..eec9016 100644 --- a/base/.zshrc +++ b/base/.zshrc @@ -1,3 +1,6 @@ +### imports +source ~/bin/.check-busybox + ### user-local fpath fpath=(~/.zsh ~/.zsh/functions/Prompts "${fpath[@]}") @@ -53,14 +56,13 @@ if [[ "$OSTYPE" =~ '^(free|net)bsd' ]] { } ## ps local p= -if { which pstree >/dev/null 2>&1 && \ - [[ ! "$(readlink -f $(which pstree))" =~ "/busybox" ]] } { +if which pstree >/dev/null 2>&1 && ! check-busybox pstree { # use pstree, but NOT busybox pstree because it kinda sucks p="pstree -wg3" } elif [[ "$OSTYPE" =~ '^freebsd' ]] { p="ps -aSdfxwwouser=USR -ogroup=GRP -opid,nice=NI \ -o%cpu,%mem,tty,stat,start=START -oetime,command" -} elif [[ "$(readlink -f $(which ps))" =~ "/busybox" ]] { +} elif check-busybox ps { # busybox compatible p="ps -eouser='USR ' -ogroup='GRP ' \ -opid=' PID' -onice=' NI' -ovsz=' MEM' \ @@ -167,6 +169,7 @@ case "$OSTYPE"; in ## sound # TODO: test alsa/oss/sndio/portaudio/pulse in order of importance function s() {} + function vol() {} esac ### modules & styles @@ -204,4 +207,8 @@ compinit autoload -Uz promptinit && promptinit prompt ds6 + +### unset imports +unfunction check-busybox + # vim: set et sts=4 sw=4 ts=8 tw=79 :