Compare commits

..

104 Commits

Author SHA1 Message Date
Gea-Suan Lin
a895613e82 fix: avoid from compinit twice. 2026-01-10 14:35:33 +08:00
Gea-Suan Lin
fac569a00e chore: rollback on hpnssh autoload for zsh. 2026-01-09 13:47:04 +08:00
Gea-Suan Lin
7f3bbd258b fix: load compinit for zsh. 2026-01-09 13:39:08 +08:00
Gea-Suan Lin
b16a15c462 feat: add auto completion for hpnssh. 2026-01-09 13:32:52 +08:00
Gea-Suan Lin
6e23c39455 fix: command -v will generate some strings to stdout. 2026-01-09 12:25:01 +08:00
Gea-Suan Lin
5152a44c2f feat: support for hpnssh. 2026-01-09 12:23:25 +08:00
Gea-Suan Lin
c14ab125e8 feat: remove unused aliases. 2026-01-05 15:57:25 +08:00
Gea-Suan Lin
62740fc09c fix: use ~ instead of hard-coded path. 2025-12-08 17:23:43 +08:00
250829f48c feat: add c0/c1 aliases. 2025-12-07 21:55:23 +08:00
Gea-Suan Lin
e4c53e50ba feat: use <Right> as accept key on llama.vim. 2025-11-13 13:58:03 +08:00
fc71f25353 feat: use line mode for sqlite by default. 2025-11-04 08:14:00 +08:00
55fd6112e1 feat: add gpt-4.1 into vim-ai. 2025-11-02 07:07:49 +08:00
Gea-Suan Lin
5f5ee008a2 fix: add missing temperature for vim-ai. 2025-11-02 07:04:19 +08:00
34f2ba05b0 feat: update default model to o4-mini, and add gpt-4.1-mini. 2025-11-02 04:07:41 +08:00
d8bcad9c4e fix: only install with python3 support. 2025-11-01 22:22:59 +08:00
4cb7ea4be5 feat: use vim-ai. 2025-11-01 22:19:53 +08:00
Gea-Suan Lin
ba35d8ad3f feat: disable Alt-{Left,Right} in tmux. 2025-10-31 15:31:22 +08:00
Gea-Suan Lin
412c9a640a feat: install .npmrc if it does not exist. 2025-10-02 12:16:58 +08:00
Gea-Suan Lin
5d7322bb44 refactor: sort. 2025-10-02 12:16:50 +08:00
Gea-Suan Lin
fdb51ee6fa feat: don't show npm fund. 2025-10-02 12:16:37 +08:00
Gea-Suan Lin
8aa021c323 chore: remove claude-code as we just use it in the shell. 2025-07-05 16:25:15 +08:00
Gea-Suan Lin
2959ff5a89 feat: support composer's binary. 2025-07-02 15:18:57 +08:00
Gea-Suan Lin
7aa25bd5f5 feat: add claude-code.nvim. 2025-06-18 09:32:21 +08:00
Gea-Suan Lin
ad3312af31 feat: add alias udac. 2025-05-10 02:57:20 +08:00
Gea-Suan Lin
a7b4cb4312 feat: add "cutl" alias support. 2025-05-06 00:18:59 +08:00
Gea-Suan Lin
8f32bb0387 fix: ttymouse was removed in neovim.
ref: https://neovim.io/doc/user/vim_diff.html#'ttymouse'
2025-04-23 01:58:13 +08:00
Gea-Suan Lin
73eb70e600 feat: use wide output for ps. 2025-04-23 01:56:36 +08:00
Gea-Suan Lin
1f5ae260bb feat: add ttymouse to disable. 2025-03-22 03:34:26 +08:00
Gea-Suan Lin
9fd0a3342f feat: remove autochdir. 2025-03-17 16:37:59 +08:00
Gea-Suan Lin
129717b4bd feat: use autochdir. 2025-03-17 16:01:33 +08:00
Gea-Suan Lin
a6f60b5ae9 feat: add Ctrl-Enter key binding for tmux. 2025-03-04 06:29:59 +08:00
Gea-Suan Lin
26a5aeca74 feat: add Ctrl-Enter to send specific string in wezterm. 2025-03-04 06:25:32 +08:00
Gea-Suan Lin
6e66bee022 feat: enable csi u key encoding. 2025-03-04 02:23:19 +08:00
Gea-Suan Lin
5bc6a329c2 feat: change llama_config's accept full key to Ctrl-Enter. 2025-03-03 07:06:21 +08:00
Gea-Suan Lin
a419c83059 feat: enlarge predict token. 2025-02-27 03:35:30 +08:00
Gea-Suan Lin
ea34eba5a2 feat: init llama_config in vim. 2025-02-27 03:34:39 +08:00
Gea-Suan Lin
a67e641e97 feat: use natural sort on tags. 2025-02-27 03:10:22 +08:00
Gea-Suan Lin
abcb39e1e4 feat: change git diff algorithm to histogram. 2025-02-26 02:22:31 +08:00
Gea-Suan Lin
a08d23f4d4 fix: syntax. 2025-02-11 01:40:51 +08:00
Gea-Suan Lin
13298de434 feat: add llama toggle. 2025-02-11 01:39:46 +08:00
Gea-Suan Lin
9f32a4a3a6 fix: "~" requires expand(). 2025-02-02 21:50:46 +08:00
Gea-Suan Lin
221dfa5cc8 feat: support preplug and post for vim. 2025-02-02 21:26:56 +08:00
Gea-Suan Lin
090e34ed00 feat: use nvim if it exists. 2025-01-27 02:49:41 +08:00
Gea-Suan Lin
84c6b724d8 fix: llama.vim requires vim >= 901. 2025-01-27 01:27:29 +08:00
Gea-Suan Lin
43db0c2363 refactor: sort. 2025-01-26 10:24:36 +08:00
Gea-Suan Lin
bfd1592573 fix: add llama.vim for pure vim. 2025-01-26 10:24:07 +08:00
Gea-Suan Lin
6ca2afb18c feat: enable llama.vim only if neovim is 0.8.0+. 2025-01-26 00:39:09 +08:00
Gea-Suan Lin
ddfa1c30d7 feat: change to use llama.vim. 2025-01-25 19:44:34 +08:00
Gea-Suan Lin
9ea4c0cf31 chore: update colorscheme. 2025-01-25 16:10:16 +08:00
Gea-Suan Lin
4f48e02654 chore: update colorscheme. 2025-01-25 13:14:45 +08:00
Gea-Suan Lin
895f0ee8c6 feat: wezterm's paste. 2025-01-07 23:46:57 +08:00
Gea-Suan Lin
8dc0427829 feat: change to darkblue color. 2024-12-25 22:07:24 +08:00
Gea-Suan Lin
aff63e4512 feat: use murphy color. 2024-12-25 22:04:08 +08:00
Gea-Suan Lin
2d58ac6583 feat: include zsh-autosuggestions. 2024-12-21 02:27:39 +08:00
Gea-Suan Lin
7d600106e1 fix: remove strange ]]. 2024-12-21 02:27:15 +08:00
Gea-Suan Lin
d467346882 feat: use » for tab in vim. 2024-11-28 03:00:26 +08:00
Gea-Suan Lin
f1d06cc0c7 feat: change to use molokai. 2024-11-01 03:39:14 +08:00
Gea-Suan Lin
ef74452d14 feat: remove unused colorscheme. 2024-11-01 03:38:59 +08:00
Gea-Suan Lin
f00481bb64 feat: use zenburn. 2024-10-31 15:43:03 +08:00
Gea-Suan Lin
f7d4b960b8 feat: use space instead of dot (⋅) in tab representation. 2024-10-31 15:33:53 +08:00
Gea-Suan Lin
6fa47d184f chore: remove ANDROID_SDK_ROOT by default. 2024-10-26 01:39:30 +08:00
Gea-Suan Lin
593b7236eb feat: support **/bin cases in $PATH. 2024-10-25 01:35:53 +08:00
Gea-Suan Lin
7f9169f53f fix: add missing desert256.vim inclusion. 2024-10-20 10:55:55 +08:00
Gea-Suan Lin
6a9c22b91e feat: use desert256 for vim. 2024-10-19 15:42:31 +08:00
Gea-Suan Lin
661ca55fbf feat: use mise if existing. 2024-10-19 11:32:06 +08:00
Gea-Suan Lin
810be727dc fix: already run "syntax sync fromstart". 2024-10-16 17:11:49 +08:00
Gea-Suan Lin
d10931e030 Use desert theme for vim. 2024-09-21 07:41:30 +08:00
Gea-Suan Lin
5d91e8a60d Update bashrc for fnm. 2024-09-15 09:04:34 +08:00
Gea-Suan Lin
d50df41efb Detect both home's fnm and homebrew's fnm. 2024-09-15 06:20:06 +08:00
Gea-Suan Lin
444a1787b2 Add vim-astro back. 2024-09-03 03:25:30 +08:00
Gea-Suan Lin
be178936b6 Remove '-' char as boundary on wezterm. 2024-09-03 02:29:25 +08:00
Gea-Suan Lin
5e14aeea7a Remove vim-astro. 2024-09-03 02:29:13 +08:00
Gea-Suan Lin
760994d951 Enable astro inside vim. 2024-09-01 10:49:26 +08:00
Gea-Suan Lin
cf9fe7fdb0 Add wuelnerdotexe/vim-astro plugin for vim. 2024-09-01 10:46:03 +08:00
Gea-Suan Lin
67434498ed Add "-" into selection_word_boundry for wezterm. 2024-08-28 16:38:47 +08:00
Gea-Suan Lin
01419e9820 Add selection_word_boundary for wezterm. 2024-08-28 16:36:07 +08:00
Gea-Suan Lin
bed48e1c74 Change vim colorschema to use wombat256mod. 2024-08-26 14:50:15 +08:00
Gea-Suan Lin
6cf89ec63b Use autocmd to keep IndentGuides* working. 2024-08-18 17:19:33 +08:00
Gea-Suan Lin
d84ca516a7 Update url for vim-indent-guides. 2024-08-18 16:48:51 +08:00
Gea-Suan Lin
d3f5e84eb6 Install tpope/vim-fugitive. 2024-08-09 02:19:57 +08:00
Gea-Suan Lin
1b6c582263 Also add into pull. 2024-06-14 14:31:21 +08:00
Gea-Suan Lin
5e92f700bf Set push.autoSetupRemote to true (Git v2.37.1). 2024-06-14 14:28:13 +08:00
Gea-Suan Lin
cf8095debd Set GH_PAGER to less. 2024-06-14 02:48:23 +08:00
Gea-Suan Lin
171b3cecb5 Set default push behavior to current. 2024-06-08 23:49:33 +08:00
Gea-Suan Lin
fc55de2540 Set typescriptreact to sw=2. 2024-05-27 09:20:01 +08:00
Gea-Suan Lin
3115be973f Remove tsx assignment. 2024-05-27 04:49:57 +08:00
Gea-Suan Lin
ea06566ca6 Lazy run copilot.vim. 2024-05-14 23:58:42 +08:00
Gea-Suan Lin
9aedb97757 Remove copilot tag pinning. 2024-05-14 03:51:18 +08:00
Gea-Suan Lin
985a2e7d4e Add css to sw=2. 2024-05-09 14:57:13 +08:00
Gea-Suan Lin
3bcea01f7c Add *.tsx as typescript. 2024-05-06 15:11:35 +08:00
Gea-Suan Lin
561828d135 Add --all oh "git pull" to fetch all branches. 2024-04-24 05:26:32 +08:00
Gea-Suan Lin
6f20e8f109 Disable ignoreRevsFile. 2024-04-18 07:53:48 +08:00
Gea-Suan Lin
5b015f4ba4 Use tab_index instead of tab_id on wezterm. 2024-03-24 04:57:03 +08:00
Gea-Suan Lin
1276b6b877 Add line_height setting. 2024-03-21 23:13:54 +08:00
Gea-Suan Lin
89df1b9089 Update fonts. 2024-03-21 23:13:37 +08:00
Gea-Suan Lin
363fab82e3 Use "Tab X" as title. 2024-03-21 23:13:12 +08:00
Gea-Suan Lin
de6780f87b Use middle click to open links. 2024-03-21 23:12:41 +08:00
Gea-Suan Lin
616b3d8dcb Just show id in tab. 2024-03-13 17:53:22 +08:00
Gea-Suan Lin
0662954103 Add version to WezTerm's window title. 2024-03-13 15:56:39 +08:00
Gea-Suan Lin
216d364d0b Just use 'WezTerm' as title. 2024-03-13 15:55:34 +08:00
Gea-Suan Lin
6b1e0710f3 Change link clicking behavior. 2024-03-13 01:14:32 +08:00
Gea-Suan Lin
f0448356e8 Enable mouse binding as we need copy selection. 2024-03-12 17:58:47 +08:00
Gea-Suan Lin
bb24154747 Update .wezterm.lua. 2024-03-12 02:28:59 +08:00
Gea-Suan Lin
35bcc04cb9 Add .wezterm.lua. 2024-03-12 01:35:56 +08:00
12 changed files with 203 additions and 94 deletions

30
.bashrc
View File

@@ -8,12 +8,12 @@ alias ccat="pygmentize -g"
alias cd..="cd .."
alias cd...="cd ../.."
alias cls="clear"
alias cutl="cut -c -\$(tput cols)"
alias d="dir"
alias dir="ls -l"
alias f="finger"
alias g="grep --color=auto"
alias gph="git push -v --follow-tags"
alias gpl="git pull -v --autostash --rebase --recurse-submodules"
alias gpl="git pull -v --all --autostash --rebase --recurse-submodules"
alias l="last"
alias ll="ls -l"
alias lo="logout"
@@ -22,12 +22,19 @@ alias md="mkdir"
alias more="most"
alias myip="curl -s https://httpbin.org/ip | jq .origin"
alias o="xdg-open"
alias psa="ps awx"
alias psm="ps -O rss,vsz -U $USER"
alias psa="ps auwwx"
alias psm="ps -O rss,vsz -U $USER -ww"
alias psr="psu root"
alias psu="ps -U"
alias psu="ps -ww -U"
alias s="screen"
alias ssh="ssh -C -e none"
alias udac="sudo apt update; sudo apt dist-upgrade -y; sudo apt autoremove -y; sudo apt clean"
#
if command -v hpnssh > /dev/null; then
alias ssh="hpnssh -C -e none"
complete -F _ssh hpnssh
else
alias ssh="ssh -C -e none"
fi
#
if [[ -x /opt/local/bin/gtelnet ]]; then
alias "t=gtelnet"
@@ -42,8 +49,8 @@ else
export EDITOR="vim"
fi
#
export ANDROID_SDK_ROOT=/usr/lib/android-sdk
export BLOCKSIZE="k"
export GH_PAGER="less"
export GIT_PAGER="less"
export HISTTIMEFORMAT="%y/%m/%d %T "
export HOMEBREW_NO_ANALYTICS=1
@@ -52,12 +59,21 @@ export LSCOLORS="gxfxcxdxbxegedabagacad"
export PYTHONDONTWRITEBYTECODE=yes
export QUILT_PATCHES="debian/patches"
#
if [[ ! "${PATH}" =~ "(^|:)/bin(:|$)" ]]; then
export PATH="/bin:${PATH}"
fi
if [[ ! "${PATH}" =~ "(^|:)/sbin(:|$)" ]]; then
export PATH="/sbin:${PATH}"
fi
if [[ ! "${PATH}" =~ "(^|:)/usr/bin(:|$)" ]]; then
export PATH="/usr/bin:${PATH}"
fi
if [[ ! "${PATH}" =~ "(^|:)/usr/sbin(:|$)" ]]; then
export PATH="/usr/sbin:${PATH}"
fi
if [[ ! "${PATH}" =~ "(^|:)/usr/local/bin(:|$)" ]]; then
export PATH="/usr/local/bin:${PATH}"
fi
if [[ ! "${PATH}" =~ "(^|:)/usr/local/sbin(:|$)" ]]; then
export PATH="/usr/local/sbin:${PATH}"
fi

View File

@@ -1,37 +1,16 @@
#
alias c0=claude
alias c1="CLAUDE_CONFIG_DIR=~/.claude-c1 claude"
alias update="(cd ~/git; make all)"
#
[[ -s /usr/share/doc/fzf/examples/completion.bash ]] && source /usr/share/doc/fzf/examples/completion.bash
[[ -s /usr/share/doc/fzf/examples/key-bindings.bash ]] && source /usr/share/doc/fzf/examples/key-bindings.bash
#
[[ -e "$HOME/go/bin" ]] && export PATH="${HOME}/go/bin:${PATH}"
[[ -s "$HOME/perl5/perlbrew/etc/bashrc" ]] && source "$HOME/perl5/perlbrew/etc/bashrc"
[[ -s "$HOME/.phpbrew/bashrc" ]] && source "$HOME/.phpbrew/bashrc"
[[ -s "$HOME/.cargo/env" ]] && source "$HOME/.cargo/env"
#
export PYENV_ROOT="${HOME}/.pyenv"
if [ -d "${PYENV_ROOT}" ]; then
if [[ ! "${PATH}" =~ "(^|:)${PYENV_ROOT}/bin(:|$)" ]]; then
export PATH="${PYENV_ROOT}/bin:${PATH}"
fi
if [[ ! "${PATH}" =~ "(^|:)${PYENV_ROOT}/shims(:|$)" ]]; then
export PATH="${PYENV_ROOT}/shims:${PATH}"
fi
eval "$(pyenv init - --no-rehash)"
if command -v mise > /dev/null; then
eval "$(mise activate bash)"
fi
#
[ -s "${HOME}/.fnm/fnm" ] && eval "$(${HOME}/.fnm/fnm env)" && export PATH="${HOME}/.fnm:${PATH}"
#
if [ -d "${HOME}/.rbenv" ]; then
if [[ ! "${PATH}" =~ "(^|:)${HOME}/\\.rbenv/bin(:|$)" ]]; then
export PATH="${HOME}/.rbenv/bin:${PATH}"
fi
eval "$(rbenv init - --no-rehash)"
fi
#
if [ -d "${HOME}/.rvm" ]; then
if [[ ! "${PATH}" =~ "(^|:)${HOME}/\\.rvm/bin(:|$)" ]]; then
export PATH="${HOME}/.rvm/bin:${PATH}"
fi
source "${HOME}/.rvm/scripts/rvm"
# Composer
if [[ -e "${HOME}/.config/composer/vendor/bin" ]]; then
export PATH="${HOME}/.config/composer/vendor/bin:${PATH}"
fi

View File

@@ -9,7 +9,8 @@
st = status -bs
up = "!git remote update -p; git merge --ff-only @{u}"
[blame]
ignoreRevsFile = .git-blame-ignore-revs
# cannot set to work optionally.
# ignoreRevsFile = .git-blame-ignore-revs
[color]
ui = auto
[column]
@@ -17,7 +18,7 @@
[core]
preloadindex = yes
[diff]
algorithm = minimal
algorithm = histogram
[diff "sqlite3"]
binary = true
textconv = "echo '.dbconfig trusted_schema no\n.dump' | sqlite3"
@@ -26,13 +27,17 @@
[merge]
tool = vimdiff
[pull]
autoSetupRemote = true
rebase = true
[push]
default = matching
autoSetupRemote = true
default = current
[rerere]
enabled = true
[submodule]
recursive = true
[tag]
sort = version:refname
[user]
useConfigOnly = true
#

1
.npmrc Normal file
View File

@@ -0,0 +1 @@
fund=false

View File

@@ -1,2 +1,2 @@
.header on
.mode column
.mode line

View File

@@ -3,6 +3,11 @@ bind-key C-a send-prefix
set -g prefix C-a
unbind C-b
#
unbind-key -T root M-Left
unbind-key -T root M-Right
#
bind-key -n C-Enter send-keys "\e[13;5u"
#
set-option -g status-bg colour27
set-option -g status-fg white
set-option -g window-status-current-style bg=colour28

9
.vim/vim-ai/roles.ini Normal file
View File

@@ -0,0 +1,9 @@
[default]
options.model = o4-mini
options.temperature = 1
[gpt-4.1]
options.model = gpt-4.1
[gpt-4.1-mini]
options.model = gpt-4.1-mini

View File

@@ -13,7 +13,7 @@ set incsearch
set laststatus=2
set lazyredraw
set list
set listchars=tab:▷⋅,trail
set listchars=tab:»\ ,trail
set mouse=
set nobomb
set nocompatible
@@ -25,6 +25,9 @@ set shiftwidth=4
set showmatch
set smartcase
set t_Co=256
if !has('nvim')
set ttymouse=
endif
set visualbell
set wrap
set wildmenu
@@ -34,16 +37,16 @@ endif
"
let g:DisableAutoPHPFolding = 1
let g:EditorConfig_exclude_patterns = ['fugitive://.*', 'scp://.*']
let g:copilot_enabled = v:false
let g:indent_guides_auto_colors = 0
let g:indent_guides_enable_on_vim_startup = 1
hi IndentGuidesEven ctermbg=8
hi IndentGuidesOdd ctermbg=236
let g:llama_config = {'keymap_accept_full':'<Right>','n_predict':256}
autocmd VimEnter,Colorscheme * :hi IndentGuidesEven ctermbg=8
autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd ctermbg=236
"
" mapping
cnoremap <expr> <Down> pumvisible() ? "\<C-n>" : "\<Down>"
cnoremap <expr> <Up> pumvisible() ? "\<C-p>" : "\<Up>"
map <C-c> :Copilot enable<CR>
map <C-c> :LlamaToggle<CR>
nmap <Esc>[Z <C-w>W
nmap <F8> :TagbarToggle<CR>
nmap <Tab> <C-w>w
@@ -57,6 +60,12 @@ filetype off
let g:lightline = {'component':{'lineinfo':'%3l:%-2v'}}
let g:polyglot_disabled = ["autoindent", "sensible"]
let g:snipMate = {'snippet_version': 1}
let g:vim_ai_roles_config_file = '~/.vim/vim-ai/roles.ini'
"
" Local
if filereadable(expand("~/.vim/vimrc-preplug.local"))
source ~/.vim/vimrc-preplug.local
endif
"
call plug#begin('~/.vim/plugged')
Plug 'DataWraith/auto_mkdir'
@@ -65,27 +74,37 @@ Plug 'bonsaiben/bootstrap-snippets'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'editorconfig/editorconfig-vim'
Plug 'garbas/vim-snipmate'
Plug 'github/copilot.vim', { 'tag': 'v1.13.0' }
Plug 'godlygeek/csapprox'
Plug 'honza/vim-snippets'
Plug 'itchyny/lightline.vim'
Plug 'luochen1990/rainbow'
Plug 'joshdick/onedark.vim'
Plug 'majutsushi/tagbar'
Plug 'motus/pig.vim'
Plug 'nathanaelkane/vim-indent-guides'
Plug 'preservim/vim-indent-guides'
Plug 'scrooloose/nerdtree'
Plug 'sheerun/vim-polyglot'
Plug 'terryma/vim-expand-region'
Plug 'tomasr/molokai'
Plug 'tomtom/tlib_vim'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-surround'
Plug 'wuelnerdotexe/vim-astro'
if v:version >= 901 || has('nvim-0.8.0')
Plug 'ggml-org/llama.vim'
Plug 'nvim-lua/plenary.nvim'
endif
if has('python3')
Plug 'madox2/vim-ai'
endif
call plug#end()
"
" color schema
set background=dark
colo onedark
highlight Search cterm=none ctermbg=blue
colo slate
"
" syntax
syntax on
autocmd BufEnter * syntax sync fromstart
"
filetype plugin indent on
let g:ctrlp_use_caching = 0
@@ -103,13 +122,12 @@ au BufNewFile,BufRead *.vue set filetype=html
au BufNewFile,BufRead GNUmakefile set noexpandtab
au BufNewFile,BufRead Makefile set noexpandtab
au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif
au FileType dart,html,javascript,javascriptreact,json,ruby,typescript,yaml set shiftwidth=2
au FileType css,dart,html,javascript,javascriptreact,json,ruby,typescript,typescriptreact,yaml set shiftwidth=2
au FileType go set noexpandtab shiftwidth=4 tabstop=4
autocmd BufEnter * silent! lcd %:p:h
autocmd BufReadPost COMMIT_EDITMSG exe "normal! gg"
map <C-n> :NERDTreeToggle<CR>
"
" Local
if filereadable("~/.vim/vimrc.local")
source ~/.vim/vimrc.local
if filereadable(expand("~/.vim/vimrc-post.local"))
source ~/.vim/vimrc-post.local
endif

65
.wezterm.lua Normal file
View File

@@ -0,0 +1,65 @@
--
local wezterm = require 'wezterm'
local act = wezterm.action
local config = wezterm.config_builder()
config.check_for_updates = false
config.color_scheme = 'Tango (terminal.sexy)'
config.enable_csi_u_key_encoding = true
config.font = wezterm.font_with_fallback({'Cousine', 'Noto Color Emoji', 'Noto Sans CJK JP'})
config.font_size = 18.0
config.hide_mouse_cursor_when_typing = false
config.initial_cols = 132
config.initial_rows = 43
config.line_height = 1.0
config.keys = {
{
key = 'Enter',
mods = 'CTRL',
action = act.SendString '\x1b[13;5u',
},
{
key = 'Insert',
mods = 'SHIFT',
action = act.PasteFrom 'Clipboard',
},
}
config.mouse_bindings = {
{
event = {Up = {streak = 1, button = 'Left'}},
mods = 'NONE',
action = act.CompleteSelection 'ClipboardAndPrimarySelection',
},
{
event = {Down = {streak = 1, button = 'Middle'}},
mods = 'NONE',
action = act.Nop,
},
{
event = {Up = {streak = 1, button = 'Middle'}},
mods = 'NONE',
action = act.OpenLinkAtMouseCursor,
},
{
event = {Up = {streak = 1, button = 'Right'}},
mods = 'NONE',
action = act.PasteFrom 'Clipboard',
},
}
config.selection_word_boundary = " \t\n{}[]()<>\"'`"
config.window_padding = {
bottom = 0,
left = 0,
right = 0,
top = 0,
}
wezterm.on('format-tab-title', function(tab, tabs, panes, config, hover, max_width)
return 'Tab ' .. tab.tab_index
end)
wezterm.on('format-window-title', function(tab, pane, tabes, panes, config)
return 'WezTerm ' .. wezterm.version
end)
return config

36
.zshrc
View File

@@ -2,30 +2,40 @@
umask 022
cd "$HOME"
#
autoload -Uz compinit
compinit
#
alias "SYNC=sync;sync;sync"
alias "c=clear"
alias "ccat=pygmentize -g"
alias "cd..=cd .."
alias "cd...=cd ../.."
alias "cls=clear"
alias "cutl=cut -c -$(tput cols)"
alias "d=ls -l"
alias "dir=ls -l"
alias "f=finger"
alias "g=grep --color=auto"
alias "gph=git push -v --follow-tags"
alias "gpl=git pull -v --autostash --rebase --recurse-submodules"
alias "gpl=git pull -v --all --autostash --rebase --recurse-submodules"
alias "l=last"
alias "ll=ls -l"
alias "lo=logout"
alias "m=more"
alias "more=most"
alias "myip=curl -s https://httpbin.org/ip | jq .origin"
alias "psa=ps aux"
alias "psm=ps -O rss,vsz -U $USER"
alias "psa=ps auwwx"
alias "psm=ps -O rss,vsz -U $USER -ww"
alias "psr=psu root"
alias "psu=ps -U"
alias "psu=ps -ww -U"
alias "s=screen"
alias "ssh=ssh -C -e none"
alias "udac=sudo apt update; sudo apt dist-upgrade -y; sudo apt autoremove -y; sudo apt clean"
#
if command -v hpnssh > /dev/null; then
alias "ssh=hpnssh -C -e none"
compdef hpnssh=ssh
else
alias "ssh=ssh -C -e none"
fi
#
if [[ -x /opt/local/bin/gtelnet ]]; then
alias "t=gtelnet"
@@ -116,8 +126,8 @@ else
export EDITOR="vim"
fi
#
export ANDROID_SDK_ROOT=/usr/lib/android-sdk
export BLOCKSIZE="k"
export GH_PAGER="less"
export GIT_PAGER="less"
export HISTFILE="$HOME/.history"
export HISTSIZE=2000
@@ -128,12 +138,21 @@ export PYTHONDONTWRITEBYTECODE=yes
export QUILT_PATCHES="debian/patches"
export SAVEHIST=2000
#
if [[ ! "${PATH}" =~ "(^|:)/bin(:|$)" ]]; then
export PATH="/bin:${PATH}"
fi
if [[ ! "${PATH}" =~ "(^|:)/sbin(:|$)" ]]; then
export PATH="/sbin:${PATH}"
fi
if [[ ! "${PATH}" =~ "(^|:)/usr/bin(:|$)" ]]; then
export PATH="/usr/bin:${PATH}"
fi
if [[ ! "${PATH}" =~ "(^|:)/usr/sbin(:|$)" ]]; then
export PATH="/usr/sbin:${PATH}"
fi
if [[ ! "${PATH}" =~ "(^|:)/usr/local/bin(:|$)" ]]; then
export PATH="/usr/local/bin:${PATH}"
fi
if [[ ! "${PATH}" =~ "(^|:)/usr/local/sbin(:|$)" ]]; then
export PATH="/usr/local/sbin:${PATH}"
fi
@@ -161,6 +180,7 @@ setopt prompt_subst
#
zstyle ':completion:*' menu select
#
[[ -s "$HOME/git/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ]] && . "$HOME/git/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ]]
[[ -s "$HOME/git/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ]] && . "$HOME/git/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
[[ -s "$HOME/git/zsh-autosuggestions/zsh-autosuggestions.zsh" ]] && . "$HOME/git/zsh-autosuggestions/zsh-autosuggestions.zsh"
#
[[ -s "$HOME/.zshrc.local" ]] && . "$HOME/.zshrc.local"

View File

@@ -1,39 +1,20 @@
#
autoload -Uz compinit
compinit
if ! whence compinit >/dev/null; then
autoload -Uz compinit && compinit
compinit
fi
[[ -s /usr/share/doc/fzf/examples/completion.zsh ]] && source /usr/share/doc/fzf/examples/completion.zsh
[[ -s /usr/share/doc/fzf/examples/key-bindings.zsh ]] && source /usr/share/doc/fzf/examples/key-bindings.zsh
#
alias "c0=claude"
alias "c1=CLAUDE_CONFIG_DIR=~/.claude-c1 claude"
alias "update=(cd ~/git; make all)"
#
[[ -e "$HOME/go/bin" ]] && export PATH="${HOME}/go/bin:${PATH}"
[[ -s "$HOME/perl5/perlbrew/etc/bashrc" ]] && source "$HOME/perl5/perlbrew/etc/bashrc"
[[ -s "$HOME/.phpbrew/bashrc" ]] && source "$HOME/.phpbrew/bashrc"
[[ -s "$HOME/.cargo/env" ]] && source "$HOME/.cargo/env"
#
export PYENV_ROOT="${HOME}/.pyenv"
if [ -d "${PYENV_ROOT}" ]; then
if [[ ! "${PATH}" =~ "(^|:)${PYENV_ROOT}/bin(:|$)" ]]; then
export PATH="${PYENV_ROOT}/bin:${PATH}"
fi
if [[ ! "${PATH}" =~ "(^|:)${PYENV_ROOT}/shims(:|$)" ]]; then
export PATH="${PYENV_ROOT}/shims:${PATH}"
fi
eval "$(pyenv init - --no-rehash)"
if command -v mise > /dev/null; then
eval "$(mise activate zsh)"
fi
#
[ -s "${HOME}/.fnm/fnm" ] && eval "$(${HOME}/.fnm/fnm env)" && export PATH="${HOME}/.fnm:${PATH}"
#
if [ -d "${HOME}/.rbenv" ]; then
if [[ ! "${PATH}" =~ "(^|:)${HOME}/\\.rbenv/bin(:|$)" ]]; then
export PATH="${HOME}/.rbenv/bin:${PATH}"
fi
eval "$(rbenv init - --no-rehash)"
fi
#
if [ -d "${HOME}/.rvm" ]; then
if [[ ! "${PATH}" =~ "(^|:)${HOME}/\\.rvm/bin(:|$)" ]]; then
export PATH="${HOME}/.rvm/bin:${PATH}"
fi
source "${HOME}/.rvm/scripts/rvm"
# Composer
if [[ -e "${HOME}/.config/composer/vendor/bin" ]]; then
export PATH="${HOME}/.config/composer/vendor/bin:${PATH}"
fi

View File

@@ -36,17 +36,22 @@ if [ ! -e ~/.gitconfig.local ]; then
cp ${BASEDIR}/.gitconfig.local ~/
fi
#
if [ ! -e ~/.npmrc ]; then
cp ${BASEDIR}/.npmrc ~/
fi
#
cp ${BASEDIR}/.gdbinit ~/
#
cp ${BASEDIR}/.wgetrc ~/
cp ${BASEDIR}/.psqlrc ~/
#
cp ${BASEDIR}/.sqliterc ~/
#
cp ${BASEDIR}/.psqlrc ~/
cp ${BASEDIR}/.wgetrc ~/
# nvim
mkdir -p ~/.config || true
@@ -56,7 +61,12 @@ ln -fs ../.vim ~/.config/nvim
mkdir -p ~/.vim/ || true
rsync -a ${BASEDIR}/.vim/ ~/.vim/
chmod 700 ~/.vim/
vim +PlugUpdate +PlugClean\! +q +q
if command -v nvim > /dev/null; then
nvim +PlugUpdate +PlugClean\! +q +q
else
vim +PlugUpdate +PlugClean\! +q +q
fi
#
diff -ruN --color .bashrc.local ~/.bashrc.local
diff -ruN --color .zshrc.local ~/.zshrc.local