-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-terminal.sh
More file actions
executable file
·54 lines (38 loc) · 1 KB
/
setup-terminal.sh
File metadata and controls
executable file
·54 lines (38 loc) · 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
#!/bin/bash
echo
echo "Instaling ZSH if not exists..."
echo
FILE=~/.zshrc
if [ ! -e "$FILE" ]; then
if [[ $OSTYPE == 'darwin'* ]]; then
brew update
brew install zsh
else
sudo apt update
sudo apt upgrade -y
sudo apt install zsh
fi
chsh -s $(which zsh)
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
echo '
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="powerlevel10k/powerlevel10k"
plugins=(git)
source $ZSH/oh-my-zsh.sh
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
' >> $ZSHFile
if [ -e "~/.bashrc"]; then
export_lines=$(cat ~/.bashrc | grep "^export ")
echo -n "" >> $ZSHFile
echo -n "# BASH Exports" >> $ZSHFile
echo -n "$export_lines" >> $ZSHFile
fi
echo
echo "Openning the ZSH terminal ..."
echo
sleep 3.5
zsh
fi