# Package management
alias fly='flyctl'
alias yay="paru --bottomup"
alias yeet="sudo pacman -Rns"
alias orphan="doas pacman -Rns (pacman -Qtdq)"

# Navigation shortcuts
alias gD="cd ~/Desktop"
alias gd="cd ~/Downloads"
alias gr="cd ~/Development/"
alias gs="cd ~/Sync"
alias gdot="cd ~/dotfiles"
alias gkey="cd ~/.local/share/keyrings/"
alias gt="cd ~/Dev/"
alias gpi='cd ~/Development/pi'
alias gtt='cd ~/Development/tecnologo'
alias nubceo='cd ~/Development/nubceo'
alias vairix='cd ~/Development/vairix'
alias seekr='cd ~/Development/seekr'

# File operations/utilities
# alias df="duf"
alias df="dysk"
alias mkdir="mkdir -pv"
alias chmox="chmod +x"
alias lf="yazi"
alias slides=presenterm
alias lll='ls -l `find . -maxdepth 1 -type l -print`'
alias syncRepo="git fetch --all; git reset --hard origin/master"

# System commands
alias src='exec zsh'
alias k="kubectl"
alias ks="kubens"
alias kx="kubectx"
alias yta="youtube-dl --add-metadata -xic"

# Development tools
alias vim='nvim'
alias v='vim'
alias tf='terraform'
alias g='git'
alias gho="gh browse"
alias gh-clone='gc'
alias task='go-task'
alias sdu='sdm-ui fzf'
alias fd='/bin/fd'


# Tmux
alias tmux='TERM=xterm-256color tmux -f "$XDG_CONFIG_HOME"/tmux/tmux.conf'
alias ts="tmux ls"
alias ta="tmux attach -t default || tmux new -s default"

# Configuration editing shortcuts
alias tmuxrc="vim $XDG_CONFIG_HOME/tmux/tmux.conf"
alias doomconf="vim ~/.config/gzdoom/gzdoom.ini"
alias pluginconf="vim ~/.config/nvim/plugins.vim"
alias i3conf="vim ~/.config/i3/config"
alias cssh="vim ~/.ssh/config"

function vimwhich {
  nvim $(which $1)
}
alias vw="vimwhich"

# Clipboard operations - with auto-detection
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then
  alias copy="wl-copy"
  alias paste="wl-paste"
else
  alias copy="xclip -selection clipboard"
  alias paste="xclip -selection clipboard -o"
fi

# Work related
alias sstack='cd ~/Dev/stuzo/oc-docker-compose; docker-compose up postgres redis rabbitmq'

# Chezmoi shorthand
alias ch='chezmoi'

# Aesthetics
alias next='feh --no-fehbg -z --bg-scale ~/Pictures/*'

command -v eza >/dev/null 2>&1 || { echo "ERROR: 'eza' not found"; return; }

# Set up aliases with 'eza'
alias ls='eza --group-directories-first --icons=always'

# Use '--git' flag if supported
if eza --version | grep -q '+git'; then
    alias ll='ls -lh --git'
else
    alias ll='ls -lh'
fi

alias la='ll -a'
alias tree='ll --tree --level=2'


# Font management
alias fm='font-manager'
alias fml='font-manager list'
alias fms='font-manager status'
alias fmc='font-manager clean'
alias fma='font-manager all'

# Maintenance shortcuts
alias maint='sudo ~/.local/bin/maintenance.sh'
alias maint-disable='touch ~/.local/share/arch_maintenance_disabled && echo "Maintenance reminders disabled"'
alias maint-enable='rm -f ~/.local/share/arch_maintenance_disabled && echo "Maintenance reminders enabled"'
alias maint-status='if [ -f ~/.local/share/arch_maintenance_disabled ]; then echo "Maintenance reminders: DISABLED"; else echo "Maintenance reminders: ENABLED"; fi'
