mirror of
https://github.com/ohmybash/oh-my-bash.git
synced 2024-05-11 05:55:37 +00:00
themes: Add the "vscode" theme
This commit is contained in:
@@ -236,6 +236,10 @@
|
||||
|
||||
[](tylenol/tylenol-dark.png)
|
||||
|
||||
## `vscode`
|
||||
|
||||
[](vscode/vscode-dark.png)
|
||||
|
||||
## `wanelo`
|
||||
|
||||
[](wanelo/wanelo-dark.png)
|
||||
|
BIN
themes/vscode/vscode-dark.png
Normal file
BIN
themes/vscode/vscode-dark.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 82 KiB |
29
themes/vscode/vscode.theme.sh
Normal file
29
themes/vscode/vscode.theme.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
#! bash oh-my-bash.module
|
||||
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
_omb_theme_PROMPT_COMMAND() {
|
||||
local userpart='`export XIT=$? \
|
||||
&& [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \
|
||||
&& [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`'
|
||||
local gitbranch='`\
|
||||
if [ "$(git config --get codespaces-theme.hide-status 2>/dev/null)" != 1 ]; then \
|
||||
export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \
|
||||
if [ "${BRANCH}" != "" ]; then \
|
||||
echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \
|
||||
&& if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \
|
||||
echo -n " \[\033[1;33m\]✗"; \
|
||||
fi \
|
||||
&& echo -n "\[\033[0;36m\]) "; \
|
||||
fi; \
|
||||
fi`'
|
||||
local lightblue='\[\033[1;34m\]'
|
||||
local removecolor='\[\033[0m\]'
|
||||
PS1="${userpart} ${lightblue}\w ${gitbranch}${removecolor}\$ "
|
||||
unset -f _omb_theme_PROMPT_COMMAND
|
||||
}
|
||||
_omb_theme_PROMPT_COMMAND
|
||||
export PROMPT_DIRTRIM=4
|
Reference in New Issue
Block a user