re-added auto-start and updated auto-start to check for existing sessions

This commit is contained in:
2024-11-11 11:26:20 +01:00
parent cb1a45a54e
commit b12fa46ea1
2 changed files with 17 additions and 0 deletions

View File

@@ -55,6 +55,15 @@ secrets() {
"$secrets_script" "$@"
}
auto_start() {
local auto_start_script="$DOTFILES_BIN/actions/auto-start.sh"
if [[ ! -x "$auto_start_script" ]]; then
printfe "%s\n" "red" "Error: Auto-start script not found or not executable"
return 1
fi
"$auto_start_script" "$@"
}
ensure_git_hooks() {
local hooks_dir="$DOTFILES_ROOT/.git/hooks"
local target_link="$DOTFILES_BIN/actions/git"
@@ -108,6 +117,7 @@ main() {
help) shift; help "$@" ;;
term) shift; term "$@" ;;
secrets) shift; secrets "$@" ;;
auto-start) shift; auto_start "$@" ;;
*) help ;;
esac
}