16.04
Appearance tweak
- Auto hide launcher: Settings » Appearance » Behavior
- Enable work spaces: Settings » Appearance » Behavior
- Set workspace size to 3 x 3:
dconf write /org/compiz/profiles/unity/plugins/core/hsize 3
dconf write /org/compiz/profiles/unity/plugins/core/vsize 3
Mouse & Touchpad
- Disable touchpad: Settings » Mouse & Touchpad
- Mouse speed: as above.
Others
See 18.04
18.04
- Hide dock: launcher » dock
- Disable bluetooth: launcher » bluetooth
- Auto hide dock: launcher » dock
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
- launcher » mouse & launchpad »
- disable touchpad
- speedup mouse
Keyboard
- launcher » keyboard
- launch web browser:
<C-M-W>
- home folder:
<win-e>
- disable a bunch of useless confusing shortcuts
- switch windows:
<M-tab>
- view split on left/right (at the very bottom):
<C-win-left/right>
- launch web browser:
Appearance tweak
yes | sudo apt install x11-utils gnome-shell-extensions
gnome-shell --version
mk_Dir -pv ~/.local/share/gnome-shell/extensions
- All below operations performed from launcher » tweaks
- appearance » animations » off
- appearance » themes::applications » radiance
- desktop » show icons » off
- workspaces » static workspaces » true
- workspaces > Workspaces span displays » true
plugins: no title bar, workspace grid
Truly I dislike GNOME – why not beautiful and intuitive like Unity? Though it often just crashes…
- visit no-title-bar
- download zip and unzip to
~/.local/share/gnome-shell/extensions
- rename the directory, stripping the trailing “.v9.shell-extension”
- visit workspace-grid, follow above workflow
- visit alternatetab
- dirty hack: copy the contents of
alt-tab delay removal
in
extension.js
into that of alternatetab
- dirty hack: copy the contents of
alt-tab delay removal
in
- visit disable-workspace-switcher-popup
- restart gnome-shell
<Alt-F2> r <Enter>
-
launcher » tweaks » extensions » enable no title bar and workspace grid
- Fix interactive search not to go recursively – when I want, I’ll ctrl-F
sudo add-apt-repository ppa:lubomir-brindza/nautilus-typeahead
sudo apt dist-upgrade
General
- Use nvidia driver instead of noveau:
- launcher » Software & Updates » Additional Drivers
- Passwordless sudo
sudo bash -c "echo \"$USER ALL=(ALL) NOPASSWD:ALL\" >> /etc/sudoers"
- use en_US.UTF8 locale:
- launcher » languages » regional formats » English united states
- make capslock another Esc
setxkbmap -option caps:escape
or launcher » tweaks » keyboard & mouse » additional layout options » caps lock behaviour
Use tuna apt source
- Follow guidance on tuna
- Edit
/etc/apt/sources.list
sudo apt update
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
-
google chrome, switchy omega
-
vim-plug
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
vim # :PlugInstall
- tmux plugin manager
- with tmux-yank. see blog post
- note that tmux-yank now only works for ssh with ssh’s
-X
flag
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
-
mono, dafny, all other M$ stuff: follow the website
-
docker CE: following docker.com ``` sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository “deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable” sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io
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 ```
- polipo: v2ray does not very well support http/https proxy
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
- launcher » languages » add Chinese support
- launcher » input method
- reboot the machine, a keyboard icon should show up in the right of the top bar
- if not, manually run
fcitx
- if not, manually run
- click into the icon » configure the current input method » add input method (the plus icon) » pinyin
Servers
yes | sudo apt install openssh-server