Boost your terminal, script by script
synth-shell improves your terminal experience and productivity through a combination of small bash scripts.
System status report:
Fancy bash prompt:
better ls: an
ls -laon steroids alternative.
alias: add colors and a nicer behaviour to basic commands.
sudo: autocomplete commands.
history: nicer format and no duplicate (consecutively the same) commands.
All features are optional, and most can also be customized to your liking. Once installed, the scripts are called from within you
.bashrcfile and become part of the bash session. You can find more details and similar tools on Yet Another Linux'n Electronics Blog.
The included setup script will guide you step by step through the process and let you choose what features to install. During this setup, you can choose to install synth-shell for your user only (recommended) or system-wide (superuser privileges required). To proceed, open and play this link in a separate tab and enter the following into your terminal:
git clone --recursive https://github.com/andresgongora/synth-shell.git chmod +x synth-shell/setup.sh cd synth-shell ./setup.sh
Note that for
fancy-bash-prompt.shyou might also need power-line fonts. You can instal it as follows (the exact name of the package varies from distro to distro):
sudo pacman -S powerline-fonts
sudo apt install fonts-powerline
Finally, open up a new terminal and test that everything works. Sometimes, despite power-line fonts being properly installed, the triangle separator for
fancy-bash-prompt.sh(if installed) might still not show. In this case, make sure that your
localeis set to UTF-8 by editing
/etc/locale.conffile (select your language but in UTF-8 format) and running
sudo locale-gen. More info on locale. Alternatively, try a different font in your terminal emulator. Some fonts do not support special characters. We get the best results with hack-ttf.
You can configure your scripts by modifying the corresponding configuration files. You can find them, along example configuration files, in the following folders depending on how you installed synth-shell:
~/.bashrcand remove the lines referring to synth-shell, usually at the bottom of the file. If you want to temporarily disable the script, you can just comment them by placing
Remove the folder containing the script, usually in your home folder under
rm -r ~/.config/synth-shell/
status.shprovides a summarized system report at a single glance every time you open up a new terminal. If it detects that any system parameter (e.g. CPU load, memory, etc.) is over a critical threshold, it will provide a warning and additional information about the cause. Last but not least, it prints a user-configurable ASCII logo to impress your crush from the library with how awesome you are.
Feel free to customize your status report through the many available options in
~/.config/synth-shell/status.config(user-only install) or
/etc/synth-shell/status.config(system-wide install),or by replacing their content with the examples files you can find under the same directory.
Adds colors and triangular separators to your bash prompt, and if the current working directory is part of a git repository, also git statuses and branches. For best results, consider installing (and telling your terminal to use) the
hack-ttffont alongside the powerline-fonts (the later is required for the separators).
As for the git status info,
fancy-bash-prompt.shprints an additional, fourth separator with the name of the current branch and one of the following icons to indicate the state of the repository (can be changed in the config file):
| Local-Upstream | Local branch has no changes | Local branch is dirty | |:--------------------------------:|:---------------------------:|:---------------------:| | Up to date | | ! | | Ahead (you have to push) | △ | ▲ | | Behind (you have to pull) | ▽ | ▼ | | Diverged (you have to pull-push) | ○ | ● |
lsprint more text, but nicely formatted. When called,
lswill now list all files (
-la), sort folders first, add colors to output, and list hidden files last after a quick separator. However, if you chose to call
lswith your own parameters (e.g.
ls -l) it will revert to the default behavior except for color and sorting options.
tree --dirsfirst -C.
dmesg --color=auto --reltime --human --nopager --decode.
complete -cf sudoto auto-complete commands.
This project is only possible thanks to the effort and passion of many, including developers, testers, and of course, our beloved coffee machine. You can find a detailed list of everyone involved in the development in AUTHORS.md. Thanks to all of you!
If you like this project and want to contribute, you are most welcome to do so.
There are two branches in this repository:
synth-shell started as a loose collection of (very simple) bash scripts I used for system maintenance. In the beginning, they were simple aids to make my life easier, but as I progressively got the hang out of bash, I also wanted them to print some nice output to the terminal.
This repository was quite different at the beginning. The content of most scripts were loose snippets from third parties that were somehow smashed together. They worked, but not exactly the way I wanted. So, over time I have rewritten most scripts from scratch, removed fluff, and teamed up with super-friendly and engaged contributors. The result is what you see today. I admit it, it's nothing fancy. But it was real fun working on the scripts.
Copyright (c) 2014-2021, Andres Gongora - www.andresgongora.com