Skip to content
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

feat(themes): adding new nekonight variant the nekonight moon and adding pull request template/issue template #653

Merged
merged 19 commits into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
2c5db6e
feat(themes): adding new nekonight variant
bgcicca Jan 21, 2025
2dae0dc
feat(themes): adding preview image of the theme
bgcicca Jan 21, 2025
4d17b72
feat(themes.md): adding preview of the new theme
bgcicca Jan 21, 2025
e6fd93b
refactor(themes): modularizing themes to be able to reuse the base
bgcicca Jan 22, 2025
548da10
fix(themes): removing blank lines
bgcicca Jan 22, 2025
3e28c68
fix(themes): fixing the themes emoji by adding a variable that can be…
bgcicca Jan 22, 2025
8badf19
refactor(themes): adding a reference to the _omb_theme_nekonight_icon…
bgcicca Jan 22, 2025
217b535
fix(themes): fix regext
bgcicca Jan 22, 2025
37497eb
refactor(themes): renaming the git reference to omb_prompt_git
bgcicca Jan 22, 2025
2a0c8b3
Update themes/THEMES.md
bgcicca Jan 23, 2025
8b74f0f
refactor(themes): transforming parts of the prompt into reusable code…
bgcicca Jan 23, 2025
59b9f79
feat(github): adding feature template and issue template
bgcicca Jan 23, 2025
2ef8e2e
fix(): Fix line endings, trailing whitespace, and add final newlines
bgcicca Jan 23, 2025
bdd607d
fix(github): fixxing editor config lint
bgcicca Jan 23, 2025
4fc6738
fix(): removing unused lines
bgcicca Jan 23, 2025
bc1fdde
fix(): removing issue and pull request template
bgcicca Jan 23, 2025
5c58a7a
Update themes/THEMES.md
bgcicca Jan 23, 2025
b6391be
Update themes/nekonight_moon/nekonight_moon.theme.sh
bgcicca Jan 23, 2025
133a12f
refactor(): renaming all instances of git to _omb_prompt_git
bgcicca Jan 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.md
akinomyoga marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: 🐞 Bug
about: File a bug/issue
title: '[BUG] <title>'
labels: 'scope: bug'
assignees: ''
---

<!--
Note: Please search to see if an issue already exists for the bug you encountered.
-->

### Current Behavior:
<!-- A concise description of what you're experiencing. -->

### Expected Behavior:
<!-- A concise description of what you expected to happen. -->

### Steps To Reproduce:
<!--
Example: steps to reproduce the behavior:
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
-->
### Logs

### Anything else:
<!--
Links? References? Screenshots? Anything that will give us more context about the issue that you are encountering!
-->
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/QUESTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: ❓ Question
about: Ask a question
title: '[QUESTION] <title>'
labels: 'scope: question'
assignees: ''
---

- [ ] I have searched open and closed issues for this question

<!-- We also have a telegram channel which is also a great place to ask questions
t.me/fastvim
-->
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Feature request
description: Suggest an idea for this project
labels: [enhancement]

body:
- type: textarea
id: problem
attributes:
label: Is your feature related to a problem?
placeholder: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
- type: textarea
id: solution
validations:
required: true
attributes:
label: Describe the new feature
placeholder: A clear and concise description of what the new feature is.
- type: textarea
id: additional-context
attributes:
label: Additional context
placeholder: Add any other context or screenshots about the feature request here.
37 changes: 37 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## Type of Changes

Please mark the options that best describe your PR:

- [ ] Bug fix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactor
- [ ] Documentation update
- [ ] CI/CD changes
- [ ] Dependencies update
- [ ] Other (please specify):

## Checklist

- [ ] I have read and followed the [CONTRIBUTING.md](../CONTRIBUTING.md) guidelines for this project.
- [ ] Added or updated documentation, changelog, news and if needed (e.g., `README.md`, code comments).
- [ ] I tested my modifications and they didn't cause any problems.
- [ ] I have resolved all conflicts (if any)
- [ ] My commit follows the project conventions

## Description

<!-- Describe the big picture of your changes to communicate to the maintainers
why we should accept this pull request. -->

## Related Issue(s)

<!--
If this PR fixes any issues, please link to the issue here.
- Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->

4 changes: 4 additions & 0 deletions themes/THEMES.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@

[![](nekonight/nekonight-dark.jpg)](nekonight/nekonight-dark.jpg)

## `nekonight_moon`

[![](nekonight_moon/nekonight-moon-dark.jpg)](nekonight_moon/nekonight-moon-dark.jpg)
bgcicca marked this conversation as resolved.
Show resolved Hide resolved

## `nwinkler`

[![](nwinkler/nwinkler-dark.png)](nwinkler/nwinkler-dark.png)
Expand Down
43 changes: 43 additions & 0 deletions themes/nekonight/nekonight.base.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#! bash oh-my-bash.module

icon_start="╭─"
icon_user=" ${_omb_theme_nekonight_icon_emoji} ${_omb_prompt_bold_olive}\u${_omb_prompt_normal}"
icon_host=" at ${_omb_theme_nekonight_icon_emoji} ${_omb_prompt_bold_cyan}\h${_omb_prompt_normal}"
icon_directory=" in ${_omb_theme_nekonight_icon_emoji} ${_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=$(_omb_prompt_git symbolic-ref --short HEAD 2>&-)
local git_status=""

local icon_emoji="${_omb_theme_nekonight_icon_emoji:-🐱}"

if [[ -n $branch_name ]]; then
git_status="${_omb_prompt_bold_white} (${icon_emoji} $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>&- | grep -Eq '^[0-9]+[[:blank:]][0-9]+$'; then
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"
}
44 changes: 4 additions & 40 deletions themes/nekonight/nekonight.theme.sh
Original file line number Diff line number Diff line change
@@ -1,55 +1,19 @@
#! bash oh-my-bash.module
# 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

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=""
_omb_theme_nekonight_icon_emoji="🐱"
akinomyoga marked this conversation as resolved.
Show resolved Hide resolved

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"
}
source "$OSH/themes/nekonight/nekonight.base.sh"

function _omb_theme_PROMPT_COMMAND() {
local git_info=$(_omb_theme_nekonight_git_prompt_info)
akinomyoga marked this conversation as resolved.
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
Binary file added themes/nekonight_moon/nekonight_moon-dark.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions themes/nekonight_moon/nekonight_moon.theme.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#! bash oh-my-bash.module
# 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

_omb_theme_nekonight_icon_emoji="🌙"

akinomyoga marked this conversation as resolved.
Show resolved Hide resolved
source "$OSH/themes/nekonight/nekonight.base.sh"

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} "
}

bgcicca marked this conversation as resolved.
Show resolved Hide resolved
_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND
Loading