mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
Merge 3a8912529b into b6f4a887ac
This commit is contained in:
commit
8aa7ae9fdc
5 changed files with 50 additions and 3 deletions
40
themes/netpunk.zsh-theme
Normal file
40
themes/netpunk.zsh-theme
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
##
|
||||
# Developed by NETPUNK#, software services
|
||||
# http://www.netpunk.net (not up ATM)
|
||||
#
|
||||
# Depends on rbenv/rvm, git, mercurial and battery plugins
|
||||
#
|
||||
# License: MIT
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
##
|
||||
|
||||
|
||||
function prompt_char {
|
||||
git branch >/dev/null 2>/dev/null && echo 'GIT ☢ ↪' && return
|
||||
hg root >/dev/null 2>/dev/null && echo 'HG ☢ ↪' && return
|
||||
echo ' ☢ ↪'
|
||||
}
|
||||
|
||||
if which rvm-prompt &> /dev/null; then
|
||||
PROMPT='%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%} %~ %{$reset_color%}$(hg_prompt_info)$(git_prompt_info)%{$reset_color%}
|
||||
$(prompt_char) '
|
||||
RPROMPT='%{$fg[red]%}RB $(~/.rvm/bin/rvm-prompt)%{$reset_color%} %{$fg[magenta]%}$(date "+%Y-%m-%d")%{$reset_color%} %{$fg[green]%} BAT: %{$reset_color%} $(battery_charge)'
|
||||
elif which rbenv &> /dev/null; then
|
||||
PROMPT='%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%} %~ %{$reset_color%}$(hg_prompt_info)$(git_prompt_info)%{$reset_color%}
|
||||
$(prompt_char) '
|
||||
RPROMPT='%{$fg[red]%}RB $(rbenv version | sed -e "s/ (set.*$//")%{$reset_color%} %{$fg[magenta]%}$(date "+%Y-%m-%d")%{$reset_color%} $(battery_pct_prompt)'
|
||||
|
||||
fi
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%} "
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[white]%}%{$bg[red]%} ✖ "
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[white]%}%{$bg[magenta]%} ◘ "
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%} ✔ "
|
||||
Loading…
Add table
Add a link
Reference in a new issue