Compare commits

...

10 commits

Author SHA1 Message Date
xinyz 939b829828 add wterm settings.json 2022-08-15 15:52:53 +08:00
xinyz 308e46e575 修改zsh配置 2022-07-23 10:05:36 +08:00
xinyz 09eb18e3db 添加clash配置文件 2021-12-27 17:33:09 +08:00
xinyz 7fd7bc261b 修改zsh提示符,支持本地zshenv 2021-12-27 17:31:59 +08:00
xinyz e5c6ea85bb 添加v2ray及vim/coc配置 2021-12-14 17:33:43 +08:00
xinyz 6528a72bb9 添加tmux 3.x配置 2021-12-13 09:13:15 +00:00
xinyz a28a19d955 添加tmux 1.x配置 2021-12-13 09:10:57 +00:00
xinyz a4600df465 添加vim简单模式配置,无插件 2021-12-13 12:26:44 +08:00
xinyz 103e9e951c 配置zsh 2021-12-02 16:46:46 +08:00
xinyz 81661d222b 添加windows terminal使用msys2的配置文件 2021-11-29 21:57:41 +08:00
14 changed files with 1020 additions and 35 deletions

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "zsh/plugins/autosuggestions"]
path = zsh/plugins/autosuggestions
url = git@github.com:zsh-users/zsh-autosuggestions.git

7
aliases/aliases Normal file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
# +----+
# | ls |
# +----+
alias ls='ls --color=auto'

View file

@ -1,35 +1,40 @@
# generated by Git for Windows # generated by Git for Windows
test -f ~/.profile && . ~/.profile test -f ~/.profile && . ~/.profile
test -f ~/.bashrc && . ~/.bashrc test -f ~/.bashrc && . ~/.bashrc
PS1='\w $ '
export LANG=zh_CN.UTF-8 export DOTFILES=$HOME/dotfiles
export _JAVA_OPTIONS="-Dfile.encoding=UTF-8" test -f $DOTFILES/aliases/aliases && . $DOTFILES/aliases/aliases
export JAVA_OPTS="-Dfile.encoding=UTF-8"
export JAVA_TOOLS_OPTIONS="-Dfile.encoding=UTF-8" PS1='\w $ '
export MAVEN_OPTS="-Dfile.encoding=UTF-8" export LANG=zh_CN.UTF-8
export VAGRANT_PREFER_SYSTEM_BIN=1 export _JAVA_OPTIONS="-Dfile.encoding=UTF-8"
export JAVA_OPTS="-Dfile.encoding=UTF-8"
env=/tmp/agent.env export JAVA_TOOLS_OPTIONS="-Dfile.encoding=UTF-8"
export MAVEN_OPTS="-Dfile.encoding=UTF-8"
agent_load_env () { test -f "$env" && . "$env" >| /dev/null ; }
export VAGRANT_PREFER_SYSTEM_BIN=1
agent_start () {
(umask 077; ssh-agent >| "$env") env=/tmp/agent.env
. "$env" >| /dev/null ; }
agent_load_env () { test -f "$env" && . "$env" >| /dev/null ; }
agent_load_env
agent_start () {
# agent_run_state: 0=agent running w/ key; 1=agent w/o key; 2= agent not running (umask 077; ssh-agent >| "$env")
agent_run_state=$(ssh-add -l >| /dev/null 2>&1; echo $?) . "$env" >| /dev/null ; }
if [ ! "$SSH_AUTH_SOCK" ] || [ $agent_run_state = 2 ]; then agent_load_env
agent_start
ssh-add # agent_run_state: 0=agent running w/ key; 1=agent w/o key; 2= agent not running
elif [ "$SSH_AUTH_SOCK" ] && [ $agent_run_state = 1 ]; then agent_run_state=$(ssh-add -l >| /dev/null 2>&1; echo $?)
ssh-add
fi if [ ! "$SSH_AUTH_SOCK" ] || [ $agent_run_state = 2 ]; then
agent_start
unset env ssh-add
elif [ "$SSH_AUTH_SOCK" ] && [ $agent_run_state = 1 ]; then
ssh-add
fi
unset env

77
clash/config.yaml Normal file
View file

@ -0,0 +1,77 @@
allow-lan: false
bind-address: 127.0.0.1
dns:
ake-ip-range: 198.18.0.1/16
default-nameserver:
- 114.114.114.114
- 119.29.29.29
- 223.5.5.5
enable: false
enhanced-mode: redir-host
fallback-filter:
geoip: true
ipcidr:
- 240.0.0.0/4
ipv6: false
nameserver:
- https://223.5.5.5/dns-query
- https://223.6.6.6/dns-query
- https://doh.pub/dns-query
use-hosts: true
external-controller: 127.0.0.1:19090
log-level: info
mixed-port: 9981
mode: rule
proxy-providers:
ghelper:
type: http
path: ./ghelper.yaml
url: https://ghelper.me/clash/77a5e5b291625bf114277272ba434030
interval: 3600
health-check:
enable: true
url: http://www.gstatic.com/generate_204
interval: 300
proxy-groups:
- name: Ghelper
type: select
use:
- ghelper
rules:
- DOMAIN-KEYWORD,google,Ghelper
- DOMAIN-KEYWORD,youtube,Ghelper
- DOMAIN-SUFFIX,ggpht.com,Ghelper
- DOMAIN-SUFFIX,gmail.com,Ghelper
- DOMAIN-SUFFIX,gvt2.com,Ghelper
- DOMAIN-SUFFIX,gvt3.com,Ghelper
- DOMAIN-SUFFIX,chrome.com,Ghelper
- DOMAIN-SUFFIX,wikipedia.org,Ghelper
- DOMAIN-SUFFIX,wikimedia.org,Ghelper
- DOMAIN-SUFFIX,appspot.com,Ghelper
- DOMAIN-SUFFIX,android.com,Ghelper
- DOMAIN-SUFFIX,github.com,Ghelper
- DOMAIN-SUFFIX,gitbook.com,Ghelper
- DOMAIN-SUFFIX,kaggle.com,Ghelper
- DOMAIN-SUFFIX,arxiv.org,Ghelper
- DOMAIN-SUFFIX,wiktionary.org,Ghelper
- DOMAIN-SUFFIX,blogger.com,Ghelper
- DOMAIN-SUFFIX,youtu.be,Ghelper
- DOMAIN-SUFFIX,ytimg.com,Ghelper
- DOMAIN-SUFFIX,youtube.com,Ghelper
- DOMAIN-SUFFIX,instagram.com,Ghelper
- DOMAIN-SUFFIX,twitter.com,Ghelper
- DOMAIN-SUFFIX,t.co,Ghelper
- DOMAIN-SUFFIX,facebook.com,Ghelper
- DOMAIN-SUFFIX,telegram.org,Ghelper
- IP-CIDR,192.168.0.0/16,DIRECT
- IP-CIDR,10.0.0.0/8,DIRECT
- IP-CIDR,172.16.0.0/12,DIRECT
- IP-CIDR,172.23.0.0/12,DIRECT
- IP-CIDR,127.0.0.0/8,DIRECT
- IP-CIDR,100.64.0.0/10,DIRECT
- IP-CIDR6,::1/128,DIRECT
- IP-CIDR6,fc00::/7,DIRECT
- IP-CIDR6,fe80::/10,DIRECT
- IP-CIDR6,fd00::/8,DIRECT
- GEOIP,CN,DIRECT
- MATCH,Ghelper

9
tmux/1.x/tmux.conf Normal file
View file

@ -0,0 +1,9 @@
unbind C-b
set -g prefix C-s
bind-key C-s send-prefix
setw -g mode-keys vi
unbind ]
bind P paste-buffer
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
bind-key -t vi-copy 'r' rectangle-toggle

12
tmux/3.x/tmux.conf Normal file
View file

@ -0,0 +1,12 @@
unbind C-b
set-option -g prefix C-s
set-window-option -g mode-keys vi
set-window-option -g status-keys vi
unbind ]
bind P paste-buffer
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
bind-key -T copy-mode-vi 'y' send-keys -X copy-selection
bind-key -T copy-mode-vi 'r' send-keys -X rectangle-toggle

207
v2ray/config.json Normal file
View file

@ -0,0 +1,207 @@
// Config file of V2Ray. This file follows standard JSON format, with comments support.
// Uncomment entries below to satisfy your needs. Also read our manual for more detail at
// https://www.v2fly.org/
{
"log": {
// By default, V2Ray writes access log to stdout.
// "access": "/path/to/access/log/file",
// By default, V2Ray write error log to stdout.
// "error": "/path/to/error/log/file",
// Log level, one of "debug", "info", "warning", "error", "none"
"loglevel": "warning"
},
// List of inbound proxy configurations.
"inbounds": [
{
"port": 10808,
"listen": "0.0.0.0",
"protocol": "socks",
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
]
},
"settings": {
"auth": "noauth",
"udp": true,
"ip": null,
"clients": null
},
"streamSettings": null
},
{
"port": 10809,
"listen": "127.0.0.1",
"protocol": "http",
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
]
},
"settings": {
"auth": "noauth",
"udp": true,
"ip": null,
"clients": null
},
"streamSettings": null
}
],
// List of outbound proxy configurations.
"outbounds": [
{
"tag": "proxy",
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "wtt.tcpbbr.net",
"port": 443,
"users": [
{
"id": "0bdf265c-54b5-11eb-8684-f23c913c8d2b",
"alterId": 2,
"email": "t@t.tt",
"security": "auto"
}
]
}
],
"servers": null,
"response": null
},
"streamSettings": {
"network": "tcp",
"security": "tls",
"tlsSettings": null,
"tcpSettings": null,
"kcpSettings": null,
"wsSettings": null,
"httpSettings": null,
"quicSettings": null
},
"mux": {
"enabled": true
}
},
{
"tag": "direct",
"protocol": "freedom",
"settings": {
"vnext": null,
"servers": null,
"response": null
},
"streamSettings": null,
"mux": null
},
{
"tag": "block",
"protocol": "blackhole",
"settings": {
"vnext": null,
"servers": null,
"response": {
"type": "http"
}
},
"streamSettings": null,
"mux": null
}
],
// Transport is for global transport settings. If you have multiple transports with same settings
// (say mKCP), you may put it here, instead of in each individual inbound/outbounds.
//"transport": {},
// Routing controls how traffic from inbounds are sent to outbounds.
"routing": {
"domainStrategy": "IPIfNonMatch",
"rules":[
{
"type": "field",
"outboundTag": "direct",
"domain": [
"domain:icloud.com",
"domain:icloud-content.com",
"domain:cdn-apple.com",
"geosite:cn",
"geosite:private"
]
},
{
// Blocks major ads.
"type": "field",
"domain": ["geosite:category-ads"],
"outboundTag": "block"
},
{
"type": "field",
"outboundTag": "proxy",
"domain": [
"geosite:category-anticensorship",
"geosite:category-media",
"geosite:category-vpnservices"
]
},
{
"type": "field",
"outboundTag": "proxy",
"domain": [
"geosite:category-dev"
]
},
{
"type": "field",
"outboundTag": "proxy",
"domain": [
"geosite:geolocation-!cn"
]
}
]
},
"dns": null,
// Policy controls some internal behavior of how V2Ray handles connections.
// It may be on connection level by user levels in 'levels', or global settings in 'system.'
"policy": {
// Connection policys by user levels
"levels": {
"0": {
"uplinkOnly": 0,
"downlinkOnly": 0
}
},
"system": {
"statsInboundUplink": false,
"statsInboundDownlink": false,
"statsOutboundUplink": false,
"statsOutboundDownlink": false
}
},
// Stats enables internal stats counter.
// This setting can be used together with Policy and Api.
//"stats":{},
// Api enables gRPC APIs for external programs to communicate with V2Ray instance.
//"api": {
//"tag": "api",
//"services": [
// "HandlerService",
// "LoggerService",
// "StatsService"
//]
//},
// You may add other entries to the configuration, but they will not be recognized by V2Ray.
"other": {}
}

195
vim/coc/vimrc Normal file
View file

@ -0,0 +1,195 @@
colorscheme desert
set ts=4 shiftwidth=4
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'preservim/nerdtree'
call plug#end()
" Set internal encoding of vim, not needed on neovim, since coc.nvim using some
" unicode characters in the file autoload/float.vim
set encoding=utf-8
" TextEdit might fail if hidden is not set.
set hidden
" Some servers have issues with backup files, see #649.
set nobackup
set nowritebackup
" Give more space for displaying messages.
set cmdheight=2
" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
" delays and poor user experience.
set updatetime=300
" Don't pass messages to |ins-completion-menu|.
set shortmess+=c
" Always show the signcolumn, otherwise it would shift the text each time
" diagnostics appear/become resolved.
if has("nvim-0.5.0") || has("patch-8.1.1564")
" Recently vim can merge signcolumn and number column into one
set signcolumn=number
else
set signcolumn=yes
endif
" Use tab for trigger completion with characters ahead and navigate.
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
" other plugin before putting this into your config.
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
" Use <c-space> to trigger completion.
if has('nvim')
inoremap <silent><expr> <c-space> coc#refresh()
else
inoremap <silent><expr> <c-@> coc#refresh()
endif
" Make <CR> auto-select the first completion item and notify coc.nvim to
" format on enter, <cr> could be remapped by other vim plugin
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
" Use `[g` and `]g` to navigate diagnostics
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
nmap <silent> [g <Plug>(coc-diagnostic-prev)
nmap <silent> ]g <Plug>(coc-diagnostic-next)
" GoTo code navigation.
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
" Use K to show documentation in preview window.
nnoremap <silent> K :call <SID>show_documentation()<CR>
function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
elseif (coc#rpc#ready())
call CocActionAsync('doHover')
else
execute '!' . &keywordprg . " " . expand('<cword>')
endif
endfunction
" Highlight the symbol and its references when holding the cursor.
autocmd CursorHold * silent call CocActionAsync('highlight')
" Symbol renaming.
nmap <leader>rn <Plug>(coc-rename)
" Formatting selected code.
xmap <leader>f <Plug>(coc-format-selected)
nmap <leader>f <Plug>(coc-format-selected)
augroup mygroup
autocmd!
" Setup formatexpr specified filetype(s).
autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
" Update signature help on jump placeholder.
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
augroup end
" Applying codeAction to the selected region.
" Example: `<leader>aap` for current paragraph
xmap <leader>a <Plug>(coc-codeaction-selected)
nmap <leader>a <Plug>(coc-codeaction-selected)
" Remap keys for applying codeAction to the current buffer.
nmap <leader>ac <Plug>(coc-codeaction)
" Apply AutoFix to problem on the current line.
nmap <leader>qf <Plug>(coc-fix-current)
" Map function and class text objects
" NOTE: Requires 'textDocument.documentSymbol' support from the language server.
xmap if <Plug>(coc-funcobj-i)
omap if <Plug>(coc-funcobj-i)
xmap af <Plug>(coc-funcobj-a)
omap af <Plug>(coc-funcobj-a)
xmap ic <Plug>(coc-classobj-i)
omap ic <Plug>(coc-classobj-i)
xmap ac <Plug>(coc-classobj-a)
omap ac <Plug>(coc-classobj-a)
" Remap <C-f> and <C-b> for scroll float windows/popups.
if has('nvim-0.4.0') || has('patch-8.2.0750')
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
endif
" Use CTRL-S for selections ranges.
" Requires 'textDocument/selectionRange' support of language server.
nmap <silent> <C-s> <Plug>(coc-range-select)
xmap <silent> <C-s> <Plug>(coc-range-select)
" Add `:Format` command to format current buffer.
command! -nargs=0 Format :call CocAction('format')
" Add `:Fold` command to fold current buffer.
command! -nargs=? Fold :call CocAction('fold', <f-args>)
" Add `:OR` command for organize imports of the current buffer.
command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport')
" Add (Neo)Vim's native statusline support.
" NOTE: Please see `:h coc-status` for integrations with external plugins that
" provide custom statusline: lightline.vim, vim-airline.
set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}
" Mappings for CoCList
" Show all diagnostics.
nnoremap <silent><nowait> <space>a :<C-u>CocList diagnostics<cr>
" Manage extensions.
nnoremap <silent><nowait> <space>e :<C-u>CocList extensions<cr>
" Show commands.
nnoremap <silent><nowait> <space>c :<C-u>CocList commands<cr>
" Find symbol of current document.
nnoremap <silent><nowait> <space>o :<C-u>CocList outline<cr>
" Search workspace symbols.
nnoremap <silent><nowait> <space>s :<C-u>CocList -I symbols<cr>
" Do default action for next item.
nnoremap <silent><nowait> <space>j :<C-u>CocNext<CR>
" Do default action for previous item.
nnoremap <silent><nowait> <space>k :<C-u>CocPrev<CR>
" Resume latest coc list.
nnoremap <silent><nowait> <space>p :<C-u>CocListResume<CR>
autocmd vimenter * NERDTree "自动开启Nerdtree
"let g:NERDTreeWinSize = 25 "设定 NERDTree 视窗大小
"开启/关闭nerdtree快捷键
map <F3> :NERDTreeToggle<CR>
"let NERDTreeShowBookmarks=1 " 开启Nerdtree时自动显示Bookmarks
"打开vim时如果没有文件自动打开NERDTree
autocmd vimenter * if !argc()|NERDTree|endif
"当NERDTree为剩下的唯一窗口时自动关闭
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
"设置树的显示图标
let g:NERDTreeDirArrowExpandable = '▸'
let g:NERDTreeDirArrowCollapsible = '▾'
let NERDTreeIgnore = ['\.pyc$'] " 过滤所有.pyc文件不显示
"let g:NERDTreeShowLineNumbers=1 " 是否显示行号
let g:NERDTreeHidden=0 "不显示隐藏文件
"Making it prettier
let NERDTreeMinimalUI = 1
let NERDTreeDirArrows = 1

45
vim/simple/vimrc Executable file
View file

@ -0,0 +1,45 @@
function! Config_setEnv() abort
if exists('g:env')
return
endif
if has('win64') || has('win32') || has('win16')
let g:env = 'WINDOWS'
else
let g:env = toupper(substitute(system('uname'), '\n', '', ''))
endif
endfunction
color desert
syntax on
set nu
set tabstop=4
set shiftwidth=4
set cindent
set backspace=indent,eol,start
set incsearch
set hlsearch
set fileencodings=utf-8,gbk
set nobackup
filetype on
filetype plugin on
filetype indent on
call Config_setEnv()
if (g:env =~# 'WINDOWS')
set dir=$userprofile\\AppData\\Local\\Temp
set bdir=$userprofile\\AppData\\Local\\Temp
else
set dir=/tmp
set bdir=/tmp
endif
if (g:env =~# 'WINDOWS')
au GUIEnter * simalt ~x
else
au GUIEnter * call MaximizeWindow()
endif
function! MaximizeWindow()
silent !wmctrl -r :ACTIVE: -b add,maximized_vert,maximized_horz
endfunction

12
wterm/readme.md Normal file
View file

@ -0,0 +1,12 @@
windows terminal中使用msys2配置文件复制到windows terminal的config.json文件profiles->lists中。
```
{
"commandline": "C:/msys64/usr/bin/env.exe MSYS='enable_pcon winsymlinks:nativestrict' CHERE_INVOKING=1 MSYS2_PATH_TYPE=inherit MSYSTEM=MSYS /bin/bash --login",
"cursorShape": "filledBox",
"guid": "{2ece5bfe-50ed-5f3a-ab87-5cd4baafed2b}",
"hidden": false,
"icon": "C:/msys64/msys2.ico",
"name": "MSYS2 MSYS",
"startingDirectory": "%USERPROFILE%"
}
```

295
wterm/settings.json Executable file
View file

@ -0,0 +1,295 @@
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command": "paste",
"keys": "ctrl+shift+v"
},
{
"command":
{
"action": "copy",
"singleLine": false
},
"keys": "ctrl+shift+c"
},
{
"command": "find",
"keys": "alt+shift+f"
},
{
"command":
{
"action": "splitPane",
"split": "auto",
"splitMode": "duplicate"
},
"keys": "alt+shift+d"
}
],
"copyFormatting": "none",
"copyOnSelect": false,
"defaultProfile": "{2ece5bfe-50ed-5f3a-ab87-5cd4baafed2b}",
"launchMode": "maximized",
"profiles":
{
"defaults": {},
"list":
[
{
"bellStyle": "window",
"cursorShape": "filledBox",
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"hidden": false,
"name": "Windows PowerShell"
},
{
"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"hidden": false,
"name": "\u547d\u4ee4\u63d0\u793a\u7b26"
},
{
"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
"hidden": false,
"name": "Azure Cloud Shell",
"source": "Windows.Terminal.Azure"
},
{
"cursorShape": "filledBox",
"guid": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}",
"hidden": false,
"name": "Ubuntu-20.04",
"source": "Windows.Terminal.Wsl"
},
{
"cursorShape": "filledBox",
"guid": "{a5a97cb8-8961-5535-816d-772efe0c6a3f}",
"hidden": false,
"name": "Arch",
"source": "Windows.Terminal.Wsl"
},
{
"commandline": "C:/msys64/usr/bin/env.exe MSYS='enable_pcon winsymlinks:nativestrict' CHERE_INVOKING=1 MSYS2_PATH_TYPE=inherit MSYSTEM=MSYS /bin/zsh --login",
"cursorShape": "filledBox",
"guid": "{2ece5bfe-50ed-5f3a-ab87-5cd4baafed2b}",
"hidden": false,
"icon": "C:/msys64/msys2.ico",
"name": "MSYS2 MSYS",
"startingDirectory": "%USERPROFILE%"
}
]
},
"schemes":
[
{
"background": "#0C0C0C",
"black": "#0C0C0C",
"blue": "#0037DA",
"brightBlack": "#767676",
"brightBlue": "#3B78FF",
"brightCyan": "#61D6D6",
"brightGreen": "#16C60C",
"brightPurple": "#B4009E",
"brightRed": "#E74856",
"brightWhite": "#F2F2F2",
"brightYellow": "#F9F1A5",
"cursorColor": "#FFFFFF",
"cyan": "#3A96DD",
"foreground": "#CCCCCC",
"green": "#13A10E",
"name": "Campbell",
"purple": "#881798",
"red": "#C50F1F",
"selectionBackground": "#FFFFFF",
"white": "#CCCCCC",
"yellow": "#C19C00"
},
{
"background": "#012456",
"black": "#0C0C0C",
"blue": "#0037DA",
"brightBlack": "#767676",
"brightBlue": "#3B78FF",
"brightCyan": "#61D6D6",
"brightGreen": "#16C60C",
"brightPurple": "#B4009E",
"brightRed": "#E74856",
"brightWhite": "#F2F2F2",
"brightYellow": "#F9F1A5",
"cursorColor": "#FFFFFF",
"cyan": "#3A96DD",
"foreground": "#CCCCCC",
"green": "#13A10E",
"name": "Campbell Powershell",
"purple": "#881798",
"red": "#C50F1F",
"selectionBackground": "#FFFFFF",
"white": "#CCCCCC",
"yellow": "#C19C00"
},
{
"background": "#282C34",
"black": "#282C34",
"blue": "#61AFEF",
"brightBlack": "#5A6374",
"brightBlue": "#61AFEF",
"brightCyan": "#56B6C2",
"brightGreen": "#98C379",
"brightPurple": "#C678DD",
"brightRed": "#E06C75",
"brightWhite": "#DCDFE4",
"brightYellow": "#E5C07B",
"cursorColor": "#FFFFFF",
"cyan": "#56B6C2",
"foreground": "#DCDFE4",
"green": "#98C379",
"name": "One Half Dark",
"purple": "#C678DD",
"red": "#E06C75",
"selectionBackground": "#FFFFFF",
"white": "#DCDFE4",
"yellow": "#E5C07B"
},
{
"background": "#FAFAFA",
"black": "#383A42",
"blue": "#0184BC",
"brightBlack": "#4F525D",
"brightBlue": "#61AFEF",
"brightCyan": "#56B5C1",
"brightGreen": "#98C379",
"brightPurple": "#C577DD",
"brightRed": "#DF6C75",
"brightWhite": "#FFFFFF",
"brightYellow": "#E4C07A",
"cursorColor": "#4F525D",
"cyan": "#0997B3",
"foreground": "#383A42",
"green": "#50A14F",
"name": "One Half Light",
"purple": "#A626A4",
"red": "#E45649",
"selectionBackground": "#FFFFFF",
"white": "#FAFAFA",
"yellow": "#C18301"
},
{
"background": "#002B36",
"black": "#002B36",
"blue": "#268BD2",
"brightBlack": "#073642",
"brightBlue": "#839496",
"brightCyan": "#93A1A1",
"brightGreen": "#586E75",
"brightPurple": "#6C71C4",
"brightRed": "#CB4B16",
"brightWhite": "#FDF6E3",
"brightYellow": "#657B83",
"cursorColor": "#FFFFFF",
"cyan": "#2AA198",
"foreground": "#839496",
"green": "#859900",
"name": "Solarized Dark",
"purple": "#D33682",
"red": "#DC322F",
"selectionBackground": "#FFFFFF",
"white": "#EEE8D5",
"yellow": "#B58900"
},
{
"background": "#FDF6E3",
"black": "#002B36",
"blue": "#268BD2",
"brightBlack": "#073642",
"brightBlue": "#839496",
"brightCyan": "#93A1A1",
"brightGreen": "#586E75",
"brightPurple": "#6C71C4",
"brightRed": "#CB4B16",
"brightWhite": "#FDF6E3",
"brightYellow": "#657B83",
"cursorColor": "#002B36",
"cyan": "#2AA198",
"foreground": "#657B83",
"green": "#859900",
"name": "Solarized Light",
"purple": "#D33682",
"red": "#DC322F",
"selectionBackground": "#FFFFFF",
"white": "#EEE8D5",
"yellow": "#B58900"
},
{
"background": "#000000",
"black": "#000000",
"blue": "#3465A4",
"brightBlack": "#555753",
"brightBlue": "#729FCF",
"brightCyan": "#34E2E2",
"brightGreen": "#8AE234",
"brightPurple": "#AD7FA8",
"brightRed": "#EF2929",
"brightWhite": "#EEEEEC",
"brightYellow": "#FCE94F",
"cursorColor": "#FFFFFF",
"cyan": "#06989A",
"foreground": "#D3D7CF",
"green": "#4E9A06",
"name": "Tango Dark",
"purple": "#75507B",
"red": "#CC0000",
"selectionBackground": "#FFFFFF",
"white": "#D3D7CF",
"yellow": "#C4A000"
},
{
"background": "#FFFFFF",
"black": "#000000",
"blue": "#3465A4",
"brightBlack": "#555753",
"brightBlue": "#729FCF",
"brightCyan": "#34E2E2",
"brightGreen": "#8AE234",
"brightPurple": "#AD7FA8",
"brightRed": "#EF2929",
"brightWhite": "#EEEEEC",
"brightYellow": "#FCE94F",
"cursorColor": "#000000",
"cyan": "#06989A",
"foreground": "#555753",
"green": "#4E9A06",
"name": "Tango Light",
"purple": "#75507B",
"red": "#CC0000",
"selectionBackground": "#FFFFFF",
"white": "#D3D7CF",
"yellow": "#C4A000"
},
{
"background": "#000000",
"black": "#000000",
"blue": "#000080",
"brightBlack": "#808080",
"brightBlue": "#0000FF",
"brightCyan": "#00FFFF",
"brightGreen": "#00FF00",
"brightPurple": "#FF00FF",
"brightRed": "#FF0000",
"brightWhite": "#FFFFFF",
"brightYellow": "#FFFF00",
"cursorColor": "#FFFFFF",
"cyan": "#008080",
"foreground": "#C0C0C0",
"green": "#008000",
"name": "Vintage",
"purple": "#800080",
"red": "#800000",
"selectionBackground": "#FFFFFF",
"white": "#C0C0C0",
"yellow": "#808000"
}
],
"windowingBehavior": "useAnyExisting"
}

@ -0,0 +1 @@
Subproject commit a411ef3e0992d4839f0732ebeb9823024afaaaa8

25
zsh/zshenv Normal file
View file

@ -0,0 +1,25 @@
#!/usr/bin/env zsh
###############################
# EXPORT ENVIRONMENT VARIABLE #
###############################
export TERM='rxvt-256color'
export DOTFILES="$HOME/dotfiles"
# XDG
export XDG_CONFIG_HOME=$HOME/.config
export XDG_DATA_HOME=$XDG_CONFIG_HOME/local/share
export XDG_CACHE_HOME=$XDG_CONFIG_HOME/cache
# editor
export EDITOR="vim"
export VISUAL="vim"
# zsh
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
export HISTFILE="$ZDOTDIR/.zhistory" # History filepath
export HISTSIZE=10000 # Maximum events for internal history
export SAVEHIST=10000 # Maximum events in history file
test -f $ZDOTDIR/zshenv.local && . $ZDOTDIR/zshenv.local

92
zsh/zshrc Executable file
View file

@ -0,0 +1,92 @@
setopt EXTENDED_HISTORY
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_FIND_NO_DUPS
setopt HIST_SAVE_NO_DUPS
setopt HIST_BEEP
autoload -Uz compinit
compinit
export LANG=zh_CN.UTF-8
export _JAVA_OPTIONS="-Dfile.encoding=UTF-8"
export JAVA_OPTS="-Dfile.encoding=UTF-8"
export JAVA_TOOLS_OPTIONS="-Dfile.encoding=UTF-8"
export MAVEN_OPTS="-Dfile.encoding=UTF-8"
export VAGRANT_PREFER_SYSTEM_BIN=1
# +---------+
# | ALIASES |
# +---------+
source $DOTFILES/aliases/aliases
# +-----------+
# | SSH_AGENT |
# +-----------+
env=/tmp/agent.env
agent_load_env () { test -f "$env" && . "$env" >| /dev/null ; }
agent_start () {
(umask 077; ssh-agent >| "$env")
. "$env" >| /dev/null ; }
agent_load_env
# agent_run_state: 0=agent running w/ key; 1=agent w/o key; 2= agent not running
agent_run_state=$(ssh-add -l >| /dev/null 2>&1; echo $?)
if [ ! "$SSH_AUTH_SOCK" ] || [ $agent_run_state = 2 ]; then
agent_start
ssh-add
elif [ "$SSH_AUTH_SOCK" ] && [ $agent_run_state = 1 ]; then
ssh-add
fi
unset env
# +-----+
# | VIM |
# +-----+
# Vi mode
bindkey -v
export KEYTIMEOUT=1
# +--------+
# | PROMPT |
# +--------+
export PROMPT='%F{blue}(%n@%m)%f %~ %(!.#.$) '
# +-----------------+
# | auto-suggestion |
# +-----------------+
source $DOTFILES/zsh/plugins/autosuggestions/zsh-autosuggestions.zsh
# Better searching in command mode
bindkey -M vicmd '?' history-incremental-search-backward
bindkey -M vicmd '/' history-incremental-search-forward
# Beginning search with arrow keys
bindkey "^[OA" history-beginning-search-backward
bindkey "^[OB" history-beginning-search-forward
bindkey "^[[A" history-beginning-search-backward
bindkey "^[[B" history-beginning-search-forward
bindkey -M vicmd "k" history-beginning-search-backward
bindkey -M vicmd "j" history-beginning-search-forward
# Make Vi mode transitions faster (KEYTIMEOUT is in hundredths of a second)
export KEYTIMEOUT=1
bindkey "^R" history-incremental-search-backward
bindkey "^S" history-incremental-search-forward
test -f $ZDOTDIR/zshrc.local && . $ZDOTDIR/zshrc.local