#! /usr/bin/env bash # Load config . ${HOME}/ayo.conf . ${scripts_dir}/functions.sh { # Sub-scripts read their subcommand from different positions, so forward args accordingly: # $1-style (git, journal, mail, notes, tasks): pass "${@:2}" — drop the router word. # $2-style (ai, display, conf): pass "$@" — they expect the router word as $1. case $1 in ## SHORTCUTS ja) # journal append . ${scripts_dir}/journal.sh append "${@:2}" ;; jt) # journal using typora . ${scripts_dir}/journal.sh -t "${@:2}" ;; nd) # Notes diff . ${scripts_dir}/notes.sh diff ;; ns) # Notes sync . ${scripts_dir}/notes.sh sync ;; nl) # Notes list . ${scripts_dir}/notes.sh list "${@:2}" ;; no) # Notes open . ${scripts_dir}/notes.sh open "${@:2}" ;; nr) # Notes remove . ${scripts_dir}/notes.sh remove "${@:2}" ;; na) # Notes archive . ${scripts_dir}/notes.sh archive "${@:2}" ;; nc) # Notes copy . ${scripts_dir}/notes.sh copy "${@:2}" ;; nt) # Notes using typora . ${scripts_dir}/notes.sh -t "${@:2}" ;; gd) # git diff . ${scripts_dir}/git.sh diff "${@:2}" ;; gs) # git status . ${scripts_dir}/git.sh stat "${@:2}" ;; gp) # git push . ${scripts_dir}/git.sh push "${@:2}" ;; mt) # mail task . ${scripts_dir}/mail.sh task ;; ## SCRIPTS cozy) . ${scripts_dir}/cozy.sh "$@" ;; ai) . ${scripts_dir}/ai.sh "$@" ;; m | mail) . ${scripts_dir}/mail.sh "${@:2}" ;; d | display) . ${scripts_dir}/display.sh "$@" ;; u | up) . ${scripts_dir}/up.sh "$@" ;; c | conf) . ${scripts_dir}/conf.sh "$@" ;; g | git) . ${scripts_dir}/git.sh "${@:2}" ;; n | notes) . ${scripts_dir}/notes.sh "${@:2}" ;; t | tasks) TASKS_HOME="${tasks_dir}" TASKS_TEMPLATE="${tasks_template}" ${scripts_dir}/tasks "${@:2}" ;; j | journal) . ${scripts_dir}/journal.sh "${@:2}" ;; c | config) echo 'Config script in-progress' ;; vm | mac) quickemu --vm ${HOME}/macos-monterey.conf --width 1920 --height 1080 ;; ms) quickemu --vm ${HOME}/macos-monterey.conf --kill ;; *) echo "Command not found" ;; esac }