
Das Dollar Zeichen, oder auch das Dollar Zeichen mit Angabe des aktuellen Pfad, kennt jeder und die Meisten finden es langweilig. So ist es auch mir gegangen und ich habe (für mich) eine gute Lösung gefunden. Die Lösung heißt synth-shell und ist auf GitHub verfügbar.
Bash Prompt mit synth-shell
Genau genommen besteht die syth-shell nicht nur aus dem Bash Prompt sondern bringt auch gleich noch ein bisschen mehr mit.

Du bekommst neben einem hübschen Bash Prompt noch einen informativen Greeter beim anmelden.

Gleichzeitig wir die Ausgabe des ls Befehls optisch verbessert und es werden noch ein Paar aliases eingerichtet. Im Großen und Ganzen ist das also ein wirklich praktisches Paket das ganz einfach zu installieren ist.
synth-shell Installation
Dem Installationspaket beigefügt ist ein Setup Script, das dich Schritt für Schritt durch den gesamten Vorgang der Einrichtung führt. Dabei kannst du auswählen welche der einzelnen Funktionen installiert werden sollen. Während der Installation kannst du wählen ob du die Lösung nur für dich (Bevorzugt) oder für das gesamte System (Super User Rechte notwendig) durchführen möchtest. Um die Installation zu starten gib einfach die nachfolgenden Befehlszeilen in einem Terminal ein:
git clone --recursive https://github.com/andresgongora/synth-shell.git chmod +x synth-shell/setup.sh cd synth-shell ./setup.sh
Wichtig ist das für fancy-bash-prompt.sh
du am Besten auch das power-line fonts Paket installierst. Das geht am einfachsten direkt aus den Paketquellen der Distribution (der exakte Name des Paketes kann unter umständen abweichen):
- ArchLinux:
sudo pacman -S powerline-fonts
- Debian/Ubuntu:
sudo apt install fonts-powerline
Zum Schluss öffne ein neues Terminal Fenster oder melde dich neu an um zu testen das alles funktioniert. Du wirst mit einem wunderschönen Begrüßungs-Bildschirm und einem klasse Bash Prompt begrüßt.
synth-shell anpassen
Die Konfiguration bei einer lokalen Installation findest du in dem Verzeichnis .config/synth-shell/
.
Shell Greeter Konfiguration
In der Datei .config/synth-shell/synth-shell-greeter.config kannst du den Greeter konfigurieren. Sowohl das Logo, als auch die anzuzeigenden Informationen werden dort eingestellt. Meine Konfiguration des Logos sieht z.B. so aus:
logo="\e[31m ▄████▄ ██▀███ ▄▄▄ ▒███████▒▓██ ██▓ ▒██▀ ▀█ ▓██ ▒ ██▒▒████▄ ▒ ▒ ▒ ▄▀░ ▒██ ██▒ ▒▓█ ▄ ▓██ ░▄█ ▒▒██ ▀█▄ ░ ▒ ▄▀▒░ ▒██ ██░ ▒▓▓▄ ▄██▒▒██▀▀█▄ ░██▄▄▄▄██ ▄▀▒ ░ ░ ▐██▓░ ▒ ▓███▀ ░░██▓ ▒██▒ ▓█ ▓██▒▒███████▒ ░ ██▒▓░ ░ ░▒ ▒ ░░ ▒▓ ░▒▓░ ▒▒ ▓▒█░░▒▒ ▓░▒░▒ ██▒▒▒ ░ ▒ ░▒ ░ ▒░ ▒ ▒▒ ░░░▒ ▒ ░ ▒ ▓██ ░▒░ ░ ░░ ░ ░ ▒ ░ ░ ░ ░ ░ ▒ ▒ ░░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ \e[37m ███▄ ▄███▓ ▄▄▄ ██ ▄█▀▓█████ ██▀███ ▓██▒▀█▀ ██▒▒████▄ ██▄█▒ ▓█ ▀ ▓██ ▒ ██▒ ▓██ ▓██░▒██ ▀█▄ ▓███▄░ ▒███ ▓██ ░▄█ ▒ ▒██ ▒██ ░██▄▄▄▄██ ▓██ █▄ ▒▓█ ▄ ▒██▀▀█▄ ▒██▒ ░██▒ ▓█ ▓██▒▒██▒ █▄░▒████▒░██▓ ▒██▒ ░ ▒░ ░ ░ ▒▒ ▓▒█░▒ ▒▒ ▓▒░░ ▒░ ░░ ▒▓ ░▒▓░ ░ ░ ░ ▒ ▒▒ ░░ ░▒ ▒░ ░ ░ ░ ░▒ ░ ▒░ ░ ░ ░ ▒ ░ ░░ ░ ░ ░░ ░ ░ ░ ░░ ░ ░ ░ ░ \e[0;39m"
Erstellt habe ich mein Logo mit dem Text to ASCII Art Generator von Patrick Gillespie.

synth-shell Promt Anpassungen
Genauso einfach kannst du den Bash Prompt anpassen. In der Datei .config/synth-shell/synth-shell-prompt.config
werden die Konfigurationen vorgenommen. In der Hauptsache werden hier die Farben eingestellt.
Um das Ganze zu vereinfachen findest du in dem Verzeichnis .config/synth-shell/examples/
(nicht nur) einige Beispieldateien für synth-shell-prompt.config
mit unterschiedlichen Farbkonstellationen.
ll .config/synth-shell/examples/ total 60K drwxr-xr-x 2 root root 4.0K 2021-06-07 23:24 ./ drwxr-xr-x 5 root root 4.0K 2021-06-07 23:54 ../ -rw-r--r-- 1 root root 823 2021-06-07 23:14 synth-shell-greeter.org.uma.mapir.cyan.config -rw-r--r-- 1 root root 839 2021-06-07 23:14 synth-shell-greeter.org.uma.mapir.gray.config -rw-r--r-- 1 root root 824 2021-06-07 23:14 synth-shell-greeter.org.uma.mapir.green.config -rw-r--r-- 1 root root 820 2021-06-07 23:14 synth-shell-greeter.org.uma.mapir.orange.config -rw-r--r-- 1 root root 1.8K 2021-06-07 23:14 synth-shell-greeter.org.uma.scbi.config -rw-r--r-- 1 root root 1.9K 2021-06-07 23:14 synth-shell-greeter.uma.ea7rct.config -rw-r--r-- 1 root root 2.2K 2021-06-07 23:14 synth-shell-prompt.blue.config -rw-r--r-- 1 root root 2.2K 2021-06-07 23:14 synth-shell-prompt.gray.config -rw-r--r-- 1 root root 2.2K 2021-06-07 23:14 synth-shell-prompt.green.config -rw-r--r-- 1 root root 560 2021-06-07 23:14 synth-shell-prompt.magenta.config -rw-r--r-- 1 root root 2.2K 2021-06-07 23:14 synth-shell-prompt.orange.config -rw-r--r-- 1 root root 2.2K 2021-06-07 23:14 synth-shell-prompt.red.config -rw-r--r-- 1 root root 2.2K 2021-06-07 23:14 synth-shell-prompt.yellow.config
Schlusswort
Ich hoffe euch macht das genauso Spaß mit so einem schönen Prompt zu arbeiten wir mir. Es kommen noch weitere Tipps rund um den Shell Prompt.
Und bis zum nächsten Beitrag sage ich norddeutsch Tschö – der Lord CrazyMaker.