-
Notifications
You must be signed in to change notification settings - Fork 0
/
zsh_setup_haiku.sh
executable file
·60 lines (47 loc) · 2.26 KB
/
zsh_setup_haiku.sh
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
#!/bin/bash
# Define color codes
RED='\033[1;31m'
GREEN='\033[1;32m'
YELLOW='\033[1;33m'
BLUE='\033[1;34m'
MAGENTA='\033[1;35m'
CYAN='\033[1;36m'
NC='\033[0m' # No color
echo -e "${CYAN}Starting Zsh installation and configuration...${NC}"
# Change shell to zsh and install Zsh
echo -e "${YELLOW}Changing default shell to zsh...${NC}"
sed -i s/'bash/zsh'/g /boot/system/settings/etc/passwd
echo -e "${GREEN}Shell changed successfully.${NC}"
echo -e "${YELLOW}Installing Zsh...${NC}"
pkgman install -y zsh
echo -e "${GREEN}Zsh installed successfully.${NC}"
# Install Oh My Zsh
echo -e "${YELLOW}Installing Oh My Zsh...${NC}"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
echo -e "${GREEN}Oh My Zsh installed successfully.${NC}"
# Clone and set up zsh-autosuggestions and zsh-syntax-highlighting plugins
echo -e "${YELLOW}Cloning zsh-autosuggestions plugin...${NC}"
git clone https://github.com/zsh-users/zsh-autosuggestions.git ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
echo -e "${GREEN}zsh-autosuggestions plugin cloned successfully.${NC}"
echo -e "${YELLOW}Cloning zsh-syntax-highlighting plugin...${NC}"
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
echo -e "${GREEN}zsh-syntax-highlighting plugin cloned successfully.${NC}"
# Copy .zshrc configuration
echo -e "${YELLOW}Copying .zshrc configuration...${NC}"
cp -v ~/haiku-stuff/Dotfiles/.zshrc ~/.zshrc
echo -e "${GREEN}.zshrc configuration copied successfully.${NC}"
# Copy custom Oh My Zsh theme
echo -e "${YELLOW}Copying custom Oh My Zsh theme...${NC}"
cp -v ~/haiku-stuff/jpassarelli.zsh-theme ~/.oh-my-zsh/custom/themes/jpassarelli.zsh-theme
echo -e "${GREEN}Custom theme copied successfully.${NC}"
# Setup Catppuccino colors
echo -e "${YELLOW}Setting up Catppuccino colors...${NC}"
./configure_zsh_syntax_colors.sh
echo -e "${GREEN}Catppuccino colors configured successfully.${NC}"
# Add 'pfetch' to .zshrc and install it if not installed
echo -e "${YELLOW}Adding 'pfetch' to .zshrc...${NC}"
echo "pfetch" >> ~/.zshrc
echo -e "${YELLOW}Installing pfetch...${NC}"
pkgman install -y pfetch
echo -e "${GREEN}Pfetch installed successfully.${NC}"
echo -e "${CYAN}Zsh has been successfully configured.${NC}"