Skip to content

Customize

BlaCk_Void edited this page Apr 21, 2020 · 16 revisions

Table of Contents

Prior knowledge

File Load

load_order

  • BlaCk-Void.zshenv: Add to path some things(Application, bin, .local.bin ..etc) that might be in your home directory(~/) and the location of package manager's(cargo, linux brew, snap, ..etc) bin.
  • BlaCk-Void.zshrc: Main Setting File.
  • autoload/*: Various functions, set to lazyload(autoload) immediately after calling BlaCk-Void.zshrc.
    See Features for more information on the functions.
  • ~/.ztheme or BlaCk-Void.ztheme: Customable theme setting file, load before normal plugins load.
  • lib/*: Loaded at the end of BlaCk-Void.zshrc.
  • complition/*: Add from lib/completion to $fpath.
  • BlaCk-Void.zlogin: Optimization related settings, such as byte compilation in the background.

FAQ: Can I get zsh's load order info?

See here.

Theme Load

ztheme-structure Theme consists of Color Mode, Icon Mode, and Theme Mode.

Color Definition and Icon Definition execute immediately, and Apply to Theme executes when Theme Definition.

Let's Start Custom !!

Plugin

  • Create file to your home.
  • Restrictions: Work only in ~/.zplugins
touch ~/.zplugins

Theme

  • Copy file to your home.
  • Restrictions: Work only in ~/.ztheme
cp $BVZSH/BlaCk-Void.ztheme ~/.ztheme
  • Apply Setting
    Restart terminal or Start new session
  • FAQ: Can not change during use?
    This isn’t supported by powerlevel10k.

Support Features

  • Install zsh plugins
  • Theme Mode, Color Mode, Icon Mode

Zsh Plugins

Write along the Zplugin WIKI.

Theme Mode

Color Mode

  • COLOR MODE list: auto, flex, fixed
  • auto
    Default is fixed.
    When not support xterm or 256 color, flex color Activate.
  • flex
    Use the default color of the terminal scheme.
  • fixed
    Use X-Term's color to show a constant color (in most cases)
  • Compare
SCHEME /COLOR MODE Flex Fixed
Breeze bvzsh-flex-breeze bvzsh-fixed-breeze
Oxygen bvzsh-flex-oxygen bvzsh-fixed-oxgen
Linux bvzsh-flex-linux bvzsh-fixed-linux
Black&Green bvzsh-flex-b g bvzsh-fixed-b g
  • Things that will help.
  • Arch Wiki: Zsh-Colors another Xterm Colors.
  • Useful command list color code
  • for code ({000..255}) print -P -- "$code: %F{$code}This is how your text would look like%f": Show xterm 256 colors.
  • getColorCode foreground: How colors are applied to the foreground.
    getColorCode background: How colors are applied to the background.
  • POWERLEVEL9K_{ELEMENT}_FOREGROUND=COLOR: Apply color to theme's forground.
    POWERLEVEL9K_{ELEMENT}_BACKGROUND=COLOR: Apply color to theme's background.

Icon Mode

  • ICON MODE list: auto, nerd, powerline
  • auto
    auto: Default is nerd.
    When ssh or root, powerline icon Activate.
  • nerd font nerd-font You can download patched fonts from yanoasis/nerd-fonts.
    Installer recommend font is Hack Nerd Font.
  • powerline font powerline-font You can download patched fonts from powerline/fonts
  • Things that will help.
  • Nerd Font, Powerline Extra Symbols, Unicode Table
  • Useful command list
  • get_icon_names: Show applied icons.
  • POWERLEVEL9K_{ICONNAME}_ICON=ICON: Apply icon to theme.