Terminal¶
Style Terminal¶
Colors the command line to make the start of one command easier to find.
Add this to .bashrc:
export PS1="[\[$(tput sgr0)\]\[\033[38;5;9m\]\t\[$(tput sgr0)\]\[\033[38;5;15m\]] \[$(tput sgr0)\]\[\033[38;5;10m\]\u@\[$(tput sgr0)\]\[\033[38;5;34m\]\h\[$(tput sgr0)\]\[\033[38;5;15m\]:\[$(tput sgr0)\]\[\033[38;5;39m\]\w\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;13m\]\\$\[$(tput sgr0)\]"
Make sure that this line is uncommented:
Preview

Show current git branch¶
Add this to .bashrc:
git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export PS1=$PS1"\$(git_branch)"
Preview

Any other customizations will be preserved.
Useful aliases¶
Activate the venv in the current directory.
Favorite Tools¶
| Tool | Description | Installation |
|---|---|---|
| bat | A cat clone with syntax highlighting and Git integration. |
apt install bat |
| ncdu | Disk usage analyzer with a text user interface. | apt install ncdu |
Laptop as a server¶
Small tweaks to I did on my laptop to make it a bit more reliable:
Make sure this lines are set in /etc/systemd/logind.conf
Disable suspend completely: