feat: new conf.sh script for managing the configuration file from anywhere

This commit is contained in:
ayo 2026-03-28 09:27:22 +01:00
parent b8830a2c0f
commit ecedc22217
2 changed files with 29 additions and 0 deletions

3
ayo.sh
View file

@ -90,6 +90,9 @@ case $1 in
u | up)
. ${scripts_dir}/up.sh "$@"
;;
c | conf)
. ${scripts_dir}/conf.sh "$@"
;;
g | git)
. ${scripts_dir}/git.sh "$@"
;;

26
conf.sh Normal file
View file

@ -0,0 +1,26 @@
#!/usr/bin/bash
# laptop display management
# Load config & functions
. ${HOME}/ayo.conf
. ${scripts_dir}/functions.sh
command=$2
function main() {
case $command in
"edit")
echo "Editing config file"
vim "$HOME/ayo.conf"
;;
esac
}
mstart_time=$(date +%s%N)
main $@
end_time=$(date +%s%N)
duration=$((end_time - start_time))
duration_ms=$(echo "scale=3; $duration / 1000000" | bc)
duration_s=$(echo "scale=3; $duration_ms / 1000" | bc)
echo "Took $duration_s s"ain