@jswork/ushell-module-powerline

1.0.0 • Public • Published

ushell-module-powerline

Unix shell module for powerline.

installation

npm i -S @jswork/ushell-module-powerline

configuration

Set config step by step.

  1. Install fonts

    # clone
    git clone https://github.com/powerline/fonts.git --depth=1
    # install
    cd fonts
    ./install.sh
    # clean-up a bit
    cd ..
    rm -rf fonts
  2. install python3

    # 这里如果安装慢,或者出错,可以换 brew 源解决问题
    brew install python3
  3. Install powerline-status

    pip3 install powerline-status
  4. Get powerline-status PATH and set config

    pip3 show powerline-status
  5. Add to your .bashrc

     # Powerline
     # 这里可以不需要了,用现在的 `ushell-module-powerline` 代替即可
     powerline-daemon -q
     POWERLINE_BASH_CONTINUATION=1
     POWERLINE_BASH_SELECT=1
     source /usr/local/lib/python3.8/site-packages/powerline/bindings/bash/powerline.sh
  6. Now, create a configuration directory for powerline in your home.

    mkdir -p ~/.config/powerline
    
    # 这里的 python3.8 根据实际情况换掉
    cp -r /usr/local/lib/python3.8/site-packages/powerline/config_files/ ~/.config/powerline/
  7. Make sure you system locale has utf8 encoding, Or your have to add to your .bashrc file

     # Set encode:
     export LC_ALL=en_US.UTF-8
     export LANG=en_US.UTF-8

support for vscode

  1. Open setting.json

  2. Add this config

    "terminal.integrated.fontFamily": "Source Code Pro for Powerline",
  3. Mac default terminal setting

  4. Enjoy coding!

resources

Package Sidebar

Install

npm i @jswork/ushell-module-powerline

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

3.71 kB

Total Files

4

Last publish

Collaborators

  • afeiship