:::

22. 漂亮終端機

  1. 執行以下指令即可:
    apt-get install python-pip
    apt-get install git
    pip install git+git://github.com/Lokaltog/powerline
    wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
    mv PowerlineSymbols.otf /usr/share/fonts/
    wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf
    mv 10-powerline-symbols.conf /etc/fonts/conf.d/
    apt-get install fontconfig 
    fc-cache -vf /usr/share/fonts/
    vi ~/.bashrc
  2. 在檔案裡面加入:

    export TERM="screen-256color"
  3. 找出powerline-status的位置

    pip show powerline-status
  4. 結果如:
    Name: powerline-status
    Version: 2.5.2.dev9999-git.5fa504118ee470e9cc9c8665515b77900ce5821e
    Location: /usr/local/lib/python2.7/dist-packages
    Requires:
    
  5. 將之再加到 ~/.bashrc

    vi ~/.bashrc
  6. 貼上,看起來會像這樣:

    powerline-daemon -q
    POWERLINE_BASH_CONTINUATION=1
    POWERLINE_BASH_SELECT=1
    . /usr/local/lib/python2.7/dist-packages/powerline/bindings/bash/powerline.sh
    
  7. 登出在登入即可看到效果。

  8. 在vim中套用之:

    vi ~/.vimrc
  9. 加入以下語法:

    set  rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim/
    set laststatus=2
    set t_Co=256
  10. 安裝

    apt-get install vim-nox
  11. 完整說明:http://www.tecmint.com/powerline-adds-powerful-statuslines-and-prompts-to-vim-and-bash/


:::

書籍目錄

展開 | 闔起

快速登入


http%3A%2F%2Fcampus-xoops.tn.edu.tw%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbdsn%3D596%26tbsn%3D15

計數器

今天: 1789178917891789
昨天: 4159415941594159
總計: 8069307806930780693078069307806930780693078069307