Теперь я установил для .tmux.conf значение docker-compose down && docker-compose up -d
автоматически при запуске tmux.
Однако теперь появляется следующая ошибка:
/home/user/.tmux.conf:42: no current target
/home/user/.tmux.conf:43: no current target
/home/user/.tmux.conf:44: no current target
/home/user/.tmux.conf:45: no current target│
/home/user/.tmux.conf:46: no current target│
/home/user/.tmux.conf:47: no current target│
/home/user/.tmux.conf:48: no current target│
/home/user/.tmux.conf:49: no current target│
'powerline-daemon -q' returned 1│
2018-12-11 13:04:58,507:ERROR:tmux:segment_generator:Failed to import attr cpu_load_parcent from modul│
e powerline.segments.common.sys: module 'powerline.segments.common.sys' has no attribute 'cpu_load_par│
cent'│
Traceback (most recent call last):│
File "/home/user/.local/lib/python3.6/site-packages/powerline/__init__.py",line 392, in get_module│
_attr│
return getattr(__import__(module, fromlist=(attr,)), attr)│
AttributeError: module 'powerline.segments.common.sys' has no attribute 'cpu_load_parcent'│
2018-12-11 13:04:58,507:ERROR:tmux:segment_generator:Failed to generate segmentfrom {'function': 'powe│
rline.segments.common.sys.cpu_load_parcent', 'before': 'CPU:', 'width': 7, 'align': 'c', 'priority': 5│
0}: Failed to obtain segment function│
Traceback (most recent call last):│
File "/home/user/.local/lib/python3.6/site-packages/powerline/segment.py", line 328, in get │
contents, _contents_func, module, function_name, name = get_segment_info(data, segment) │
File "/home/user/.local/lib/python3.6/site-packages/powerline/segment.py", line 69, in get_functio│
n│
raise ImportError('Failed to obtain segment function')│
ImportError: Failed to obtain segment function
/home/user/.tmux.conf:22: unknown command: alias
Возможно, используется линия электропередачи.
Это мой .tmux.conf.
#powerline
run-shell "powerline-daemon -q"
source ".local/lib/python3.6/site-packages/powerline/bindings/tmux/powerline.conf"
#auto command
send-keys "cd ~/Blog && docker-compose down && docker-compose up -d && clear" C-m
splitw -h
selectp -t 1
send-keys "cd ~/Blog && git pull && git fetch --all && clear" C-m
splitw -v
selectp -t 2
send-keys "cd ~/Blog && clear" C-m
selectp -t 0
и это конфигурация моего tmux.
Возможно, этот параметр вызывает ошибку.
{
"segments": {
"right": [
{
"function": "powerline.segments.common.sys.uptime",
"priority": 50
},
{
"function": "powerline.segments.common.sys.cpu_load_parcent",
"before": "CPU:",
"width": 7,
"align": "c",
"priority": 50
},
{
"function": "powerline.segments.common.sys.system_load",
"before": "System:",
"width": 3,
"align": "c",
"priority": 50
},
{
"function": "powerline.segments.common.time.date"
},
{
"function": "powerline.segments.common.bat.battery",
"before": "Battery:",
"width": 16,
"align": "c"
},
{
"function": "powerline.segments.common.time.date",
"name": "time",
"args": {
"format": "%H:%M",
"istime": true
}
},
{
"function": "powerline.segments.common.net.hostname"
}
]
}
}
Пожалуйста, помогите мне.