标签:WSL

  • 升级 Windown 10 内置 Ubuntu 子系统

    17-07-15 08:30 21147 0 技术
  • Windows 10 Linux 子系统安装 php 环境

    16-10-12 20:46 43799 0 技术

    准备必要的源

    sudo add-apt-repository ppa:ondrej/php
    sudo add-apt-repository ppa:jonathonf/vim
    sudo apt update
    sudo apt upgrade
    

    安装必备软件

    apt-get install zsh
    
    apt-get install php5 php5-mysql php5-gd php5-curl php5-cli mysql-server apache2 silversearcher-ag make
    

    安装 vim

    sudo apt install vim
    
    // 卸载方法
    apt remove vim
    add-apt-repository --remove ppa:jonathonf/vim
    

    安装 tmux

    apt-get install libevent-dev
    apt-get install ncurses-dev
    wget https://github.com/tmux/tmux/releases/download/2.3/tmux-2.3.tar.gz
    tar xzvf tmux-2.3.tar.gz
    ./configure && make
    mv tmux /usr/bin/
    

    修改 ~/.minttyrc

    Locale=zh_CN
    Charset=UTF-8
    Font=DejaVu Sans Mono for Powerline
    Term=xterm-256color
    RightClickAction=paste
    CursorType=block
    ClicksTargetApp=no
    BoldAsFont=no
    BoldAsColour=no
    CopyAsRTF=no
    Scrollbar=none
    
    ForegroundColour=131,148,150
    BackgroundColour=0,43,54
    CursorColour=220,50,47
    
    Black=7,54,66
    BoldBlack=0,43,54
    Red=220,50,47
    BoldRed=203,75,22
    Green=133,153,0
    BoldGreen=88,110,117
    Yellow=181,137,0
    BoldYellow=101,123,131
    Blue=38,139,210
    BoldBlue=131,148,150
    Magenta=211,54,130
    BoldMagenta=108,113,196
    Cyan=42,161,152
    BoldCyan=147,161,161
    White=238,232,213
    BoldWhite=253,246,227
    FontWeight=400
    

    .tmux.conf

    # 设置默认shell和terminal
    set -g default-shell /usr/bin/zsh
    set -g default-terminal "screen-256color"
    
    # 支持自动更新标题
    setw -g automatic-rename on
    set -g set-titles on
    set -g set-titles-string 'Tmux - #S:#W'
    
    # 滚动时使用vi模式
    setw -g mode-keys vi
    
    # 设置窗口和面板索引
    set -g base-index 1
    set -g pane-base-index 1
    
    # 打开鼠标模式
    set -g mouse on
    
    # 选择 pane
    bind-key k select-pane -U
    bind-key j select-pane -D
    bind-key h select-pane -L
    bind-key l select-pane -R
    
    # 扩展 pane
    bind H resize-pane -L 10
    bind L resize-pane -R 10
    bind K resize-pane -U 5
    bind J resize-pane -D 5
    
    # 复制模式
    bind-key -t vi-copy 'v' begin-selection
    bind-key -t vi-copy 'C-v' rectangle-toggle
    bind-key -t vi-copy 'y' copy-selection
    
    # 状态条定制
    set -g status-left-length 30
    set -g status-right-length 100
    set -g status-fg white
    set -g status-bg colour234
    set -g window-status-activity-attr bold
    set -g pane-border-fg colour245
    set -g pane-active-border-fg colour39
    set -g message-fg colour16
    set -g message-bg colour221
    set -g message-attr bold
    set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour238,nobold]#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,nobold]'
    set -g window-status-format "#[fg=colour234,bg=colour238]#[fg=colour245,bg=colour238,bold] #I  #W#F #[fg=colour238,bg=colour234,nobold]"
    set -g window-status-current-format "#[fg=colour234,bg=colour39]#[fg=colour25,bg=colour39,noreverse,bold] #I  #W#F #[fg=colour39,bg=colour234,nobold]"
    set -g status-right '#T %F %A %H:%M '
    set -g window-status-separator ''
    

文章归档

文章日历

2024 年 03 月
27 28 29 30 31 01 02
03 04 05 06 07 08 09
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
01 02 03 04 05 06 07

文章标签

最新评论

友情链接