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:
~~Run the setup script again (like during the installation), but choose
uninstallwhen prompted.~~ WARNING: the script is undergoing major changes. The only way to push forward and get everything fixed, without confusing all users, is to merge all changes in the repo and, as a consequence, disable some of the functionalities of the script until everything can be fixed. The automatic uninstall might not properly work. To remove the script, simple remove the bottom lines reffering to synth-shell in your
~/.bashrcfile with your favorite text editor. For example:
nano ~/.bashrcLastly, remove all files pertaining to synth-shell like so (change dir if installed globaly):
rm -r ~/.config/synth-shell/Sorry for the inconvenience. This should be fixed very soon.
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 formated. 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 behaviour except for color and sorting options.
tree --dirsfirst -C.
dmesg --color=auto --reltime --human --nopager --decode.
complete -cf sudoto atucomplete 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-2020, Andres Gongora - www.andresgongora.com