-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from andresgongora/develop
Develop
- Loading branch information
Showing
17 changed files
with
1,300 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "bash-tools"] | ||
path = bash-tools | ||
url = https://github.com/andresgongora/bash-tools.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<!--------------------------------------+--------------------------------------> | ||
## ABOUT | ||
<!--------------------------------------+--------------------------------------> | ||
|
||
This file contains the list of people involved in the development of these | ||
scripts, which started as just a bunch of loose file that I kept around | ||
for convenience, and most often than not, just for fun :) | ||
|
||
If you feel someone is missing, please fork and pull-request. | ||
You may add your name, email, a link to your personal web-site/blog/profile | ||
(no commercial links) and a brief contribution summary. | ||
|
||
<!-- The following list is roughly sorted in reverse cronological order. --> | ||
|
||
|
||
|
||
|
||
|
||
|
||
<!--------------------------------------+--------------------------------------> | ||
## DEVELOPERS & CONTRIBUTORS | ||
<!--------------------------------------+--------------------------------------> | ||
|
||
* **Andres Gongora** | ||
<[email protected]> | ||
www.andresgongora.com | ||
Main developer | ||
|
||
|
||
* **Sami Olmari** | ||
<[email protected]> | ||
www.olmari.fi | ||
2019 - Major improvements to `status.sh` | ||
|
||
|
||
* **PeterJRiches** | ||
2019 - Proofreading of comments and explanation fixes | ||
|
||
|
||
|
||
|
||
|
||
|
||
<!--------------------------------------+--------------------------------------> | ||
## OTHERS | ||
<!--------------------------------------+--------------------------------------> | ||
|
||
Bug reports and new feature suggestions, provideded by users world-wide, | ||
are usually mentioned in the [changelogs](doc/changelog.md). | ||
|
||
We kindly thank all of them for their valuable feedback. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
![synth-shell](doc/synth-shell-status.jpg) | ||
|
||
|
||
**synth-shell-prompt** is not only fancy, but also useful: | ||
- Configurable colors and aesthetics. | ||
- Git statuses (requires pull/push, is dirty, etc.) if inside a directory that | ||
is part of a git repository. | ||
- Better separation between user input and command outputs. | ||
|
||
|
||
|
||
<br/><br/> | ||
|
||
|
||
|
||
<!--------------------------------------+--------------------------------------> | ||
# Setup | ||
<!--------------------------------------+--------------------------------------> | ||
|
||
|
||
### Arch Linux | ||
|
||
You may install `synth-shell-prompt` from AUR: | ||
https://aur.archlinux.org/packages/synth-shell-prompt-git/ | ||
Once installed, test it with: | ||
``` | ||
. /usr/bin/synth-shell-greeter | ||
``` | ||
And if you like it, add it permanently to your terminal with: | ||
``` | ||
echo ". /usr/bin/synth-shell-greeter" >> ~/.bashrc | ||
``` | ||
|
||
|
||
|
||
### Manual setup | ||
|
||
The included [setup script](setup.sh) will guide you step by step through the | ||
installatioj process. Just clone this repository and run it: | ||
``` | ||
git clone --recursive https://github.com/andresgongora/synth-shell-greeter.git | ||
synth-shell-greeter/setup.sh | ||
``` | ||
|
||
You can then test your script by sourcing it from wherever you installed it. | ||
Usually this is to your user's `.config` folder, so you should run the following | ||
command. Notice the `.`, this is meant to source the script to your | ||
terminal session (i.e. include it into your session). | ||
``` | ||
. ~/.config/synth-shell/synth-shell-greeter.sh | ||
``` | ||
|
||
If you want it to appear everytime you open a new terminal, run either | ||
``` | ||
echo ". ~/.config/synth-shell/synth-shell-greeter.sh" >> ~/.bashrc | ||
``` | ||
|
||
|
||
|
||
### Configuration/customization | ||
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**: | ||
|
||
* Current-user only: `~/.config/synth-shell/` | ||
* System wide: `/etc/synth-shell/` | ||
|
||
|
||
|
||
|
||
<br/><br/> | ||
|
||
|
||
|
||
<!--------------------------------------+--------------------------------------> | ||
# Overview | ||
<!--------------------------------------+--------------------------------------> | ||
|
||
`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-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) | ● | ○ | | ||
|
||
|
||
|
||
|
||
<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](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 | ||
|
||
* [Report a bug](https://github.com/andresgongora/synth-shell/issues/new/choose): | ||
if you notice that something is not right, tell us. We'll try to fix it ASAP. | ||
* Suggest an idea you would like to see in the next release: send us | ||
and email or open an [issue](https://github.com/andresgongora/synth-shell/issues)! | ||
* Become a developer: fork this repo and become an active developer! | ||
Take a look at the [issues](https://github.com/andresgongora/synth-shell/issues) | ||
for suggestions of where to start. Also, take a look at our | ||
[coding style](coding_style.md). | ||
* Spread the word: telling your friends is the fastes way to get this code to | ||
the people who might enjoy it! | ||
|
||
|
||
|
||
### Git branches | ||
|
||
There are two branches in this repository: | ||
|
||
* **master**: this is the main branch, and thus contains fully functional | ||
scripts. When you want to use the scripts as a _user_, | ||
this is the branch you want to clone or download. | ||
* **develop**: this branch contains all the new features and most recent | ||
contributions. It is always _stable_, in the sense that you can use it | ||
without major inconveniences. | ||
However, it's very prone to undetected bugs and it might be subject to major | ||
unannounced changes. If you want to contribute, this is the branch | ||
you should pull-request to. | ||
|
||
|
||
|
||
<br/><br/> | ||
|
||
|
||
|
||
<!--------------------------------------+--------------------------------------> | ||
# About | ||
<!--------------------------------------+--------------------------------------> | ||
|
||
**synth-shell-prompt** is part of | ||
[synth-shell](https://github.com/andresgongora/synth-shell) | ||
|
||
|
||
|
||
<br/><br/> | ||
|
||
|
||
|
||
<!--------------------------------------+--------------------------------------> | ||
# License | ||
<!--------------------------------------+--------------------------------------> | ||
|
||
Copyright (c) 2014-2020, Andres Gongora - www.andresgongora.com | ||
|
||
* This software is released under a GPLv3 license. | ||
Read [license-GPLv3.txt](LICENSE), | ||
or if not present, <http://www.gnu.org/licenses/>. | ||
* If you need a closed-source version of this software | ||
for commercial purposes, please contact the [authors](AUTHORS.md). | ||
|
Submodule bash-tools
added at
32cc7c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
##============================================================================== | ||
## COLORS | ||
## | ||
## Control the color and format scheme of the bash prompt. | ||
## The prompt is divided into segments, listed below starting from the left: | ||
## - USER: shows the user's name. | ||
## - HOST: shows the host's name. | ||
## - PWD: shows the current directory. | ||
## - GIT: if inside a git repository, shows the name of current branch. | ||
## - INPUT: actual bash input. | ||
## | ||
## Valid color options: | ||
## - white black light-gray dark-gray | ||
## red green yellow blue cyan purple | ||
## light-red light-green light-yellow light-blue light-cyan light-purple | ||
## - Values in the range [0-255] for 256 bit colors. To check all number-color | ||
## pairs for your terminal, you may run the following snippet by HaleTom: | ||
## curl -s https://gist.githubusercontent.com/HaleTom/89ffe32783f89f403bba96bd7bcd1263/raw/ | bash | ||
## or search something like "bash 256 color codes" on the internet. | ||
## | ||
##============================================================================== | ||
|
||
font_color_user="white" | ||
background_user="blue" | ||
texteffect_user="bold" | ||
|
||
font_color_host="white" | ||
background_host="light-blue" | ||
texteffect_host="bold" | ||
|
||
font_color_pwd="dark-gray" | ||
background_pwd="white" | ||
texteffect_pwd="bold" | ||
|
||
font_color_git="light-gray" | ||
background_git="dark-gray" | ||
texteffect_git="bold" | ||
|
||
font_color_input="cyan" | ||
background_input="none" | ||
texteffect_input="bold" | ||
|
||
|
||
|
||
##============================================================================== | ||
## BEHAVIOR | ||
##============================================================================== | ||
local separator_char='\uE0B0' # Separation character, '\uE0B0'=triangle | ||
enable_vertical_padding=true # Add extra new line over prompt | ||
|
||
|
||
##============================================================================== | ||
## GIT | ||
##============================================================================== | ||
show_git=true # Enable/Disable git info if inside a repo | ||
git_symbol_synced='' | ||
git_symbol_unpushed='△' | ||
git_symbol_unpulled='▽' | ||
git_symbol_unpushedunpulled='○' | ||
git_symbol_dirty='!' | ||
git_symbol_dirty_unpushed='▲' | ||
git_symbol_dirty_unpulled='▼' | ||
git_symbol_dirty_unpushedunpulled='●' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
##============================================================================== | ||
## COLORS | ||
## | ||
## Control the color and format scheme of the bash prompt. | ||
## The prompt is divided into segments, listed below starting from the left: | ||
## - USER: shows the user's name. | ||
## - HOST: shows the host's name. | ||
## - PWD: shows the current directory. | ||
## - GIT: if inside a git repository, shows the name of current branch. | ||
## - INPUT: actual bash input. | ||
## | ||
## Valid color options: | ||
## - white black light-gray dark-gray | ||
## red green yellow blue cyan purple | ||
## light-red light-green light-yellow light-blue light-cyan light-purple | ||
## - Values in the range [0-255] for 256 bit colors. To check all number-color | ||
## pairs for your terminal, you may run the following snippet by HaleTom: | ||
## curl -s https://gist.githubusercontent.com/HaleTom/89ffe32783f89f403bba96bd7bcd1263/raw/ | bash | ||
## or search something like "bash 256 color codes" on the internet. | ||
## | ||
##============================================================================== | ||
|
||
font_color_user="white" | ||
background_user="black" | ||
texteffect_user="bold" | ||
|
||
font_color_host="white" | ||
background_host="dark-gray" | ||
texteffect_host="bold" | ||
|
||
font_color_pwd="black" | ||
background_pwd="light-gray" | ||
texteffect_pwd="bold" | ||
|
||
font_color_git="blacky" | ||
background_git="whtie" | ||
texteffect_git="bold" | ||
|
||
font_color_input="none" | ||
background_input="none" | ||
texteffect_input="bold" | ||
|
||
|
||
|
||
##============================================================================== | ||
## BEHAVIOR | ||
##============================================================================== | ||
local separator_char='\uE0B0' # Separation character, '\uE0B0'=triangle | ||
enable_vertical_padding=true # Add extra new line over prompt | ||
|
||
|
||
##============================================================================== | ||
## GIT | ||
##============================================================================== | ||
show_git=true # Enable/Disable git info if inside a repo | ||
git_symbol_synced='' | ||
git_symbol_unpushed='△' | ||
git_symbol_unpulled='▽' | ||
git_symbol_unpushedunpulled='○' | ||
git_symbol_dirty='!' | ||
git_symbol_dirty_unpushed='▲' | ||
git_symbol_dirty_unpulled='▼' | ||
git_symbol_dirty_unpushedunpulled='●' | ||
|
Oops, something went wrong.