ํ์ง๋ง vi set.py๋ฅผ ์ํํ๋ฉด git branch info๊ฐ ํ์๋ฉ๋๋ค.
๋ด vimrc์๋ ๋ค์์ด ์์ต๋๋ค.
. /Users/felix/Personalization/powerline/powerline/bindings/bash/powerline.sh
OSX 10.8.2์์ iterm2 1.0.0.20130204- ๋ฐค๋ง๋ค ์คํ
๋ํ ๋๊ตฐ๊ฐ๊ฐ ๋ด ํ๋กฌํํธ์ ์๋ฒ ์ ๋ณด๋ฅผ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ์ ์๋ ค์ค ์ ์๋ค๋ฉด ์ข์ ๊ฒ์ ๋๋ค.
์ฌ์ฉ์ ๊ตฌ์ฑ์์ default_leftonly ํ ๋ง๋ฅผ ํ์ฑํํด์ผํฉ๋๋ค.
๊ทธ๋ ๊ฒํ๋ ค๊ณ ํ์ง๋ง "๋ด ์ฌ์ฉ์ ๊ตฌ์ฑ์ ๋ณ๊ฒฝ"ํ๋ ๋ฐฉ๋ฒ์ ๋ชจ๋ฅด๊ฒ ์ต๋๋ค.
์์ค์์ powerline์ ์ฌ์ฉํ๊ณ ์์ต๋๋ค ( "pip install --user -e / home / daniel / workspace / powerline"์ ์ํํ๊ณ ". /home/daniel/workspace/powerline/powerline/bindings/bash/powerline.sh"์ถ๊ฐ). .
ํ๋กฌํํธ์์ git ๋ธ๋์น๋ฅผ ์ป์ผ๋ ค๋ฉด ๋ฌด์์ ๋ณ๊ฒฝํด์ผํฉ๋๊น?
์์ฐ, ๋ฐฉ๊ธ ๋ฌธ์ (https://powerline.readthedocs.org/en/latest/configuration.html)๋ฅผ ์ฝ๊ณ ์ดํดํ์ต๋๋ค! (์ ๋๊ธ์ ๋ํด ์ฃ์กํฉ๋๋ค : S)
@danieltdt ๋ฌธ์๊ฐ ํผ๋ ์ค๋ฝ์ต๋๋ค. ์ด๋ค ํ์ผ์ ๋ณ๊ฒฝํ ์ง (๊ทธ๋ฆฌ๊ณ ๋ฌด์์ ๋ณ๊ฒฝํด์ผํ๋์ง) ์ ์ ์์ต๋๋ค.
@DanielGGordon ๋ฉ์ธ config.json์ ์์ ํ๊ฑฐ๋ ๋ก์ปฌ ๋ณต์ฌ๋ณธ (~ / .config / powerline์ผ๋ก)์ ๋ง๋ค๊ณ shell-> theme์ "_default_"์์ "_default_leftonly_"๋ก ๋ณ๊ฒฝํ์ญ์์ค.
๊ณ ๋ง์ต๋๋ค!
๋ชจ๋ ๋จ๊ณ๋ฅผ ๋ฐ๋์ง๋ง ์ฌ์ ํ Fedora 23์์์ด ๋ฌธ์ ๊ฐ ์์ต๋๋ค.
pip2 (python 2.7.10)์ ํจ๊ป ์ค์น๋ powerline-status (2.3)
python2 ๋ฐ python3์ ๋ํด pygit2 (0.22.1)๊ฐ ๋ชจ๋ ์์ต๋๋ค.
~ / .config / powerline / config.json์ ์ฌ์ฉ์ ๊ตฌ์ฑ์ ๋ง๋ค์์ต๋๋ค. coz ์๋ํฉ๋๋ค. ํ์ง๋ง ์์์ ์ฌ์ ํ โโ์๋ํ์ง ์์ต๋๋ค
{
"common": {
"term_truecolor": false
},
"ext": {
"ipython": {
"colorscheme": "default",
"theme": "in",
"local_themes": {
"rewrite": "rewrite",
"out": "out",
"in2": "in2"
}
},
"shell": {
"colorscheme": "solarized",
"theme": "default_leftonly",
"local_themes": {
"continuation": "continuation",
"select": "select"
}
},
"tmux": {
"colorscheme": "default",
"theme": "default"
}
}
}
powerline install root / config_files์ ๊ธฐ๋ณธ ๊ตฌ์ฑ .json์ ํธ์งํ์ต๋๋ค.
Google ์ฌ์ฉ์ :
mkdir -p ~/.config/powerline
cat <<-'EOF' > ~/.config/powerline/config.json
{
"ext": {
"shell": {
"theme": "default_leftonly"
}
}
}
EOF
powerline-daemon --replace
๊ตฌ์ฑ์ด ๋ณํฉ๋๊ธฐ ๋๋ฌธ์ ์๋ํฉ๋๋ค.
๋๋ ์ฌ์ฉ์ ์ ์ ๋ฌธ์๊ฐ ๋์์ ์ฅํฉํ๊ณ ํผ๋ ์ค๋ฌ์ ๋ค๋ ๋ฐ ๋์ํฉ๋๋ค. ๋ด ์ค์ ์์ powerline_root
์ด ์ด๋์ ์๋์ง ์์ง ๋ชจ๋ฆ
๋๋ค.
@xenithorb ๊ฐ ๋๋ฅผ ์ํด ์ผํ์ต๋๋ค btw ^^
์ผ์ข
์ ๋ง์คํฐ config.json์ด ์์ต๋๊น? ๊ทธ๋ฆฌ๊ณ ~/.config/powerline/config.json
๊ฐ ์ผ์นํ๋ ํค๋ฅผ ์ฌ์ ์ํฉ๋๊น?
๋ด๊ฐ ์ฝ์ ๋ฌธ์๋ json ์คํค๋ง๋ฅผ ํจ๊ณผ์ ์ผ๋ก ๊ต์กํ์ง ์๋ ๊ฒ ๊ฐ์ต๋๋ค.
๋ ๋ง์ ์ ๋ณด๋ฅผ ์ํด ์ธํฐ๋ท ๊ฒ์์ ํ ํ ์น ์ฌ์ดํธ์์ ์ผ๋ถ ์ธ์ด๋ฅผ ์ฐพ์์ต๋๋ค. ๋๋ ์ด๊ฒ์ด ์ฌ์ฉ์๊ฐ ๊ธฐ๋ณธ / ๊ธฐ๋ณธ๊ฐ์ผ๋ก ์์ํ๋๋กํ๋ ๋ฐฉ๋ฒ์ด๋ผ๊ณ ์๊ฐํฉ๋๋ค. ๊ทธ๋ฐ ๋ค์ ํ์์ ๋ฐ๋ผ ํธ์ง ํ ์ ์์ต๋๋ค.
๋๋ pip --user๋ก ์ค์นํ๋ฏ๋ก ๋ด ๋นํธ๋ ~ / .local /์ ์์ต๋๋ค.
์ฐธ๊ณ : ~ / .local / lib /python3.5/
site-packages / ... ๊ฒฝ๋ก๋ ์์คํ
๊ตฌ์ฑ์ ๋ฐ๋ผ ๊ฐ๋ณ์ ์
๋๋ค.
mkdir -p ~/.config/powerline && cp -R ~/.local/lib/python3.5/site-packages/powerline/config_files/* ~/.config/powerline/ && cd ~/.config/powerline && ls -alF --color=auto
๊ทธ๋ฐ ๋ค์ @xenithorb๊ฐ ์ธ๊ธํ๋ฏ์ด`~ / .config / powerline / config.json``ext` =>`shell` =>`theme` ๊ฐ์`default`์์`default_leftonly`๋ก ํธ์งํฉ๋๋ค. ์ :{ "ํํ": { "term_truecolor": ๊ฑฐ์ง }, "ext": { "ipython": { "colorscheme": "๊ธฐ๋ณธ๊ฐ", "theme": "in", "local_themes": { "rewrite": "๋ค์ ์ฐ๊ธฐ", "out": "out", "in2": "in2" } }, "pdb": { "colorscheme": "๊ธฐ๋ณธ๊ฐ", "theme": "๊ธฐ๋ณธ๊ฐ" }, "shell": { "colorscheme": "๊ธฐ๋ณธ๊ฐ", "theme": " default_leftonly ", "local_themes": { "continuation": "continuation", "์ ํ": "์ ํ" } }, "tmux": { "colorscheme": "๊ธฐ๋ณธ๊ฐ", "theme": "๊ธฐ๋ณธ๊ฐ" }, "vim": { "colorscheme": "๊ธฐ๋ณธ๊ฐ", "theme": "๊ธฐ๋ณธ๊ฐ", "local_themes": { "__tabline__": "ํญ ๋ผ์ธ", "cmdwin": "cmdwin", "help": "help", "quickfix": "quickfix", "powerline.matchers.vim.plugin.nerdtree.nerdtree": "plugin_nerdtree", "powerline.matchers.vim.plugin.commandt.commandt": "plugin_commandt", "powerline.matchers.vim.plugin.gundo.gundo": "plugin_gundo", "powerline.matchers.vim.plugin.gundo.gundo_preview": "plugin_gundo-preview" } }, "wm": { "colorscheme": "๊ธฐ๋ณธ๊ฐ", "theme": "๊ธฐ๋ณธ๊ฐ" } } }
๋ํ Note:
๋ฐ๋ชฌ์ด ์คํ ์ค์ด๋ฉด ๋ฐ๋ชฌ์ ์ค์งํ๊ฑฐ๋ ๋ค์ ์์ํ ๋๊น์ง ~/.config/powerline/*
ํ์ผ์ ๋ํ ๋ณ๊ฒฝ ์ฌํญ์ด ์ ์ฉ๋์ง ์์ต๋๋ค. ๋ฐ๋ชฌ์ด ps aux | grep powerline
๋ก ์คํ ์ค์ธ์ง ํ์ธํ์ญ์์ค. ์ด๋ ์ชฝ์ด๋ ๋ฐ๋ชฌ์ powerline-daemon --replace
๋ก ์์ / ๋ค์ ์์ํ ์ ์์ต๋๋ค.
์ด๊ฒ์ ๋ด๊ฐ ํ์ํ ๋ช ๋ น์ด์์ต๋๋ค.
powerline-daemon --replace
๊ฐ์ฌํฉ๋๋ค @xenithorb
์๋ ํ์ธ์,
git์ ๋ํ ์ถ๊ฐ ์ ๋ณด๋ฅผ ์ป๋ ๋ฐฉ๋ฒ์ด ์์ต๋๊น? ๋ค์ ์ฌํญ์ ์๊ณ ์ถ์ต๋๋ค.
๋๋ ์ด๊ฒ์ https://github.com/jaspernbrouwer/powerline-gitstatus#installation ๋ณธ ์ ์ด ์์ผ๋ฉฐ ๊ทธ๋ฌํ ๊ฒ์ด ์ด๋ฏธ ์ ๋ ฅ์ ์ ์กด์ฌํ๋์ง ๊ถ๊ธํฉ๋๋ค.
์๋์, ์ธ๊ธ ํ ๊ฒ๊ณผ ๊ฐ์ ํ์ฌ ๋ชจ๋์ ์ฌ์ฉํด์ผํฉ๋๋ค.
๋ชจ๋ ๊ฒ์ ๊ณต์ ๋ฌธ์์ ์์ธํ ์ค๋ช ๋์ด
$ pacman -S powerline powerline-fonts
$ mkdir -p ~/.config/powerline/
$ cp /usr/lib/python3.6/site-packages/powerline/config_files/config.json ~/.config/powerline
ํ์ด์ฌ ๋ฒ์ ์ด ๋ณ๊ฒฝ ๋ ๊ฐ๋ฅ์ฑ์ด ์์ต๋๋ค. ๋ด ๊ฒฝ๋ก์ ์ผ์นํ๋์ง ํ์ธํ๋ ค๋ฉด ๋ก์ปฌ ๊ฒฝ๋ก๋ฅผ ํ์ธํ์ญ์์ค.
NB : Arch ์ฌ์ฉ์์๊ฒ๋ ์ ๋ ฅ์ ์ค๋ช
์ ์ powerline_root
์ธ๊ทธ๋จผํธ๊ฐ ํด๋น ๊ฒฝ๋ก์ ํด๋นํฉ๋๋ค. ์ธ๊ธํ ๋งํ ๊ฐ์น๊ฐ ์์ต๋๋ค.
ext.shell.theme
์์ฑ์ default
์์ default_left_only
ํฉ๋๋ค.
{
...
"ext": {
...
"shell": {
"colorscheme": "default",
"theme": "default_leftonly",
"local_themes": {
"continuation": "continuation",
"select": "select"
}
},
...
}
}
powerline-daemon --replace
๋๋ ๋จ์ํ ์ ์ ธ์ ๋ซ๊ณ ์ฝ๋ ๋ค.
(๋ฐ๋น์๊ณผ ์ฐ๋ถํฌ๋ ๊ฐ์ ๋ฐฉ์์ผ๋ก ์๋ํด์ผํฉ๋๋ค)
pip install powerline-status
wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf
# NOTE: adjust fonts paths properly!
mv PowerlineSymbols.otf /usr/share/fonts/
fc-cache -vf /usr/share/fonts/
mv 10-powerline-symbols.conf ~/.config/fontconfig/conf.d/
# add this to your .bashrc
powerline-daemon -q
POWERLINE_BASH_CONTINUATION=1
POWERLINE_BASH_SELECT=1
. {powerline-installation-dir}/bindings/bash/powerline.sh
mkdir -p ~/.config/powerline
# NOTE: adjust your {powerline-installation-dir} properly!
cp /{powerline-installation-dir}/config_files/config.json ~/.config/powerline
# edit ~/.config/powerline/config.json to see git status and branch name in prompt
{ ...
"theme": "default_leftonly",
...
}
# edit "def __call_()" function in vcs.py (may require sudo)
# vcs.py location --> /{powerline-installation-dir}/segments/common/vcs.py
# change "status_colors=False" --> status_colors=True
# change "ignore_statuses=()" --> ignore_statuses=(["U"]) to ignore untracked files
def __call__(self, pl, segment_info, create_watcher, status_colors=True, ignore_statuses=()):
# FINISH! APPLY CHANGES!
powerline-daemon --replace
๋ ์์ธํ ์ ๋ณด๊ฐ ํ์ํ์ญ๋๊น? -> ์์ -Deepin Linux (Debian / Ubuntu) ์ฉ Bash ์ ๋ ฅ์ ์์ํ 10 ๋จ๊ณ
๋ ์์ธํ ์ ๋ณด๊ฐ ํ์ํ์ญ๋๊น? -> ๊ณต์ ๋ฌธ์
powerline
์ธ์ ํฐ๋ฏธ๋์ git ํ๋กฌํํธ๋ฅผ ํ์ํ๋ ค๋ฉด pip install powerline-gitstatus
๋ํด์ผํฉ๋๋ค. ๋ํ ๊ทํ์ ๋ฌธ์ ์ ๋ํด Medium์ ๋ํ ์ ์ฉํ ๊ฒ์๋ฌผ ์ ์ฐพ์์ต๋๋ค. ์ด ํํ ๋ฆฌ์ผ์ macOS๋ฅผ ๊ธฐ๋ฐ์ผ๋กํ์ง๋ง Ubuntu18.04์์ ๊ทธ์ ๋ฐฉ๋ฒ์ ํ
์คํธํ์ผ๋ฉฐ ์๋ํ์ต๋๋ค! ์ด๊ฒ์ด ๋น์ ์ ๋์ธ ๊ฒ์
๋๋ค.
Ubuntu 18.04์์ apt install
๋ก powerline-gitstatus
์ (๋ฅผ) ์ค์นํ๋ ๋ฐ ๋ฌธ์ ๊ฐ์์์ต๋๋ค. ์ ์ฅ์๊ฐ ๋ ์ด์ ์ ์ง๋์ง ์์ ์ ์์ต๋๋ค. ๊ทธ๋๋ pip
๋ก ์ค์นํ์ง ์์์ต๋๋ค.
๋ ๋ค๋ฅธ ๊ฒ์ ... ๋ด .bashrc ํ์ผ์์ ๋ค์๊ณผ ๊ฐ์ด ์ถ๊ฐํ์ต๋๋ค.
if [ -f /usr/share/powerline/bindings/bash/powerline.sh ]; then
source /usr/share/powerline/bindings/bash/powerline.sh
fi
๋ฐ๋ชฌ๊ณผ ์ด๊ฒ์ ๋ํด์๋ ์๋ฌด๊ฒ๋ ์์ต๋๋ค.
powerline-daemon -q
POWERLINE_BASH_CONTINUATION=1
POWERLINE_BASH_SELECT=1
๋ด ์ง๋ฌธ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
-๋ด .bashrc ํ์ผ์๋ ํด๋น ์ค์ ์ถ๊ฐํด์ผํฉ๋๊น?
- apt remove powerline
ํ๊ณ pip
์ค์นํด์ผํฉ๋๊น?
๋ ๋ค๋ฅธ ๊ฒ์ ... ๋ด .bashrc ํ์ผ์์ ๋ค์๊ณผ ๊ฐ์ด ์ถ๊ฐํ์ต๋๋ค.
if [ -f /usr/share/powerline/bindings/bash/powerline.sh ]; then source /usr/share/powerline/bindings/bash/powerline.sh fi
๋ฐ๋ชฌ๊ณผ ์ด๊ฒ์ ๋ํด์๋ ์๋ฌด๊ฒ๋ ์์ต๋๋ค.
powerline-daemon -q POWERLINE_BASH_CONTINUATION=1 POWERLINE_BASH_SELECT=1
๋ด ์ง๋ฌธ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
-๋ด .bashrc ํ์ผ์๋ ํด๋น ์ค์ ์ถ๊ฐํด์ผํฉ๋๊น?
-apt remove powerline
ํ๊ณpip
์ค์นํด์ผํฉ๋๊น?
pip3์ ์ฌ์ฉํ์ฌ Powerline-status๋ฅผ ์ค์นํ์ต๋๋ค.
pip3 install powerline-status
pip3 install powerline-gitstatus
๋ค์ ๋๋ ํ ๋ฆฌ๋ฅผ ์์ฑํ์ต๋๋ค.
~/.config/powerline
~/.config/powerline/themes/shell
~/.config/powerline/colorschemes
๊ทธ๋ฆฌ๊ณ ์์ ๋ค์ํ ์ฃผ์์ ๊ธฐ๋ฐ์ผ๋ก ์ด๋ฌํ ํ์ผ์ ๋ง๋ค์์ต๋๋ค.
~/.config/powerline/colorschemes/default.json
~/.config/powerline/themes/shell/default.json
~/.config/powerline/config.json
์์์ ์ฟผ๋ฆฌ ํ๋๋ก ~ / .bashrc์ ๋ค์ ์ค์ ์ถ๊ฐํ์ต๋๋ค.
# Powerline startup
powerline-daemon -q
POWERLINE_BASH_CONTINUATION=1
POWERLINE_BASH_SELECT=1
source {{ powerline_location.stdout }}/powerline/bindings/bash/powerline.sh
Ansible์ ํตํด์ด ๋ชจ๋ ์์ ์ ์ํํ๊ณ ์์ผ๋ฏ๋ก ๋ง์ง๋ง ์ค์๋ ๋ณ์๊ฐ ํฌํจ๋์ด ์์ต๋๋ค.
์ด์ ๋ด Konsole์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
๋ํ Ansible์ ์ฌ์ฉํ์ฌ Powerline ํจ์น ๊ธ๊ผด์ ์ค์นํ๊ณ ์์ง๋ง ์ด๋์ด ๋ฌธ์ ๋ฐ ์ง๋ฌธ์ ๋ฒ์๋ฅผ ๋ฒ์ด๋ฉ๋๋ค.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
Google ์ฌ์ฉ์ :
๊ตฌ์ฑ์ด ๋ณํฉ๋๊ธฐ ๋๋ฌธ์ ์๋ํฉ๋๋ค.