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: adding nekolight theme (a starship variant) #655

Merged
merged 29 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2c5db6e
feat(themes): adding new nekonight variant
BrunoCiccarino Jan 21, 2025
0ea1495
merge branch master
BrunoCiccarino Jan 26, 2025
0055544
fix: resolving conflicts
BrunoCiccarino Jan 26, 2025
2f62a55
feat: adding preview image
BrunoCiccarino Jan 26, 2025
2d70d6b
fix: removing nekolight-light.jpg:Zone.Identifier
BrunoCiccarino Jan 26, 2025
b31611a
feat: adding on themes.md preview of nekolight
BrunoCiccarino Jan 26, 2025
1493c60
feat: adding sheebang on init of the theme
BrunoCiccarino Jan 26, 2025
87dec4a
fix: fixxing prompt icon
BrunoCiccarino Jan 26, 2025
b14fd16
feat: updating preview
BrunoCiccarino Jan 26, 2025
c8787b9
fix: removing blank lines
BrunoCiccarino Jan 26, 2025
c369cbd
feat: adding branch symbol
BrunoCiccarino Jan 26, 2025
4a47c4e
fix: fixxing identation and nomeclature
BrunoCiccarino Jan 26, 2025
f820329
fix: adding on on theme
BrunoCiccarino Jan 26, 2025
21dc59e
fix: fixxing nomeclature of variable
BrunoCiccarino Jan 26, 2025
a33fce3
fix: fixxing filename and identation
BrunoCiccarino Jan 26, 2025
ac2b9df
Update themes/nekolight/nekolight.theme.sh
BrunoCiccarino Jan 26, 2025
bcd4647
fix: fixxing local variables names
BrunoCiccarino Jan 26, 2025
acf8b01
fix: merging branch pr655
BrunoCiccarino Jan 26, 2025
b8665ba
fix: fixxing prefixed variable name
BrunoCiccarino Jan 26, 2025
763db0e
fix: removing dead code
BrunoCiccarino Jan 26, 2025
cc6a620
fix: removing blank lines
BrunoCiccarino Jan 26, 2025
a33fd5b
fix: removing deadcode and renaming variables
BrunoCiccarino Jan 26, 2025
e59ce9f
fix: removing duplicates
BrunoCiccarino Jan 26, 2025
59b3988
feat: adding documentation for the theme
BrunoCiccarino Jan 26, 2025
59924d6
Update themes/nekolight/README.md
BrunoCiccarino Jan 26, 2025
1f6b609
fix: fixxing image scale
BrunoCiccarino Jan 27, 2025
73addfd
Update themes/nekolight/README.md
BrunoCiccarino Jan 27, 2025
38cd543
feat(themes/nekolight): add image in README.md
akinomyoga Jan 27, 2025
b880313
fix(themes/nekolight): fix the image path in README.md
akinomyoga Jan 27, 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
4 changes: 4 additions & 0 deletions themes/THEMES.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@

[![](n0qorg/n0qorg-dark.png)](n0qorg/n0qorg-dark.png)

## `nekolight`

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

## `nekonight`

[![](nekonight/nekonight-dark.jpg)](nekonight/nekonight-dark.jpg)
Expand Down
16 changes: 16 additions & 0 deletions themes/nekolight/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# NekoLight prompt theme

Nekolight is a starship-based oh my bash prompt theme designed to be simple and lightweight.
BrunoCiccarino marked this conversation as resolved.
Show resolved Hide resolved

akinomyoga marked this conversation as resolved.
Show resolved Hide resolved
## 🚀 Installation

Prerequisites
- A Nerd Font installed and enabled in your terminal (for example, try the FiraCode Nerd Font).
BrunoCiccarino marked this conversation as resolved.
Show resolved Hide resolved

After installing the Nerd Fonts font, just modify the following line in your ~/.bashrc

```shell
OSH_THEME="nekolight"
```

and then to load the theme in your terminal you must type `source ~/.bashrc`.
Binary file added themes/nekolight/nekolight-dark.jpg
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.
25 changes: 25 additions & 0 deletions themes/nekolight/nekolight.theme.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#! bash oh-my-bash.module

_omb_theme_nekolight_version='1.0.0'
_omb_theme_nekolight_symbol=""
akinomyoga marked this conversation as resolved.
Show resolved Hide resolved

function _omb_theme_nekolight_git_info() {
if _omb_prompt_git rev-parse --is-inside-work-tree &>/dev/null; then
local branch=$(_omb_prompt_git symbolic-ref --short HEAD 2>/dev/null || _omb_prompt_git rev-parse --short HEAD 2>/dev/null)

if _omb_prompt_git diff --quiet 2>/dev/null && _omb_prompt_git diff --cached --quiet 2>/dev/null; then
_omb_util_print "on ${_omb_prompt_bold_green} ${_omb_theme_nekolight_symbol} ${branch} ${_omb_prompt_normal}"
else
_omb_util_print "on ${_omb_prompt_bold_red} ${_omb_theme_nekolight_symbol} ${branch}${_omb_prompt_normal}"
fi
fi
}

function _omb_theme_PROMPT_COMMAND() {
local display_dir="${_omb_prompt_bold_blue}\w${_omb_prompt_normal}"
local git_status=$(_omb_theme_nekolight_git_info)

PS1="${display_dir} ${git_status}\n❯ "
}

_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND
Loading