16.04

Appearance tweak

dconf write /org/compiz/profiles/unity/plugins/core/hsize 3
dconf write /org/compiz/profiles/unity/plugins/core/vsize 3

Mouse & Touchpad

Others

See 18.04

18.04

gnome-terminal

<right click> >> preferences>>
  global::general>>
    enable menubar by default := false
    enable menu accelerator key := false
  global::shortcuts>>
    delete all shortcuts except copy paste zoom
  profiles::unnamed>>
    colors >>
	text and background color >>
	  built-in schemes := white on black
	palette >>
	  built-in schemes := linux console
    scrolling>>
	show scrollbar := false
	boldcolor := not black !!!!

Mouse & Touchpad

Keyboard

Appearance tweak

yes | sudo apt install x11-utils gnome-shell-extensions
gnome-shell --version
mk_Dir -pv ~/.local/share/gnome-shell/extensions

plugins: no title bar, workspace grid

Truly I dislike GNOME – why not beautiful and intuitive like Unity? Though it often just crashes…

sudo add-apt-repository ppa:lubomir-brindza/nautilus-typeahead
sudo apt dist-upgrade

General

sudo bash -c "echo \"$USER ALL=(ALL) NOPASSWD:ALL\" >> /etc/sudoers"
setxkbmap -option caps:escape

or launcher » tweaks » keyboard & mouse » additional layout options » caps lock behaviour

Use tuna apt source

utilities

apt

# installation
yes | sudo apt install vim vim-gnome htop iotop git cmake zsh ipython3 curl tree net-tools cloc silversearcher-ag xsel qemu-system-x86 meld cloc artha pdfgrep manpages-dev xdot cgdb

# config git
git config --global user.email "daizy15@mails.tsinghua.edu.cn"
git config --global user.name "Hoblovski"

# config oh-my-zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
vim ~/.zshrc # use michelebologna theme

manual

curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
vim # :PlugInstall
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

sudo groupadd docker sudo gpasswd -a $USER docker newgrp docker


* fzf
~~~
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
~~~

### from source
* tmux: possibly proxy needed to download source in PRC

~~~
wget https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz
tar xzf libevent-2.1.8-stable.tar.gz
cd libevent-2.1.8-stable
./autogen.sh
./configure
make -j64
sudo make install   # install tmux and libevent for everyone
# Do not use master
# wget https://github.com/tmux/tmux/archive/master.zip
# unzip master.zip
# cd tmux-master
git clone https://github.com/tmux/tmux.git
cd tmux
git checkout a2c52d9f
yes | sudo apt install pkg-config libncurses5-dev autoconf automake
sh autogen.sh   # do not ./autogen.sh
./configure
make -j64
sudo make install
~~~

* configuration: rc-files including `.vimrc`, `.tmux.conf` and `.zshrc`.
  - (in my bitbucket private repository)

* universal-ctags
~~~
wget https://github.com/universal-ctags/ctags/archive/master.zip
unzip ctags-master.zip
cd ctags-master
./autogen.sh
./configure
make -j4
sudo make install -j4
~~~


## programming languages
* gcc / g++ / python2 / python3: should be built-in

* apt: java, go, scala, tex, pip, pip3

~~~
yes | sudo apt install default-jdk golang-go scala texlive-full texlive-xetex texlive-lang-cjk python-pip python3-pip texlive-science
~~~

* pip:

~~~
pip3 install pip -U
pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install numpy matplotlib --user
~~~

* haskell:
  - serious development should use stack
  - if only doing casual work (or with ancient computer) then apt would suffice (`sudo apt install ghc`)

~~~
curl -sSL https://get.haskellstack.org/ | sh

# Use tuna source
cat >> ~/.stack/config.yaml <<EOF
setup-info: "http://mirrors.tuna.tsinghua.edu.cn/stackage/stack-setup.yaml"
urls:
  latest-snapshot: http://mirrors.tuna.tsinghua.edu.cn/stackage/snapshots.json
  lts-build-plans: http://mirrors.tuna.tsinghua.edu.cn/stackage/lts-haskell/
  nightly-build-plans: http://mirrors.tuna.tsinghua.edu.cn/stackage/stackage-nightly/

package-indices:
  - name: Tsinghua
    download-prefix: http://mirrors.tuna.tsinghua.edu.cn/hackage/package/
    http: http://mirrors.tuna.tsinghua.edu.cn/hackage/00-index.tar.gz
EOF
~~~
* rust: follow [rustup](https://rustup.rs/)
  - use tuna source

* ocaml: use [opam](https://opam.ocaml.org/doc/Install.html)
  - install ocaml with opam [guides](http://ocaml.org/docs/install.html#OPAM)
  - install coq, utop with opam


## Free Internet
Switched from shadowsocks to v2ray.

* v2ray

server / client

wget https://install.direct/go.sh # and do audit! sudo bash go.sh sudo vim /etc/v2ray/config.json # my private server / client config sudo systemctl start v2ray ```

yes | sudo apt install polipo
sudo -i
cat >> /etc/polipo/config <<EOF
socksParentProxy = "localhost:XXXXXX"
socksProxyType = socks5
EOF
exit
sudo service polipo restart

cat >> ~/.zshrc <<EOF
polipoexports() {
  if [[ -z `service polipo status | grep active` ]]
  then
    echo "Polipo not enabled!"
    return
  fi
  export http_proxy="http://localhost:8123"
  export https_proxy="http://localhost:8123"
}
EOF
# 8123 is polipo's default port

Chinese Input Method

Chinese students living in China inevitably have to use Chinese IMEs orz.

yes | sudo apt-get install fcitx-bin fcitx-table

Servers

yes | sudo apt install openssh-server