130 lines
6.2 KiB
Markdown
130 lines
6.2 KiB
Markdown
# [bashrc][bashrc_repo]
|
|
|
|

|
|

|
|

|
|
|
|
**bashrc** is a collection of dotfiles/[RUNCOM][RUNCOM] dedicated to environment setup for Debian based server/desktop systems.
|
|
|
|
- I use these files on my personal desktops and most semi-professional projects.
|
|
|
|
- The most powerful features are related to my own setup for tmux, ssh, nfty or keepassxc.
|
|
|
|
- It also contains many aliases and functions of interest.
|
|
|
|
----
|
|
|
|
## Features
|
|
|
|
- Include **[Liquid Prompt][liquidprompt_repo]**, an intelligent and non-intrusive prompt for Bash and zsh.
|
|
- Ready for **FZF bindings**.
|
|
- Full **TMUX experience**, even surviving desktop user reconnections.
|
|
- Ready to use **[KeePassXC][KeePassXC_website] as ssh-agent and keyring**.
|
|
- Advanced Command notifications with [NTFY][NTFY_repo], dunstify and sound.
|
|
- And many more **aliases and functions to discover** …
|
|
|
|
## License
|
|
|
|
This repository includes some original lines of code and others gathered through many years and available publicly or known as best practices.
|
|
|
|
There will be no license attached to this code except for the content listed below and coming from a licensed source:
|
|
|
|
- [Liquid Prompt][liquidprompt_repo]: AGPL-3.0 license. Original source in file `.bashrc.d/22-prompt.bashrc`.
|
|
|
|
### Issues
|
|
|
|
- function `lf` (ls alternative with filters and sorting through fzf and exa): some outputs are broken, I will fix it soon.
|
|
|
|
## Requirements
|
|
|
|
- debian 10+ based distro
|
|
|
|
### Recommended
|
|
|
|
- bash 5+
|
|
- bash_completion
|
|
- systemd, systemd-container
|
|
- vim
|
|
- ncdu
|
|
- fzf 0.35+
|
|
- pipx
|
|
- keepassxc
|
|
- keyring (python3-keyring)
|
|
- tmux 3.3+
|
|
- [tmuxrc][tmuxrc_repo]
|
|
- fzf-tmux
|
|
- exa 10.1+
|
|
- fd (fd-find)
|
|
- xclip
|
|
- [MOTDfetch][MOTDfetch_repo]
|
|
- curl
|
|
- bat (get the latest release)
|
|
- dunstify
|
|
- wget2
|
|
- emoji-fzf (python)
|
|
- ssh
|
|
- ...
|
|
|
|
## Installation
|
|
|
|
### Current user
|
|
|
|
```bash
|
|
# backup current files
|
|
mkdir -p $HOME/.backups
|
|
cp -r --backup=t {"$HOME"/.bashrc,"$HOME"/.bashrc.d,"$HOME"/.bash_logout,"$HOME"/.bash_profile,"$HOME"/.profile} $HOME/.backups/
|
|
|
|
# download new files from repository
|
|
wget -c -nv https://git.tkapias.net/tkapias/bashrc/archive/master.tar.gz -O - \
|
|
| tar -xzv --strip-components=1 -C $HOME/ \
|
|
bashrc/.bash_logout \
|
|
bashrc/.bash_profile \
|
|
bashrc/.bashrc \
|
|
bashrc/.bashrc.d/ \
|
|
bashrc/.profile
|
|
|
|
chmod 700 ~/.bashrc.d
|
|
chmod 600 ~/.bashrc ~/.bashrc.d/* ~/.bash_logout ~/.bash_profile ~/.profile
|
|
|
|
# check if you need to customize the secrets file
|
|
cat ~/.bashrc.d/02-secrets.bashrc
|
|
```
|
|
|
|
### SKEL
|
|
|
|
If you want to get the same base for every new user on the system.
|
|
|
|
- Execute as root:
|
|
|
|
```bash
|
|
# backup current files
|
|
mkdir -p /root/.backups/skel
|
|
cp -r --backup=t /etc/skel $HOME/.backups/
|
|
|
|
# download new files from repository
|
|
wget -c -nv https://git.tkapias.net/tkapias/bashrc/archive/master.tar.gz -O - \
|
|
| tar -xzv --strip-components=1 -C /etc/skel/ \
|
|
bashrc/.bash_logout \
|
|
bashrc/.bash_profile \
|
|
bashrc/.bashrc \
|
|
bashrc/.bashrc.d/ \
|
|
bashrc/.profile
|
|
|
|
chmod 700 /etc/skel/.bashrc.d
|
|
chmod 600 /etc/skel/.bashrc /etc/skel/.bashrc.d/* /etc/skel/.bash_logout /etc/skel/.bash_profile /etc/skel/.profile
|
|
|
|
# check if you need to customize the secrets file
|
|
cat /etc/skel/.bashrc.d/02-secrets.bashrc
|
|
```
|
|
|
|
----
|
|
|
|
[//]: # (LINKS)
|
|
[bashrc_repo]: https://git.tkapias.net/tkapias/bashrc
|
|
[RUNCOM]: https://en.wikipedia.org/wiki/RUNCOM
|
|
[liquidprompt_repo]: https://github.com/nojhan/liquidprompt
|
|
[KeePassXC_website]: https://keepassxc.org
|
|
[NTFY_repo]: https://github.com/binwiederhier/ntfy
|
|
[MOTDfetch_repo]: https://git.tkapias.net/tkapias/MOTDfetch
|
|
[tmuxrc_repo]: https://git.tkapias.net/tkapias/tmuxrc
|