-
-
Notifications
You must be signed in to change notification settings - Fork 757
feat(themes): adding new nekonight variant the nekonight moon and adding pull request template/issue template #653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
2c5db6e
feat(themes): adding new nekonight variant
2dae0dc
feat(themes): adding preview image of the theme
thebigcicca 4d17b72
feat(themes.md): adding preview of the new theme
e6fd93b
refactor(themes): modularizing themes to be able to reuse the base
548da10
fix(themes): removing blank lines
3e28c68
fix(themes): fixing the themes emoji by adding a variable that can be…
8badf19
refactor(themes): adding a reference to the _omb_theme_nekonight_icon…
217b535
fix(themes): fix regext
thebigcicca 37497eb
refactor(themes): renaming the git reference to omb_prompt_git
thebigcicca 2a0c8b3
Update themes/THEMES.md
thebigcicca 8b74f0f
refactor(themes): transforming parts of the prompt into reusable code…
59b9f79
feat(github): adding feature template and issue template
2ef8e2e
fix(): Fix line endings, trailing whitespace, and add final newlines
bdd607d
fix(github): fixxing editor config lint
4fc6738
fix(): removing unused lines
bc1fdde
fix(): removing issue and pull request template
5c58a7a
Update themes/THEMES.md
thebigcicca b6391be
Update themes/nekonight_moon/nekonight_moon.theme.sh
thebigcicca 133a12f
refactor(): renaming all instances of git to _omb_prompt_git
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
akinomyoga marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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,33 @@ | ||
| function _omb_theme_nekonight_git_prompt_info() { | ||
akinomyoga marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| local branch_name | ||
| branch_name=$(git symbolic-ref --short HEAD 2>&-) | ||
akinomyoga marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| local git_status="" | ||
|
|
||
| if [[ -n $branch_name ]]; then | ||
| git_status="${_omb_prompt_bold_white}(🐱 $branch_name $(_omb_theme_nekonight_scm_git_status))${_omb_prompt_normal}" | ||
akinomyoga marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| fi | ||
|
|
||
| echo -n "$git_status" | ||
| } | ||
|
|
||
| function _omb_theme_nekonight_scm_git_status() { | ||
| local git_status="" | ||
|
|
||
| if git rev-list --count --left-right @{upstream}...HEAD 2>&- | grep -Eq '^[0-9]+\s[0-9]+$'; then | ||
akinomyoga marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| git_status+="${_omb_prompt_brown}↓${_omb_prompt_normal} " | ||
| fi | ||
|
|
||
| if [[ -n $(git diff --cached --name-status 2>&-) ]]; then | ||
| git_status+="${_omb_prompt_green}+${_omb_prompt_normal}" | ||
| fi | ||
|
|
||
| if [[ -n $(git diff --name-status 2>&-) ]]; then | ||
| git_status+="${_omb_prompt_yellow}•${_omb_prompt_normal}" | ||
| fi | ||
|
|
||
| if [[ -n $(git ls-files --others --exclude-standard 2>&-) ]]; then | ||
| git_status+="${_omb_prompt_red}⌀${_omb_prompt_normal}" | ||
| fi | ||
|
|
||
| echo -n "$git_status" | ||
| } | ||
This file contains hidden or 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 |
|---|---|---|
| @@ -1,55 +1,26 @@ | ||
| # nekonight Bash prompt with source control management | ||
akinomyoga marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # Author: Bruno Ciccarino <[email protected]> | ||
| # | ||
| # | ||
| # Theme inspired by: | ||
| # - Bash_it cupcake theme | ||
| # Demo: | ||
| # ╭─🐱 virtualenv 🐱user at 🐱host in 🐱directory on (🐱branch {1} ↑1 ↓1 +1 •1 ⌀1 ✗) | ||
| # ╰λ cd ~/path/to/your-directory | ||
|
|
||
| if [ -z "${NEKONIGHT_BASE_LOADED}" ]; then | ||
| source "$OSH/themes/nekonight/nekonight-base.sh" | ||
| export NEKONIGHT_BASE_LOADED=true | ||
| fi | ||
akinomyoga marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| icon_start="╭─" | ||
| icon_user=" 🐱 ${_omb_prompt_bold_olive}\u${_omb_prompt_normal}" | ||
| icon_host=" at 🐱 ${_omb_prompt_bold_cyan}\h${_omb_prompt_normal}" | ||
| icon_directory=" in 🐱 ${_omb_prompt_bold_magenta}\w${_omb_prompt_normal}" | ||
| icon_end="╰─${_omb_prompt_bold_white}λ${_omb_prompt_normal}" | ||
|
|
||
| function _omb_theme_nekonight_git_prompt_info() { | ||
| local branch_name | ||
| branch_name=$(git symbolic-ref --short HEAD 2>/dev/null) | ||
| local git_status="" | ||
|
|
||
| if [[ -n $branch_name ]]; then | ||
| git_status="${_omb_prompt_bold_white}(🐱 $branch_name $(_omb_theme_nekonight_scm_git_status))${_omb_prompt_normal}" | ||
| fi | ||
|
|
||
| echo -n "$git_status" | ||
| } | ||
|
|
||
| function _omb_theme_nekonight_scm_git_status() { | ||
| local git_status="" | ||
|
|
||
| if git rev-list --count --left-right @{upstream}...HEAD 2>/dev/null | grep -Eq '^[0-9]+\s[0-9]+$'; then | ||
| git_status+="${_omb_prompt_brown}↓${_omb_prompt_normal} " | ||
| fi | ||
|
|
||
| if [[ -n $(git diff --cached --name-status 2>/dev/null) ]]; then | ||
| git_status+="${_omb_prompt_green}+${_omb_prompt_normal}" | ||
| fi | ||
|
|
||
| if [[ -n $(git diff --name-status 2>/dev/null) ]]; then | ||
| git_status+="${_omb_prompt_yellow}•${_omb_prompt_normal}" | ||
| fi | ||
|
|
||
| if [[ -n $(git ls-files --others --exclude-standard 2>/dev/null) ]]; then | ||
| git_status+="${_omb_prompt_red}⌀${_omb_prompt_normal}" | ||
| fi | ||
|
|
||
| echo -n "$git_status" | ||
| } | ||
|
|
||
| function _omb_theme_PROMPT_COMMAND() { | ||
| local git_info=$(_omb_theme_nekonight_git_prompt_info) | ||
akinomyoga marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| PS1="${icon_start}${icon_user}${icon_host}${icon_directory} in $(_omb_theme_nekonight_git_prompt_info)\n${icon_end} " | ||
| } | ||
|
|
||
| _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND | ||
|
|
||
akinomyoga marked this conversation as resolved.
Show resolved
Hide resolved
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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,28 @@ | ||
| # nekonight-moon Bash prompt with source control management | ||
akinomyoga marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # Author: Bruno Ciccarino <[email protected]> | ||
| # | ||
| # Theme inspired by: | ||
| # - Bash_it cupcake theme | ||
| # Demo: | ||
| # ╭─🌙 virtualenv 🌙user at 🌙host in 🌙directory on (🌙branch {1} ↑1 ↓1 +1 •1 ⌀1 ✗) | ||
| # ╰λ cd ~/path/to/your-directory | ||
|
|
||
| if [ -z "${NEKONIGHT_BASE_LOADED}" ]; then | ||
| source "$OSH/themes/nekonight/nekonight-base.sh" | ||
| export NEKONIGHT_BASE_LOADED=true | ||
| fi | ||
akinomyoga marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
akinomyoga marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| icon_start="╭─" | ||
| icon_user=" 🌙 ${_omb_prompt_bold_olive}\u${_omb_prompt_normal}" | ||
| icon_host=" at 🌙 ${_omb_prompt_bold_cyan}\h${_omb_prompt_normal}" | ||
| icon_directory=" in 🌙 ${_omb_prompt_bold_magenta}\w${_omb_prompt_normal}" | ||
| icon_end="╰─${_omb_prompt_bold_white}λ${_omb_prompt_normal}" | ||
|
|
||
| function _omb_theme_PROMPT_COMMAND() { | ||
| local git_info=$(_omb_theme_nekonight_git_prompt_info) | ||
| PS1="${icon_start}${icon_user}${icon_host}${icon_directory} in $(_omb_theme_nekonight_git_prompt_info)\n${icon_end} " | ||
| } | ||
|
|
||
thebigcicca marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| _omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND | ||
|
|
||
|
|
||
akinomyoga marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.