Skip to content

Commit

Permalink
Add tmux colors solarized
Browse files Browse the repository at this point in the history
  • Loading branch information
int32bit committed Sep 26, 2016
1 parent 5dd0f3f commit 9bad2e5
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Expand Up @@ -68,6 +68,8 @@ UserKnownHostsFile /dev/null

## 2 tmux

![tmux](img/tmux.jpg)

### 2.1 快速配置

运行`tmux/setup.sh`脚本即可,不需要其它额外配置。
Expand Down Expand Up @@ -112,6 +114,12 @@ bind-key / command-prompt "split-window -h 'exec man %%'"

只需要输入`prefix+/`,然后输入需要查询的命令即可。

## 2.3 主题方案

选用的主题是Solarized,参考[Making tmux Pretty and Usable - A Guide to Customizing your tmux.conf](http://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/),为了和iterm以及vim集成,手动调节了部分颜色,包括panel boder颜色以及windows菜单颜色等。

status bar设置在顶部,为了避免和vim status重叠。

## 3 vim

注意:当加载太多插件时,vim启动会很慢,并且vim 8以前插件加载都是同步的,必须等待插件执行完才能继续下一个任务. 因此我把自动生成tags功能默认是关闭的, 避免每打开一个文件都要卡顿几秒。可以使用[neovim](https://neovim.io/)替代vim。
Expand Down Expand Up @@ -577,7 +585,14 @@ EOF

待补充。

## 7 非常棒的命令行工具(装机必备神器)
## 7 iterm

颜色方案基于内置Solarized Dark主题调节,最终效果如图:

![iterm](img/iterm.jpg)


## 附 非常棒的命令行工具(装机必备神器)

### [ag](https://github.com/ggreer/the_silver_searcher)

Expand Down
Binary file added img/iterm.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/tmux.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 50 additions & 0 deletions tmux/tmux.conf
Expand Up @@ -20,3 +20,53 @@ bind r source-file ~/.tmux.conf \; display "Reloaded!"
bind-key / command-prompt "split-window -h 'exec man %%'"

set-option -g allow-rename off # prevent system from renaming our window


set -g default-terminal "screen-256color"

set -g status-justify left
set -g status-interval 1
set -g status-position top
set -g status-bg colour234
set -g status-fg colour137
set -g status-attr dim
set -g status-left ''
# status右边显示当前时间
set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
set -g status-right-length 50
set -g status-left-length 20

# 设置windows菜单颜色 Prefix+w
setw -g clock-mode-colour colour135
setw -g mode-attr bold
setw -g mode-fg colour15
setw -g mode-bg colour238

# pane border
set -g pane-border-bg colour235
set -g pane-border-fg colour238
set -g pane-active-border-bg colour236
set -g pane-active-border-fg colour15


# 设置status面板当前windows颜色
setw -g window-status-current-fg colour81
setw -g window-status-current-bg colour238
setw -g window-status-current-attr bold
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '

# 设置status非活跃windows颜色
setw -g window-status-fg colour138
setw -g window-status-bg colour235
setw -g window-status-attr none
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '

setw -g window-status-bell-attr bold
setw -g window-status-bell-fg colour255
setw -g window-status-bell-bg colour1

# 设置message字体颜色
set -g message-attr bold
#set -g message-fg colour232
set -g message-fg colour15
set -g message-bg colour236

0 comments on commit 9bad2e5

Please sign in to comment.