#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
alias grep='grep --color=auto'
PS1='[\u@\h \W]\$ '

alias ll="ls -la"
alias l="ll"

alias ..="cd .."

alias m="micro"
alias sm="sudo micro"

alias n="nano"
alias sn="sudo nano"

alias gita="git add ."
alias gitc="git commit -m"
alias gitp="git push"


function gitf() {

	if [ -z $1 ]; then
	        echo "no commit message, doing nothing"
	else
			echo "directly commiting with message \"$1\""
	        git add .
	        git commit -m $1
	        git push
	fi
}

alias icat="kitten icat"
alias cls="clear"

alias ssh="kitten ssh"
alias ssk="kitten ssh"

alias t="wd"

function y() {
	local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
	yazi "$@" --cwd-file="$tmp"
	if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
		builtin cd -- "$cwd"
	fi
	rm -f -- "$tmp"
}

export TERM=xterm-256color

#eval "$(starship init bash)"

#fastfetch --logo-color-1 red --logo-color-2 red --color red -l ~/Dotfiles/m-archy-SPC.txt 

export PS1="\u@\H>\t "
