grep --color=auto < /dev/null &>/dev/null && alias grep='grep --color=auto'
export PATH="$HOME/.local/bin:$PATH"
export PATH="/usr/pkg/sbin:/usr/pkg/bin:$PATH"
export PATH="$HOME/.cargo/bin:$PATH"
export PATH="$PATH:/home/coast/.spicetify"
export MANPATH="/usr/pkg/man:$MANPATH"
export XDG_DATA_DIRS="/var/lib/flatpak/exports/share:$HOME/.local/share/flatpak/exports/share:/usr/local/share:/usr/share"
export EDITOR="nvim"
export EIX_LIMIT=0

#aliasrc
alias frgj="ssh -L 3000:localhost:3000 ubuntu@89.168.25.90 -i .ssh/vpssun"
alias nf="hyfetch"
alias neofetch="hyfetch"
alias vim="nvim"
alias emacs="nvim"
alias mutt="neomutt"
alias mt="neomutt"
alias emoji="cat ~/.local/src/local/share/emoji | grep"
alias cst="vi ~/.config/st/config.h"
alias dias=doas
#alias ls="ls --color=auto"
#alias ll="ls -hl"
#alias l="ls -lh"
#alias la="ls -ahl"
alias smi="nvidia-smi"
alias srczsh="source ~/.zshrc"
alias battery="sb-battery"
alias bat="sb-battery"
alias quit="exit"
alias push="git push"
alias weather="curl wttr.in/masjedsoleyman"
alias las="ls"
alias la="ls -a"
alias c="clear"
alias cear="clear"
alias cd..="cd .."
alias ..='echo "cd .."; cd ../'
alias claer="clear"
alias clare="clear"
alias cleae="clear"
alias clera="clear"
alias hotp="htop"
alias copykey='cat ~/.local/share/vault1.key | xclip -sel clipboard'
alias mic="micro"
alias nx="nsxiv"
alias v="nvim"
alias vi="nvim"
alias nvim="nvim"
alias stx="startx"
alias e="doas emerge --ask --verbose"
alias es="emerge -s"
alias fe="flatpak search"
alias fei="flatpak install"
alias startx="startw"
alias ac="doas emerge -ac"
alias ls="ls --color=auto"
alias alsamixer="alsamixer -c 0"

video() {
    mpv "$1" --ytdl-format="bestvideo[height>=720]+bestaudio/best[height>=720]"
}
videolow() {
    mpv "$1" --ytdl-format="bestvideo[height<=720]+bestaudio/best[height<=720]"
}

#else
bindkey -e
eval $(ssh-agent -s) >/dev/null 2>&1
batstat=$(cat /sys/class/power_supply/BAT1/status 2>/dev/null)
charge=$(cat /sys/class/power_supply/BAT1/capacity 2>/dev/null)
if [[ "$batstat" == "Discharging" && "$charge" -lt 50 ]]; then
  echo "Battery: $(sb-battery)"
fi
