2020-12-18 05:17:25 +01:00
|
|
|
|
# Ubuntu fresh setup guide
|
2020-07-16 00:37:44 +02:00
|
|
|
|
|
2019-09-09 19:15:51 +02:00
|
|
|
|
## Update & Upgrade
|
2020-07-16 00:37:44 +02:00
|
|
|
|
|
2019-09-09 19:15:51 +02:00
|
|
|
|
```bash
|
|
|
|
|
sudo apt update && sudo apt upgrade -y
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Install Packages
|
2020-07-16 00:37:44 +02:00
|
|
|
|
|
2019-02-13 00:10:50 +01:00
|
|
|
|
```bash
|
2019-10-12 23:27:15 +02:00
|
|
|
|
sudo apt-get install python3-pip zsh curl wget git
|
2020-12-21 04:19:11 +01:00
|
|
|
|
sudo apt-get install p7zip-full smplayer cmus speedtest-cli git-gui filezilla pavucontrol paprefs ufw servefile nmap fail2ban gimp most colordiff mosh dconf-editor ncdu qcalc jq tor fonts-noto nautilus-actions filemanager-actions thunderbird chrome-gnome-shell gnome-tweaks smartmontools &
|
2019-09-09 19:17:19 +02:00
|
|
|
|
|
2019-10-12 23:27:15 +02:00
|
|
|
|
pip3 install youtube-dl tldr
|
2019-02-13 00:10:50 +01:00
|
|
|
|
```
|
2019-02-13 00:05:12 +01:00
|
|
|
|
|
2019-10-29 02:15:28 +01:00
|
|
|
|
## External Repositories
|
2019-12-23 21:54:24 +01:00
|
|
|
|
|
|
|
|
|
### Antimicro
|
2020-07-16 00:37:44 +02:00
|
|
|
|
|
2019-12-23 21:54:24 +01:00
|
|
|
|
```bash
|
|
|
|
|
sudo add-apt-repository ppa:mdeguzis/libregeek
|
|
|
|
|
```
|
2020-07-16 00:37:44 +02:00
|
|
|
|
|
|
|
|
|
As of today, a bionic package is still not available, but the artful works!. <https://github.com/AntiMicro/antimicro/issues>
|
2019-12-23 21:54:24 +01:00
|
|
|
|
|
|
|
|
|
`sudo nano /etc/apt/sources.list.d/mdeguzis-ubuntu-libregeek-bionic.list` Replace `bionic` with `artful`
|
2020-07-16 00:37:44 +02:00
|
|
|
|
|
2019-12-23 21:54:24 +01:00
|
|
|
|
```bash
|
|
|
|
|
sudo apt update
|
|
|
|
|
sudo apt install antimicro
|
|
|
|
|
```
|
2020-07-16 00:37:44 +02:00
|
|
|
|
|
|
|
|
|
Put config file <https://gist.github.com/madacol/19f8c71ba98f484a4294ccfe90e88e6e> in `~/.config/antimicro`
|
2019-10-29 02:15:28 +01:00
|
|
|
|
|
2020-03-03 03:05:01 +01:00
|
|
|
|
### SinkSwitcher
|
|
|
|
|
|
2020-07-16 00:37:44 +02:00
|
|
|
|
<https://github.com/madacol/sinkSwitcher>
|
2020-03-03 03:05:01 +01:00
|
|
|
|
|
2019-02-13 00:05:12 +01:00
|
|
|
|
## Web installs
|
2020-07-16 00:37:44 +02:00
|
|
|
|
|
|
|
|
|
- docker: <https://download.docker.com>
|
|
|
|
|
- VSCode: <https://code.visualstudio.com/>
|
|
|
|
|
- chrome: <https://www.chrome.com/>
|
|
|
|
|
- syncthing: <https://apt.syncthing.net/>
|
|
|
|
|
- Zsh-syntax-highlighting: <https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/INSTALL.md>
|
2019-02-13 00:05:12 +01:00
|
|
|
|
|
2020-10-07 01:02:43 +02:00
|
|
|
|
## Shells
|
|
|
|
|
|
|
|
|
|
### Fish
|
|
|
|
|
|
|
|
|
|
#### Functions
|
|
|
|
|
|
|
|
|
|
- nvm
|
|
|
|
|
|
2020-12-17 16:24:14 +01:00
|
|
|
|
Install bass, then configure these functions
|
|
|
|
|
|
|
|
|
|
- **__nvm_load.fish**
|
2020-10-07 01:02:43 +02:00
|
|
|
|
|
|
|
|
|
```fish
|
|
|
|
|
function __nvm_load
|
|
|
|
|
functions -e __nvm_load node npm npx
|
|
|
|
|
bass source ~/.nvm/nvm.sh --no-use ';' nvm use 2> /dev/null '||' nvm use default
|
|
|
|
|
end
|
|
|
|
|
```
|
|
|
|
|
|
2020-12-17 16:24:14 +01:00
|
|
|
|
- **nvm.fish**
|
|
|
|
|
|
|
|
|
|
```fish
|
|
|
|
|
function nvm
|
|
|
|
|
functions -e __nvm_load node npm npx
|
|
|
|
|
bass source ~/.nvm/nvm.sh --no-use ';' source ~/.nvm/bash_completion ';' nvm $argv
|
|
|
|
|
end
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
- **npx.fish**
|
|
|
|
|
|
|
|
|
|
```fish
|
|
|
|
|
function npx
|
|
|
|
|
__nvm_load
|
|
|
|
|
npx $argv
|
|
|
|
|
end
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
- **npm.fish**
|
|
|
|
|
|
|
|
|
|
```fish
|
|
|
|
|
function npm
|
|
|
|
|
__nvm_load
|
|
|
|
|
npm $argv
|
|
|
|
|
end
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
- **node.fish**
|
|
|
|
|
|
|
|
|
|
```fish
|
|
|
|
|
function node
|
|
|
|
|
__nvm_load
|
|
|
|
|
node $argv
|
|
|
|
|
end
|
|
|
|
|
```
|
2020-10-07 01:02:43 +02:00
|
|
|
|
|
|
|
|
|
### Zsh - Edit ~/.zshrc
|
|
|
|
|
|
2020-12-17 01:16:51 +01:00
|
|
|
|
#### Add `~/.local/bin` to PATH
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
export PATH=$HOME/.local/bin:$PATH
|
|
|
|
|
```
|
|
|
|
|
|
2020-10-07 01:02:43 +02:00
|
|
|
|
#### Add shortcut "Alt+:" [to iterate through arguments](https://stackoverflow.com/questions/4009412/how-to-use-arguments-from-previous-command/55069846#55069846)
|
2020-07-16 00:37:44 +02:00
|
|
|
|
|
2019-09-09 19:15:51 +02:00
|
|
|
|
```bash
|
|
|
|
|
autoload -Uz copy-earlier-word
|
|
|
|
|
zle -N copy-earlier-word
|
|
|
|
|
bindkey "^[:" copy-earlier-word
|
|
|
|
|
```
|
|
|
|
|
|
2020-10-07 01:02:43 +02:00
|
|
|
|
#### Aliases
|
2020-09-17 23:23:07 +02:00
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
alias lr="ls -hartl"
|
|
|
|
|
alias youtube-dl720='youtube-dl -f "bestvideo[height<=720]+bestaudio/best[height<=720]"'
|
|
|
|
|
alias python=python3
|
|
|
|
|
alias ipython=ipython3
|
|
|
|
|
function mkcd () { mkdir -p "$@" && cd "$@"; }
|
|
|
|
|
```
|
|
|
|
|
|
2020-10-07 01:02:43 +02:00
|
|
|
|
#### Lazy-load nvm
|
2020-10-05 23:44:33 +02:00
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
export NVM_DIR="$HOME/.nvm"
|
2020-12-21 04:22:04 +01:00
|
|
|
|
[ -s "$NVM_DIR/nvm.sh" ] && . $NVM_DIR/nvm.sh --no-use;
|
|
|
|
|
[ -s "$NVM_DIR/bash_completion" ] && . $NVM_DIR/bash_completion;
|
|
|
|
|
function __nvm_load_node () {
|
2020-10-05 23:44:33 +02:00
|
|
|
|
unalias node npm npx;
|
|
|
|
|
nvm use 2> /dev/null || nvm use default;
|
2020-12-21 04:22:04 +01:00
|
|
|
|
command=$1;
|
|
|
|
|
shift 1;
|
|
|
|
|
$command $@;
|
2020-10-05 23:44:33 +02:00
|
|
|
|
}
|
2020-12-21 04:22:04 +01:00
|
|
|
|
alias node='__nvm_load_node node $@'
|
|
|
|
|
alias npm='__nvm_load_node npm $@'
|
|
|
|
|
alias npx='__nvm_load_node npx $@'
|
2020-10-05 23:44:33 +02:00
|
|
|
|
```
|
|
|
|
|
|
2020-10-07 01:02:43 +02:00
|
|
|
|
#### Enable most
|
2020-07-16 00:37:44 +02:00
|
|
|
|
|
2019-09-09 19:15:51 +02:00
|
|
|
|
```bash
|
|
|
|
|
export PAGER=most
|
|
|
|
|
```
|
2019-02-13 00:05:12 +01:00
|
|
|
|
|
2020-10-07 01:02:43 +02:00
|
|
|
|
#### Enable zsh plugins
|
2020-09-17 23:28:39 +02:00
|
|
|
|
|
|
|
|
|
```bash
|
2020-12-17 01:16:51 +01:00
|
|
|
|
plugins=(git zsh-syntax-highlighting zsh-autosuggestions)
|
2020-09-17 23:28:39 +02:00
|
|
|
|
```
|
2020-12-17 16:24:14 +01:00
|
|
|
|
|
2020-09-17 23:28:39 +02:00
|
|
|
|
**Note:** Probably need to install them first
|
|
|
|
|
|
2019-02-13 00:05:12 +01:00
|
|
|
|
## Gnome extensions
|
2020-07-16 00:37:44 +02:00
|
|
|
|
|
2020-09-17 22:55:29 +02:00
|
|
|
|
- Caffeine <https://extensions.gnome.org/extension/517/caffeine/>
|
2020-07-16 00:37:44 +02:00
|
|
|
|
- NetSpeed <https://extensions.gnome.org/extension/104/netspeed/>
|
2020-12-24 02:34:41 +01:00
|
|
|
|
- EasyScreenCast <https://extensions.gnome.org/extension/690/easyscreencast/>
|
2019-02-13 00:05:12 +01:00
|
|
|
|
|
2020-12-17 07:13:14 +01:00
|
|
|
|
## Dconf
|
|
|
|
|
|
2020-12-23 02:28:40 +01:00
|
|
|
|
### Built-in dash-to-dock extension
|
|
|
|
|
|
|
|
|
|
- `org.gnome.shell.extensions.dash-to-dock.click-action` = **`cycle-windows`**
|
|
|
|
|
- `org.gnome.shell.extensions.dash-to-dock.scroll-action` = **`cycle-windows`**
|
|
|
|
|
- `org.gnome.shell.extensions.dash-to-dock.show-windows-preview` = **`false`**
|
2020-12-17 07:13:14 +01:00
|
|
|
|
|
2019-02-13 00:10:50 +01:00
|
|
|
|
## Custom shortcuts
|
2020-07-16 00:37:44 +02:00
|
|
|
|
|
2019-09-09 19:15:51 +02:00
|
|
|
|
- `systemctl suspend`
|
2020-07-16 00:37:44 +02:00
|
|
|
|
- Cmus <https://medium.com/@madacol/configure-cmus-music-player-on-the-terminal-in-ubuntu-3c513d2d2cd0>
|
2019-09-09 19:15:51 +02:00
|
|
|
|
|
|
|
|
|
## StartUp
|
2020-07-16 00:37:44 +02:00
|
|
|
|
|
|
|
|
|
- Cmus `gnome-terminal -- cmus`
|