Repository navigation
Expand file tree
/
Copy pathlinux_install_functions.sh
More file actions
82 lines (71 loc) · 2.61 KB
/
Copy pathlinux_install_functions.sh
File metadata and controls
82 lines (71 loc) · 2.61 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
function install_packages {
PACKAGES=(
"build-essential"
"curl"
"nodejs"
"bash"
"git"
"tmux"
"wget"
"tree"
"zsh"
"diff-so-fancy"
"bat"
)
echo "Installing packages using apt"
for pkg in "${PACKAGES[@]}"; do
if ! apt list | grep "^${pkg}\$";
then
echo "Installing $pkg"
sudo apt install "$pkg"
fi
done
echo "Installing exa"
if ! command -v exa >/dev/null 2>&1 ; then
curl https://sh.rustup.rs -sSf | sh
wget -c https://github.com/ogham/exa/releases/download/v0.8.0/exa-linux-x86_64-0.8.0.zip
unzip exa-linux-x86_64-0.8.0.zip
sudo mv exa-linux-x86_64 /usr/local/bin/exa
else
echo "exa already installed"
fi
echo "Installing heroku-cli"
command -v exa >/dev/null 2>&1 ||
curl https://cli-assets.heroku.com/install.sh | sh
echo "Installing diff-so-fancy"
[ ! -d "$HOME/bin/diff-so-fancy" ] && git clone https://github.com/so-fancy/diff-so-fancy.git $HOME/bin/diff-so-fancy
git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"
git config --global color.ui true
git config --global color.diff-highlight.oldNormal "red bold"
git config --global color.diff-highlight.oldHighlight "red bold 52"
git config --global color.diff-highlight.newNormal "green bold"
git config --global color.diff-highlight.newHighlight "green bold 22"
git config --global color.diff.meta "11"
git config --global color.diff.frag "magenta bold"
git config --global color.diff.commit "yellow bold"
git config --global color.diff.old "red bold"
git config --global color.diff.new "green bold"
git config --global color.diff.whitespace "red reverse"
}
function install_conky {
echo "Installing conky. Replace network interface name in .conkyrc after installation."
echo "Network interface name:"
ip -o -4 route show to default | awk '{print $5}'
if ! command -v conky >/dev/null 2>&1 ; then
sudo apt -y install conky-all
python3 set_startupscript.py 'Conky' '/usr/bin/conky'
else
echo "conky already installed"
fi
}
function install_espanso {
if ! command -v espanso >/dev/null 2>&1 ; then
wget https://github.com/federico-terzi/espanso/releases/latest/download/espanso-debian-amd64.deb
sudo apt install ./espanso-debian-amd64.deb
rm espanso-debian-amd64.deb
espanso start
cp -r espanso/user/. $HOME/.config/espanso/user
else
echo "espanso already installed"
fi
}