This repository was archived by the owner on Feb 27, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathmain.sh
More file actions
executable file
·63 lines (56 loc) · 2.1 KB
/
main.sh
File metadata and controls
executable file
·63 lines (56 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
# Path Variables
ROOT_DIR="$(dirname "${BASH_SOURCE[0]}")"
BACKUP_DIR="$ROOT_DIR/dotfiles" # Path for all backups
MODULES_DIR="$ROOT_DIR/modules" # Path for all backups
# Color variables
RED='\033[31m'
GREEN='\033[32m'
YELLOW='\033[33m'
MAGENTA='\033[35m'
RESET='\033[0m'
# Indicator for new sections
ARROW="${MAGENTA}==>${RESET}"
# Prompt user for input
echo -e "Script Options:\n1.Automated Setup\n2.Update Backup"
read -rp "Enter number: " choice
if [ "$choice" -eq 1 ]; then
echo -e "${ARROW} ${GREEN}Starting automatic setup..."
# Installs brew and packages from Brewfile
# shellcheck source=modules/brew.sh
source "$MODULES_DIR/brew.sh"
# Symlink dotfiles to home directory
# shellcheck source=modules/restore.sh
source "$MODULES_DIR/restore.sh"
# Installs fish shell and configures it as the default shell
# shellcheck source=modules/fish.sh
source "$MODULES_DIR/fish.sh"
# Installs LSP servers missing from brew packages
# shellcheck source=modules/lsp.sh
source "$MODULES_DIR/lsp.sh"
# Changes macOS defaults
# shellcheck source=modules/defaults.sh
source "$MODULES_DIR/defaults.sh"
# Adds persistent dock apps
# shellcheck source=modules/dock_apps.sh
source "$MODULES_DIR/dock_apps.sh"
# Misc macOS settings like touchid for sudo, etc.
# shellcheck source=modules/misc.sh
source "$MODULES_DIR/misc.sh"
# Sets up Kanata and Karabiner driver as services for keyboard cusomization and layers
# shellcheck source=modules/keyboard.sh
source "$MODULES_DIR/keyboard.sh"
# Sets up DNS over HTTPS with Adblock (Mullvad)
# shellcheck source=modules/dns.sh
source "$MODULES_DIR/dns.sh"
# Initializes apps for first time setup and permissions
# shellcheck source=modules/init.sh
source "$MODULES_DIR/init.sh"
echo -e "${ARROW} Next steps: Log out for all changes to apply."
elif [ "$choice" -eq 2 ]; then
echo -e "${ARROW} ${GREEN}Updating backup..."
# shellcheck source=modules/backup.sh
source "$ROOT_DIR/modules/backup.sh"
else
echo "Invalid input, please enter a valid option."
fi