-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsystem_setup
More file actions
executable file
·149 lines (125 loc) · 3.44 KB
/
system_setup
File metadata and controls
executable file
·149 lines (125 loc) · 3.44 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#!/bin/zsh
set -e
function install_paru()
{
sudo pacman -S base-devel
rm -rf /tmp/paru
git clone https://aur.archlinux.org/paru-bin.git /tmp/paru
cd /tmp/paru
makepkg -si
}
function install_dmenu() {
cd /tmp
wget https://gist.githubusercontent.com/pabloariasal/e0b65c5c158b436a1685f69624d629f2/raw/62f4b4587cc8a57d59f090eb4029ae68b54de8ff/dmenu_custom_bindings.patch
rm -rf dmenu
git clone https://git.suckless.org/dmenu
cd dmenu
git apply ../dmenu_custom_bindings.patch
make
sudo make install
}
function setup_wallpaper()
{
ln -s ${DOTFILES}/extra/wallpaper.png ~/.wallpaper.png
}
function install_nerd_fonts()
{
local nerd_fonts_dir="$HOME/.nerd_fonts"
[ -d "$nerd-fonts" ] || git clone --depth 1 https://github.com/ryanoasis/nerd-fonts.git $nerd_fonts_dir
cd "$nerd_fonts_dir"
./install.sh JetBrainsMono DejaVuSansMono
}
function install_scripts() {
cd "$DOTFILES"
stow --verbose=2 -d configs -t ~ scripts
stow --verbose=2 -d configs -t ~ scripts-wm
stow --verbose=2 -d configs -t ~ webapps
}
function install_pulseaudio() {
sudo pacman -S pulseaudio \
pavucontrol \
pulseaudio-alsa
}
function install_cpp_dev_tools() {
sudo pacman -S base-devel ccache clang cmake ninja gdb
}
function install_lua_dev_tools() {
sudo pacman -S lua luarocks lua-language-server
}
function install_xorg_conf()
{
sudo ln -sv ${DOTFILES}/xorg_extra_config/00-keyboard.conf /etc/X11/xorg.conf.d/
sudo ln -sv ${DOTFILES}/xorg_extra_config/10-serverflags.conf /etc/X11/xorg.conf.d/
}
function enable_agent_service()
{
systemctl --user enable ssh-agent.service
systemctl --user start ssh-agent.service
}
function install_command_line_goodies() {
sudo pacman -S fd ripgrep vifm fzf bat eza git-delta figlet lolcat fastfetch
}
function install_devour()
{
mkdir -p ${HOME}/tools
cd ${HOME}/tools
rm -rf devour
git clone https://github.com/salman-abedin/devour.git
cd devour
sudo make install
}
function create_github_personal_ssh_key()
{
mkdir -p ~/.ssh
ssh-keygen -t ed25519 -C "pabloariasal@gmail.com" -f ~/.ssh/github_personal
xclip -selection clipboard < ~/.ssh/github_personal.pub
echo "copied public key to clipboard!"
}
function install_python_language_server() {
sudo pacman -S python-pip \
python-lsp-server \
python-pyflakes \
python-pycodestyle \
yapf \
python-pylint
}
function install_xorg() {
sudo pacman -S xorg-server \
xorg-xev \
xdotool \
xorg-xmodmap \
xorg-xrandr \
arandr
}
function install_i3_wm() {
sudo pacman -S i3-wm \
i3lock \
i3status \
xss-lock \
jq \
dunst \
noto-fonts-emoji
}
function clone_repo() {
git clone git@github.com:pabloariasal/dotfiles.git ~/dotfiles
}
function install_gdb_dashboard() {
rm -f ~/.gdbinit
wget -P ~ https://git.io/.gdbinit
}
function disable_bluetooth {
echo -e '# disable bluetooth\nSUBSYSTEM=="rfkill", ATTR{type}=="bluetooth", ATTR{state}="0"' > /etc/udev/rules.d/50-bluetooth.rules
}
function setup_gdb() {
install_gdb_dashboard
sudo pacman -S python-pygments
}
_get_all_functions() {
script_dir="$( cd "$( dirname "${(%):-%x}" )" && pwd )"
cat "${script_dir}/system_setup" | grep '^function' | awk '{print $2}' | tr -d '()'
}
if [[ $# -eq 0 || "$*" == *"--help"* ]]; then
_get_all_functions
exit 0
fi
"$@"