tmux์ ๋ฌผ๊ณ ๊ธฐ๋ก Powerline์ ์คํํ๊ณ ์์ต๋๋ค. ์ฌ๋ฌ ์ค ์ ธ ํ๋กฌํํธ๋ฅผ ์ค์ ํ๋ ค๊ณ ์๋ํ๊ณ fish์ zsh ๋ชจ๋์์ ๋ค์ ๋์์ ๋ฐ์์ต๋๋ค.
๋๋ ์์ง VM์์ ์ฌํ์ ์๋ํ์ง ์์์ผ๋ฏ๋ก ๋ด๊ฐ ์๋ชปํ๊ณ ์๋ ๋ช ๋ฐฑํ ์ผ์ด ์์ผ๋ฉด ์ง์ ํ์ญ์์ค.
๋์์ด๋๋ค๋ฉด ๋ค์์ env $POWERLINE_COMMAND shell right | xxd
์ ์ถ๋ ฅ์
๋๋ค.
00000000: 1b5b 306d .[0m
๊ทธ๋ฆฌ๊ณ ์ฌ๊ธฐ์ ๋ฌผ๊ณ ๊ธฐ ํ๋กฌํํธ๊ฐ ์์ต๋๋ค.
$ย type fish_prompt
fish_prompt is a function with definition
function fish_prompt
env $POWERLINE_COMMAND shell aboveleft --last-exit-code=$status --last-pipe-status=$status --jobnum=(jobs -p | wc -l) --renderer-arg=client_id=12917 --width=$_POWERLINE_COLUMNS --renderer-arg=mode=$fish_bind_mode --renderer-arg=default_mode=$_POWERLINE_DEFAULT_MODE
end
$ย type fish_right_prompt
fish_right_prompt is a function with definition
function fish_right_prompt
env $POWERLINE_COMMAND shell right --last-exit-code=$status --last-pipe-status=$status --jobnum=(jobs -p | wc -l) --renderer-arg=client_id=12917 --width=$_POWERLINE_COLUMNS --renderer-arg=mode=$fish_bind_mode --renderer-arg=default_mode=$_POWERLINE_DEFAULT_MODE
echo -n " "
end
~/.config/powerline/themes/shell/default.json
:
{
"segments": {
"above": [
{
"left": [
{
"function": "powerline.segments.common.net.hostname",
"priority": 10
},
{
"function": "powerline.segments.common.env.user",
"priority": 30
},
{
"function": "powerline.segments.shell.cwd",
"priority": 10
},
{
"function": "powerline.segments.shell.jobnum",
"priority": 20
}
],
"right": [
{
"function": "powerline_gitstatus.gitstatus",
"priority": 40
},
{
"function": "powerline.segments.common.time.date",
"name": "time",
"args": {
"format": "%H:%M:%S",
"istime": true
}
},
{
"function": "powerline.segments.shell.last_pipe_status",
"priority": 10
},
{
"function": "powerline.segments.common.env.virtualenv",
"priority": 50
}
]
}
],
"left": [
{
"function": "powerline.segments.shell.mode"
},
{
"function": "powerline.segments.shell.last_pipe_status",
"priority": 10
},
{
"function": "powerline.segments.common.time.date",
"args": {
"format": "$"
}
}
],
"right": [
]
}
}
~/.tmux.conf
:
set -g default-terminal "screen-256color"
POWERLINE_CONFIG_PATHS="$HOME/.config/powerline"
run-shell "powerline-daemon -q"
source "/usr/lib/python3.5/site-packages/powerline/bindings/tmux/powerline.conf"
์ต์ config.fish
:
set -gx POWERLINE_CONFIG_PATHS "$HOME/.config/powerline"
set fish_function_path $fish_function_path "/usr/lib/python3.5/site-packages/powerline/bindings/fish"
powerline-setup
source /usr/share/fish/functions/fzf.fish
์ต์ .zshrc
:
HYPHEN_INSENSITIVE="true"
DISABLE_AUTO_UPDATE="true"
if [[ -r /usr/lib/python3.5/site-packages/powerline/bindings/zsh/powerline.zsh ]]; then
source /usr/lib/python3.5/site-packages/powerline/bindings/zsh/powerline.zsh
fi
์ : fish v2.3.1
, zsh 5.2
Python : 3.5.2
OS : Manjaro (Arch Linux ํ์)
$ pip show powerline-status
---
Metadata-Version: 1.1
Name: powerline-status
Version: 2.4
Summary: The ultimate statusline/prompt utility.
Home-page: https://github.com/powerline/powerline
Author: Kim Silkebaekken
Author-email: [email protected]
License: MIT
Location: /usr/lib/python3.5/site-packages
Requires:
Classifiers:
Development Status :: 5 - Production/Stable
Environment :: Console
Environment :: Plugins
Intended Audience :: End Users/Desktop
License :: OSI Approved :: MIT License
Natural Language :: English
Operating System :: Microsoft :: Windows
Operating System :: POSIX
Programming Language :: Python :: 2.6
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3.2
Programming Language :: Python :: 3.3
Programming Language :: Python :: 3.4
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: Implementation :: PyPy
ํ๋ฌ ์ธ๊ทธ๋จผํธ๊ฐ ์์ต๋๋ค. ์ค๋ฅธ์ชฝ ์ธ๊ทธ๋จผํธ๋ ์ค๊ณ ์ ์ค๋ฅธ์ชฝ์ ์ ๋ ฌ๋์ง ์๊ณ ํ๋ฌ ์ธ๊ทธ๋จผํธ์ ์ํด ์ ๋ ฌ๋์ด์ผํฉ๋๋ค. Vim ๊ตฌ์ฑ์์ ์์ ๋ฅผ ๋ณผ ์ ์์ต๋๋ค.
์๋
ํ์ธ์ @ ZyX-I
ํ๋ฌ ์ธ๊ทธ๋จผํธ๋ ์ด๋ป๊ฒ ๋ง๋ค ์ ์์ต๋๊น? ํ๋ฌ๋ก ์๋ํ๋ ํน์ ์ธ๊ทธ๋จผํธ๊ฐ ์์ต๋๊น? ๊ทธ๋ฆฌ๊ณ ์ด๋ป๊ฒ "ํฌ๋ช
ํ"์๋ฏธ๋ก ๋ณด์ด๊ฒ ๋ง๋ค ์ ์์ต๋๊น?
@Javiergg ํ๋ฌ ์ธ๊ทธ๋จผํธ์ ์๋ Vim ํ ๋ง์ ์์ต๋๋ค. "ํฌ๋ช "์ต์ ์ด ์์ต๋๋ค. ๋๋จธ์ง ํฐ๋ฏธ๋๊ณผ ๋์ผํ ๋ฐฐ๊ฒฝ์ ๊ฐ์ง ํ์ด๋ผ์ดํธ ๊ทธ๋ฃน์ ์์ฑํ๊ณ ์ด๋ฅผ ํ๋ฌ์ ์ฌ์ฉํด์ผํฉ๋๋ค.
์ฐพ์์ต๋๋ค. @ ZyX-I ๋๋จํ ๊ฐ์ฌํฉ๋๋ค
ํ ๊ฐ์ง ์ง๋ฌธ์ "ํฌ๋ช
ํ"์์์ด ์์ง๋ง ํฐ๋ฏธ๋ ๋ฐฐ๊ฒฝ์์ "๊ฐ์ง"ํ๊ฑฐ๋ ์์คํ
๋ณ์๋ก ์ฌ์ฉํ ์ ์์ต๋๊น?
@Javiergg ๊ทธ๋ฐ ์ต์ ์ด ์์ต๋๋ค. ์์ 0์ ์ฌ์ฉํด ๋ณผ ์ ์์ต๋๋ค. ์ฐฉ๊ฐํ์ง ์์ผ๋ฉด 24 ๋นํธ ์ฑ์์ ํ์ฑํ ํ ๋๊น์ง ํ์ํ๋๋ก ์๋ํฉ๋๋ค.
๋์ ๊ฐ์ Google ์ง์์์ํ ๋ฉ๋ชจ์
๋๋ค.
ํ๋ฌ ์ธ๊ทธ๋จผํธ์ ์ :
{
"type": "string",
"highlight_groups": ["background"],
"draw_soft_divider": false,
"draw_hard_divider": false,
"width": "auto"
}
์๋
ํ์ธ์, ์์ฃผ ๋ฉ์ง ์ ๋ ฅ์ ์์ด๋์ด์ ๊ฐ์ฌ๋๋ฆฝ๋๋ค.
์ธ์ด ํ๊ฒฝ์ ๋ํ ํน๋ณ ์ธ๊ทธ๋จผํธ๋ฅผ ๋ณผ ์ ์์ต๋๊น? ruby ๋ฐ rvm, python ๋ฐ django ๋ฑ๊ณผ ๊ฐ์ด ... ์๋ง๋ ruby โโ/ python / perl / other -version์ ์์ด์ฝ๊ณผ ๋ ์ผ์ rvm ์์น ...
๋๋ ๊ทธ๊ฒ์ ํ ์์๋ ๋ฐฉ๋ฒ์ด ์์ด์ผํ๋ค๊ณ ์๊ฐํ๋ฉฐ, ์๋ง๋ ์ด๊ฒ์ ๋ณด์ฌ์ฃผ๊ธฐ ์ํด ์ด๋ฏธ ์กด์ฌํ๋ ์ธ๊ทธ๋จผํธ๊ฐ์์ ๊ฒ์
๋๋ค.
์ ๋ฐ ์ ๋ฅผ ์ก์ ์ฃผ์ค ์ ์๋์? (์ ๋ ๋ด archlinux OS์์ ์ต๊ณ ์ zsh-powerline ์
ธ์ ์ฌ์ฉํ๊ธฐ์๋ ์์ง ๋ฉ์ง ์์์ต๋๋ค. ๋งค์ฐ ํ๋ณตํฉ๋๋ค)
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
๋์ ๊ฐ์ Google ์ง์์์ํ ๋ฉ๋ชจ์ ๋๋ค.
ํ๋ฌ ์ธ๊ทธ๋จผํธ์ ์ :