-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·57 lines (44 loc) · 1.82 KB
/
install
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
#!/usr/bin/env bash
set -e
set -o verbose
CONFIG="install.conf.yaml"
DOTBOT_DIR="dotbot"
DOTBOT_BIN="bin/dotbot"
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "${BASEDIR}"
git submodule update --init --recursive "${DOTBOT_DIR}"
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}"
# Stop focus stealing!
# https://unix.stackexchange.com/questions/261003/preventing-other-gui-applications-from-stealing-focus
gsettings set org.gnome.desktop.wm.preferences focus-new-windows strict
gsettings set org.mate.Marco.general focus-new-windows strict
# https://bertrandbenoit.blogspot.co.uk/2011/09/change-window-behavior-to-prevent-focus.html
gconftool-2 --set /apps/metacity/general/focus_new_windows --type string strict
gconftool-2 --set /apps/metacity/general/no_focus_windows --type string "(not true)"
gconftool-2 --get /apps/metacity/general/focus_new_windows
gconftool-2 --get /apps/metacity/general/no_focus_windows
# BASH_IT
if [ ! -d ${HOME}/.bash_it ]; then
git clone https://github.com/Bash-it/bash-it.git ${HOME}/.bash_it
fi
# NVM
if ! [ -x "$(command -v nvm)" ]; then
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install node
fi
# CEDICT
if [ ! -f ${HOME}/cedict_1_0_ts_utf-8_mdbg.txt ]; then
wget https://www.mdbg.net/chinese/export/cedict/cedict_1_0_ts_utf-8_mdbg.txt.gz -O ${HOME}/cedict_1_0_ts_utf-8_mdbg.txt.gz
gunzip ${HOME}/cedict_1_0_ts_utf-8_mdbg.txt.gz
fi
# APT
sudo apt install tmux docker docker-compose git golang ruby ruby-dev
# GO
go get github.com/spf13/hugo
go get github.com/hughgrigg/cedict-shuffler
# Inotify Watches Limit
# https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit
sudo cp idea.conf /etc/sysctl.d/
sudo sysctl -p --system