#!/bin/bash
# 
# SCRIPT NAME:
# .aliases
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# This script is used to define aliases for commands.
#
# USAGE:
# This script is sourced by .bashrc

# Alias for clear because I sometimes type the DOS command instead
alias cls="clear"

# Alias for using lsd as ls replacement
alias ls='lsd --icon never'
alias la="ls -al"
alias lt="ls --tree"

# Alias for using bat as cat replacement
alias cat="bat"

# Aliases to folders
if [ -d "${HOME}/projects" ]; then
    alias pj='cd ${HOME}/projects'
fi

if [ -d "${HOME}/downloads" ]; then
    alias dl='cd ${HOME}/downloads'
fi

if [ -d "${HOME}/documents" ]; then
    alias doc='cd ${HOME}/documents'
fi

if [ -d "${HOME}/work" ]; then
    alias wo='cd ${HOME}/work'
fi

# Alias for opening my code editor
alias e="code"

# Aliases for todo list management
alias t='task todo'
alias ta='task add'
alias td='task done'

# Work aliases
if [ -d "${HOME}/work/tools/dde" ]; then
    alias dde='make -f "${HOME}/work/tools/dde/Makefile"'
fi