Home

Awesome

synth-shell

synth-shell improves your terminal experience and productivity by adding color, extra info, and convenience. It is not a single tool, but a collection of scripts and aliases (feel free to install only those you want) all written in bash. See the overview section for a detailed list and options.

<br/><br/>

<!------------------------------------------------+------------------------------------------------>

Quick setup

<!------------------------------------------------+------------------------------------------------>

This section covers the vary basics if you want to get started as fast as possible. See the setup section of this file for more details. Also, before you get started, and to get the best possible experience there are important considerations:

Once everything is ready, it is as easy as copy-pasting the following commands to run the included setup script.

git clone --recursive https://github.com/andresgongora/synth-shell.git
cd synth-shell
./setup.sh

When prompted, select install (default) and user (default). Afterwards, you might need to open a new terminal. Afterwards, you can customize everything to your liking.

<br/><br/>

<!------------------------------------------------+------------------------------------------------>

Overview

<!------------------------------------------------+------------------------------------------------>

The following tools and scripts are included in the synth-shell package:

Example with status.sh and fancy-bash-prompt.sh

All features are optional, and most can also be customized to your liking. Once installed, the scripts are called from within you .bashrc file and become part of the bash session. Everything is written in bash and should work out of the box on almost any Linux system (you might need to install some dependencies, but that is all).

status.sh

status.sh provides 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.

status configuration options

fancy-bash-prompt.sh

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-ttf font alongside the powerline-fonts (the later is required for the separators).

As for the git status info, fancy-bash-prompt.sh prints 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-UpstreamLocal branch has no changesLocal branch is dirty
Up to date!
Ahead (you have to push)
Behind (you have to pull)
Diverged (you have to pull-push)

better-ls.sh

Makes ls print more text, but nicely formatted. When called, ls will 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 ls with your own parameters (e.g. ls -l) it will revert to the default behavior except for color and sorting options.

Alias

<br/><br/>

<!------------------------------------------------+------------------------------------------------>

Setup

<!------------------------------------------------+------------------------------------------------>

Automatic setup

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.sh you might also need power-line fonts. You can install it as follows (the exact name of the package varies from distro to distro):

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 locale is set to UTF-8 by editing /etc/locale.conf file (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.

Configuration/customization

You can configure your scripts by modifying the corresponding configuration files. You can find them, along the example configuration files, in the following folders depending on how you installed synth-shell:

Uninstallation

  1. Edit ~/.bashrc and 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 # in front.
nano ~/.bashrc
  1. Remove the folder containing the script, usually in your home folder under ~/.config/synth-shell/.
rm -r ~/.config/synth-shell/

<br/><br/>

<!------------------------------------------------+------------------------------------------------>

Contribute

<!------------------------------------------------+------------------------------------------------>

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.

Help us improve

Git branches

There are two branches in this repository:

<br/><br/>

<!------------------------------------------------+------------------------------------------------>

About

<!------------------------------------------------+------------------------------------------------>

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.

And the name? That's quite easy. I spent most of my coding frenzy listening to SynthWave to feel like Hackerman.

<br/><br/>

<!------------------------------------------------+------------------------------------------------>

License

<!------------------------------------------------+------------------------------------------------>

Copyright (c) 2014-2021, Andres Gongora - www.andresgongora.com