aboutsummaryrefslogtreecommitdiff
path: root/shell_only.sh
blob: 827c68c8eb193b4d36a5c9ea83a64274faadd9c7 (plain) (blame)
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
#!/bin/bash

function command_exists {
	command -v $1 &> /dev/null
}

set -x

if [ $UID -ne 0 ]; then
	if command_exists sudo; then
		SUDO="sudo"
	elif command_exists doas; then
		SUDO="doas"
	fi
fi

if command_exists apt; then
	$SUDO apt update
	$SUDO apt install -y \
		bat \
		lolcat \
		cowsay \
		fortune \
		zsh \
		git \
		figlet \
		curl \
		wget \
		htop \
		tty-clock \
		oathtool
else
	echo "Your distro is not supported."
	exit 1
fi

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

ln -s ${PWD}/bin ~/bin

rm ~/.zshrc
rm ~/.zsh_aliases

mkdir -p ~/
ln -s ${PWD}/zshrc ~/.zshrc

mkdir -p ~/
ln -s ${PWD}/zsh_aliases ~/.zsh_aliases

mkdir -p ~/.config/micro
ln -s ${PWD}/micro_settings.json ~/.config/micro/settings.json

sudo mkdir -p /usr/local/bin
cd /usr/local/bin
curl https://getmic.ro/r | $SUDO sh
$SUDO update-alternatives --set editor /usr/local/bin/micro

mkdir -p ~/.local/bspwm-setup/
ln -s ${PWD}/lockscreen.xkb ~/.local/bspwm-setup/lockscreen.xkb