-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlinux.sh
More file actions
115 lines (74 loc) · 4.85 KB
/
linux.sh
File metadata and controls
115 lines (74 loc) · 4.85 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
# Install brew
echo | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
# Add brew to $PATH
echo 'eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >> /home/ubuntu/.zprofile
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
# Make zsh the default shell
sudo chsh -s /usr/bin/zsh
# Zsh config
curl https://raw.githubusercontent.com/maptv/setup/master/macos/.zshrc -o ~/.zshrc
# powerlevel10k config
curl https://raw.githubusercontent.com/maptv/setup/master/macos/.p10k.zsh -o ~/.p10k.zsh
# git config
curl https://raw.githubusercontent.com/maptv/setup/master/.gitconfig -o ~/.gitconfig
# Shell programs needed for aliases
## Install fzf (fuzzy finder)
## Install bat and exa (for fzf file preview)
## Install fasd and fd (to provide inputs for fzf)
## Install xpdf (e.g. pdftotext - for fzf PDF file preview)
## Install vim and neovim
# Zsh theme: powerlevel10k
# Zsh plugins: zsh-autosuggestions and zsh-syntax-highlighting
brew install bash bat exa fasd fd fzf hub neovim tmux vim xpdf zsh-autosuggestions zsh-syntax-highlighting romkatv/powerlevel10k/powerlevel10k
## Install fzf key bindings and fuzzy completion
$(brew --prefix)/opt/fzf/install --no-fish --completion --no-key-bindings --no-update-rc
# Use Bash as a backup
curl https://raw.githubusercontent.com/maptv/setup/master/macos/.bash_profile -o ~/.bash_profile
curl https://raw.githubusercontent.com/maptv/setup/master/macos/.inputrc -o ~/.inputrc
## Download dotfiles (configuration files)
### Vim
curl https://raw.githubusercontent.com/maptv/setup/master/vim/.vimrc -o ~/.vimrc
curl https://raw.githubusercontent.com/maptv/setup/master/vim/.au.vimrc -o ~/.au.vimrc
curl https://raw.githubusercontent.com/maptv/setup/master/vim/.map.vimrc -o ~/.map.vimrc
curl https://raw.githubusercontent.com/maptv/setup/master/vim/.plug.vimrc -o ~/.plug.vimrc
curl https://raw.githubusercontent.com/maptv/setup/master/vim/.set.vimrc -o ~/.set.vimrc
### Neovim
curl https://raw.githubusercontent.com/maptv/setup/master/neovim/init.vim -o ~/.config/nvim/init.vim
curl https://raw.githubusercontent.com/maptv/setup/master/neovim/au.vim -o ~/.config/nvim/au.vim
curl https://raw.githubusercontent.com/maptv/setup/master/neovim/map.vim -o ~/.config/nvim/map.vim
curl https://raw.githubusercontent.com/maptv/setup/master/neovim/plug.vim -o ~/.config/nvim/plug.vim
curl https://raw.githubusercontent.com/maptv/setup/master/neovim/set.vim -o ~/.config/nvim/set.vim
### SpaceVim
git clone https://github.com/SpaceVim/SpaceVim.git ~/.SpaceVim
curl https://raw.githubusercontent.com/maptv/setup/master/spacevim/init.toml -o ~/.SpaceVim.d/init.toml --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/master/spacevim/myspacevim.vim -o ~/.SpaceVim.d/autoload/myspacevim.vim --create-dirs
## Set up oh my tmux
curl https://raw.githubusercontent.com/maptv/setup/master/macos/.tmux.conf -o ~/.tmux.conf
curl https://raw.githubusercontent.com/maptv/setup/master/macos/.tmux.conf.local -o ~/.tmux.conf.local
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# Python and R
## Install miniconda Python
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o ~/miniconda.sh
bash ~/miniconda.sh -bp $HOME/miniconda
## Install nodejs (for coc.vim) and python packages (for nvim-R and ncm-R):
### https://github.com/jalvesaq/Nvim-R/blob/master/doc/Nvim-R.txt#L1953
conda install -yc conda-forge cookiecutter nodejs neovim pybtex
#### I don't use jupyterlab-git extension, I only demo it in classes
##### jupyter labextension install @jupyterlab/git
##### jupyter serverextension enable --py jupyterlab_git
conda create -yc conda-forge -n py python=3.8 joblib jupyterlab seaborn numpy pandas scikit-learn scipy
##### jupyter labextension install jupyterlab_vim
## Set up jupyterlab-github extension
#### jupyter labextension install @jupyterlab/github
#### pip install jupyterlab_github
##### Provide access token to GitHub extension
##### https://github.com/jupyterlab/jupyterlab-github#2-getting-your-credentials-from-github
## Install RStudio (this also installs `r-essentials`; RStudio was working for me as part of Anaconda 5.2.0)
##### Installing r into base environment breaks nvim-R
conda create -yc conda-forge -n r rstudio r-essentials r-tidymodels r-tidyverse
curl https://raw.githubusercontent.com/maptv/setup/master/rstudio/rstudio-prefs.json -o ~/.config/rstudio/rstudio-prefs.json --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/master/rstudio/editor_bindings.json -o ~/.config/rstudio/keybindings/editor_bindings.json --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/master/rstudio/rstudio_bindings.json -o ~/.config/rstudio/keybindings/rstudio_bindings.json
### Install and symlink macvim (brew installed macvim conflicts with brew installed vim)
##### ln -s /usr/local/Cellar/macvim/**/MacVim.app/ /Applications/MacVim.app
conda init zsh