summaryrefslogtreecommitdiff
path: root/home/xyz/.config
diff options
context:
space:
mode:
Diffstat (limited to 'home/xyz/.config')
-rw-r--r--home/xyz/.config/htop/htoprc43
-rw-r--r--home/xyz/.config/nvim/init.vim63
-rw-r--r--home/xyz/.config/systemd/user/ssh-agent.service2
3 files changed, 67 insertions, 41 deletions
diff --git a/home/xyz/.config/htop/htoprc b/home/xyz/.config/htop/htoprc
index 48d07e69..cb80a1bc 100644
--- a/home/xyz/.config/htop/htoprc
+++ b/home/xyz/.config/htop/htoprc
@@ -1,12 +1,8 @@
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
-htop_version=3.1.0
-config_reader_min_version=2
+htop_version=3.2.0
+config_reader_min_version=3
fields=0 48 17 18 38 39 40 2 46 47 49 1
-sort_key=46
-sort_direction=-1
-tree_sort_key=0
-tree_sort_direction=1
hide_kernel_threads=1
hide_userland_threads=1
shadow_other_users=0
@@ -21,10 +17,8 @@ highlight_changes_delay_secs=5
find_comm_in_cmdline=1
strip_exe_from_cmdline=1
show_merged_command=0
-tree_view=0
-tree_view_always_by_pid=0
-all_branches_collapsed=0
header_margin=1
+screen_tabs=1
detailed_cpu_time=0
cpu_count_from_one=0
show_cpu_usage=1
@@ -38,7 +32,30 @@ enable_mouse=1
delay=15
hide_function_bar=0
header_layout=two_50_50
-column_meters_0=AllCPUs Memory Swap
-column_meter_modes_0=1 1 1
-column_meters_1=Tasks LoadAverage DiskIO NetworkIO
-column_meter_modes_1=2 2 2 2
+column_meters_0=LeftCPUs Memory Uptime LoadAverage Systemd
+column_meter_modes_0=1 1 2 2 2
+column_meters_1=RightCPUs Swap Tasks DiskIO NetworkIO
+column_meter_modes_1=1 1 2 2 2
+tree_view=0
+sort_key=46
+tree_sort_key=0
+sort_direction=-1
+tree_sort_direction=1
+tree_view_always_by_pid=0
+all_branches_collapsed=0
+screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command
+.sort_key=PERCENT_CPU
+.tree_sort_key=PID
+.tree_view=0
+.tree_view_always_by_pid=0
+.sort_direction=-1
+.tree_sort_direction=1
+.all_branches_collapsed=0
+screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE PERCENT_SWAP_DELAY PERCENT_IO_DELAY Command
+.sort_key=IO_RATE
+.tree_sort_key=PID
+.tree_view=0
+.tree_view_always_by_pid=0
+.sort_direction=-1
+.tree_sort_direction=1
+.all_branches_collapsed=0
diff --git a/home/xyz/.config/nvim/init.vim b/home/xyz/.config/nvim/init.vim
index b08d967d..d73e0ba0 100644
--- a/home/xyz/.config/nvim/init.vim
+++ b/home/xyz/.config/nvim/init.vim
@@ -8,18 +8,19 @@ call plug#begin()
"Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
"Plug 'junegunn/fzf.vim'
"Plug 'vim-perl/vim-perl', { 'for': 'perl', 'do': 'make clean carp dancer highlight-all-pragmas moose test-more try-tiny' }
-Plug 'glacambre/firenvim', { 'do': { _ -> firenvim#install(0) } }
+"Plug 'glacambre/firenvim', { 'do': { _ -> firenvim#install(0) } }
" chriskempson/base16-vim doesn't do bold/italic for markdown syntax, and not maintained
-" fnune/base16-vim and RRethy/nvim-base16 seem both work, both support tree-sitter
-Plug 'fnune/base16-vim'
+" tinted-theming/base16-vim and RRethy/nvim-base16 seem both work, both support tree-sitter
+" I prefer tinted-theming/base16-vim in the past because of darker status bar color?
+Plug 'tinted-theming/base16-vim'
" nvim-treesitter does not support markdown right now, so wait
"Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} " We recommend updating the parsers on update
" use latest vim-markdown
Plug 'tpope/vim-markdown'
" alternatives: h-hg/fcitx.nvim, rlue/vim-barbaric, lilydjwg/fcitx.vim
-Plug 'rlue/vim-barbaric'
+"Plug 'rlue/vim-barbaric'
" alternatives: 'thinca/vim-ref' with 'eiiches/vim-ref-info', 'HiPhish/info.vim', 'alx741/vinfo'
-Plug 'HiPhish/info.vim'
+Plug 'https://gitlab.com/HiPhish/info.vim.git'
call plug#end()
" next line must put below `Plug 'glacambre/firenvim'`, else if click github issue textarea, then click elsewhere, then click textarea, textarea will not be selected (no cursor in it), not sure why
@@ -57,7 +58,8 @@ augroup END
" :h markdown, for vim default tpope/vim-markdown
"let g:markdown_folding = 1
-let g:markdown_minlines = 500
+" g:markdown_minlines before nvim 0.8, 500 works well; version 0.8 makes even 400 noticeable slow when keep pressing gk
+let g:markdown_minlines = 350
"let g:markdown_fenced_languages = ['python', 'sh', 'vim', 'c', 'cpp']
" netrw-p preview vertial split
@@ -68,7 +70,7 @@ let g:netrw_winsize = 20
filetype plugin on
" fold is slow and buggy, at least for different kinds of vim-markdown, disable it, not sure if works or not
-set nofoldenable
+"set nofoldenable
language en_US
set number relativenumber
@@ -80,9 +82,6 @@ colorscheme base16-tomorrow-night
" set dir to current editing file's dir
set autochdir
-" always use system for ALL instead of use + and * operator?
-"set clipboard+=unnamedplus
-
" Spaces & Tabs
set tabstop=4 " number of visual spaces per TAB
set softtabstop=4 " number of spaces in tab when editing
@@ -90,24 +89,30 @@ set shiftwidth=4 " number of spaces to use for autoindent
"set expandtab " tabs are space
" https://www.zhihu.com/question/22363620/answer/21199296
-" last line seems is default to neovim but not vim
-set fileencodings=ucs-bom,utf-8,utf-16,gbk,big5,gb18030,latin1
+" euc-cn=gb2312, cp936=gbk
+" it is recommended by `:h fileencodings` to put ucs-bom at first and latin1 at last
+" based on my experience, if put utf-16 in front of euc-cn, euc-cn will have mojibake
+" based on my experience, if put big5 in front of euc-cn and cp936, euc-cn will have mojibake
+" according to zhihu comment, if put gb18030 in front of big5 , big5 will have mojibake
+" according to wikipedia articles, euc-cn is preceded by cp936 which is preceded by gb18030, gb18030 is backward compatible with cp936 which seems is backward compatible with euc-cn
+set fileencodings=ucs-bom,utf-8,euc-cn,cp936,big5,gb18030,utf-16,latin1
+" seems is default to neovim but not vim
set encoding=utf-8
" some file on win10 display as unix but is dos
-"if has('win32')
-" set fileformats=dos
-" " windows 10 bug, need this to change cursor back to vertical bar after leaving neovim
-" " the number after ver seems no effects, maybe because neovim is exited
-" " https://github.com/alacritty/alacritty/issues/2839#issuecomment-766421840
-" " use of ! after autocmd see youtube video above, not fully understood
-" autocmd! VimLeave * set guicursor=a:ver25
-"endif
-
-" don't generate those three types of files
-set nobackup
-set noswapfile
-set noundofile
+if has('win32')
+ set fileformats=dos
+ " windows 10 bug, need this to change cursor back to vertical bar after leaving neovim
+ " the number after ver seems no effects, maybe because neovim is exited
+ " https://github.com/alacritty/alacritty/issues/2839#issuecomment-766421840
+ " use of ! after autocmd see youtube video above, not fully understood
+ autocmd! VimLeave * set guicursor=a:ver25
+endif
+
+" if don't want to generate swap file
+"set noswapfile
+" nvim backup file defualt off, see `:h nobackup` `:set backup?`
+" nvim undo file default off, see `:h noundofile` `:set undofile?`
" gg=G work for .xml files now,:h matchit-activate
" https://stackoverflow.com/questions/21408222/vim-indent-xml-file/28365920#28365920
@@ -117,6 +122,10 @@ packadd! matchit
set ignorecase
set smartcase
+" disable mouse support
+" :h disable-mouse
+set mouse=
+
" map ctrl+h/j/k/l to move between split windows
map <C-h> <C-w>h
map <C-j> <C-w>j
@@ -124,8 +133,8 @@ map <C-k> <C-w>k
map <C-l> <C-w>l
" moving in long line
-nnoremap k gk
-nnoremap j gj
+"nnoremap k gk
+"nnoremap j gj
nnoremap o o<Esc>
nnoremap O O<Esc>
diff --git a/home/xyz/.config/systemd/user/ssh-agent.service b/home/xyz/.config/systemd/user/ssh-agent.service
index 66fa63ef..e867c4b1 100644
--- a/home/xyz/.config/systemd/user/ssh-agent.service
+++ b/home/xyz/.config/systemd/user/ssh-agent.service
@@ -11,7 +11,7 @@ Type=simple
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
# DISPLAY required for ssh-askpass to work
Environment=DISPLAY=:0
-ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
+ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK -t 3600
# github White-Oak approach
# https://github.com/White-Oak/arch-setup-for-dummies/blob/master/setting-up-ssh-agent.md