From f26498abb9922d7541d7cd5afe591dd34af07bcf Mon Sep 17 00:00:00 2001 From: erius Date: Thu, 5 Sep 2024 02:09:49 +0300 Subject: [PATCH] Modified oh-my-zsh theme, added aliases for vi and vim --- zsh/.oh-my-zsh/custom/example.zsh | 12 ------ zsh/.oh-my-zsh/custom/paths.zsh | 1 - .../custom/plugins/example/example.plugin.zsh | 3 -- .../custom/themes/example.zsh-theme | 6 --- zsh/.oh-my-zsh/themes/bira.zsh-theme | 38 +++++++++++++++++++ zsh/.zshrc | 2 +- 6 files changed, 39 insertions(+), 23 deletions(-) delete mode 100644 zsh/.oh-my-zsh/custom/example.zsh delete mode 100644 zsh/.oh-my-zsh/custom/paths.zsh delete mode 100644 zsh/.oh-my-zsh/custom/plugins/example/example.plugin.zsh delete mode 100644 zsh/.oh-my-zsh/custom/themes/example.zsh-theme create mode 100644 zsh/.oh-my-zsh/themes/bira.zsh-theme diff --git a/zsh/.oh-my-zsh/custom/example.zsh b/zsh/.oh-my-zsh/custom/example.zsh deleted file mode 100644 index c194f49d7..000000000 --- a/zsh/.oh-my-zsh/custom/example.zsh +++ /dev/null @@ -1,12 +0,0 @@ -# Put files in this folder to add your own custom functionality. -# See: https://github.com/ohmyzsh/ohmyzsh/wiki/Customization -# -# Files in the custom/ directory will be: -# - loaded automatically by the init script, in alphabetical order -# - loaded last, after all built-ins in the lib/ directory, to override them -# - ignored by git by default -# -# Example: add custom/shortcuts.zsh for shortcuts to your local projects -# -# brainstormr=~/Projects/development/planetargon/brainstormr -# cd $brainstormr diff --git a/zsh/.oh-my-zsh/custom/paths.zsh b/zsh/.oh-my-zsh/custom/paths.zsh deleted file mode 100644 index df48558b2..000000000 --- a/zsh/.oh-my-zsh/custom/paths.zsh +++ /dev/null @@ -1 +0,0 @@ -export PATH=$PATH:~/.local/bin diff --git a/zsh/.oh-my-zsh/custom/plugins/example/example.plugin.zsh b/zsh/.oh-my-zsh/custom/plugins/example/example.plugin.zsh deleted file mode 100644 index 83611fe3f..000000000 --- a/zsh/.oh-my-zsh/custom/plugins/example/example.plugin.zsh +++ /dev/null @@ -1,3 +0,0 @@ -# Add your own custom plugins in the custom/plugins directory. Plugins placed -# here will override ones with the same name in the main plugins directory. -# See: https://github.com/ohmyzsh/ohmyzsh/wiki/Customization#overriding-and-adding-plugins diff --git a/zsh/.oh-my-zsh/custom/themes/example.zsh-theme b/zsh/.oh-my-zsh/custom/themes/example.zsh-theme deleted file mode 100644 index 5551207f8..000000000 --- a/zsh/.oh-my-zsh/custom/themes/example.zsh-theme +++ /dev/null @@ -1,6 +0,0 @@ -# Put your custom themes in this folder. -# See: https://github.com/ohmyzsh/ohmyzsh/wiki/Customization#overriding-and-adding-themes -# -# Example: - -PROMPT="%{$fg[red]%}%n%{$reset_color%}@%{$fg[blue]%}%m %{$fg[yellow]%}%~ %{$reset_color%}%% " diff --git a/zsh/.oh-my-zsh/themes/bira.zsh-theme b/zsh/.oh-my-zsh/themes/bira.zsh-theme new file mode 100644 index 000000000..5b752285b --- /dev/null +++ b/zsh/.oh-my-zsh/themes/bira.zsh-theme @@ -0,0 +1,38 @@ +local return_code="%(?..%{$fe[red]%}%? ↵%{$reset_color%})" +local user_host="%B%(!.%{$fg[red]%}.%{$fg[magenta]%})%n@%m%{$reset_color%} " +local user_symbol='%(!.#.$)' +local current_dir="%B%{$fg[blue]%}%~ %{$reset_color%}" +local conda_prompt='$(conda_prompt_info)' + +local vcs_branch='$(git_prompt_info)$(hg_prompt_info)' +local rvm_ruby='$(ruby_prompt_info)' +local venv_prompt='$(virtualenv_prompt_info)' +if [[ "${plugins[@]}" =~ 'kube-ps1' ]]; then + local kube_prompt='$(kube_ps1)' +else + local kube_prompt='' +fi + +ZSH_THEME_RVM_PROMPT_OPTIONS="i v g" + +PROMPT="╭─${conda_prompt}${user_host}${current_dir}${rvm_ruby}${vcs_branch}${venv_prompt}${kube_prompt} +╰─%B${user_symbol}%b " +RPROMPT="%B${return_code}%b" + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}‹" +ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}●%{$fg[green]%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}" + +ZSH_THEME_HG_PROMPT_PREFIX="$ZSH_THEME_GIT_PROMPT_PREFIX" +ZSH_THEME_HG_PROMPT_SUFFIX="$ZSH_THEME_GIT_PROMPT_SUFFIX" +ZSH_THEME_HG_PROMPT_DIRTY="$ZSH_THEME_GIT_PROMPT_DIRTY" +ZSH_THEME_HG_PROMPT_CLEAN="$ZSH_THEME_GIT_PROMPT_CLEAN" + +ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[red]%}‹" +ZSH_THEME_RUBY_PROMPT_SUFFIX="› %{$reset_color%}" + +ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX="%{$fg[green]%}‹" +ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX="› %{$reset_color%}" +ZSH_THEME_VIRTUALENV_PREFIX="$ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX" +ZSH_THEME_VIRTUALENV_SUFFIX="$ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX" diff --git a/zsh/.zshrc b/zsh/.zshrc index fa83cc0c6..5a446b982 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -8,7 +8,7 @@ export ZSH="$HOME/.oh-my-zsh" # load a random theme each time Oh My Zsh is loaded, in which case, # to know which specific one was loaded, run: echo $RANDOM_THEME # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes -ZSH_THEME="robbyrussell" +ZSH_THEME="bira" # Set list of themes to pick from when loading at random # Setting this variable when ZSH_THEME=random will cause zsh to load