Powerline: "์˜ค๋ฅธ์ชฝ ์œ„"์‰˜ ์„ธ๊ทธ๋จผํŠธ๊ฐ€ ์—ฌ๋Ÿฌ ์ค„ ์„ค์ •์—์„œ ์™ผ์ชฝ์— ์ •๋ ฌ๋ฉ๋‹ˆ๋‹ค.

์— ๋งŒ๋“  2016๋…„ 07์›” 29์ผ  ยท  7์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: powerline/powerline

tmux์˜ ๋ฌผ๊ณ ๊ธฐ๋กœ Powerline์„ ์‹คํ–‰ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์—ฌ๋Ÿฌ ์ค„ ์…ธ ํ”„๋กฌํ”„ํŠธ๋ฅผ ์„ค์ •ํ•˜๋ ค๊ณ  ์‹œ๋„ํ–ˆ๊ณ  fish์™€ zsh ๋ชจ๋‘์—์„œ ๋‹ค์Œ ๋™์ž‘์„ ๋ฐ›์•˜์Šต๋‹ˆ๋‹ค.

selection_009

๋‚˜๋Š” ์•„์ง 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
cshell sconfiguration error bug

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

๋‚˜์™€ ๊ฐ™์€ Google ์ง์›์„์œ„ํ•œ ๋ฉ”๋ชจ์ž…๋‹ˆ๋‹ค.
ํ•„๋Ÿฌ ์„ธ๊ทธ๋จผํŠธ์˜ ์˜ˆ :

{
    "type": "string",
    "highlight_groups": ["background"],
    "draw_soft_divider": false,
    "draw_hard_divider": false,
    "width": "auto"
}

๋ชจ๋“  7 ๋Œ“๊ธ€

ํ•„๋Ÿฌ ์„ธ๊ทธ๋จผํŠธ๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค. ์˜ค๋ฅธ์ชฝ ์„ธ๊ทธ๋จผํŠธ๋Š” ์„ค๊ณ„ ์ƒ ์˜ค๋ฅธ์ชฝ์— ์ •๋ ฌ๋˜์ง€ ์•Š๊ณ  ํ•„๋Ÿฌ ์„ธ๊ทธ๋จผํŠธ์— ์˜ํ•ด ์ •๋ ฌ๋˜์–ด์•ผํ•ฉ๋‹ˆ๋‹ค. 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 ์…ธ์„ ์‚ฌ์šฉํ•˜๊ธฐ์—๋Š” ์•„์ง ๋ฉ€์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค. ๋งค์šฐ ํ–‰๋ณตํ•ฉ๋‹ˆ๋‹ค)

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰