Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Merge engines #474

Closed
wants to merge 6 commits into from
Closed

Merge engines #474

wants to merge 6 commits into from

Conversation

onaforeignshore
Copy link
Contributor

@onaforeignshore onaforeignshore commented Apr 7, 2017

User selectable rendering engine (generator)

This is a total replacement for the master branch.

General updates

  • Both rendering engines are included Engines #471
    • generators/default is loaded if POWERLEVEL9K_GENERATOR="default" (or not defined)
    • generators/async is loaded if POWERLEVEL9K_GENERATOR="async" Async all the segments #344
  • All segments have been moved into their own files and share the same calling line (serialize_segment) meaning one definition for both engines plugin structure #437
    • developer segments in segments/develop.zsh
    • network related segments in segments/network.zsh
    • system segments in segments/system.zsh
    • integration with todo.sh in segments/todo.zsh
    • versioning control systems in segments/vcs.zsh
    • virtualization segments in segments/virtual.zsh
    • vi_mode and cursor shape are only loaded when the async generator is used: [[ "${POWERLEVEL9K_GENERATOR}" == "async" ]] && source $script_location/segments/vi_mode.zsh || prompt_vi_mode() {} # not working in default!
  • The main file is now only 142 lines long. This separation makes it easier to get to what you need to changes quicker, since there aren't hundreds of lines of code to search through.

Detailed updates

  • generators/default now has a serialize_segments wrapper function to enable all segments to be written once for both generators
  • prompt_battery has support for dynamic icon switching and dynamic background color changing Improve battery segment #373 / Battery #468
  • prompt_dir has been updated with colored separators and bold/color on last directory, as well as configurable home Make home shorthand configurable for dir prompt #461
  • vi_mode has support for changing cursor shape (which cannot be tested at present) vi_mode suddenly stopped working #319
  • zshrc-example.zsh is nearly up to date with all the changes made
  • any segment content can be printed in bold
  • icons in the right prompt can be displayed on the left

TODO

This branch combines both generators into a single distribution.
All segments have been moved into their own file.
Since vi_mode doesn't work on the default generator, it is disabled by default.
@onaforeignshore onaforeignshore mentioned this pull request Apr 7, 2017
@V1rgul
Copy link
Contributor

V1rgul commented Apr 7, 2017

Very nice initiative !

added icons on left in right prompt
added bold segment
@onaforeignshore
Copy link
Contributor Author

Because the call changed for segments, the _joined logic isn't working as planned. Busy debugging this at the moment.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants