├── .gitignore ├── .luarc.json ├── README.md ├── bash ├── .bash_logout ├── .bash_profile ├── .bashrc ├── .dir_colors └── .extend.bashrc ├── docker └── compose │ ├── adguard │ ├── .gitignore │ ├── chaneys_filter.txt │ └── docker-compose.yaml │ ├── beszel │ ├── agent │ │ ├── .gitignore │ │ └── docker-compose.yaml │ └── hub │ │ ├── .gitignore │ │ └── docker-compose.yaml │ ├── clash │ ├── .gitignore │ ├── clash_chaneys_reject.txt │ ├── docker-compose.yaml │ └── example.config.yaml │ ├── docker-kong │ ├── .gitignore │ ├── Makefile │ ├── POSTGRES_PASSWORD │ ├── README.md │ ├── config │ │ └── kong.yaml │ ├── docker-compose.yml │ └── docker-compose.yml-e │ ├── dufs │ └── docker-compose.yaml │ ├── gitea │ ├── .gitignore │ └── docker-compose.yaml │ ├── homarr │ ├── .gitignore │ └── docker-compose.yaml │ ├── homepage │ ├── config │ │ ├── bookmarks.yaml │ │ ├── custom.css │ │ ├── custom.js │ │ ├── docker.yaml │ │ ├── kubernetes.yaml │ │ ├── logs │ │ │ └── homepage.log │ │ ├── services.yaml │ │ ├── settings.yaml │ │ └── widgets.yaml │ └── docker-compose.yaml │ ├── lx-music │ ├── .gitignore │ └── docker-compose.yaml │ ├── memos │ ├── .gitignore │ └── docker-compose.yaml │ ├── nginx-proxy-manager │ ├── .gitignore │ └── docker-compose.yaml │ ├── portainer-agent │ └── docker-compose.yaml │ ├── portainer │ └── docker-compose.yaml │ ├── rustdesk │ ├── .gitignore │ └── docker-compose.yaml │ ├── syncthing │ ├── .gitignore │ ├── SyncMeta │ │ └── .gitkeep │ └── docker-compose.yaml │ ├── uptime-kuma │ ├── .gitignore │ └── docker-compose.yaml │ └── yacd │ └── docker-compose.yaml ├── ghostty └── .config │ └── ghostty │ └── config ├── hammerspoon └── .hammerspoon │ ├── ime.lua │ ├── init.lua │ └── wscrmv.lua ├── justfile ├── kitty └── .config │ └── kitty │ ├── kitty.cinnamon.conf │ └── kitty.conf ├── linux-home ├── .Xresources ├── .config │ ├── ghostty │ │ └── linux.config │ └── ibus │ │ └── rime │ │ └── default.custom.yaml ├── .dmrc ├── .local │ └── share │ │ └── xfce4 │ │ └── terminal │ │ └── colorschemes │ │ ├── chaney_dark.theme │ │ └── nord.theme ├── .pam_environment ├── .profile ├── .xprofile └── .xsession ├── neovim.yml ├── nvim ├── .config │ ├── black │ ├── flake8 │ ├── go │ │ └── env │ ├── lazygit │ │ └── config.yml │ ├── nvim │ │ ├── init.lua │ │ ├── lazy-lock.json │ │ ├── lua │ │ │ └── neo │ │ │ │ ├── debug.lua │ │ │ │ ├── lazy.lua │ │ │ │ ├── neovide.lua │ │ │ │ ├── plugins │ │ │ │ ├── autocmp.lua │ │ │ │ ├── codehint.lua │ │ │ │ ├── foldent.lua │ │ │ │ ├── git.lua │ │ │ │ ├── lsp.lua │ │ │ │ ├── misc.lua │ │ │ │ ├── search.lua │ │ │ │ ├── statine.lua │ │ │ │ ├── theme.lua │ │ │ │ ├── trouble.lua │ │ │ │ ├── uihance.lua │ │ │ │ └── which-key.lua │ │ │ │ └── setting.lua │ │ ├── queries │ │ │ └── python │ │ │ │ └── folds.scm │ │ └── spell │ │ │ ├── cspell.json │ │ │ └── en.utf-8.add │ ├── pip │ │ └── pip.conf │ ├── pycodestyle │ ├── pylintrc │ └── yamllint │ │ └── config ├── .editorconfig ├── .gemrc ├── .gitconfig ├── .isort.cfg ├── .npmrc ├── .shellcheckrc └── .yarnrc ├── selene.toml ├── ssh └── .ssh │ ├── config │ └── session │ └── .gitkeep ├── stylua.toml ├── systemd └── .config │ └── systemd │ └── user │ ├── clash.service │ ├── default.target.wants │ ├── clash.service │ └── syncthing.service │ ├── efi-boot-steamos.service │ ├── notify-me.service │ ├── notify-me.timer │ ├── syncthing.service │ └── timers.target.wants │ └── notify-me.timer ├── tmux ├── .teamocil │ ├── .gitignore │ ├── chaney-pi.local.yml │ └── chaney-pi.yml └── .tmux.conf ├── wezterm └── .config │ └── wezterm │ └── wezterm.lua ├── yazi └── .config │ └── yazi │ ├── .gitignore │ ├── theme.toml │ └── yazi.toml ├── zellij └── .config │ └── zellij │ └── config.kdl └── zsh ├── .config └── starship.toml ├── .myutil.zsh ├── .p10k.zsh ├── .zprofile ├── .zshenv └── .zshrc /.gitignore: -------------------------------------------------------------------------------- 1 | aria2/.aria2/aria2.session 2 | ansible/.ansible/hosts 3 | ansible/.ansible/tmp 4 | 5 | .DS_Store 6 | 7 | fontconfig/.config/fontconfig/conf.d/78-Reject.conf 8 | 9 | linux-home/.local/bin/ 10 | linux-home/.local/share/containers/ 11 | linux-home/.local/share/delta/ 12 | linux-home/.local/share/man/ 13 | linux-home/.local/share/nvim/ 14 | linux-home/.local/share/pipx/ 15 | linux-home/.local/share/pnpm/ 16 | linux-home/.local/share/virtualenv/ 17 | linux-home/.local/share/CMakeTools/ 18 | 19 | linux-home/.local/state/nvim/ 20 | linux-home/.local/state/pipx/ 21 | 22 | .netrwhist 23 | nvim/.config/nvim/cache 24 | nvim/.config/nvim/swap 25 | nvim/.config/nvim/sessions/default.vim 26 | nvim/.config/nvim/spell/en.utf-8.add.spl 27 | nvim/.config/nvim/plugin/packer_compiled.vim 28 | nvim/.config/nvim/plugin/packer_compiled.lua 29 | nvim/.config/go/telemetry 30 | -------------------------------------------------------------------------------- /.luarc.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtime": { 3 | "version": "LuaJIT" 4 | }, 5 | "diagnostics": { 6 | "globals": ["vim", "hs", "Snacks"] 7 | }, 8 | "workspace": { 9 | "checkThirdParty": false, 10 | "library": [ 11 | "${env:VIMRUNTIME}", 12 | "${3rd}/luv/library", 13 | "${3rd}/busted/library" 14 | ] 15 | }, 16 | "telemetry": { 17 | "enable": false 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dotfiles 2 | 3 | 使用 [GNU Stow](https://www.gnu.org/software/stow/) 管理的 linux 配置文件. 4 | 5 | Gnu Stow 使用两个文件夹来管理两个文件树之间的映射,分别是: 6 | 7 | - `stow dir`:默认为当前文件夹 8 | - `target dir`:默认为当前文件夹的父文件夹 9 | 10 | `stow dir`下每一个顶层的子文件夹都是一个单独的文件树, 11 | `target dir`下是多个这样的文件树在同一起始路径的层叠展开,后者的文件树使用**符号链接**指向前者的文件树。 12 | 13 | ## 第一次收集配置文件 14 | 15 | 第一次收集配置文件时,推荐使用`--adopt`选项转移配置文件。具体操作如下: 16 | 17 | 1. 在家目录下创建`stow dir`, 比如命名为 dotfiles。 18 | 19 | 2. 在`stow dir`下分门别类的创建好各类配置文件的文件夹,比如专门放置 bash 相关配置文件的文件夹。 20 | 21 | 3. 在 bash 文件夹下创建对应的配置文件,文件内容为空即可,比如`.bashrc`,`.bash_profile`。 22 | 23 | 4. 在`stow dir`下执行`stow --adopt bash`,这一命令分别对比`target dir`(也即是家目录)和 bash 目录的结构, 24 | 并将家目录下同树结构的文件采纳到`stow dir`下:将`.bashrc`移到bash目录覆盖掉对应的空配置文件, 25 | 并在家目录创建符号链接指向转移过来的配置文件。 26 | 27 | 5. 重复上述 2-4 步,陆续添加其他文件夹和配置文件。 28 | 29 | 收集到配置文件后,我们一般使用 git 来管理,这样可以方便的跟踪修改,也可以方便的拉取到另一台电脑上。 30 | 实际上,我们上面使用的`--adopt` 命令可以结合 git 来方便的对比两台电脑间配置文件的不同。 31 | `--adopt`选项会处理 stow 遇到的冲突文件,并统一采用`target dir`下的文件**替换**`stow dir` 下的文件, 32 | 当`stow dir`被 git 管理时,被替换的文件就可以方便的和仓库中的文件对比,方面你修改,采纳,或者删除。 33 | 34 | **注意**: `--adopt`选项会修改`stow dir`下的内容,非第一次收集配置文件,或者`stow dir`没有被版本控制软件管理前,请谨慎使用。 35 | 36 | ## 将收集的配置文件应用到新的系统中 37 | 38 | 将项目拉取到新的机器的家目录,切换到`stow dir`,执行`stow -S bash`可以将bash的配置文件展开到家目录下。 39 | 你也可以使用多个组合命令:`stow -S pkg1 pkg2 -D pkg3 pkg4 -S pkg5 -R pkg6` 40 | 41 | - `-d` 指定 stow 文件夹 42 | - `-t` 指定 target 文件夹 43 | - `-D` 移除已创建的文件树 44 | - `-S` 创建指定的文件树 45 | - `-R` 移除并重新创建指定的文件树 46 | 47 | - `--ignore=regexp` 忽略`stow dir`下指定匹配模式的文件 48 | - `--defer=regexp` 跳过`target dir`下指定匹配模式的文件 49 | - `--override=regexp` 强制替换`target dir`下指定匹配模式的文件 50 | 51 | - `--no-folding` stow 默认创建最少的符号链接。这一选项会使 stow 逐一创建每一个文件的符号链接,而不是创建一整个文件夹的链接。 52 | - `--dotfiles` 在 stow dir 下的文件名如果有`dot-`前缀,在创建链接时,链接名字会替换为以`.`为前缀, 53 | 比如:`~/.zshrc -> dotfiles/zsh/dot-zshrc` 54 | 55 | GNU Stow 不会对冲突的文件做任何处理,并中断所有操作,我没有找到一个快捷的覆盖已存在文件的选项, 56 | `-D` 和 `--override=regexp` 并不能对已存在的文件进行覆盖替换,除非它是符号链接或者文件夹并已经处于`stow dir`的管理之下。 57 | 58 | 如果因为文件已经存在而发生了冲突,一个直接的办法是先删掉已存在的文件。而另一个方法则是结合使用 `--adopt`选项和 git。 59 | 首先将已存在的配置文件全部采纳到 git 管理之下的 stow dir,然后选择性的采纳,修改,或舍弃, 60 | 使用 git 的 commit 和 checkout,你可以方便的取舍冲突的配置文件。 61 | 如果你知道stow更好的方法,请在 issue 中告诉我,谢谢~ 62 | 63 | 更多信息请参见 [GNU Stow 手册页](https://www.gnu.org/software/stow/manual/stow.html) 64 | 65 | ## 软件包备份和恢复 66 | 67 | ```sh 68 | # 获取当前系统中主动安装的包 69 | pacman -Qqet > pkglist.txt 70 | # 从列表文件安装软件包 71 | pacman -S --needed - < pkglist.txt 72 | # 如果其中包含AUR等外部包,需要过滤后再执行 73 | pacman -S --needed $(comm -12 <(pacman -Slq | sort) <(sort pkglist.txt)) 74 | # 移除没有列在文件中的包 75 | pacman -Rsu $(comm -23 <(pacman -Qq | sort) <(sort pkglist.txt)) 76 | ``` 77 | 78 | 更多信息请参见 [pacman archlinux wiki](https://wiki.archlinux.org/index.php/Pacman/Tips_and_tricks#Install_packages_from_a_list) 79 | 80 | ## License 81 | 82 | - MIT 83 | - CC BY-NC-SA 3.0 84 | -------------------------------------------------------------------------------- /bash/.bash_logout: -------------------------------------------------------------------------------- 1 | # 2 | # ~/.bash_logout 3 | # 4 | -------------------------------------------------------------------------------- /bash/.bash_profile: -------------------------------------------------------------------------------- 1 | # 2 | # ~/.bash_profile 3 | # 4 | 5 | [[ -f ~/.extend.bash_profile ]] && . ~/.extend.bash_profile 6 | [[ -f ~/.bashrc ]] && . ~/.bashrc 7 | 8 | -------------------------------------------------------------------------------- /bash/.bashrc: -------------------------------------------------------------------------------- 1 | # 2 | # ~/.bashrc 3 | # 4 | 5 | [[ $- != *i* ]] && return 6 | 7 | [[ -f ~/.extend.bashrc ]] && . ~/.extend.bashrc 8 | 9 | [ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion 10 | 11 | -------------------------------------------------------------------------------- /bash/.dir_colors: -------------------------------------------------------------------------------- 1 | # Configuration file for dircolors, a utility to help you set the 2 | # LS_COLORS environment variable used by GNU ls with the --color option. 3 | 4 | # Copyright (C) 1996-2014 Free Software Foundation, Inc. 5 | # Copying and distribution of this file, with or without modification, 6 | # are permitted provided the copyright notice and this notice are preserved. 7 | 8 | # The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the 9 | # slackware version of dircolors) are recognized but ignored. 10 | 11 | # You can copy this file to .dir_colors in your $HOME directory to override 12 | # the system defaults. 13 | 14 | # Below, there should be one TERM entry for each termtype that is colorizable 15 | TERM Eterm 16 | TERM ansi 17 | TERM color-xterm 18 | TERM con132x25 19 | TERM con132x30 20 | TERM con132x43 21 | TERM con132x60 22 | TERM con80x25 23 | TERM con80x28 24 | TERM con80x30 25 | TERM con80x43 26 | TERM con80x50 27 | TERM con80x60 28 | TERM cons25 29 | TERM console 30 | TERM cygwin 31 | TERM dtterm 32 | TERM eterm-color 33 | TERM gnome 34 | TERM gnome-256color 35 | TERM hurd 36 | TERM jfbterm 37 | TERM konsole 38 | TERM kterm 39 | TERM linux 40 | TERM linux-c 41 | TERM mach-color 42 | TERM mach-gnu-color 43 | TERM mlterm 44 | TERM putty 45 | TERM putty-256color 46 | TERM rxvt 47 | TERM rxvt-256color 48 | TERM rxvt-cygwin 49 | TERM rxvt-cygwin-native 50 | TERM rxvt-unicode 51 | TERM rxvt-unicode-256color 52 | TERM rxvt-unicode256 53 | TERM screen 54 | TERM screen-256color 55 | TERM screen-256color-bce 56 | TERM screen-bce 57 | TERM screen-w 58 | TERM screen.Eterm 59 | TERM screen.rxvt 60 | TERM screen.linux 61 | TERM st 62 | TERM st-256color 63 | TERM terminator 64 | TERM vt100 65 | TERM xterm 66 | TERM xterm-16color 67 | TERM xterm-256color 68 | TERM xterm-88color 69 | TERM xterm-color 70 | TERM xterm-debian 71 | 72 | # Below are the color init strings for the basic file types. A color init 73 | # string consists of one or more of the following numeric codes: 74 | # Attribute codes: 75 | # 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed 76 | # Text color codes: 77 | # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white 78 | # Background color codes: 79 | # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white 80 | #NORMAL 00 # no color code at all 81 | #FILE 00 # regular file: use no color at all 82 | RESET 0 # reset to "normal" color 83 | DIR 01;34 # directory 84 | LINK 01;36 # symbolic link. (If you set this to 'target' instead of a 85 | # numerical value, the color is as for the file pointed to.) 86 | MULTIHARDLINK 00 # regular file with more than one link 87 | FIFO 40;33 # pipe 88 | SOCK 01;35 # socket 89 | DOOR 01;35 # door 90 | BLK 40;33;01 # block device driver 91 | CHR 40;33;01 # character device driver 92 | ORPHAN 01;05;37;41 # orphaned syminks 93 | MISSING 01;05;37;41 # ... and the files they point to 94 | SETUID 37;41 # file that is setuid (u+s) 95 | SETGID 30;43 # file that is setgid (g+s) 96 | CAPABILITY 30;41 # file with capability 97 | STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w) 98 | OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky 99 | STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable 100 | 101 | # This is for files with execute permission: 102 | EXEC 01;32 103 | 104 | # List any file extensions like '.gz' or '.tar' that you would like ls 105 | # to colorize below. Put the extension, a space, and the color init string. 106 | # (and any comments you want to add after a '#') 107 | 108 | # If you use DOS-style suffixes, you may want to uncomment the following: 109 | #.cmd 01;32 # executables (bright green) 110 | #.exe 01;32 111 | #.com 01;32 112 | #.btm 01;32 113 | #.bat 01;32 114 | # Or if you want to colorize scripts even if they do not have the 115 | # executable bit actually set. 116 | #.sh 01;32 117 | #.csh 01;32 118 | 119 | # archives or compressed (bright red) 120 | .tar 01;31 121 | .tgz 01;31 122 | .arc 01;31 123 | .arj 01;31 124 | .taz 01;31 125 | .lha 01;31 126 | .lz4 01;31 127 | .lzh 01;31 128 | .lzma 01;31 129 | .tlz 01;31 130 | .txz 01;31 131 | .tzo 01;31 132 | .t7z 01;31 133 | .zip 01;31 134 | .z 01;31 135 | .Z 01;31 136 | .dz 01;31 137 | .gz 01;31 138 | .lrz 01;31 139 | .lz 01;31 140 | .lzo 01;31 141 | .xz 01;31 142 | .bz2 01;31 143 | .bz 01;31 144 | .tbz 01;31 145 | .tbz2 01;31 146 | .tz 01;31 147 | .deb 01;31 148 | .rpm 01;31 149 | .jar 01;31 150 | .war 01;31 151 | .ear 01;31 152 | .sar 01;31 153 | .rar 01;31 154 | .alz 01;31 155 | .ace 01;31 156 | .zoo 01;31 157 | .cpio 01;31 158 | .7z 01;31 159 | .rz 01;31 160 | .cab 01;31 161 | 162 | # image formats 163 | .jpg 01;35 164 | .jpeg 01;35 165 | .gif 01;35 166 | .bmp 01;35 167 | .pbm 01;35 168 | .pgm 01;35 169 | .ppm 01;35 170 | .tga 01;35 171 | .xbm 01;35 172 | .xpm 01;35 173 | .tif 01;35 174 | .tiff 01;35 175 | .png 01;35 176 | .svg 01;35 177 | .svgz 01;35 178 | .mng 01;35 179 | .pcx 01;35 180 | .mov 01;35 181 | .mpg 01;35 182 | .mpeg 01;35 183 | .m2v 01;35 184 | .mkv 01;35 185 | .webm 01;35 186 | .ogm 01;35 187 | .mp4 01;35 188 | .m4v 01;35 189 | .mp4v 01;35 190 | .vob 01;35 191 | .qt 01;35 192 | .nuv 01;35 193 | .wmv 01;35 194 | .asf 01;35 195 | .rm 01;35 196 | .rmvb 01;35 197 | .flc 01;35 198 | .avi 01;35 199 | .fli 01;35 200 | .flv 01;35 201 | .gl 01;35 202 | .dl 01;35 203 | .xcf 01;35 204 | .xwd 01;35 205 | .yuv 01;35 206 | .cgm 01;35 207 | .emf 01;35 208 | 209 | # http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions 210 | .axv 01;35 211 | .anx 01;35 212 | .ogv 01;35 213 | .ogx 01;35 214 | 215 | # Document files 216 | .pdf 00;32 217 | .ps 00;32 218 | .txt 00;32 219 | .patch 00;32 220 | .diff 00;32 221 | .log 00;32 222 | .tex 00;32 223 | .doc 00;32 224 | 225 | # audio formats 226 | .aac 00;36 227 | .au 00;36 228 | .flac 00;36 229 | .m4a 00;36 230 | .mid 00;36 231 | .midi 00;36 232 | .mka 00;36 233 | .mp3 00;36 234 | .mpc 00;36 235 | .ogg 00;36 236 | .ra 00;36 237 | .wav 00;36 238 | 239 | # http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions 240 | .axa 00;36 241 | .oga 00;36 242 | .spx 00;36 243 | .xspf 00;36 244 | -------------------------------------------------------------------------------- /bash/.extend.bashrc: -------------------------------------------------------------------------------- 1 | # 2 | # ~/.extend.bashrc 3 | # 4 | 5 | # ex - archive extractor 6 | # usage: ex 7 | function ex () { 8 | if [ -f $1 ] ; then 9 | case $1 in 10 | *.tar.bz2) tar xjf $1 ;; 11 | *.tar.gz) tar xzf $1 ;; 12 | *.bz2) bunzip2 $1 ;; 13 | *.rar) unrar x $1 ;; 14 | *.gz) gunzip $1 ;; 15 | *.tar) tar xf $1 ;; 16 | *.tbz2) tar xjf $1 ;; 17 | *.tgz) tar xzf $1 ;; 18 | *.zip) unzip $1 ;; 19 | *.Z) uncompress $1;; 20 | *.7z) 7z x $1 ;; 21 | *) echo "'$1' cannot be extracted via ex()" ;; 22 | esac 23 | else 24 | echo "'$1' is not a valid file" 25 | fi 26 | } 27 | 28 | 29 | function _get_keyboard_id { 30 | keyboard_id=$(xinput list | grep AT | awk -F '=' '{ print $2 }' | awk '{ print $1 }') 31 | echo $keyboard_id 32 | } 33 | 34 | 35 | # dk - disable laptop keyboard 36 | function dk () { 37 | keyboard_id=$(_get_keyboard_id) 38 | xinput disable $keyboard_id 39 | } 40 | 41 | 42 | # ek - enable laptop keyboard 43 | function ek () { 44 | keyboard_id=$(_get_keyboard_id) 45 | xinput enable $keyboard_id 46 | } 47 | 48 | -------------------------------------------------------------------------------- /docker/compose/adguard/.gitignore: -------------------------------------------------------------------------------- 1 | adguardhome/ 2 | -------------------------------------------------------------------------------- /docker/compose/adguard/chaneys_filter.txt: -------------------------------------------------------------------------------- 1 | # Block most adult Websites 2 | # origin from https://github.com/virtualvoyager367/Adult-Site-Blocklist 3 | 4 | !Explicit Content 5 | 6 | ||4chan.com^ 7 | ||8tube.xxx^ 8 | ||bangbros.com^ 9 | ||fling.com^ 10 | ||hclips.com^ 11 | ||hentaihaven.org^ 12 | ||mydirtyhobby.com^ 13 | ||naked.com^ 14 | ||pornhub.com^ 15 | ||redtube.com^ 16 | ||spankbang.com^ 17 | ||tnaflix.com^ 18 | ||tube8.com^ 19 | ||xhamster.com^ 20 | ||xnxx.com^ 21 | ||xvideos.com^ 22 | ||youjizz.com 23 | ||youporn.com^ 24 | ||hanime1.me^ 25 | ||jable.tv^ 26 | ||kink.com^ 27 | ||nhentai.net^ 28 | ||xhamsterlive.com^ 29 | 30 | !Dating 31 | 32 | ||bumble.com 33 | ||cupid.com 34 | ||elitesingles.com 35 | ||hinge.com 36 | ||lavalife.com 37 | ||match.com 38 | ||matchmaker.com 39 | ||meetme.com 40 | ||okcupid.com 41 | ||okcupid.com 42 | ||plentyoffish.com 43 | ||seniormatch.com 44 | ||tinder.com 45 | ||zoosk.com 46 | ||eharmony.com 47 | 48 | !Cam Websites 49 | 50 | ||bongacams.com^ 51 | ||cam4.com^ 52 | ||camsoda.com^ 53 | ||cams.com^ 54 | ||chaturbate.com^ 55 | ||imlive.com^ 56 | ||livejasmin.com^ 57 | ||liveprivates.com^ 58 | ||myfreecams.com^ 59 | ||naked.com^ 60 | ||slutroulette.com^ 61 | ||streamate.com^ 62 | 63 | !Chat Sites 64 | 65 | ||adultchat.com^ 66 | ||bazoocam.org^ 67 | ||bongacams.com^ 68 | ||chat-avenue.com^ 69 | ||chatroulette.com^ 70 | ||chathour.com^ 71 | ||chatterbate.com^ 72 | ||coomeet.com^ 73 | ||omegle.com^ 74 | ||paltalk.com^ 75 | ||paltalk.com^ 76 | ||talkwithstranger.com^ 77 | ||tinychat.com^ 78 | 79 | !Gambling Sites 80 | 81 | ||888casino.com^ 82 | ||bet365.com^ 83 | ||betonline.ag^ 84 | ||betfair.com^ 85 | ||betfred.com^ 86 | ||bovada.lv^ 87 | ||freespin.com^ 88 | ||ladbrokes.com^ 89 | ||mybookie.ag^ 90 | ||partypoker.com^ 91 | ||pokerstars.com^ 92 | ||royalacecasino.com^ 93 | ||slotocash.im^ 94 | ||sportsbetting.ag^ 95 | ||unibet.com^ 96 | ||williamhill.com^ 97 | 98 | !Malware/Infected Sites 99 | 100 | ||adsports.in^ 101 | ||alushtadom.com^ 102 | ||avtoresurs.net^ 103 | ||eastsideautosalvage.com^ 104 | ||gtcartographic.co.uk^ 105 | ||logopaedie-tisch.homepage.t-online.de^ 106 | ||pamelasparrowchilds.com^ 107 | ||stimmwissenschaften.de^ 108 | ||truepublish.de^ 109 | 110 | -------------------------------------------------------------------------------- /docker/compose/adguard/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | adguardhome: 3 | image: adguard/adguardhome 4 | container_name: adguardhome 5 | restart: always 6 | network_mode: host 7 | volumes: 8 | - ./adguardhome/work:/opt/adguardhome/work 9 | - ./adguardhome/conf:/opt/adguardhome/conf 10 | -------------------------------------------------------------------------------- /docker/compose/beszel/agent/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | -------------------------------------------------------------------------------- /docker/compose/beszel/agent/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | beszel-agent: 3 | image: henrygd/beszel-agent:latest 4 | container_name: beszel-agent 5 | restart: unless-stopped 6 | network_mode: host 7 | volumes: 8 | - /var/run/docker.sock:/var/run/docker.sock:ro 9 | env_file: ".env" 10 | -------------------------------------------------------------------------------- /docker/compose/beszel/hub/.gitignore: -------------------------------------------------------------------------------- 1 | beszel_data/ 2 | -------------------------------------------------------------------------------- /docker/compose/beszel/hub/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | beszel: 3 | image: henrygd/beszel:latest 4 | container_name: beszel 5 | restart: unless-stopped 6 | ports: 7 | - 8090:8090 8 | volumes: 9 | - ./beszel_data:/beszel_data 10 | -------------------------------------------------------------------------------- /docker/compose/clash/.gitignore: -------------------------------------------------------------------------------- 1 | config.yaml 2 | config.stash.yaml -------------------------------------------------------------------------------- /docker/compose/clash/clash_chaneys_reject.txt: -------------------------------------------------------------------------------- 1 | payload: 2 | # Block most adult Websites 3 | # origin from https://github.com/virtualvoyager367/Adult-Site-Blocklist 4 | 5 | # Explicit Content 6 | - '+.4chan.com' 7 | - '+.8tube.xxx' 8 | - '+.bangbros.com' 9 | - '+.fling.com' 10 | - '+.hclips.com' 11 | - '+.hentaihaven.org' 12 | - '+.mydirtyhobby.com' 13 | - '+.naked.com' 14 | - '+.pornhub.com' 15 | - '+.redtube.com' 16 | - '+.spankbang.com' 17 | - '+.tnaflix.com' 18 | - '+.tube8.com' 19 | - '+.xhamster.com' 20 | - '+.xnxx.com' 21 | - '+.xvideos.com' 22 | - '+.youjizz.co' 23 | - '+.youporn.com' 24 | - '+.hanime1.me' 25 | - '+.jable.tv' 26 | - '+.kink.com' 27 | - '+.nhentai.net' 28 | - '+.xhamsterlive.com' 29 | 30 | # Dating 31 | - '+.bumble.com' 32 | - '+.cupid.com' 33 | - '+.elitesingles.com' 34 | - '+.hinge.com' 35 | - '+.lavalife.com' 36 | - '+.match.com' 37 | - '+.matchmaker.com' 38 | - '+.meetme.com' 39 | - '+.okcupid.com' 40 | - '+.okcupid.com' 41 | - '+.plentyoffish.com' 42 | - '+.seniormatch.com' 43 | - '+.tinder.com' 44 | - '+.zoosk.com' 45 | - '+.eharmony.com' 46 | 47 | # Cam Websites 48 | - '+.bongacams.com' 49 | - '+.cam4.com' 50 | - '+.camsoda.com' 51 | - '+.cams.com' 52 | - '+.chaturbate.com' 53 | - '+.imlive.com' 54 | - '+.livejasmin.com' 55 | - '+.liveprivates.com' 56 | - '+.myfreecams.com' 57 | - '+.naked.com' 58 | - '+.slutroulette.com' 59 | - '+.streamate.com' 60 | 61 | # Chat Sites 62 | - '+.adultchat.com' 63 | - '+.bazoocam.org' 64 | - '+.bongacams.com' 65 | - '+.chat-avenue.com' 66 | - '+.chatroulette.com' 67 | - '+.chathour.com' 68 | - '+.chatterbate.com' 69 | - '+.coomeet.com' 70 | - '+.omegle.com' 71 | - '+.paltalk.com' 72 | - '+.paltalk.com' 73 | - '+.talkwithstranger.com' 74 | - '+.tinychat.com' 75 | 76 | # Gambling Sites 77 | - '+.888casino.com' 78 | - '+.bet365.com' 79 | - '+.betonline.ag' 80 | - '+.betfair.com' 81 | - '+.betfred.com' 82 | - '+.bovada.lv' 83 | - '+.freespin.com' 84 | - '+.ladbrokes.com' 85 | - '+.mybookie.ag' 86 | - '+.partypoker.com' 87 | - '+.pokerstars.com' 88 | - '+.royalacecasino.com' 89 | - '+.slotocash.im' 90 | - '+.sportsbetting.ag' 91 | - '+.unibet.com' 92 | - '+.williamhill.com' 93 | 94 | # Malware/Infected Sites 95 | - '+.adsports.in' 96 | - '+.alushtadom.com' 97 | - '+.avtoresurs.net' 98 | - '+.eastsideautosalvage.com' 99 | - '+.gtcartographic.co.uk' 100 | - '+.logopaedie-tisch.homepage.t-online.de' 101 | - '+.pamelasparrowchilds.com' 102 | - '+.stimmwissenschaften.de' 103 | - '+.truepublish.de' 104 | -------------------------------------------------------------------------------- /docker/compose/clash/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | metacubexd: 3 | container_name: metacubexd 4 | image: ghcr.io/metacubex/metacubexd 5 | restart: always 6 | ports: 7 | - '17895:80' 8 | clash: 9 | container_name: clash-meta 10 | image: docker.io/metacubex/mihomo:Alpha 11 | restart: always 12 | pid: host 13 | ipc: host 14 | network_mode: host 15 | cap_add: 16 | - ALL 17 | volumes: 18 | - ./config.yaml:/root/.config/mihomo/config.yaml 19 | - /dev/net/tun:/dev/net/tun 20 | -------------------------------------------------------------------------------- /docker/compose/clash/example.config.yaml: -------------------------------------------------------------------------------- 1 | # see https://github.com/MetaCubeX/mihomo/blob/Alpha/docs/config.yaml 2 | 3 | log-level: info 4 | 5 | mixed-port: 7890 6 | allow-lan: true 7 | bind-address: "*" 8 | mode: rule 9 | 10 | external-controller: 0.0.0.0:17894 11 | geo-auto-update: true 12 | 13 | hosts: 14 | profile: 15 | store-selected: true 16 | store-fake-ip: true 17 | 18 | dns: 19 | cache-algorithm: arc 20 | enable: false # 关闭将使用系统 DNS 21 | prefer-h3: false # 是否开启 DoH 支持 HTTP/3,将并发尝试 22 | listen: 0.0.0.0:53 # 开启 DNS 服务器监听 23 | default-nameserver: 24 | - 114.114.114.114 25 | - 8.8.8.8 26 | - tls://1.12.12.12:853 27 | - tls://223.5.5.5:853 28 | - system # append DNS server from system configuration. If not found, it would print an error log and skip. 29 | enhanced-mode: fake-ip # or redir-host 30 | fake-ip-range: 198.18.0.1/16 # fake-ip 池设置 31 | fake-ip-filter: 32 | - '*.lan' 33 | fake-ip-filter-mode: blacklist 34 | use-hosts: true 35 | respect-rules: false 36 | nameserver: 37 | - 114.114.114.114 # default value 38 | - 8.8.8.8 # default value 39 | - tls://223.5.5.5:853 # DNS over TLS 40 | - https://doh.pub/dns-query # DNS over HTTPS 41 | - https://dns.alidns.com/dns-query#h3=true # 强制 HTTP/3,与 perfer-h3 无关,强制开启 DoH 的 HTTP/3 支持,若不支持将无法使用 42 | - https://mozilla.cloudflare-dns.com/dns-query#DNS&h3=true # 指定策略组和使用 HTTP/3 43 | - quic://dns.adguard.com:784 # DNS over QUIC 44 | proxy-server-nameserver: 45 | - https://dns.google/dns-query 46 | - https://doh.pub/dns-query 47 | - https://dns.alidns.com/dns-query 48 | - tls://one.one.one.one 49 | nameserver-policy: 50 | "geosite:cn,private,apple": 51 | - https://doh.pub/dns-query 52 | - https://dns.alidns.com/dns-query 53 | "geosite:category-ads-all": rcode://success 54 | "www.baidu.com,+.google.cn": [223.5.5.5, https://dns.alidns.com/dns-query] 55 | 56 | proxy-providers: 57 | SUBSCRIPTION.name: 58 | type: http 59 | url: "SUBSCRIPTION.url" 60 | interval: 3600 61 | path: ./proxies/SUBSCRIPTION.name.yaml 62 | proxy: DIRECT 63 | header: 64 | User-Agent: 65 | - "Clash" 66 | - "mihomo" 67 | health-check: 68 | enable: true 69 | interval: 600 70 | # lazy: true 71 | url: https://cp.cloudflare.com/generate_204 72 | # expected-status: 204 # 当健康检查返回状态码与期望值不符时,认为节点不可用 73 | override: 74 | # skip-cert-verify: true 75 | # udp: true 76 | 77 | proxy-groups: 78 | - name: PROXY 79 | type: select 80 | use: 81 | - SUBSCRIPTION.name 82 | proxies: 83 | - Auto 84 | - Fallback 85 | - name: Auto 86 | type: url-test 87 | url: "https://cp.cloudflare.com/generate_204" 88 | interval: 86400 89 | use: 90 | - SUBSCRIPTION.name 91 | - name: Fallback 92 | type: fallback 93 | url: "https://cp.cloudflare.com/generate_204" 94 | interval: 7200 95 | use: 96 | - SUBSCRIPTION.name 97 | 98 | rule-providers: 99 | reject: 100 | type: http 101 | behavior: domain 102 | url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/reject.txt" 103 | path: ./ruleset/reject.yaml 104 | interval: 86400 105 | 106 | icloud: 107 | type: http 108 | behavior: domain 109 | url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/icloud.txt" 110 | path: ./ruleset/icloud.yaml 111 | interval: 86400 112 | 113 | apple: 114 | type: http 115 | behavior: domain 116 | url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/apple.txt" 117 | path: ./ruleset/apple.yaml 118 | interval: 86400 119 | 120 | google: 121 | type: http 122 | behavior: domain 123 | url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/google.txt" 124 | path: ./ruleset/google.yaml 125 | interval: 86400 126 | 127 | proxy: 128 | type: http 129 | behavior: domain 130 | url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/proxy.txt" 131 | path: ./ruleset/proxy.yaml 132 | interval: 86400 133 | 134 | direct: 135 | type: http 136 | behavior: domain 137 | url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/direct.txt" 138 | path: ./ruleset/direct.yaml 139 | interval: 86400 140 | 141 | private: 142 | type: http 143 | behavior: domain 144 | url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/private.txt" 145 | path: ./ruleset/private.yaml 146 | interval: 86400 147 | 148 | gfw: 149 | type: http 150 | behavior: domain 151 | url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/gfw.txt" 152 | path: ./ruleset/gfw.yaml 153 | interval: 86400 154 | 155 | tld-not-cn: 156 | type: http 157 | behavior: domain 158 | url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/tld-not-cn.txt" 159 | path: ./ruleset/tld-not-cn.yaml 160 | interval: 86400 161 | 162 | telegramcidr: 163 | type: http 164 | behavior: ipcidr 165 | url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/telegramcidr.txt" 166 | path: ./ruleset/telegramcidr.yaml 167 | interval: 86400 168 | 169 | cncidr: 170 | type: http 171 | behavior: ipcidr 172 | url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/cncidr.txt" 173 | path: ./ruleset/cncidr.yaml 174 | interval: 86400 175 | 176 | lancidr: 177 | type: http 178 | behavior: ipcidr 179 | url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/lancidr.txt" 180 | path: ./ruleset/lancidr.yaml 181 | interval: 86400 182 | 183 | applications: 184 | type: http 185 | behavior: classical 186 | url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/applications.txt" 187 | path: ./ruleset/applications.yaml 188 | interval: 86400 189 | 190 | adblockmihomo: 191 | type: http 192 | behavior: domain 193 | url: "https://raw.githubusercontent.com/217heidai/adblockfilters/main/rules/adblockmihomo.yaml" 194 | path: ./ruleset/adblockmihomo.yaml 195 | interval: 86400 196 | 197 | chaneyreject: 198 | type: http 199 | behavior: domain 200 | url: "https://raw.githubusercontent.com/chaneyzorn/dotfiles/master/docker/compose/clash/clash_chaneys_reject.txt" 201 | path: ./ruleset/chaneys_reject.yaml 202 | interval: 86400 203 | 204 | rules: 205 | - DOMAIN,clash.razord.top,DIRECT 206 | - DOMAIN,yacd.haishan.me,DIRECT 207 | - RULE-SET,adblockmihomo,REJECT 208 | - RULE-SET,chaneyreject,REJECT 209 | - RULE-SET,reject,REJECT 210 | - RULE-SET,applications,DIRECT 211 | - RULE-SET,private,DIRECT,no-resolve 212 | - RULE-SET,icloud,DIRECT 213 | - RULE-SET,apple,DIRECT 214 | - RULE-SET,google,PROXY 215 | - RULE-SET,proxy,PROXY 216 | - RULE-SET,direct,DIRECT 217 | - RULE-SET,lancidr,DIRECT 218 | - RULE-SET,cncidr,DIRECT 219 | - RULE-SET,telegramcidr,PROXY 220 | - GEOIP,LAN,DIRECT 221 | - GEOIP,CN,DIRECT 222 | - MATCH,PROXY 223 | -------------------------------------------------------------------------------- /docker/compose/docker-kong/.gitignore: -------------------------------------------------------------------------------- 1 | config/gen-crt 2 | -------------------------------------------------------------------------------- /docker/compose/docker-kong/Makefile: -------------------------------------------------------------------------------- 1 | ACTION ?= up -d 2 | 3 | kong-postgres: 4 | COMPOSE_PROJECT_NAME=kong \ 5 | COMPOSE_PROFILES=database \ 6 | KONG_DATABASE=postgres \ 7 | KONG_PROXY_LISTEN="0.0.0.0:8000, 0.0.0.0:8443 ssl" \ 8 | KONG_ADMIN_LISTEN="0.0.0.0:8001 reuseport backlog=16384, 0.0.0.0:8444 http2 ssl reuseport backlog=16384" \ 9 | KONG_ADMIN_GUI_LISTEN="0.0.0.0:8002, 0.0.0.0:8445 ssl" \ 10 | docker compose ${ACTION} 11 | 12 | kong-dbless: 13 | docker compose up -d 14 | 15 | clean: 16 | docker compose kill 17 | docker compose rm -f 18 | -------------------------------------------------------------------------------- /docker/compose/docker-kong/POSTGRES_PASSWORD: -------------------------------------------------------------------------------- 1 | kong -------------------------------------------------------------------------------- /docker/compose/docker-kong/README.md: -------------------------------------------------------------------------------- 1 | # Kong in Docker Compose 2 | 3 | from 4 | 5 | -------------------------------------------------------------------------------- /docker/compose/docker-kong/config/kong.yaml: -------------------------------------------------------------------------------- 1 | # a very minimal declarative config file 2 | _format_version: "2.1" 3 | _transform: true 4 | -------------------------------------------------------------------------------- /docker/compose/docker-kong/docker-compose.yml: -------------------------------------------------------------------------------- 1 | x-kong-config: 2 | &kong-env 3 | KONG_DATABASE: ${KONG_DATABASE:-off} 4 | KONG_PG_DATABASE: ${KONG_PG_DATABASE:-kong} 5 | KONG_PG_HOST: db 6 | KONG_PG_USER: ${KONG_PG_USER:-kong} 7 | KONG_PG_PASSWORD_FILE: /run/secrets/kong_postgres_password 8 | 9 | volumes: 10 | kong_data: {} 11 | kong_prefix_vol: 12 | driver_opts: 13 | type: tmpfs 14 | device: tmpfs 15 | kong_tmp_vol: 16 | driver_opts: 17 | type: tmpfs 18 | device: tmpfs 19 | 20 | networks: 21 | kong-net: 22 | external: false 23 | 24 | services: 25 | kong-migrations: 26 | image: "${KONG_DOCKER_TAG:-kong:latest}" 27 | command: kong migrations bootstrap 28 | profiles: [ "database" ] 29 | depends_on: 30 | - db 31 | environment: 32 | <<: *kong-env 33 | secrets: 34 | - kong_postgres_password 35 | networks: 36 | - kong-net 37 | restart: on-failure 38 | 39 | kong-migrations-up: 40 | image: "${KONG_DOCKER_TAG:-kong:latest}" 41 | command: kong migrations up && kong migrations finish 42 | profiles: [ "database" ] 43 | depends_on: 44 | - db 45 | environment: 46 | <<: *kong-env 47 | secrets: 48 | - kong_postgres_password 49 | networks: 50 | - kong-net 51 | restart: on-failure 52 | 53 | kong: 54 | image: "${KONG_DOCKER_TAG:-kong:latest}" 55 | user: "${KONG_USER:-kong}" 56 | environment: 57 | <<: *kong-env 58 | KONG_ADMIN_ACCESS_LOG: /dev/stdout 59 | KONG_ADMIN_ERROR_LOG: /dev/stderr 60 | KONG_PROXY_LISTEN: "${KONG_PROXY_LISTEN:-0.0.0.0:8000}" 61 | KONG_ADMIN_LISTEN: "${KONG_ADMIN_LISTEN:-0.0.0.0:8001}" 62 | KONG_ADMIN_GUI_LISTEN: "${KONG_ADMIN_GUI_LISTEN:-0.0.0.0:8002}" 63 | KONG_PROXY_ACCESS_LOG: /dev/stdout 64 | KONG_PROXY_ERROR_LOG: /dev/stderr 65 | KONG_PREFIX: ${KONG_PREFIX:-/var/run/kong} 66 | KONG_DECLARATIVE_CONFIG: "/opt/kong/kong.yaml" 67 | KONG_ADMIN_SSL_CERT: "/opt/kong/gen-crt/wildcard.home.lan.crt" 68 | KONG_ADMIN_SSL_CERT_KEY: "/opt/kong/gen-crt/wildcard.home.lan.key" 69 | secrets: 70 | - kong_postgres_password 71 | networks: 72 | - kong-net 73 | ports: 74 | # The following two environment variables default to an insecure value (0.0.0.0) 75 | # according to the CIS Security test. 76 | - "${KONG_INBOUND_PROXY_LISTEN:-0.0.0.0}:80:8000/tcp" 77 | - "${KONG_INBOUND_SSL_PROXY_LISTEN:-0.0.0.0}:443:8443/tcp" 78 | # Making them mandatory but undefined, like so would be backwards-breaking: 79 | # - "${KONG_INBOUND_PROXY_LISTEN?Missing inbound proxy host}:8000:8000/tcp" 80 | # - "${KONG_INBOUND_SSL_PROXY_LISTEN?Missing inbound proxy ssl host}:8443:8443/tcp" 81 | # Alternative is deactivating check 5.13 in the security bench, if we consider Kong's own config to be enough security here 82 | 83 | - "8001:8001/tcp" 84 | - "8444:8444/tcp" 85 | - "8002:8002/tcp" 86 | - "8445:8445/tcp" 87 | healthcheck: 88 | test: [ "CMD", "kong", "health" ] 89 | interval: 10s 90 | timeout: 10s 91 | retries: 10 92 | restart: on-failure:5 93 | read_only: true 94 | volumes: 95 | - kong_prefix_vol:${KONG_PREFIX:-/var/run/kong} 96 | - kong_tmp_vol:/tmp 97 | - ./config:/opt/kong 98 | security_opt: 99 | - no-new-privileges 100 | 101 | db: 102 | image: postgres:9.5 103 | profiles: [ "database" ] 104 | environment: 105 | POSTGRES_DB: ${KONG_PG_DATABASE:-kong} 106 | POSTGRES_USER: ${KONG_PG_USER:-kong} 107 | POSTGRES_PASSWORD_FILE: /run/secrets/kong_postgres_password 108 | secrets: 109 | - kong_postgres_password 110 | healthcheck: 111 | test: 112 | [ 113 | "CMD", 114 | "pg_isready", 115 | "-d", 116 | "${KONG_PG_DATABASE:-kong}", 117 | "-U", 118 | "${KONG_PG_USER:-kong}" 119 | ] 120 | interval: 30s 121 | timeout: 30s 122 | retries: 3 123 | restart: on-failure 124 | stdin_open: true 125 | tty: true 126 | networks: 127 | - kong-net 128 | volumes: 129 | - kong_data:/var/lib/postgresql/data 130 | 131 | secrets: 132 | kong_postgres_password: 133 | file: ./POSTGRES_PASSWORD 134 | -------------------------------------------------------------------------------- /docker/compose/docker-kong/docker-compose.yml-e: -------------------------------------------------------------------------------- 1 | version: '3.9' 2 | 3 | x-kong-config: 4 | &kong-env 5 | KONG_DATABASE: ${KONG_DATABASE:-off} 6 | KONG_PG_DATABASE: ${KONG_PG_DATABASE:-kong} 7 | KONG_PG_HOST: db 8 | KONG_PG_USER: ${KONG_PG_USER:-kong} 9 | KONG_PG_PASSWORD_FILE: /run/secrets/kong_postgres_password 10 | 11 | volumes: 12 | kong_data: {} 13 | kong_prefix_vol: 14 | driver_opts: 15 | type: tmpfs 16 | device: tmpfs 17 | kong_tmp_vol: 18 | driver_opts: 19 | type: tmpfs 20 | device: tmpfs 21 | 22 | networks: 23 | kong-net: 24 | external: false 25 | 26 | services: 27 | kong-migrations: 28 | image: "${KONG_DOCKER_TAG:-kong:latest}" 29 | command: kong migrations bootstrap 30 | profiles: [ "database" ] 31 | depends_on: 32 | - db 33 | environment: 34 | <<: *kong-env 35 | secrets: 36 | - kong_postgres_password 37 | networks: 38 | - kong-net 39 | restart: on-failure 40 | 41 | kong-migrations-up: 42 | image: "${KONG_DOCKER_TAG:-kong:latest}" 43 | command: kong migrations up && kong migrations finish 44 | profiles: [ "database" ] 45 | depends_on: 46 | - db 47 | environment: 48 | <<: *kong-env 49 | secrets: 50 | - kong_postgres_password 51 | networks: 52 | - kong-net 53 | restart: on-failure 54 | 55 | kong: 56 | image: "${KONG_DOCKER_TAG:-kong:latest}" 57 | user: "${KONG_USER:-kong}" 58 | environment: 59 | <<: *kong-env 60 | KONG_ADMIN_ACCESS_LOG: /dev/stdout 61 | KONG_ADMIN_ERROR_LOG: /dev/stderr 62 | KONG_PROXY_LISTEN: "${KONG_PROXY_LISTEN:-0.0.0.0:8000}" 63 | KONG_ADMIN_LISTEN: "${KONG_ADMIN_LISTEN:-0.0.0.0:8001}" 64 | KONG_ADMIN_GUI_LISTEN: "${KONG_ADMIN_GUI_LISTEN:-0.0.0.0:8002}" 65 | KONG_PROXY_ACCESS_LOG: /dev/stdout 66 | KONG_PROXY_ERROR_LOG: /dev/stderr 67 | KONG_PREFIX: ${KONG_PREFIX:-/var/run/kong} 68 | KONG_DECLARATIVE_CONFIG: "/opt/kong/kong.yaml" 69 | secrets: 70 | - kong_postgres_password 71 | networks: 72 | - kong-net 73 | ports: 74 | # The following two environment variables default to an insecure value (0.0.0.0) 75 | # according to the CIS Security test. 76 | - "${KONG_INBOUND_PROXY_LISTEN:-0.0.0.0}:8000:8000/tcp" 77 | - "${KONG_INBOUND_SSL_PROXY_LISTEN:-0.0.0.0}:8443:8443/tcp" 78 | # Making them mandatory but undefined, like so would be backwards-breaking: 79 | # - "${KONG_INBOUND_PROXY_LISTEN?Missing inbound proxy host}:8000:8000/tcp" 80 | # - "${KONG_INBOUND_SSL_PROXY_LISTEN?Missing inbound proxy ssl host}:8443:8443/tcp" 81 | # Alternative is deactivating check 5.13 in the security bench, if we consider Kong's own config to be enough security here 82 | 83 | - "8001:8001/tcp" 84 | - "8444:8444/tcp" 85 | - "8002:8002/tcp" 86 | healthcheck: 87 | test: [ "CMD", "kong", "health" ] 88 | interval: 10s 89 | timeout: 10s 90 | retries: 10 91 | restart: on-failure:5 92 | read_only: true 93 | volumes: 94 | - kong_prefix_vol:${KONG_PREFIX:-/var/run/kong} 95 | - kong_tmp_vol:/tmp 96 | - ./config:/opt/kong 97 | security_opt: 98 | - no-new-privileges 99 | 100 | db: 101 | image: postgres:9.5 102 | profiles: [ "database" ] 103 | environment: 104 | POSTGRES_DB: ${KONG_PG_DATABASE:-kong} 105 | POSTGRES_USER: ${KONG_PG_USER:-kong} 106 | POSTGRES_PASSWORD_FILE: /run/secrets/kong_postgres_password 107 | secrets: 108 | - kong_postgres_password 109 | healthcheck: 110 | test: 111 | [ 112 | "CMD", 113 | "pg_isready", 114 | "-d", 115 | "${KONG_PG_DATABASE:-kong}", 116 | "-U", 117 | "${KONG_PG_USER:-kong}" 118 | ] 119 | interval: 30s 120 | timeout: 30s 121 | retries: 3 122 | restart: on-failure 123 | stdin_open: true 124 | tty: true 125 | networks: 126 | - kong-net 127 | volumes: 128 | - kong_data:/var/lib/postgresql/data 129 | 130 | secrets: 131 | kong_postgres_password: 132 | file: ./POSTGRES_PASSWORD 133 | -------------------------------------------------------------------------------- /docker/compose/dufs/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | dufs: 3 | image: sigoden/dufs 4 | container_name: dufs 5 | restart: always 6 | volumes: 7 | - '$HOME:/data' 8 | ports: 9 | - '5000:5000' 10 | command: '/data -A' 11 | -------------------------------------------------------------------------------- /docker/compose/gitea/.gitignore: -------------------------------------------------------------------------------- 1 | gitea/ 2 | -------------------------------------------------------------------------------- /docker/compose/gitea/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | networks: 2 | gitea: 3 | external: false 4 | 5 | services: 6 | server: 7 | image: docker.gitea.com/gitea:1.23.8 8 | container_name: gitea 9 | environment: 10 | - USER_UID=1000 11 | - USER_GID=1000 12 | restart: always 13 | networks: 14 | - gitea 15 | volumes: 16 | - ./gitea:/data 17 | - /etc/timezone:/etc/timezone:ro 18 | - /etc/localtime:/etc/localtime:ro 19 | ports: 20 | - "3280:3000" 21 | - "2222:22" 22 | -------------------------------------------------------------------------------- /docker/compose/homarr/.gitignore: -------------------------------------------------------------------------------- 1 | homarr/appdata -------------------------------------------------------------------------------- /docker/compose/homarr/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | homarr: 3 | container_name: homarr 4 | image: ghcr.io/homarr-labs/homarr:latest 5 | uts: host 6 | restart: unless-stopped 7 | volumes: 8 | - /var/run/docker.sock:/var/run/docker.sock 9 | - ./homarr/appdata:/appdata 10 | environment: 11 | - SECRET_ENCRYPTION_KEY=bbfd7465415bf08e0faecbab202531874957e48b7ed20b48acbfec3db8250cdb 12 | ports: 13 | - '7575:7575' 14 | -------------------------------------------------------------------------------- /docker/compose/homepage/config/bookmarks.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # For configuration options and examples, please see: 3 | # https://gethomepage.dev/latest/configs/bookmarks 4 | 5 | - Developer: 6 | - Github: 7 | - abbr: GH 8 | href: https://github.com/ 9 | 10 | - Social: 11 | - Reddit: 12 | - abbr: RE 13 | href: https://reddit.com/ 14 | 15 | - Entertainment: 16 | - YouTube: 17 | - abbr: YT 18 | href: https://youtube.com/ 19 | -------------------------------------------------------------------------------- /docker/compose/homepage/config/custom.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaneyzorn/dotfiles/8347f6aaadc2709f95b2cefeb0137e87c2eec0bc/docker/compose/homepage/config/custom.css -------------------------------------------------------------------------------- /docker/compose/homepage/config/custom.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaneyzorn/dotfiles/8347f6aaadc2709f95b2cefeb0137e87c2eec0bc/docker/compose/homepage/config/custom.js -------------------------------------------------------------------------------- /docker/compose/homepage/config/docker.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # For configuration options and examples, please see: 3 | # https://gethomepage.dev/latest/configs/docker/ 4 | 5 | # my-docker: 6 | # host: 127.0.0.1 7 | # port: 2375 8 | 9 | # my-docker: 10 | # socket: /var/run/docker.sock 11 | -------------------------------------------------------------------------------- /docker/compose/homepage/config/kubernetes.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # sample kubernetes config 3 | -------------------------------------------------------------------------------- /docker/compose/homepage/config/logs/homepage.log: -------------------------------------------------------------------------------- 1 | [2023-11-22T11:05:52.186Z] info: docker.yaml was copied to the config folder 2 | [2023-11-22T11:05:52.192Z] info: services.yaml was copied to the config folder 3 | [2023-11-22T11:05:52.194Z] info: bookmarks.yaml was copied to the config folder 4 | [2023-11-22T11:05:52.224Z] info: widgets.yaml was copied to the config folder 5 | [2023-11-22T11:05:52.226Z] info: custom.css was copied to the config folder 6 | [2023-11-22T11:05:52.229Z] info: custom.js was copied to the config folder 7 | [2023-11-22T11:05:52.344Z] info: kubernetes.yaml was copied to the config folder 8 | -------------------------------------------------------------------------------- /docker/compose/homepage/config/services.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # For configuration options and examples, please see: 3 | # https://gethomepage.dev/latest/configs/services 4 | 5 | - My First Group: 6 | - My First Service: 7 | href: http://localhost/ 8 | description: Homepage is awesome 9 | 10 | - My Second Group: 11 | - My Second Service: 12 | href: http://localhost/ 13 | description: Homepage is the best 14 | 15 | - My Third Group: 16 | - My Third Service: 17 | href: http://localhost/ 18 | description: Homepage is 😎 19 | -------------------------------------------------------------------------------- /docker/compose/homepage/config/settings.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # For configuration options and examples, please see: 3 | # https://gethomepage.dev/latest/configs/settings 4 | 5 | title: "Chaney's Homepage" 6 | language: zh-CN 7 | headerStyle: boxed 8 | providers: 9 | openweathermap: openweathermapapikey 10 | weatherapi: weatherapiapikey 11 | -------------------------------------------------------------------------------- /docker/compose/homepage/config/widgets.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # For configuration options and examples, please see: 3 | # https://gethomepage.dev/latest/configs/widgets 4 | 5 | - resources: 6 | cpu: true 7 | memory: true 8 | disk: / 9 | 10 | - search: 11 | provider: duckduckgo 12 | target: _blank 13 | -------------------------------------------------------------------------------- /docker/compose/homepage/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | homepage: 3 | image: ghcr.io/gethomepage/homepage:latest 4 | container_name: homepage 5 | restart: always 6 | environment: 7 | PUID: 1000 8 | PGID: 1000 9 | ports: 10 | - 8310:3000 11 | volumes: 12 | - ./config:/app/config 13 | - /var/run/docker.sock:/var/run/docker.sock:ro 14 | -------------------------------------------------------------------------------- /docker/compose/lx-music/.gitignore: -------------------------------------------------------------------------------- 1 | lx-data/ 2 | -------------------------------------------------------------------------------- /docker/compose/lx-music/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | lx-music: 3 | image: lyswhut/lx-music-sync-server:v2.1.0 4 | container_name: lx-music 5 | restart: always 6 | environment: 7 | - BIND_IP=0.0.0.0 8 | - LX_USER_chaney=lx-chaney 9 | ports: 10 | - "9527:9527" 11 | volumes: 12 | - ./lx-data/:/server/data/data 13 | -------------------------------------------------------------------------------- /docker/compose/memos/.gitignore: -------------------------------------------------------------------------------- 1 | memos/ 2 | -------------------------------------------------------------------------------- /docker/compose/memos/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | memos: 3 | image: 'ghcr.io/usememos/memos:latest' 4 | container_name: memos 5 | restart: always 6 | ports: 7 | - '5230:5230' 8 | volumes: 9 | - ./memos:/var/opt/memos 10 | -------------------------------------------------------------------------------- /docker/compose/nginx-proxy-manager/.gitignore: -------------------------------------------------------------------------------- 1 | data/ 2 | letsencrypt/ 3 | -------------------------------------------------------------------------------- /docker/compose/nginx-proxy-manager/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | nginx-proxy-manager: 3 | image: jc21/nginx-proxy-manager:latest 4 | container_name: nginx-proxy-manager 5 | restart: always 6 | ports: 7 | - "80:80" 8 | - "81:81" 9 | - "443:443" 10 | volumes: 11 | - ./data:/data 12 | - ./letsencrypt:/etc/letsencrypt 13 | -------------------------------------------------------------------------------- /docker/compose/portainer-agent/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | portainer_agent: 3 | image: portainer/agent:2.21.4 4 | container_name: portainer_agent 5 | restart: always 6 | ports: 7 | - "9001:9001" 8 | volumes: 9 | - /var/run/docker.sock:/var/run/docker.sock 10 | - /var/lib/docker/volumes:/var/lib/docker/volumes 11 | - /:/host 12 | -------------------------------------------------------------------------------- /docker/compose/portainer/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | portainer: 3 | image: portainer/portainer-ce:2.21.4 4 | container_name: portainer 5 | restart: always 6 | ports: 7 | # - "8000:8000" 8 | - "9443:9443" 9 | volumes: 10 | - /var/run/docker.sock:/var/run/docker.sock 11 | - portainer_data:/data 12 | 13 | volumes: 14 | portainer_data: 15 | -------------------------------------------------------------------------------- /docker/compose/rustdesk/.gitignore: -------------------------------------------------------------------------------- 1 | data/ 2 | -------------------------------------------------------------------------------- /docker/compose/rustdesk/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | hbbs: 3 | container_name: hbbs 4 | image: rustdesk/rustdesk-server:latest 5 | command: hbbs 6 | volumes: 7 | - ./data:/root 8 | network_mode: "host" 9 | depends_on: 10 | - hbbr 11 | restart: unless-stopped 12 | hbbr: 13 | container_name: hbbr 14 | image: rustdesk/rustdesk-server:latest 15 | command: hbbr 16 | volumes: 17 | - ./data:/root 18 | network_mode: "host" 19 | restart: unless-stopped 20 | -------------------------------------------------------------------------------- /docker/compose/syncthing/.gitignore: -------------------------------------------------------------------------------- 1 | SyncMeta/* 2 | !SyncMeta/.gitkeep 3 | -------------------------------------------------------------------------------- /docker/compose/syncthing/SyncMeta/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaneyzorn/dotfiles/8347f6aaadc2709f95b2cefeb0137e87c2eec0bc/docker/compose/syncthing/SyncMeta/.gitkeep -------------------------------------------------------------------------------- /docker/compose/syncthing/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | # see https://github.com/syncthing/syncthing/blob/main/README-Docker.md 2 | 3 | services: 4 | syncthing: 5 | image: syncthing/syncthing:latest 6 | container_name: syncthing 7 | uts: host # hostname: syncthing-wk 8 | volumes: 9 | - ./SyncMeta:/var/syncthing 10 | network_mode: host 11 | restart: unless-stopped 12 | healthcheck: 13 | test: curl -fkLsS -m 2 127.0.0.1:8384/rest/noauth/health | grep -o --color=never OK || exit 1 14 | interval: 1m 15 | timeout: 10s 16 | retries: 3 17 | -------------------------------------------------------------------------------- /docker/compose/uptime-kuma/.gitignore: -------------------------------------------------------------------------------- 1 | data/ 2 | -------------------------------------------------------------------------------- /docker/compose/uptime-kuma/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | uptime-kuma: 3 | image: louislam/uptime-kuma:1 4 | volumes: 5 | - ./data:/app/data 6 | ports: 7 | # : 8 | - 13001:3001 9 | restart: unless-stopped 10 | -------------------------------------------------------------------------------- /docker/compose/yacd/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | yacd: 3 | image: 'ghcr.io/haishanh/yacd:master' 4 | container_name: yacd 5 | restart: always 6 | ports: 7 | - '5001:80' 8 | -------------------------------------------------------------------------------- /ghostty/.config/ghostty/config: -------------------------------------------------------------------------------- 1 | background-opacity = 0.95 2 | background-blur = true 3 | theme = "Ayu Mirage" 4 | cursor-style = block 5 | shell-integration-features = no-cursor 6 | macos-option-as-alt = true 7 | config-file = ?linux.config 8 | -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/ime.lua: -------------------------------------------------------------------------------- 1 | local function setupAppWatch() 2 | local appIme = { 3 | ["WezTerm"] = "com.apple.keylayout.ABC", 4 | ["Ghostty"] = "com.apple.keylayout.ABC", 5 | ["Neovide"] = "com.apple.keylayout.ABC", 6 | ["neovide"] = "com.apple.keylayout.ABC", 7 | } 8 | hs.application.watcher 9 | .new(function(appName, eventType, appObject) 10 | if eventType == hs.application.watcher.activated then 11 | local expectedImeId = appIme[appName] 12 | if expectedImeId and hs.keycodes.currentSourceID() ~= expectedImeId then 13 | hs.keycodes.currentSourceID(expectedImeId) 14 | end 15 | end 16 | end) 17 | :start() 18 | end 19 | 20 | local function setupImeWatch() 21 | local appIme = { 22 | ["WezTerm"] = "com.apple.keylayout.ABC", 23 | ["Ghostty"] = "com.apple.keylayout.ABC", 24 | ["Neovide"] = "com.apple.keylayout.ABC", 25 | ["neovide"] = "com.apple.keylayout.ABC", 26 | } 27 | hs.keycodes.inputSourceChanged(function() 28 | local ok, appName = pcall(function() 29 | return hs.window.focusedWindow():application():name() 30 | end) 31 | if ok and appName then 32 | local expectedImeId = appIme[appName] 33 | if expectedImeId and hs.keycodes.currentSourceID() ~= expectedImeId then 34 | hs.keycodes.currentSourceID(expectedImeId) 35 | end 36 | end 37 | end) 38 | end 39 | 40 | local function setupKeymap() 41 | hs.hotkey.bind({ "ctrl", "cmd" }, ".", function() 42 | local focusedApp = hs.window.focusedWindow():application() 43 | local appName = focusedApp:name() 44 | local appPath = focusedApp:path() 45 | local imeId = hs.keycodes.currentSourceID() 46 | hs.notify.show(appName, appPath, "IME: " .. imeId) 47 | end) 48 | end 49 | 50 | local M = {} 51 | 52 | function M.setup() 53 | setupAppWatch() 54 | setupImeWatch() 55 | setupKeymap() 56 | end 57 | 58 | return M 59 | -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/init.lua: -------------------------------------------------------------------------------- 1 | require("ime").setup() 2 | require("wscrmv").setup() 3 | -------------------------------------------------------------------------------- /hammerspoon/.hammerspoon/wscrmv.lua: -------------------------------------------------------------------------------- 1 | local function moveWindowToNextScreen() 2 | local win = hs.window.focusedWindow() 3 | if not win then 4 | return 5 | end 6 | 7 | local screens = hs.screen.allScreens() 8 | if #screens < 2 then 9 | return 10 | end 11 | 12 | local currentScreen = win:screen() 13 | local currentIndex = 0 14 | for i, screen in ipairs(screens) do 15 | if screen == currentScreen then 16 | currentIndex = i 17 | break 18 | end 19 | end 20 | 21 | local nextIndex = currentIndex % #screens + 1 22 | local nextScreen = screens[nextIndex] 23 | 24 | win:moveToScreen(nextScreen) 25 | end 26 | 27 | local M = {} 28 | 29 | function M.setup() 30 | hs.hotkey.bind({ "ctrl", "cmd" }, "n", moveWindowToNextScreen) 31 | end 32 | 33 | return M 34 | -------------------------------------------------------------------------------- /justfile: -------------------------------------------------------------------------------- 1 | default: 2 | @just --list 3 | 4 | config-archlinuxcn: 5 | #!/usr/bin/env sh 6 | if ! grep archlinuxcn /etc/pacman.conf; then 7 | sudo echo "[archlinuxcn]" >> /etc/pacman.conf 8 | sudo echo "Server = https://mirrors.hust.edu.cn/archlinuxcn/$arch" >> /etc/pacman.conf 9 | sudo pacman -Sy && sudo pacman -S archlinuxcn-keyring 10 | fi 11 | 12 | ensure-yay: 13 | #!/usr/bin/env sh 14 | if ! which yay; then 15 | sudo pacman -S --needed git base-devel 16 | git clone https://aur.archlinux.org/yay-bin.git 17 | pushd yay-bin 18 | makepkg -si 19 | popd 20 | rm -rf yay-bin 21 | fi 22 | 23 | yay-pkgs: 24 | #!/usr/bin/env sh 25 | env_pkgs=( 26 | docker 27 | go 28 | lua 29 | luarocks 30 | nodejs 31 | npm 32 | pnpm 33 | ruby 34 | rust 35 | uv 36 | archlinuxcn/yay 37 | ) 38 | cli_tools=( 39 | ast-grep 40 | bash-language-server 41 | biome 42 | btop 43 | ccls 44 | cloc 45 | cppcheck 46 | curl 47 | fastfetch 48 | fd 49 | fzf 50 | git-crypt 51 | go-tools 52 | golangci-lint-langserver-bin # AUR 53 | gopls 54 | hugo 55 | iputils 56 | jq 57 | just 58 | lua-language-server 59 | man-db 60 | markdownlint-cli2 61 | meson 62 | mypy 63 | nodejs-cspell # AUR 64 | pandoc-cli 65 | prettier 66 | pyright 67 | ripgrep 68 | ruff 69 | rust-analyzer 70 | scrcpy 71 | shellcheck 72 | shfmt 73 | sshfs 74 | stow 75 | stylua 76 | superfile 77 | taplo-cli 78 | tmux 79 | tokei 80 | tree 81 | tree-sitter-cli 82 | typescript-language-server 83 | typos-lsp 84 | unarchiver 85 | vale 86 | wget 87 | yamlfmt 88 | yamllint 89 | yq 90 | ) 91 | yay -S --needed ${env_pkgs[@]} ${cli_tools[@]} 92 | 93 | yay-gui-pkgs: 94 | #!/usr/bin/env sh 95 | fonts=( 96 | ttf-cascadia-code 97 | ttf-cascadia-code-nerd 98 | ttf-fira-code 99 | ttf-firacode-nerd 100 | ttf-fira-mono 101 | ttf-jetbrains-mono 102 | ttf-jetbrains-mono-nerd 103 | ttf-nerd-fonts-symbols-mono 104 | ) 105 | gui_tools=( 106 | font-manager 107 | ghostty 108 | google-chrome 109 | gparted 110 | menulibre 111 | obsidian 112 | pamac-aur 113 | papirus-icon-theme 114 | telegram-desktop 115 | transmission-gtk 116 | visual-studio-code-bin 117 | ) 118 | yay -S --needed ${fonts[@]} ${gui_tools[@]} 119 | 120 | brew-pkgs: 121 | #!/usr/bin/env sh 122 | env_pkgs=( 123 | go 124 | lua 125 | luarocks 126 | node 127 | pnpm 128 | ) 129 | cli_tools=( 130 | ast-grep 131 | bash-language-server 132 | biome 133 | btop 134 | ccls 135 | cspell 136 | fd 137 | git-crypt 138 | goimports 139 | golangci-lint-langserver 140 | gopls 141 | hugo 142 | jq 143 | just 144 | lua-language-server 145 | markdownlint-cli2 146 | mypy 147 | neovim 148 | prettier 149 | pyright 150 | ripgrep 151 | ruff 152 | rust-analyzer 153 | scrcpy 154 | shellcheck 155 | shfmt 156 | stow 157 | stylua 158 | superfile 159 | taplo 160 | tmux 161 | tokei 162 | tree 163 | tree-sitter 164 | typescript-language-server 165 | typos-lsp 166 | vale 167 | wget 168 | yamlfmt 169 | yamllint 170 | yq 171 | ) 172 | casks=( 173 | alt-tab 174 | font-jetbrains-mono-nerd-font 175 | ghostty 176 | jordanbaird-ice 177 | lapce 178 | monitorcontrol 179 | neovide 180 | obsidian 181 | pearcleaner 182 | ) 183 | brew install -q ${env_pkgs[@]} ${cli_tools[@]} 184 | brew install -q --cask ${casks[@]} 185 | 186 | user-pkgs: 187 | #!/usr/bin/env sh 188 | uv_pkgs=( 189 | neovim-sh 190 | ruff 191 | basedpyright 192 | pyrefly 193 | ) 194 | for p in "${uv_pkgs[@]}"; do 195 | uv tool install "$p" 196 | done 197 | 198 | nvim-nightly: 199 | #!/usr/bin/env sh 200 | case "$(uname -s)" in 201 | Linux*) 202 | PLATFORM="linux" 203 | SUFFIX="appimage" 204 | ;; 205 | Darwin*) 206 | PLATFORM="macos" 207 | SUFFIX="tar.gz" 208 | ;; 209 | *) 210 | echo "unsupported platform: $(uname -s)" 211 | exit 1 212 | esac 213 | case "$(uname -m)" in 214 | x86_64*) 215 | ARCH="x86_64" 216 | ;; 217 | arm64*|aarch64*) 218 | ARCH="arm64" 219 | ;; 220 | *) 221 | echo "unsupported arch: $(uname -m)" 222 | exit 1 223 | esac 224 | 225 | TMP_DIR=$(mktemp -d) 226 | DOWNLOAD_URL="https://github.com/neovim/neovim/releases/download/nightly/nvim-${PLATFORM}-${ARCH}.${SUFFIX}" 227 | echo "download $DOWNLOAD_URL to ${TMP_DIR}" 228 | curl -L "${DOWNLOAD_URL}" -o "${TMP_DIR}/neovim_download" 229 | 230 | NEOVIM_BIN="${HOME}/.local/bin/nv" 231 | INSTALL_DIR="${HOME}/.local/share/neovim-nightly" 232 | echo "extract to ${INSTALL_DIR}" 233 | rm -rf ${INSTALL_DIR} 234 | if [ "$PLATFORM" = "linux" ]; then 235 | mkdir -p "${INSTALL_DIR}" 236 | mv -vf "${TMP_DIR}/neovim_download" "${INSTALL_DIR}/nvim.appimage" 237 | chmod +x "${INSTALL_DIR}/nvim.appimage" 238 | ln -sf "${INSTALL_DIR}/nvim.appimage" "${NEOVIM_BIN}" 239 | else 240 | xattr -c "${TMP_DIR}/neovim_download" 241 | tar -xzf "${TMP_DIR}/neovim_download" -C "${TMP_DIR}" 242 | mv -vf "${TMP_DIR}"/nvim-macos-${ARCH} "${INSTALL_DIR}" 243 | ln -sf "${INSTALL_DIR}/bin/nvim" "${NEOVIM_BIN}" 244 | fi 245 | echo "clean ${TMP_DIR}" 246 | rm -rf "${TMP_DIR}" 247 | ls -lah "${NEOVIM_BIN}" 248 | 249 | -------------------------------------------------------------------------------- /kitty/.config/kitty/kitty.cinnamon.conf: -------------------------------------------------------------------------------- 1 | font_size 10.0 2 | -------------------------------------------------------------------------------- /linux-home/.Xresources: -------------------------------------------------------------------------------- 1 | #if __has_include(".extend.Xresources") 2 | #include ".extend.Xresources" 3 | #endif 4 | 5 | ! ^ The above lines are no comments! 6 | ! Leave them as they are if a file ~/.extend.Xresources is being used on your system. 7 | ! config can be added there or also here below. 8 | ! For comments use "!" 9 | 10 | Xft.dpi: 96 11 | Xft.antialias: true 12 | Xft.hinting: true 13 | Xft.rgba: rgb 14 | Xft.autohint: false 15 | Xft.hintstyle: hintslight 16 | Xft.lcdfilter: lcddefault 17 | 18 | XTerm*background: #2b2b2b 19 | XTerm*foreground: #e7e7e7 20 | XTerm*pointerColor: #16A085 21 | XTerm*faceName: Fixed 22 | XTerm*faceSize: 11 23 | 24 | Xcursor.theme: xcursor-breeze-snow 25 | Xcursor.size: 48 26 | 27 | -------------------------------------------------------------------------------- /linux-home/.config/ghostty/linux.config: -------------------------------------------------------------------------------- 1 | window-decoration = none 2 | 3 | -------------------------------------------------------------------------------- /linux-home/.config/ibus/rime/default.custom.yaml: -------------------------------------------------------------------------------- 1 | patch: 2 | __include: rime_ice_suggestion:/ 3 | __patch: 4 | schema_list: 5 | - schema: rime_ice 6 | - schema: luna_pinyin 7 | -------------------------------------------------------------------------------- /linux-home/.dmrc: -------------------------------------------------------------------------------- 1 | [Desktop] 2 | Language=zh_CN.utf8 3 | Session=cinnamon 4 | -------------------------------------------------------------------------------- /linux-home/.local/share/xfce4/terminal/colorschemes/chaney_dark.theme: -------------------------------------------------------------------------------- 1 | [Scheme] 2 | Name=Chaney 3 | ColorForeground=#839496 4 | ColorBackground=#002b36 5 | ColorCursor=#BABDB6 6 | TabActivityColor=#dc322f 7 | ColorPalette=#073642;#dc322f;#EBCB8B;#AAB288;#9DA786;#d33682;#16D5B6;#eee8d5;#22444D;#cb4b16;#586e75;#657b83;#839496;#6c71c4;#93a1a1;#fdf6e3 8 | ColorBold=#93a1a1 9 | ColorBoldUseDefault=FALSE 10 | -------------------------------------------------------------------------------- /linux-home/.local/share/xfce4/terminal/colorschemes/nord.theme: -------------------------------------------------------------------------------- 1 | [Scheme] 2 | Name=Nord 3 | ColorCursor=#D8DEE9 4 | ColorForeground=#D8DEE9 5 | ColorBackground=#2E3440 6 | TabActivityColor=#88C0D0 7 | ColorPalette=#3B4252;#BF616A;#A3BE8C;#EBCB8B;#81A1C1;#B48EAD;#88C0D0;#E5E9F0;#4C566A;#BF616A;#A3BE8C;#EBCB8B;#81A1C1;#B48EAD;#8FBCBB;#ECEFF4 8 | ColorBold=#D8DEE9 9 | ColorBoldUseDefault=FALSE 10 | -------------------------------------------------------------------------------- /linux-home/.pam_environment: -------------------------------------------------------------------------------- 1 | # https://github.com/archlinux/svntogit-packages/commit/b9d1d5e6e62834ca97afe2023468d19d9faccad7 2 | GTK_IM_MODULE DEFAULT=ibus 3 | QT_IM_MODULE DEFAULT=ibus 4 | XMODIFIERS DEFAULT=\@im=ibus 5 | INPUT_METHOD DEFAULT=ibus 6 | SDL_IM_MODULE DEFAULT=ibus 7 | GLFW_IM_MODULE DEFAULT=ibus 8 | -------------------------------------------------------------------------------- /linux-home/.profile: -------------------------------------------------------------------------------- 1 | # 2 | # ~/.profile 3 | # 4 | # 5 | 6 | [[ "$XDG_CURRENT_DESKTOP" == "KDE" ]] || export QT_QPA_PLATFORMTHEME="qt5ct" 7 | 8 | [[ -f ~/.extend.profile ]] && . ~/.extend.profile 9 | 10 | export QT_QPA_PLATFORMTHEME="qt5ct" 11 | export QT_AUTO_SCREEN_SCALE_FACTOR=0 12 | export GTK2_RC_FILES="$HOME/.gtkrc-2.0" 13 | 14 | -------------------------------------------------------------------------------- /linux-home/.xprofile: -------------------------------------------------------------------------------- 1 | # ~/.xprofile 2 | 3 | # Environment variables 4 | 5 | # .pam_environment file deprecated 6 | # https://github.com/archlinux/svntogit-packages/commit/b9d1d5e6e62834ca97afe2023468d19d9faccad7 7 | 8 | # https://wiki.archlinux.org/title/Fcitx5#Integration 9 | export GTK_IM_MODULE=ibus 10 | export QT_IM_MODULE=ibus 11 | export XMODIFIERS=@im=ibus 12 | export INPUT_METHOD=ibus 13 | export SDL_IM_MODULE=ibus 14 | # for kitty https://github.com/kovidgoyal/kitty/issues/469#issuecomment-778814173 15 | export GLFW_IM_MODULE=ibus 16 | 17 | [[ -f ~/.extend.xprofile ]] && . ~/.extend.xprofile 18 | -------------------------------------------------------------------------------- /linux-home/.xsession: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # ~/.xsession 5 | # 6 | # Executed by xdm/gdm/kdm at login 7 | # 8 | 9 | [[ -f ~/.extend.xsession ]] && . ~/.extend.xsession 10 | 11 | -------------------------------------------------------------------------------- /neovim.yml: -------------------------------------------------------------------------------- 1 | # used by selene lua checker 2 | base: lua51 3 | globals: 4 | vim: 5 | any: true 6 | hs: 7 | any: true 8 | Snacks: 9 | any: true 10 | -------------------------------------------------------------------------------- /nvim/.config/black: -------------------------------------------------------------------------------- 1 | [tool.black] 2 | line-length = 120 3 | 4 | -------------------------------------------------------------------------------- /nvim/.config/flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | ignore = B901,C407,C408,D100,D101,D102,D103,D104,D105,D106,D107,D202,E203,D205,D400,D403,E722,S001 3 | max-line-length = 120 4 | import-order-style=google 5 | inline-quotes='"' 6 | -------------------------------------------------------------------------------- /nvim/.config/go/env: -------------------------------------------------------------------------------- 1 | GOPRIVATE=*.smartx.com 2 | GOPROXY=https://goproxy.cn,direct 3 | GOSUMDB=off 4 | -------------------------------------------------------------------------------- /nvim/.config/lazygit/config.yml: -------------------------------------------------------------------------------- 1 | keybinding: 2 | universal: 3 | scrollUpMain-alt1: 4 | scrollDownMain-alt1: 5 | -------------------------------------------------------------------------------- /nvim/.config/nvim/init.lua: -------------------------------------------------------------------------------- 1 | -- init.lua 2 | 3 | require("neo.setting") 4 | require("neo.neovide") 5 | require("neo.lazy").setup() 6 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lazy-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "aerial.nvim": { "branch": "master", "commit": "5c0df1679bf7c814c924dc6646cc5291daca8363" }, 3 | "blink.cmp": { "branch": "main", "commit": "022521a8910a5543b0251b21c9e1a1e989745796" }, 4 | "catppuccin": { "branch": "main", "commit": "a0c769bc7cd04bbbf258b3d5f01e2bdce744108d" }, 5 | "conform.nvim": { "branch": "master", "commit": "0e93e0d12d2f7ebdea9e3e444dfaff0050cefbe6" }, 6 | "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, 7 | "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" }, 8 | "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, 9 | "fold_line.nvim": { "branch": "main", "commit": "10c37a5be956be93e54557539d6408c0365996ff" }, 10 | "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, 11 | "gitsigns.nvim": { "branch": "main", "commit": "d0f90ef51d4be86b824b012ec52ed715b5622e51" }, 12 | "grug-far.nvim": { "branch": "main", "commit": "c36f5f9b53f12a60aa53d42282e8ae78aef72178" }, 13 | "helpview.nvim": { "branch": "main", "commit": "8df486915a29483c7955067a7c17bffdf3b1e5f5" }, 14 | "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, 15 | "lualine.nvim": { "branch": "master", "commit": "0c6cca9f2c63dadeb9225c45bc92bb95a151d4af" }, 16 | "marks.nvim": { "branch": "master", "commit": "f353e8c08c50f39e99a9ed474172df7eddd89b72" }, 17 | "markview.nvim": { "branch": "main", "commit": "c3b270ac84391b9792dba122d47139c741217311" }, 18 | "mini.nvim": { "branch": "main", "commit": "5a10dfb3ab49b3ee2425bc2c215b5067ccce1c79" }, 19 | "nvim-bqf": { "branch": "main", "commit": "e20417d5e589e03eaaaadc4687904528500608be" }, 20 | "nvim-colorizer.lua": { "branch": "master", "commit": "517df88cf2afb36652830df2c655df2da416a0ae" }, 21 | "nvim-lint": { "branch": "master", "commit": "5763f1d56449e67789796adf87a3908c2ee3c888" }, 22 | "nvim-lspconfig": { "branch": "master", "commit": "036885e8e5456d3907626b634693234f628afef6" }, 23 | "nvim-tree.lua": { "branch": "master", "commit": "1c733e8c1957dc67f47580fe9c458a13b5612d5b" }, 24 | "nvim-treesitter": { "branch": "main", "commit": "f976acdc9c8214145a11372d2a7ae4a032f62a39" }, 25 | "nvim-ufo": { "branch": "main", "commit": "3c7a3570e9c9dc198a2ad4491b0b0e51c4d4ba08" }, 26 | "nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" }, 27 | "persisted.nvim": { "branch": "main", "commit": "d35a3ed973e17defd8800acd46a0c893498a2671" }, 28 | "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, 29 | "promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" }, 30 | "recall.nvim": { "branch": "main", "commit": "f45b9e697c674c6023b795e562544513af7e4ee1" }, 31 | "snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" }, 32 | "suda.vim": { "branch": "master", "commit": "9adda7d195222d4e2854efb2a88005a120296c47" }, 33 | "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, 34 | "treewalker.nvim": { "branch": "main", "commit": "fe814c2181dc3004d97073a613c20554cc1a7d7b" }, 35 | "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, 36 | "vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" }, 37 | "vim-illuminate": { "branch": "master", "commit": "0d1e93684da00ab7c057410fecfc24f434698898" }, 38 | "vim-lastplace": { "branch": "master", "commit": "e58cb0df716d3c88605ae49db5c4741db8b48aa9" }, 39 | "visual-whitespace.nvim": { "branch": "main", "commit": "11b654e7e053e52e375297f472c8824a74b1b965" }, 40 | "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } 41 | } 42 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/neo/debug.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.print_rtp() 4 | local count = 0 5 | for _, value in ipairs(vim.api.nvim_list_runtime_paths()) do 6 | print(value) 7 | count = count + 1 8 | end 9 | print("total: ", count) 10 | end 11 | 12 | return M 13 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/neo/lazy.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | local ensure_lazy_nvim = function() 4 | -- ~/.local/share/nvim/lazy/lazy.nvim 5 | local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" 6 | if not vim.uv.fs_stat(lazypath) then 7 | vim.fn.system({ 8 | "git", 9 | "clone", 10 | "--filter=blob:none", 11 | "https://github.com/folke/lazy.nvim.git", 12 | "--branch=stable", 13 | lazypath, 14 | }) 15 | end 16 | vim.opt.rtp:prepend(lazypath) 17 | end 18 | 19 | function M.setup() 20 | ensure_lazy_nvim() 21 | require("lazy").setup("neo.plugins", { 22 | change_detection = { 23 | notify = false, 24 | }, 25 | ui = { 26 | border = "rounded", 27 | }, 28 | rocks = { 29 | enabled = false, 30 | hererocks = true, 31 | }, 32 | }) 33 | end 34 | 35 | return M 36 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/neo/neovide.lua: -------------------------------------------------------------------------------- 1 | -- https://github.com/neovide/neovide 2 | 3 | if not vim.g.neovide then 4 | return nil 5 | end 6 | 7 | vim.o.linespace = 4 8 | vim.opt.guicursor = { 9 | "n-v-c-sm:block", 10 | "i-ci-ve:ver25", 11 | "r-cr-o:hor20", 12 | "n:blinkwait1000-blinkoff500-blinkon800-Cursor/lCursor", 13 | "i:blinkwait300-blinkoff500-blinkon500-Cursor/lCursor", 14 | "c:blinkwait250-blinkoff350-blinkon350-Cursor/lCursor", 15 | "sm:block-blinkwait175-blinkoff150-blinkon175", 16 | } 17 | 18 | -- see https://github.com/neovide/neovide/issues/1196 19 | if vim.uv.os_uname().sysname == "Darwin" then 20 | vim.o.guifont = "JetBrainsMono Nerd Font:h13" 21 | else 22 | vim.o.guifont = "JetBrainsMono Nerd Font:h12" 23 | end 24 | 25 | vim.g.neovide_input_macos_option_key_is_meta = "both" 26 | vim.g.neovide_fullscreen = false 27 | vim.g.neovide_opacity = 0.9 28 | vim.g.neovide_normal_opacity = 0.9 29 | vim.g.neovide_window_blurred = true 30 | vim.g.neovide_show_border = true 31 | vim.g.neovide_floating_shadow = true 32 | vim.g.neovide_floating_corner_radius = 0.3 33 | 34 | vim.g.neovide_cursor_animation_length = 0.01 35 | vim.g.neovide_cursor_trail_length = 0.1 36 | vim.g.neovide_cursor_vfx_mode = "railgun" 37 | vim.g.neovide_cursor_animate_command_line = false 38 | vim.g.neovide_position_animation_length = 0 39 | 40 | vim.g.neovide_hide_mouse_when_typing = true 41 | 42 | -- IME input config 43 | vim.g.neovide_user_ime_enabled = false 44 | 45 | local function set_ime(args) 46 | if args.event:match("Enter$") then 47 | vim.g.neovide_input_ime = vim.g.neovide_user_ime_enabled 48 | else 49 | vim.g.neovide_input_ime = false 50 | end 51 | end 52 | 53 | local ime_input = vim.api.nvim_create_augroup("NeovideImeInput", { clear = true }) 54 | 55 | vim.api.nvim_create_autocmd({ "InsertEnter", "InsertLeave" }, { 56 | group = ime_input, 57 | pattern = "*", 58 | callback = set_ime, 59 | }) 60 | 61 | vim.api.nvim_create_autocmd({ "CmdlineEnter", "CmdlineLeave" }, { 62 | group = ime_input, 63 | pattern = "[/\\?]", 64 | callback = set_ime, 65 | }) 66 | 67 | vim.keymap.set("n", "ve", function() 68 | vim.g.neovide_user_ime_enabled = not vim.g.neovide_user_ime_enabled 69 | if vim.g.neovide_user_ime_enabled then 70 | vim.notify("User IME enabled") 71 | else 72 | vim.notify("User IME disabled") 73 | end 74 | end, { desc = "Toggle neovide user IME" }) 75 | 76 | vim.keymap.set("n", "vf", function() 77 | vim.g.neovide_fullscreen = not vim.g.neovide_fullscreen 78 | end, { desc = "Toggle neovide fullscreen" }) 79 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/neo/plugins/autocmp.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "saghen/blink.cmp", 4 | dependencies = { 5 | "rafamadriz/friendly-snippets", 6 | }, 7 | event = { 8 | "InsertEnter", 9 | "CmdlineEnter", 10 | }, 11 | version = "*", 12 | opts = { 13 | keymap = { 14 | preset = "none", 15 | [""] = { "show", "show_documentation", "hide_documentation" }, 16 | [""] = { "cancel" }, 17 | [""] = { "select_next", "fallback" }, 18 | [""] = { "select_prev", "fallback" }, 19 | [""] = { "scroll_documentation_down", "fallback" }, 20 | [""] = { "scroll_documentation_up", "fallback" }, 21 | [""] = { "snippet_forward", "fallback" }, 22 | [""] = { "snippet_backward", "fallback" }, 23 | }, 24 | completion = { 25 | list = { 26 | selection = { preselect = false, auto_insert = true }, 27 | }, 28 | menu = { 29 | border = "rounded", 30 | draw = { 31 | columns = { 32 | { "label", "label_description", gap = 1 }, 33 | { "kind_icon", "kind", gap = 1 }, 34 | { "source_name" }, 35 | }, 36 | treesitter = { "lsp" }, 37 | }, 38 | }, 39 | documentation = { 40 | window = { border = "rounded" }, 41 | }, 42 | }, 43 | signature = { 44 | enabled = true, 45 | window = { border = "rounded" }, 46 | }, 47 | sources = { 48 | providers = { 49 | lsp = { fallbacks = {} }, 50 | path = { fallbacks = {} }, 51 | buffer = { 52 | opts = { 53 | get_bufnrs = vim.api.nvim_list_bufs, 54 | }, 55 | }, 56 | }, 57 | }, 58 | cmdline = { 59 | keymap = { 60 | preset = "none", 61 | [""] = { "show_and_insert", "select_next" }, 62 | [""] = { "show_and_insert", "select_prev" }, 63 | [""] = { "show", "fallback" }, 64 | [""] = { "select_next", "fallback" }, 65 | [""] = { "select_prev", "fallback" }, 66 | [""] = { "select_and_accept" }, 67 | [""] = { "cancel" }, 68 | }, 69 | completion = { 70 | list = { 71 | selection = { preselect = false, auto_insert = true }, 72 | }, 73 | menu = { auto_show = true }, 74 | }, 75 | }, 76 | }, 77 | }, 78 | } 79 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/neo/plugins/codehint.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "folke/flash.nvim", 4 | opts = {}, 5 | keys = { 6 | { 7 | "s", 8 | mode = { "n", "x", "o" }, 9 | function() 10 | require("flash").jump() 11 | end, 12 | desc = "Flash jump", 13 | }, 14 | { 15 | "o", 16 | mode = { "n", "x", "o" }, 17 | function() 18 | require("flash").treesitter() 19 | end, 20 | desc = "Flash treesitter", 21 | }, 22 | { 23 | "", 24 | mode = "o", 25 | function() 26 | require("flash").remote() 27 | end, 28 | desc = "Flash remote", 29 | }, 30 | { 31 | "", 32 | mode = { "o", "x" }, 33 | function() 34 | require("flash").treesitter_search() 35 | end, 36 | desc = "Flash treesitter search", 37 | }, 38 | { 39 | "", 40 | mode = { "c" }, 41 | function() 42 | require("flash").toggle() 43 | end, 44 | desc = "Flash search toggle", 45 | }, 46 | }, 47 | }, 48 | { 49 | "RRethy/vim-illuminate", 50 | event = "BufReadPost", 51 | config = function() 52 | require("illuminate").configure({ 53 | filetypes_denylist = { 54 | "fugitive", 55 | "NvimTree", 56 | "DiffviewFiles", 57 | "qf", 58 | "help", 59 | "list", 60 | "man", 61 | "aerial", 62 | }, 63 | }) 64 | end, 65 | }, 66 | { 67 | "catgoose/nvim-colorizer.lua", 68 | event = "BufReadPre", 69 | config = function() 70 | require("colorizer").setup() 71 | end, 72 | }, 73 | { 74 | "folke/todo-comments.nvim", 75 | dependencies = { "nvim-lua/plenary.nvim" }, 76 | event = "BufReadPost", 77 | opts = {}, 78 | }, 79 | { 80 | "nvim-treesitter/nvim-treesitter", 81 | branch = "main", 82 | build = ":TSUpdate", 83 | config = function() 84 | local fts = { 85 | "bash", 86 | "c", 87 | "cpp", 88 | "css", 89 | "dockerfile", 90 | "go", 91 | "gomod", 92 | "gosum", 93 | "html", 94 | "ini", 95 | "java", 96 | "javascript", 97 | "json", 98 | "json5", 99 | "jsonc", 100 | "just", 101 | "lua", 102 | "make", 103 | "markdown", 104 | "nginx", 105 | "proto", 106 | "python", 107 | "regex", 108 | "ruby", 109 | "rust", 110 | "ssh_config", 111 | "swift", 112 | "tmux", 113 | "toml", 114 | "tsx", 115 | "typescript", 116 | "vim", 117 | "vimdoc", 118 | "vue", 119 | "xml", 120 | "xresources", 121 | "yaml", 122 | "zig", 123 | } 124 | require("nvim-treesitter").install(fts) 125 | vim.api.nvim_create_autocmd("FileType", { 126 | pattern = fts, 127 | callback = function() 128 | vim.treesitter.start() 129 | end, 130 | }) 131 | end, 132 | }, 133 | { 134 | "aaronik/treewalker.nvim", 135 | cmd = { "Treewalker" }, 136 | keys = { 137 | -- movement 138 | { "", "Treewalker Up", mode = { "n", "v" }, desc = "Treewalker Up" }, 139 | { "", "Treewalker Down", mode = { "n", "v" }, desc = "Treewalker Down" }, 140 | { "", "Treewalker Right", mode = { "n", "v" }, desc = "Treewalker Right" }, 141 | { "", "Treewalker Left", mode = { "n", "v" }, desc = "Treewalker Left" }, 142 | -- swapping 143 | { "", "Treewalker SwapDown", mode = { "n" }, desc = "Treewalker SwapDown" }, 144 | { "", "Treewalker SwapUp", mode = { "n" }, desc = "Treewalker SwapUp" }, 145 | { "", "Treewalker SwapRight", mode = { "n" }, desc = "Treewalker SwapRight" }, 146 | { "", "Treewalker SwapLeft", mode = { "n" }, desc = "Treewalker SwapLeft" }, 147 | }, 148 | opts = {}, 149 | }, 150 | { 151 | "fnune/recall.nvim", 152 | keys = { 153 | { "mm", "RecallToggle", desc = "" }, 154 | { "mn", "RecallNext", desc = "" }, 155 | { "mp", "RecallPrevious", desc = "" }, 156 | { "mc", "RecallClear", desc = "" }, 157 | { 158 | "ml", 159 | function() 160 | require("recall.snacks").pick() 161 | end, 162 | desc = "", 163 | }, 164 | { 165 | "fm", 166 | function() 167 | require("recall.snacks").pick() 168 | end, 169 | desc = "", 170 | }, 171 | }, 172 | opts = { 173 | sign_highlight = "DiagnosticSignHint", 174 | }, 175 | }, 176 | { 177 | "chentoast/marks.nvim", 178 | event = "BufReadPost", 179 | opts = {}, 180 | }, 181 | { 182 | "OXY2DEV/markview.nvim", 183 | lazy = false, 184 | }, 185 | { 186 | "OXY2DEV/helpview.nvim", 187 | ft = "help", 188 | dependencies = { 189 | "nvim-treesitter/nvim-treesitter", 190 | }, 191 | }, 192 | { 193 | "mcauley-penney/visual-whitespace.nvim", 194 | event = "ModeChanged *:[vV\22]", 195 | opts = { 196 | fileformat_chars = { 197 | unix = "¬", 198 | mac = "←", 199 | dos = "↙", 200 | }, 201 | }, 202 | }, 203 | } 204 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/neo/plugins/foldent.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "gh-liu/fold_line.nvim", 4 | event = "VeryLazy", 5 | init = function() 6 | vim.g.fold_line_current_fold_only = true 7 | vim.g.fold_line_char_open_start = "╭" 8 | vim.g.fold_line_char_open_end = "╰" 9 | vim.g.fold_line_char_priority = 2 10 | end, 11 | }, 12 | { 13 | "kevinhwang91/nvim-ufo", 14 | dependencies = { 15 | "kevinhwang91/promise-async", 16 | }, 17 | event = "BufRead", 18 | keys = { 19 | { 20 | "zR", 21 | function() 22 | require("ufo").openAllFolds() 23 | end, 24 | desc = "Open all folds", 25 | }, 26 | { 27 | "zM", 28 | function() 29 | require("ufo").closeAllFolds() 30 | end, 31 | desc = "Close all folds", 32 | }, 33 | { 34 | "az", 35 | "lua require('ufo').foldScope('outer')", 36 | mode = { "o", "x" }, 37 | desc = "text-obj: a-fold", 38 | }, 39 | { 40 | "iz", 41 | "lua require('ufo').foldScope('inner')", 42 | mode = { "o", "x" }, 43 | desc = "text-obj: i-fold", 44 | }, 45 | }, 46 | init = function() 47 | vim.o.foldlevel = 99 48 | vim.o.foldlevelstart = 99 49 | end, 50 | config = function() 51 | local getFoldScope = function() 52 | local lnum = vim.fn.line(".") 53 | local startLine = vim.fn.foldclosed(lnum) 54 | local endLine = vim.fn.foldclosedend(lnum) 55 | if startLine < 0 then 56 | vim.cmd.foldclose({ mods = { silent = true, emsg_silent = true } }) 57 | startLine = vim.fn.foldclosed(lnum) 58 | endLine = vim.fn.foldclosedend(lnum) 59 | vim.cmd.foldopen({ mods = { silent = true, emsg_silent = true } }) 60 | end 61 | if startLine < 0 then 62 | return lnum, lnum 63 | end 64 | return startLine, endLine 65 | end 66 | 67 | local lineWiseSelect = function(startLine, endLine) 68 | -- save last position in jumplist like vim native textobj 69 | vim.cmd.normal({ "m`", bang = true }) 70 | vim.api.nvim_win_set_cursor(0, { startLine, 0 }) 71 | if not vim.fn.mode():find("V") then 72 | vim.cmd.normal({ "V", bang = true }) 73 | end 74 | -- move cursor to end of visual 75 | vim.cmd.normal({ "o", bang = true }) 76 | vim.api.nvim_win_set_cursor(0, { endLine, 0 }) 77 | end 78 | 79 | local ufo = require("ufo") 80 | 81 | ufo.foldScope = function(scope) 82 | local sl, el = getFoldScope() 83 | vim.cmd.foldopen({ 84 | mods = { emsg_silent = true, silent = true }, 85 | range = { sl, el }, 86 | }) 87 | if scope == "inner" then 88 | local tailFt = { "python" } 89 | sl = vim.fn.min({ sl + 1, el }) 90 | if not vim.tbl_contains(tailFt, vim.bo.ft) then 91 | el = vim.fn.max({ el - 1, sl }) 92 | elseif string.match(vim.fn.getline(el), "^%s*[}%])]+") then 93 | el = vim.fn.max({ el - 1, sl }) 94 | end 95 | end 96 | lineWiseSelect(sl, el) 97 | end 98 | 99 | ufo.setup({ 100 | provider_selector = function(bufnr, filetype, buftype) 101 | return { "treesitter", "indent" } 102 | end, 103 | }) 104 | end, 105 | }, 106 | } 107 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/neo/plugins/git.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "tpope/vim-fugitive", 4 | event = "BufReadPre", 5 | cmd = "Git", 6 | }, 7 | { 8 | "sindrets/diffview.nvim", 9 | cmd = { 10 | "DiffviewOpen", 11 | "DiffviewFileHistory", 12 | }, 13 | keys = { 14 | { "hv", "DiffviewOpen", desc = "DiffviewOpen" }, 15 | { "hx", "DiffviewClose", desc = "DiffviewClose" }, 16 | }, 17 | }, 18 | { 19 | "lewis6991/gitsigns.nvim", 20 | event = "BufReadPre", 21 | cmd = "Gitsigns", 22 | config = function() 23 | require("gitsigns").setup({ 24 | current_line_blame = true, 25 | current_line_blame_formatter = "  ", 26 | signs = { 27 | add = { text = "│" }, 28 | change = { text = "│" }, 29 | delete = { text = "_" }, 30 | topdelete = { text = "" }, 31 | changedelete = { text = "│" }, 32 | untracked = { text = "┆" }, 33 | }, 34 | on_attach = function(bufnr) 35 | local gs = package.loaded.gitsigns 36 | 37 | local function map(mode, l, r, opts) 38 | opts = opts or {} 39 | opts.buffer = bufnr 40 | vim.keymap.set(mode, l, r, opts) 41 | end 42 | 43 | local function nmap(l, r, opts) 44 | map("n", l, r, opts) 45 | end 46 | 47 | -- Navigation 48 | nmap("]c", function() 49 | if vim.wo.diff then 50 | return "]c" 51 | end 52 | vim.schedule(function() 53 | gs.next_hunk() 54 | end) 55 | return "" 56 | end, { expr = true, desc = "Git next hunk" }) 57 | 58 | nmap("[c", function() 59 | if vim.wo.diff then 60 | return "[c" 61 | end 62 | vim.schedule(function() 63 | gs.prev_hunk() 64 | end) 65 | return "" 66 | end, { expr = true, desc = "Git prev hunk" }) 67 | 68 | -- Actions 69 | nmap("hs", gs.stage_hunk, { desc = "Git stage hunk" }) 70 | nmap("hr", gs.reset_hunk, { desc = "Git reset hunk" }) 71 | nmap("hS", gs.stage_buffer, { desc = "Git stage buffer" }) 72 | nmap("hu", gs.undo_stage_hunk, { desc = "Git undo stage hunk" }) 73 | nmap("hR", gs.reset_buffer, { desc = "Git reset buffer" }) 74 | nmap("hp", gs.preview_hunk, { desc = "Git preview hunk" }) 75 | 76 | nmap("hb", function() 77 | gs.blame_line({ full = true }) 78 | end, { desc = "Git blame line" }) 79 | nmap("hB", function() 80 | gs.blame() 81 | end, { desc = "Git blame file" }) 82 | 83 | nmap("hd", function() 84 | gs.toggle_deleted() 85 | gs.toggle_word_diff() 86 | end, { desc = "Git show diff" }) 87 | 88 | nmap("hl", function() 89 | gs.toggle_numhl() 90 | gs.toggle_linehl() 91 | end, { desc = "Git highlight changes" }) 92 | 93 | map("v", "hs", function() 94 | gs.stage_hunk({ vim.fn.line("."), vim.fn.line("v") }) 95 | end, { desc = "Git stage selected" }) 96 | 97 | map("v", "hr", function() 98 | gs.reset_hunk({ vim.fn.line("."), vim.fn.line("v") }) 99 | end, { desc = "Git reset selected" }) 100 | 101 | -- Text object 102 | map({ "o", "x" }, "ih", ":Gitsigns select_hunk", { desc = "Git select hunk" }) 103 | end, 104 | }) 105 | end, 106 | }, 107 | } 108 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/neo/plugins/lsp.lua: -------------------------------------------------------------------------------- 1 | local lsp_servers = { 2 | -- js 3 | "biome", 4 | "ts_ls", 5 | -- lus 6 | "lua_ls", 7 | -- python 8 | "basedpyright", 9 | "ruff", 10 | -- golang 11 | "gopls", 12 | "golangci_lint_ls", 13 | -- cpp 14 | "ccls", 15 | "clangd", 16 | -- any 17 | "typos_lsp", 18 | } 19 | 20 | return { 21 | { 22 | "j-hui/fidget.nvim", 23 | config = function() 24 | require("fidget").setup({ 25 | notification = { 26 | window = { 27 | normal_hl = "DiagnosticHint", 28 | winblend = 0, 29 | }, 30 | }, 31 | }) 32 | end, 33 | }, 34 | { 35 | "stevearc/conform.nvim", 36 | cmd = { "ConformInfo" }, 37 | init = function() 38 | vim.o.formatexpr = "v:lua.require('conform').formatexpr()" 39 | end, 40 | keys = { 41 | { 42 | "ck", 43 | function() 44 | require("conform").format({}, function(err, did_edit) 45 | if err then 46 | require("fidget").notify("conform: " .. err, vim.log.levels.ERROR) 47 | elseif did_edit then 48 | require("fidget").notify("conform success: content changed") 49 | else 50 | require("fidget").notify("conform success: no changes") 51 | end 52 | end) 53 | end, 54 | desc = "Format buffer", 55 | }, 56 | }, 57 | opts = { 58 | formatters_by_ft = { 59 | c = { "clang_format" }, 60 | cpp = { "clang_format" }, 61 | go = { "goimports", "gofmt" }, 62 | lua = { "stylua" }, 63 | python = { "ruff_format" }, 64 | javascript = { "prettier" }, 65 | html = { "prettier" }, 66 | css = { "prettier" }, 67 | json = { "prettier" }, 68 | markdown = { "prettier" }, 69 | sh = { "shfmt" }, 70 | zsh = { "shfmt" }, 71 | yaml = { "yamlfmt" }, 72 | toml = { "taplo" }, 73 | }, 74 | }, 75 | }, 76 | { 77 | "mfussenegger/nvim-lint", 78 | event = { "BufReadPre", "BufNewFile" }, 79 | keys = { 80 | { 81 | "dd", 82 | function() 83 | vim.diagnostic.enable(not vim.diagnostic.is_enabled()) 84 | end, 85 | desc = "loclist diagnostic", 86 | }, 87 | { 88 | "dl", 89 | function() 90 | vim.diagnostic.setloclist() 91 | end, 92 | desc = "loclist diagnostic", 93 | }, 94 | { 95 | "df", 96 | function() 97 | vim.diagnostic.open_float() 98 | end, 99 | desc = "diagnostic float hover", 100 | }, 101 | { 102 | "zg", 103 | function() 104 | require("lint").try_lint("cspell") 105 | require("fidget").notify("CSpell Refreshed") 106 | end, 107 | desc = "refresh cspell", 108 | }, 109 | }, 110 | config = function() 111 | vim.diagnostic.config({ 112 | float = { 113 | border = "rounded", 114 | source = true, 115 | prefix = function(diagnostic, _, _) 116 | local symbols = { "", "", "", "󰛨 " } 117 | local symbol = symbols[diagnostic.severity] or "?" 118 | return symbol 119 | end, 120 | }, 121 | signs = { 122 | text = { 123 | [vim.diagnostic.severity.ERROR] = "󰅚", 124 | [vim.diagnostic.severity.WARN] = "", 125 | [vim.diagnostic.severity.INFO] = "", 126 | [vim.diagnostic.severity.HINT] = "󰌶", 127 | }, 128 | }, 129 | virtual_text = { 130 | source = true, 131 | prefix = "", 132 | format = function(diagnostic) 133 | local symbols = { "", "", "", "󰛨 " } 134 | local symbol = symbols[diagnostic.severity] or "?" 135 | return string.format("%s %s", diagnostic.message, symbol) 136 | end, 137 | }, 138 | }) 139 | 140 | local lint = require("lint") 141 | lint.linters_by_ft = { 142 | markdown = { "markdownlint-cli2", "vale" }, 143 | c = { "cppcheck" }, 144 | cpp = { "cppcheck" }, 145 | css = { "stylelint" }, 146 | yaml = { "yamllint" }, 147 | } 148 | 149 | -- config cspell 150 | local function get_cspell_conf() 151 | local cspell_conf = vim.fs.find(function(name) 152 | return vim.list_contains({ 153 | ".cspell.json", 154 | "cspell.json", 155 | ".cSpell.json", 156 | "cSpell.json", 157 | "cspell.config.js", 158 | "cspell.config.cjs", 159 | "cspell.config.json", 160 | "cspell.config.yaml", 161 | "cspell.config.yml", 162 | "cspell.yaml", 163 | "cspell.yml", 164 | }, name) 165 | end, { limit = math.huge, type = "file", path = "./" }) 166 | if #cspell_conf > 0 then 167 | return cspell_conf[1] 168 | end 169 | return vim.fs.abspath("~/.config/nvim/spell/cspell.json") 170 | end 171 | lint.linters.cspell.args = { 172 | "lint", 173 | "--no-color", 174 | "--no-progress", 175 | "--no-summary", 176 | "--config", 177 | get_cspell_conf(), 178 | function() 179 | return "stdin://" .. vim.api.nvim_buf_get_name(0) 180 | end, 181 | } 182 | lint.linters.cspell = require("lint.util").wrap(lint.linters.cspell, function(diagnostic) 183 | diagnostic.severity = vim.diagnostic.severity.HINT 184 | return diagnostic 185 | end) 186 | 187 | vim.api.nvim_create_autocmd({ "BufWritePost" }, { 188 | group = vim.api.nvim_create_augroup("BufWriteLint", { clear = true }), 189 | callback = function() 190 | if vim.g.nvim_lint_enabled then 191 | require("lint").try_lint() 192 | require("lint").try_lint("cspell") 193 | end 194 | end, 195 | }) 196 | end, 197 | }, 198 | { 199 | "neovim/nvim-lspconfig", 200 | event = { "BufReadPre", "BufNewFile" }, 201 | keys = { 202 | { 203 | "cv", 204 | function() 205 | vim.o.spell = true 206 | vim.g.nvim_lint_enabled = true 207 | require("lint").try_lint() 208 | require("lint").try_lint("cspell") 209 | 210 | -- enable lsp servers 211 | local lsp_for_ft = {} 212 | local lsp_for_any = {} 213 | for _, name in ipairs(lsp_servers) do 214 | local lsp_config = vim.lsp.config[name] 215 | if lsp_config ~= nil then 216 | if lsp_config.filetypes == nil then 217 | table.insert(lsp_for_any, name) 218 | else 219 | for _, ft in ipairs(lsp_config.filetypes) do 220 | if ft == vim.bo.filetype then 221 | table.insert(lsp_for_ft, name) 222 | end 223 | end 224 | end 225 | end 226 | end 227 | if #lsp_for_ft > 0 then 228 | vim.lsp.enable(lsp_for_ft) 229 | end 230 | if #lsp_for_any > 0 then 231 | vim.lsp.enable(lsp_for_any) 232 | end 233 | 234 | require("fidget").notify("IntelliSense Enabled") 235 | end, 236 | desc = "Enable IntelliSense", 237 | }, 238 | { 239 | "cx", 240 | function() 241 | vim.o.spell = false 242 | vim.diagnostic.reset() 243 | vim.g.nvim_lint_enabled = false 244 | 245 | -- disable all lsp server 246 | vim.lsp.enable(lsp_servers, false) 247 | 248 | require("fidget").notify("IntelliSense Disabled") 249 | end, 250 | desc = "Disabled IntelliSense", 251 | }, 252 | }, 253 | config = function() 254 | vim.api.nvim_create_autocmd("LspAttach", { 255 | desc = "LSP Attach Hook", 256 | group = vim.api.nvim_create_augroup("UserLspConfig", {}), 257 | callback = function(ev) 258 | -- Enable completion triggered by 259 | vim.bo[ev.buf].omnifunc = "v:lua.vim.lsp.omnifunc" 260 | 261 | -- Buffer local mappings. 262 | local function map(mode, l, r, opts) 263 | opts = opts or {} 264 | opts.buffer = ev.buf 265 | vim.keymap.set(mode, l, r, opts) 266 | end 267 | 268 | local function nmap(l, r, opts) 269 | map("n", l, r, opts) 270 | end 271 | 272 | local function vmap(l, r, opts) 273 | map("v", l, r, opts) 274 | end 275 | 276 | -- See `:help vim.lsp.*` for documentation on any of the below functions 277 | nmap("gs", vim.lsp.buf.signature_help, { desc = "Lsp signature help" }) 278 | nmap("gk", vim.lsp.buf.hover, { desc = "Lsp hover doc" }) 279 | nmap("gd", vim.lsp.buf.declaration, { desc = "Lsp to declaration" }) 280 | 281 | -- use trouble.nvim as lsp list 282 | nmap("gi", "Trouble lsp_implementations toggle", { desc = "Trouble lsp imp" }) 283 | nmap("gg", "Trouble lsp_definitions toggle", { desc = "Trouble lsp def" }) 284 | nmap("gt", "Trouble lsp_type_definitions toggle", { desc = "Trouble lsp type" }) 285 | nmap("gr", "Trouble lsp_references toggle", { desc = "Trouble lsp ref" }) 286 | 287 | nmap("ca", vim.lsp.buf.code_action, { desc = "Lsp code action" }) 288 | vmap("ca", vim.lsp.buf.code_action, { desc = "Lsp code action" }) 289 | nmap("cf", vim.lsp.buf.format, { desc = "Lsp code format" }) 290 | nmap("cr", vim.lsp.buf.rename, { desc = "Lsp rename" }) 291 | end, 292 | }) 293 | end, 294 | }, 295 | } 296 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/neo/plugins/misc.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "farmergreg/vim-lastplace", 4 | event = "BufReadPre", 5 | }, 6 | { 7 | "lambdalisue/suda.vim", 8 | event = "CmdlineEnter", 9 | cmd = { 10 | "SudaWrite", 11 | }, 12 | }, 13 | { 14 | "echasnovski/mini.nvim", 15 | event = "VeryLazy", 16 | config = function() 17 | require("mini.ai").setup() 18 | require("mini.icons").setup() 19 | require("mini.surround").setup() 20 | require("mini.trailspace").setup() 21 | end, 22 | }, 23 | { 24 | "folke/snacks.nvim", 25 | priority = 1000, 26 | lazy = false, 27 | keys = { 28 | { 29 | "fb", 30 | function() 31 | Snacks.picker.buffers() 32 | end, 33 | desc = "Pick buffers", 34 | }, 35 | { 36 | "fg", 37 | function() 38 | Snacks.picker.git_status() 39 | end, 40 | desc = "Pick git status", 41 | }, 42 | { 43 | "ff", 44 | function() 45 | Snacks.picker.files({ hidden = true }) 46 | end, 47 | desc = "Pick files", 48 | }, 49 | { 50 | "fr", 51 | function() 52 | Snacks.picker.grep({ hidden = true }) 53 | end, 54 | desc = "Pick live search", 55 | }, 56 | { 57 | "fc", 58 | function() 59 | Snacks.picker.grep_word({ hidden = true }) 60 | end, 61 | desc = "Pick search cursor", 62 | }, 63 | { 64 | "zz", 65 | function() 66 | Snacks.zen.zen() 67 | end, 68 | desc = "Toggle zen mode", 69 | }, 70 | { 71 | "za", 72 | function() 73 | Snacks.zen.zoom() 74 | end, 75 | desc = "Toggle zen zoom", 76 | }, 77 | }, 78 | opts = { 79 | picker = {}, 80 | 81 | indent = { 82 | indent = { char = "┊" }, 83 | scope = { char = "┊" }, 84 | filter = function(buf) 85 | if vim.b[buf].snacks_indent == false then 86 | return false 87 | end 88 | 89 | if vim.bo[buf].filetype == "snacks_picker_preview" then 90 | return false 91 | end 92 | 93 | local bt = vim.bo[buf].buftype 94 | if bt == "nofile" or bt == "help" then 95 | return false 96 | end 97 | 98 | return true 99 | end, 100 | }, 101 | scope = {}, 102 | scroll = { 103 | filter = function(buf) 104 | return vim.g.neovide == nil 105 | and vim.g.snacks_scroll ~= false 106 | and vim.b[buf].snacks_scroll ~= false 107 | and vim.bo[buf].buftype ~= "terminal" 108 | end, 109 | }, 110 | 111 | zen = {}, 112 | }, 113 | }, 114 | { 115 | "olimorris/persisted.nvim", 116 | config = function() 117 | require("persisted").setup({ 118 | autoload = true, 119 | should_save = function() 120 | local cwd = vim.fn.getcwd() 121 | local git_dir = vim.fs.joinpath(cwd, ".git") 122 | if vim.uv.fs_stat(git_dir) then 123 | return true 124 | end 125 | return false 126 | end, 127 | }) 128 | vim.api.nvim_create_autocmd("User", { 129 | pattern = "PersistedLoadPost", 130 | callback = function() 131 | for _, buf in ipairs(vim.api.nvim_list_bufs()) do 132 | local buf_name = vim.api.nvim_buf_get_name(buf) 133 | if string.find(buf_name, "NvimTree") then 134 | -- recover nvim-tree buf content after session loaded 135 | require("nvim-tree.api").tree.find_file({ open = true, focus = false }) 136 | return 137 | end 138 | end 139 | end, 140 | }) 141 | end, 142 | }, 143 | { 144 | dir = vim.fn.expand("~/Projects/iself/xdo.nvim"), 145 | dev = true, 146 | cmd = { "Xdo", "Xdov", "Vdo", "Vdov", "XdoLog" }, 147 | }, 148 | } 149 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/neo/plugins/search.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "MagicDuck/grug-far.nvim", 4 | cmd = "GrugFar", 5 | keys = { 6 | { "rg", "GrugFar", desc = "Grug find and replace" }, 7 | }, 8 | config = function() 9 | require("grug-far").setup({ 10 | startInInsertMode = false, 11 | normalModeSearch = true, 12 | wrap = false, 13 | icons = { 14 | actionEntryBullet = " ", 15 | }, 16 | engines = { 17 | ripgrep = { 18 | path = "rg", 19 | extraArgs = "--hidden", 20 | }, 21 | }, 22 | folding = { 23 | enabled = false, 24 | foldcolumn = "0", 25 | }, 26 | helpLine = { 27 | enabled = false, 28 | }, 29 | windowCreationCommand = "tab split", 30 | openTargetWindow = { 31 | preferredLocation = "right", 32 | }, 33 | }) 34 | end, 35 | }, 36 | } 37 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/neo/plugins/statine.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "nvim-lualine/lualine.nvim", 4 | event = "VeryLazy", 5 | dependencies = { 6 | "nvim-tree/nvim-web-devicons", 7 | }, 8 | opts = { 9 | options = { 10 | globalstatus = true, 11 | component_separators = "", 12 | section_separators = "", 13 | disabled_filetypes = { 14 | winbar = { "NvimTree", "aerial", "qf", "trouble" }, 15 | }, 16 | }, 17 | extensions = { "aerial" }, 18 | sections = { 19 | lualine_a = { 20 | { "mode" }, 21 | }, 22 | lualine_b = { 23 | { 24 | "branch", 25 | icon = "", 26 | }, 27 | { 28 | "diff", 29 | symbols = { added = " ", modified = " ", removed = " " }, 30 | }, 31 | { 32 | "diagnostics", 33 | sources = { "nvim_diagnostic" }, 34 | symbols = { error = " ", warn = " ", info = " ", hint = "󰛨 " }, 35 | }, 36 | }, 37 | lualine_c = { 38 | { 39 | "filetype", 40 | padding = { left = 1, right = 0 }, 41 | colored = true, 42 | icon_only = true, 43 | }, 44 | { 45 | "filename", 46 | path = 1, 47 | padding = { left = 0, right = 1 }, 48 | symbols = { 49 | modified = "󰃉 ", 50 | readonly = " ", 51 | unnamed = "[No Name]", 52 | newfile = "[New]", 53 | }, 54 | }, 55 | }, 56 | lualine_x = { 57 | { 58 | "encoding", 59 | icon = "", 60 | }, 61 | { 62 | "fileformat", 63 | symbols = { 64 | unix = " LF", 65 | dos = " CRLF", 66 | mac = " CR", 67 | }, 68 | }, 69 | { "filetype" }, 70 | { 71 | "lsp_status", 72 | icon = "", 73 | ignore_lsp = { "typos_lsp" }, 74 | }, 75 | }, 76 | lualine_y = { 77 | { 78 | function() 79 | local cur = vim.fn.line(".") 80 | local total = vim.fn.line("$") 81 | local col = vim.fn.charcol(".") 82 | return string.format("r%d,c%d,%d%s", cur, col, math.floor(cur / total * 100), "%%") 83 | end, 84 | icon = " ", 85 | }, 86 | }, 87 | lualine_z = {}, 88 | }, 89 | winbar = { 90 | lualine_a = {}, 91 | lualine_b = {}, 92 | lualine_c = { 93 | { 94 | "filetype", 95 | separator = "", 96 | padding = { left = 1, right = 0 }, 97 | colored = true, 98 | icon_only = true, 99 | }, 100 | { 101 | "filename", 102 | padding = { left = 0, right = 1 }, 103 | separator = ">", 104 | symbols = { 105 | modified = "󰃉 ", 106 | readonly = " ", 107 | unnamed = "[No Name]", 108 | newfile = "[New]", 109 | }, 110 | }, 111 | { 112 | "aerial", 113 | sep = " > ", 114 | depth = 3, 115 | dense = false, 116 | dense_sep = ".", 117 | colored = true, 118 | }, 119 | }, 120 | lualine_x = {}, 121 | lualine_y = {}, 122 | lualine_z = {}, 123 | }, 124 | inactive_winbar = { 125 | lualine_a = {}, 126 | lualine_b = {}, 127 | lualine_c = { 128 | { 129 | "filetype", 130 | separator = "", 131 | padding = { left = 1, right = 0 }, 132 | colored = true, 133 | icon_only = true, 134 | }, 135 | { 136 | "filename", 137 | padding = { left = 0, right = 1 }, 138 | symbols = { 139 | modified = "󰃉 ", 140 | readonly = " ", 141 | unnamed = "[No Name]", 142 | newfile = "[New]", 143 | }, 144 | }, 145 | }, 146 | lualine_x = {}, 147 | lualine_y = {}, 148 | lualine_z = {}, 149 | }, 150 | }, 151 | }, 152 | } 153 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/neo/plugins/theme.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "nvim-tree/nvim-web-devicons", 4 | lazy = true, 5 | }, 6 | { 7 | "catppuccin/nvim", 8 | name = "catppuccin", 9 | priority = 1000, 10 | config = function() 11 | require("catppuccin").setup({ 12 | flavour = "mocha", -- latte, frappe, macchiato, mocha 13 | dim_inactive = { 14 | enabled = true, 15 | shade = "dark", 16 | percentage = 0.2, 17 | }, 18 | term_colors = true, 19 | styles = { 20 | comments = { "italic" }, 21 | conditionals = {}, 22 | keywords = { "bold" }, 23 | functions = { "bold" }, 24 | types = { "bold" }, 25 | }, 26 | integrations = { 27 | aerial = true, 28 | blink_cmp = true, 29 | diffview = true, 30 | fidget = true, 31 | flash = true, 32 | gitsigns = true, 33 | grug_far = true, 34 | lsp_trouble = true, 35 | markview = true, 36 | native_lsp = { 37 | enabled = true, 38 | underlines = { 39 | errors = { "undercurl" }, 40 | hints = { "undercurl" }, 41 | warnings = { "undercurl" }, 42 | information = { "undercurl" }, 43 | ok = { "undercurl" }, 44 | }, 45 | }, 46 | nvimtree = true, 47 | snacks = true, 48 | treesitter = true, 49 | which_key = true, 50 | ufo = true, 51 | }, 52 | }) 53 | -- setup must be called before loading 54 | vim.cmd.colorscheme("catppuccin") 55 | end, 56 | }, 57 | } 58 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/neo/plugins/trouble.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "folke/trouble.nvim", 4 | cmd = { "Trouble" }, 5 | keys = { 6 | { "kk", "Trouble diagnostics toggle filter.buf=0", desc = "Trouble diagnostics (current)" }, 7 | { "ke", "Trouble diagnostics toggle", desc = "Trouble diagnostics (workspace)" }, 8 | { "kl", "Trouble loclist toggle", desc = "Trouble loclist" }, 9 | { "kq", "Trouble qflist toggle", desc = "Trouble quickfix" }, 10 | { "kc", "Trouble lsp toggle", desc = "Trouble code lsp" }, 11 | { "ks", "Trouble symbols toggle", desc = "Trouble symbols" }, 12 | }, 13 | config = function() 14 | local trouble = require("trouble") 15 | 16 | local cspell_good = function() 17 | local line = vim.fn.getline(".") 18 | local word = string.match(line, "Unknown word %((.+)%) cspell") 19 | if word ~= nil or word ~= "" then 20 | vim.cmd("spellgood " .. word:lower()) 21 | -- only available after spellgood called 22 | local spell_file = vim.opt.spellfile:get()[1] 23 | os.execute(string.format("sort -u %s -o %s", spell_file, spell_file)) 24 | end 25 | end 26 | 27 | local cspell_all_good = function() 28 | local words = {} 29 | for _, item in pairs(trouble.get_items()) do 30 | if item.source == "cspell" then 31 | local word = string.match(item.text, "Unknown word %((.+)%)") 32 | if word ~= nil or word ~= "" then 33 | words[word:lower()] = true 34 | end 35 | end 36 | end 37 | 38 | if vim.tbl_isempty(words) then 39 | return 40 | end 41 | 42 | local count = 0 43 | for word, _ in pairs(words) do 44 | vim.cmd("silent! spellgood " .. word) 45 | count = count + 1 46 | end 47 | 48 | -- only available after spellgood called 49 | local spell_file = vim.opt.spellfile:get()[1] 50 | os.execute(string.format("sort -u %s -o %s", spell_file, spell_file)) 51 | vim.notify(string.format("%s word(s) added to the %s.", count, spell_file)) 52 | end 53 | 54 | trouble.setup({ 55 | focus = true, 56 | win = { 57 | type = "split", 58 | relative = "win", 59 | position = "bottom", 60 | }, 61 | keys = { 62 | f = { 63 | action = cspell_good, 64 | desc = "cspell good", 65 | }, 66 | sg = { 67 | action = cspell_all_good, 68 | desc = "cspell all good", 69 | }, 70 | }, 71 | }) 72 | end, 73 | }, 74 | } 75 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/neo/plugins/uihance.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "kevinhwang91/nvim-bqf", 4 | ft = "qf", 5 | main = "bqf", 6 | }, 7 | { 8 | "stevearc/aerial.nvim", 9 | cmd = { 10 | "AerialToggle", 11 | "AerialOpen", 12 | "AerialNavToggle", 13 | "AerialNavOpen", 14 | }, 15 | dependencies = { 16 | "nvim-treesitter/nvim-treesitter", 17 | "nvim-tree/nvim-web-devicons", 18 | }, 19 | keys = { 20 | { "ta", "AerialNavToggle", desc = "Aerial nav toggle" }, 21 | { "tb", "AerialToggle", desc = "Aerial outline toggle" }, 22 | }, 23 | opts = { 24 | layout = { 25 | width = 30, 26 | min_width = 20, 27 | default_direction = "prefer_left", 28 | }, 29 | -- filter_kind = false, 30 | filter_kind = { 31 | "Module", 32 | "Namespace", 33 | "Package", 34 | "Class", 35 | "Method", 36 | "Property", 37 | "Field", 38 | "Constructor", 39 | "Enum", 40 | "Interface", 41 | "Function", 42 | "Constant", 43 | "Array", 44 | "Object", 45 | "Key", 46 | "EnumMember", 47 | "Struct", 48 | }, 49 | show_guides = true, 50 | }, 51 | }, 52 | { 53 | "kyazdani42/nvim-tree.lua", 54 | dependencies = { 55 | "nvim-tree/nvim-web-devicons", 56 | }, 57 | cmd = { 58 | "NvimTreeToggle", 59 | "NvimTreeFindFile", 60 | "NvimTreeFocus", 61 | }, 62 | keys = { 63 | { "ft", "NvimTreeToggle", desc = "NvimTreeToggle" }, 64 | { "fl", "NvimTreeFindFile", desc = "NvimTreeFindFile" }, 65 | }, 66 | config = function() 67 | require("nvim-tree").setup({ 68 | on_attach = function(bufnr) 69 | local api = require("nvim-tree.api") 70 | api.config.mappings.default_on_attach(bufnr) 71 | 72 | local function opts(desc) 73 | return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true } 74 | end 75 | 76 | vim.keymap.set("n", "]b", api.node.navigate.opened.next, opts("navigate to next opened file")) 77 | vim.keymap.set("n", "[b", api.node.navigate.opened.prev, opts("navigate to prev opened file")) 78 | end, 79 | disable_netrw = true, 80 | sync_root_with_cwd = true, 81 | view = { 82 | width = { 83 | min = 30, 84 | max = 80, 85 | }, 86 | }, 87 | modified = { 88 | enable = true, 89 | show_on_dirs = true, 90 | show_on_open_dirs = true, 91 | }, 92 | renderer = { 93 | highlight_git = true, 94 | highlight_modified = "all", 95 | highlight_opened_files = "all", 96 | highlight_clipboard = "all", 97 | indent_markers = { 98 | enable = true, 99 | }, 100 | special_files = { 101 | "Cargo.toml", 102 | "Makefile", 103 | "README.md", 104 | "readme.md", 105 | "packages.json", 106 | }, 107 | icons = { 108 | glyphs = { 109 | default = "󰈙", 110 | symlink = "", 111 | bookmark = "󰆤", 112 | modified = "󰃉", 113 | folder = { 114 | arrow_closed = "", 115 | arrow_open = "", 116 | default = "", 117 | open = "", 118 | empty = "", 119 | empty_open = "", 120 | symlink = "", 121 | symlink_open = "", 122 | }, 123 | git = { 124 | unstaged = "󰃉", 125 | staged = "󰄭", 126 | unmerged = "", 127 | renamed = "", 128 | untracked = "󰓒", 129 | deleted = "", 130 | ignored = "", 131 | }, 132 | }, 133 | }, 134 | }, 135 | filters = { 136 | git_ignored = false, 137 | custom = { 138 | -- `\\` escape as lua `\`, then 139 | -- https://neovim.io/doc/user/pattern.html#pattern 140 | "*.swp$", 141 | "*.pyc$", 142 | "^\\.git$", 143 | "^\\.idea$", 144 | "^node_modules$", 145 | }, 146 | }, 147 | }) 148 | end, 149 | }, 150 | } 151 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/neo/plugins/which-key.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "folke/which-key.nvim", 4 | event = "VeryLazy", 5 | keys = { 6 | { 7 | "?", 8 | function() 9 | require("which-key").show({ global = false }) 10 | end, 11 | desc = "Buffer Local Keymaps", 12 | }, 13 | }, 14 | config = function() 15 | local wk = require("which-key") 16 | wk.setup({ 17 | preset = "helix", 18 | icons = { mappings = false }, 19 | sort = { "desc", "local", "order", "group", "alphanum", "mod", "lower", "icase" }, 20 | spec = { 21 | -- one-key quick action, improve my daily usage 22 | { "", "w", desc = "next window" }, 23 | 24 | -- quick action 25 | { "", "close", desc = "quit" }, 26 | { "", "update", mode = { "n", "v", "i" }, desc = "save file" }, 27 | 28 | -- move faster 29 | { "", "3j", desc = "move j faster" }, 30 | { "", "3k", desc = "move k faster" }, 31 | { "", "", desc = "scroll down faster" }, 32 | { "", "", desc = "scroll up faster" }, 33 | 34 | -- leader group 35 | { "b", group = "buffer" }, 36 | { "c", group = "coding" }, 37 | { "f", group = "find" }, 38 | { "g", group = "lsp" }, 39 | { "h", group = "git" }, 40 | { "k", group = "trouble" }, 41 | { "l", group = "list" }, 42 | { "t", group = "tag" }, 43 | { "v", group = "vim" }, 44 | { "w", group = "window" }, 45 | 46 | -- window 47 | { "wp", "p", desc = "pre window" }, 48 | { "wn", "vnew", desc = "new window" }, 49 | { "wc", "c", desc = "close current window" }, 50 | { "wo", "o", desc = "close other windows" }, 51 | { "ws", "s", desc = "h split window" }, 52 | { "wv", "v", desc = "v split window" }, 53 | { "ww", "w", desc = "next window" }, 54 | { "wh", "h", desc = "mv to left window" }, 55 | { "wj", "j", desc = "mv to down window" }, 56 | { "wl", "l", desc = "mv to right window" }, 57 | { "wk", "k", desc = "mv to up window" }, 58 | { "w[", "5<", desc = "win width -5" }, 59 | { "w]", "5>", desc = "win width +5" }, 60 | { "w=", "resize +5", desc = "win height +5" }, 61 | { "w-", "resize -5", desc = "win height -5" }, 62 | { "w/", "=", desc = "resize win==" }, 63 | 64 | -- tab 65 | { "tn", "tabnew", desc = "new tab" }, 66 | { "tc", "tabclose", desc = "close current tab" }, 67 | { "to", "tabonly", desc = "close other tabs" }, 68 | { "tt", "tabnext", desc = "next tab" }, 69 | { "tf", "tabfirst", desc = "first tab" }, 70 | { "tl", "tablast", desc = "last tab" }, 71 | 72 | -- vim 73 | { 74 | "vm", 75 | function() 76 | if vim.o.mouse == "" then 77 | vim.o.mouse = "a" 78 | vim.notify("[ToggleMouse] mouse enabled") 79 | else 80 | vim.o.mouse = "" 81 | vim.notify("[ToggleMouse] mouse disabled") 82 | end 83 | end, 84 | desc = "toggle mouse", 85 | }, 86 | { "vq", "wqall", desc = "save all and quit" }, 87 | { "vs", "Lazy sync", desc = "Lazy sync" }, 88 | { "vx", "qa!", desc = "quit without save" }, 89 | { "vr", "restart", desc = "restart nvim instance" }, 90 | 91 | -- vim copy and paste 92 | { "vy", [["+y]], mode = { "x" }, desc = "yank selected to sys-clip" }, 93 | { "vp", [["+p]], mode = { "n", "v" }, desc = "paste from sys-clip" }, 94 | -- { "", [[+]], mode = { "i", "c" }, desc = "paste from sys-clip" }, 95 | }, 96 | }) 97 | end, 98 | }, 99 | } 100 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/neo/setting.lua: -------------------------------------------------------------------------------- 1 | -- setting.lua 2 | 3 | local vo = vim.o 4 | local vg = vim.g 5 | 6 | vg.mapleader = " " 7 | 8 | vo.mouse = "" 9 | 10 | vo.encoding = "UTF-8" 11 | vim.cmd.language("en_US.UTF-8") 12 | 13 | vo.timeoutlen = 500 14 | 15 | -- load config from exrc: .nvim.lua .nvimrc .exrc 16 | vo.exrc = true 17 | vo.secure = true 18 | 19 | -- show at least 5 lines around cursorline 20 | vo.scrolloff = 5 21 | vo.cursorline = true 22 | 23 | vo.number = true 24 | vo.relativenumber = true 25 | 26 | vo.splitright = true 27 | 28 | -- see https://github.com/jeffkreeftmeijer/vim-numbertoggle 29 | local number_toggle = vim.api.nvim_create_augroup("NumberToggle", { clear = true }) 30 | vim.api.nvim_create_autocmd({ "BufEnter", "FocusGained", "InsertLeave", "WinEnter" }, { 31 | group = number_toggle, 32 | pattern = "*", 33 | callback = function() 34 | if vim.wo.number and vim.fn.mode() ~= "i" then 35 | vim.wo.relativenumber = true 36 | end 37 | end, 38 | }) 39 | vim.api.nvim_create_autocmd({ "BufLeave", "FocusLost", "InsertEnter", "WinLeave" }, { 40 | group = number_toggle, 41 | pattern = "*", 42 | callback = function() 43 | if vim.wo.number then 44 | vim.wo.relativenumber = false 45 | end 46 | end, 47 | }) 48 | 49 | -- show ruler virt-line at textwidth +1 50 | vo.colorcolumn = "+1" 51 | 52 | -- always show signcolumn 53 | vo.signcolumn = "yes" 54 | 55 | -- set the default border for all floating windows 56 | vo.winborder = "rounded" 57 | 58 | -- Smaller updatetime for CursorHold & CursorHoldI & swapfile 59 | vo.updatetime = 300 60 | 61 | vo.autoindent = true 62 | vo.smartindent = true 63 | vo.expandtab = true 64 | 65 | -- one tab as four spaces 66 | vo.shiftround = true 67 | vo.shiftwidth = 4 68 | vo.tabstop = 4 69 | vo.softtabstop = 4 70 | 71 | vo.list = true 72 | vim.opt.listchars = { 73 | tab = "»·", 74 | trail = "∙", 75 | precedes = "←", 76 | extends = "→", 77 | -- eol = "¬", 78 | nbsp = "␣", 79 | } 80 | 81 | vim.opt.fillchars = { 82 | eob = " ", 83 | fold = "·", 84 | foldopen = "", 85 | foldsep = "│", 86 | foldclose = "", 87 | } 88 | 89 | vo.hlsearch = true 90 | vo.incsearch = true 91 | vo.ignorecase = true 92 | vo.smartcase = true 93 | 94 | vo.termguicolors = true 95 | 96 | vo.showmode = false 97 | vo.wildmenu = true 98 | 99 | vo.autoread = true 100 | 101 | -- disable line wrap 102 | vo.wrap = false 103 | 104 | vo.spell = false 105 | vo.spelllang = "en,cjk" 106 | vo.spellcapcheck = "" 107 | vo.spelloptions = "camel" 108 | 109 | vo.tags = "./.tags;,.tags,~/.cache/tags/sys-.tags" 110 | vo.path = table.concat({ 111 | ".", 112 | "/usr/include", 113 | "/usr/include/*", 114 | "/usr/lib/*/include", 115 | "/usr/lib/gcc/**/include", 116 | }, ",") 117 | 118 | vg.python3_host_prog = vim.env.UV_TOOL_DIR .. "/neovim-sh/bin/python" 119 | vg.loaded_ruby_provider = 0 120 | vg.loaded_perl_provider = 0 121 | 122 | -- disable netrw 123 | vg.loaded_netrw = 1 124 | vg.loaded_netrwPlugin = 1 125 | -------------------------------------------------------------------------------- /nvim/.config/nvim/queries/python/folds.scm: -------------------------------------------------------------------------------- 1 | ;; extends 2 | 3 | [ 4 | ((block) @if_body 5 | (#has-parent? @if_body if_statement)) 6 | (elif_clause) 7 | (else_clause) 8 | ((block) @try_body 9 | (#has-parent? @try_body try_statement)) 10 | (except_clause) 11 | (finally_clause) 12 | ] @fold 13 | -------------------------------------------------------------------------------- /nvim/.config/nvim/spell/cspell.json: -------------------------------------------------------------------------------- 1 | { 2 | "dictionaries": ["custom-words"], 3 | "dictionaryDefinitions": [ 4 | { 5 | "name": "custom-words", 6 | "path": "~/.config/nvim/spell/en.utf-8.add", 7 | "addWords": true 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /nvim/.config/nvim/spell/en.utf-8.add: -------------------------------------------------------------------------------- 1 | aarch 2 | abspath 3 | accesslog 4 | addr 5 | ahci 6 | amphi 7 | ansible 8 | api 9 | app 10 | appveyor 11 | arg 12 | args 13 | argv 14 | arp 15 | asctime 16 | augroup 17 | auth 18 | authpriv 19 | autocmd 20 | autoindent 21 | autoread 22 | badblock 23 | badblocks 24 | basename 25 | basetype 26 | binascii 27 | blankline 28 | blk 29 | blkdiscard 30 | blockdev 31 | bool 32 | buf 33 | bufnr 34 | buftype 35 | builtin 36 | builtins 37 | ccls 38 | celsius 39 | cfg 40 | cgroup 41 | cgroupfs 42 | cgroups 43 | chaneyzorn 44 | changelog 45 | changelogs 46 | chardev 47 | charset 48 | checkhealth 49 | chunkd 50 | cjk 51 | clangd 52 | clangtidy 53 | cli 54 | cls 55 | cmd 56 | cmdheight 57 | cmdline 58 | cmds 59 | cmdstr 60 | cmp 61 | CN 62 | coc 63 | colorscheme 64 | command 65 | committer 66 | concat 67 | cond 68 | conf 69 | config 70 | configpath 71 | coredump 72 | coveragerc 73 | cpp 74 | cppcheck 75 | cpu 76 | cpuinfo 77 | cpus 78 | CRLF 79 | cron 80 | cscope 81 | csmi 82 | cspell 83 | CSpell 84 | css 85 | ctags 86 | cterm 87 | ctermbg 88 | ctermfg 89 | ctypes 90 | curpos 91 | cursorline 92 | datacenter 93 | datacenters 94 | datastore 95 | datefmt 96 | datetime 97 | daxregion 98 | debian 99 | debuginfo 100 | deepcopy 101 | dep 102 | deployer 103 | deps 104 | dhcp 105 | diff 106 | dimm 107 | dimms 108 | dirname 109 | diskstats 110 | dll 111 | dmidecode 112 | dns 113 | dnsmasq 114 | dockerfiles 115 | dotfiles 116 | dst 117 | dup 118 | dylib 119 | egrep 120 | elif 121 | emoji 122 | endswith 123 | env 124 | errflag 125 | errflags 126 | errorf 127 | errorlog 128 | esc 129 | eslint 130 | esxi 131 | eth 132 | excepthook 133 | exe 134 | exepath 135 | expandtab 136 | exrc 137 | exsi 138 | failfast 139 | fargs 140 | fcitx 141 | feedkeys 142 | fileformat 143 | fileno 144 | filepath 145 | filetypes 146 | fillchars 147 | fisheye 148 | floaterm 149 | fmt 150 | fn 151 | foldcolumn 152 | foldenable 153 | foldlevel 154 | foldlevelstart 155 | formatexpr 156 | formating 157 | fping 158 | func 159 | function 160 | gcc 161 | getattr 162 | getcharpos 163 | getenv 164 | getitem 165 | getline 166 | getlist 167 | getpid 168 | gevent 169 | gitcommit 170 | gitconfig 171 | github 172 | gitignore 173 | gitme 174 | gmail 175 | gofmt 176 | goimports 177 | golang 178 | golangci 179 | google 180 | gopls 181 | govmomi 182 | grpc 183 | gtags 184 | gui 185 | guibg 186 | guicursor 187 | guifg 188 | guifont 189 | gunicorn 190 | hasattr 191 | hashicorp 192 | hddtemp 193 | healthd 194 | helptags 195 | hlsearch 196 | homedir 197 | hostname 198 | hostnamectl 199 | https 200 | hugepage 201 | hugepages 202 | hugepagesz 203 | hwaddr 204 | hypervisor 205 | ibdev 206 | ibdevs 207 | iface 208 | ifaces 209 | ifcfg 210 | ifdown 211 | ifname 212 | ifup 213 | ignorecase 214 | imap 215 | incsearch 216 | infos 217 | init 218 | inplace 219 | io 220 | iommu 221 | iops 222 | iostat 223 | ioutil 224 | ip 225 | ipaddr 226 | ipaddress 227 | ipairs 228 | ipc 229 | ipmctl 230 | ipmi 231 | ipmitool 232 | ips 233 | iscsi 234 | isdigit 235 | isdir 236 | isempty 237 | iset 238 | isfile 239 | isinstance 240 | islink 241 | issuecomment 242 | iteritems 243 | jenkinsfile 244 | joinpath 245 | js 246 | json 247 | jsonlint 248 | keepjumps 249 | keepmarks 250 | key 251 | keybind 252 | keymap 253 | keymaps 254 | kvm 255 | kwargs 256 | languageserver 257 | ledctl 258 | levelname 259 | libuv 260 | lightspeed 261 | linenr 262 | linewise 263 | linters 264 | linting 265 | listchars 266 | llscheck 267 | lnum 268 | loadavg 269 | localleader 270 | localtime 271 | loclist 272 | logconfig 273 | logging 274 | loglevel 275 | lsblk 276 | lsm 277 | lsp 278 | lspconfig 279 | lua 280 | luacheck 281 | luajit 282 | luarc 283 | luarocks 284 | luasnip 285 | luassert 286 | luavit 287 | luvit 288 | lvl 289 | macaddr 290 | manylinux 291 | mapleader 292 | maplocalleader 293 | markdownlint 294 | mdadm 295 | mdstat 296 | mellanox 297 | mem 298 | metaclass 299 | metad 300 | mgt 301 | mklabel 302 | mkpart 303 | mktemp 304 | mongo 305 | mongod 306 | mongodb 307 | mongodump 308 | mongoup 309 | mountpoint 310 | msg 311 | mtu 312 | multihandles 313 | mypy 314 | namespace 315 | namespaces 316 | nargs 317 | nas 318 | ndctl 319 | neo 320 | neovide 321 | neovim 322 | netmask 323 | netrw 324 | newgh 325 | nfs 326 | nguid 327 | nic 328 | nics 329 | nmap 330 | nodeps 331 | nofile 332 | noqa 333 | noremap 334 | nsid 335 | ntp 336 | ntpd 337 | ntpdate 338 | ntptime 339 | numa 340 | nums 341 | nvim 342 | nvme 343 | objc 344 | objcpp 345 | objs 346 | oem 347 | offline 348 | omnifunc 349 | openibd 350 | openvswitch 351 | os 352 | outdate 353 | ovs 354 | ovsbr 355 | partprobe 356 | passphrase 357 | passthrough 358 | Pdeathsig 359 | pep8 360 | perccli 361 | pidof 362 | pinfo 363 | pkgs 364 | plugconf 365 | plugins 366 | plugmap 367 | pmem 368 | pmems 369 | podman 370 | popen 371 | postprocess 372 | powerline 373 | poweroff 374 | pragma 375 | prog 376 | proto 377 | protobuf 378 | psutil 379 | py 380 | pyc 381 | pycache 382 | pycmd 383 | pyerror 384 | pyfakefs 385 | pygen 386 | pygments 387 | pylint 388 | pyproject 389 | pyright 390 | python2 391 | python3 392 | pyuv 393 | pyvenv 394 | pyzbs 395 | qiuping 396 | qualname 397 | quan 398 | quickfix 399 | rdma 400 | readline 401 | readlines 402 | readwrite 403 | realpath 404 | recv 405 | redir 406 | regexp 407 | relativenumber 408 | repo 409 | req 410 | resolv 411 | ret 412 | returncode 413 | rpc 414 | rpmdb 415 | rpms 416 | rst 417 | rstrip 418 | rtcode 419 | rtype 420 | san 421 | scrolloff 422 | scsi 423 | scvm 424 | sdk 425 | sdr 426 | sed 427 | segs 428 | selftest 429 | setloclist 430 | setreg 431 | sgdisk 432 | shellcheck 433 | shfmt 434 | shiftround 435 | shiftwidth 436 | shortmess 437 | showmode 438 | shutil 439 | signcolumn 440 | signum 441 | slb 442 | smartcase 443 | smartclt 444 | smartctl 445 | smartindent 446 | smartpqi 447 | smartx 448 | smbus 449 | smtx 450 | socktype 451 | softtabstop 452 | spellcapcheck 453 | spellfile 454 | spellgood 455 | spelllang 456 | spelloptions 457 | splitlines 458 | sriov 459 | ssd 460 | ssl 461 | startswith 462 | stderr 463 | stdin 464 | stdout 465 | stdpath 466 | storcli 467 | str 468 | strdisplaywidth 469 | strftime 470 | struct 471 | stylua 472 | subcmd 473 | sublicense 474 | subnetmask 475 | swapfile 476 | symlink 477 | sys 478 | sysconfig 479 | sysctl 480 | sysfs 481 | syslog 482 | sysname 483 | systemctl 484 | systemd 485 | tabstop 486 | taplo 487 | taskd 488 | tempname 489 | termguicolors 490 | threadpool 491 | timedelta 492 | timemachine 493 | timeoutlen 494 | timestamp 495 | tmpl 496 | tmux 497 | toolbar 498 | toplevel 499 | topo 500 | tox 501 | traceback 502 | treesitter 503 | truecolor 504 | tty 505 | tunasdk 506 | txt 507 | udev 508 | udevadm 509 | uid 510 | umount 511 | umounted 512 | unconfigured 513 | unix 514 | unparted 515 | unregister 516 | updatetime 517 | usb 518 | usbredir 519 | usbredirserver 520 | userinfo 521 | username 522 | usr 523 | utf 524 | util 525 | uuid 526 | uuids 527 | vagrantfile 528 | vcenter 529 | vcpu 530 | vcpus 531 | vdisk 532 | vds 533 | venv 534 | ver 535 | vert 536 | vhost 537 | vim 538 | vimdoc 539 | vimrc 540 | vimruntime 541 | vimtags 542 | vip 543 | vips 544 | virt 545 | virtualization 546 | vlan 547 | vm 548 | vmap 549 | vmdk 550 | vmem 551 | vms 552 | vmtools 553 | vmware 554 | vsd 555 | vsphere 556 | vsplit 557 | warnflag 558 | warnflags 559 | wearout 560 | wezterm 561 | wiki 562 | wildmenu 563 | wms 564 | workflow 565 | writestr 566 | wwid 567 | xclip 568 | xdg 569 | xen 570 | xenserver 571 | xenserver7 572 | xmap 573 | yaml 574 | yamlfmt 575 | yamllint 576 | youdao 577 | zbs 578 | zh 579 | zipfile 580 | zooid 581 | zookeeper 582 | zou 583 | zsh 584 | -------------------------------------------------------------------------------- /nvim/.config/pip/pip.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | index-url = https://pypi.tuna.tsinghua.edu.cn/simple 3 | 4 | -------------------------------------------------------------------------------- /nvim/.config/pycodestyle: -------------------------------------------------------------------------------- 1 | [pycodestyle] 2 | max-line-length = 120 3 | -------------------------------------------------------------------------------- /nvim/.config/pylintrc: -------------------------------------------------------------------------------- 1 | # This Pylint rcfile contains a best-effort configuration to uphold the 2 | # best-practices and style described in the Google Python style guide: 3 | # https://google.github.io/styleguide/pyguide.html 4 | # 5 | # Its canonical open-source location is: 6 | # https://google.github.io/styleguide/pylintrc 7 | 8 | [MASTER] 9 | 10 | # Files or directories to be skipped. They should be base names, not paths. 11 | ignore=third_party 12 | 13 | # Files or directories matching the regex patterns are skipped. The regex 14 | # matches against base names, not paths. 15 | ignore-patterns= 16 | 17 | # Pickle collected data for later comparisons. 18 | persistent=no 19 | 20 | # List of plugins (as comma separated values of python modules names) to load, 21 | # usually to register additional checkers. 22 | load-plugins= 23 | 24 | # Use multiple processes to speed up Pylint. 25 | jobs=4 26 | 27 | # Allow loading of arbitrary C extensions. Extensions are imported into the 28 | # active Python interpreter and may run arbitrary code. 29 | unsafe-load-any-extension=no 30 | 31 | 32 | [MESSAGES CONTROL] 33 | 34 | # Only show warnings with the listed confidence levels. Leave empty to show 35 | # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED 36 | confidence= 37 | 38 | # Enable the message, report, category or checker with the given id(s). You can 39 | # either give multiple identifier separated by comma (,) or put this option 40 | # multiple time (only on the command line, not in the configuration file where 41 | # it should appear only once). See also the "--disable" option for examples. 42 | #enable= 43 | 44 | # Disable the message, report, category or checker with the given id(s). You 45 | # can either give multiple identifiers separated by comma (,) or put this 46 | # option multiple times (only on the command line, not in the configuration 47 | # file where it should appear only once).You can also use "--disable=all" to 48 | # disable everything first and then reenable specific checks. For example, if 49 | # you want to run only the similarities checker, you can use "--disable=all 50 | # --enable=similarities". If you want to run only the classes checker, but have 51 | # no Warning level messages displayed, use"--disable=all --enable=classes 52 | # --disable=W" 53 | disable=abstract-method, 54 | apply-builtin, 55 | arguments-differ, 56 | attribute-defined-outside-init, 57 | backtick, 58 | bad-option-value, 59 | basestring-builtin, 60 | broad-except, 61 | buffer-builtin, 62 | c-extension-no-member, 63 | consider-using-enumerate, 64 | consider-using-f-string, 65 | cmp-builtin, 66 | cmp-method, 67 | coerce-builtin, 68 | coerce-method, 69 | delslice-method, 70 | div-method, 71 | duplicate-code, 72 | eq-without-hash, 73 | execfile-builtin, 74 | file-builtin, 75 | filter-builtin-not-iterating, 76 | fixme, 77 | getslice-method, 78 | global-statement, 79 | hex-method, 80 | idiv-method, 81 | implicit-str-concat, 82 | import-error, 83 | import-self, 84 | import-star-module-level, 85 | inconsistent-return-statements, 86 | input-builtin, 87 | intern-builtin, 88 | invalid-str-codec, 89 | locally-disabled, 90 | logging-format-interpolation, 91 | logging-not-lazy, 92 | long-builtin, 93 | long-suffix, 94 | map-builtin-not-iterating, 95 | misplaced-comparison-constant, 96 | missing-class-docstring, 97 | missing-function-docstring, 98 | missing-module-docstring, 99 | metaclass-assignment, 100 | next-method-called, 101 | next-method-defined, 102 | no-absolute-import, 103 | no-else-break, 104 | no-else-continue, 105 | no-else-raise, 106 | no-else-return, 107 | no-init, # added 108 | no-member, 109 | no-name-in-module, 110 | no-self-use, 111 | nonzero-method, 112 | oct-method, 113 | old-division, 114 | old-ne-operator, 115 | old-octal-literal, 116 | old-raise-syntax, 117 | parameter-unpacking, 118 | print-statement, 119 | raising-string, 120 | range-builtin-not-iterating, 121 | raw_input-builtin, 122 | rdiv-method, 123 | reduce-builtin, 124 | relative-import, 125 | reload-builtin, 126 | round-builtin, 127 | setslice-method, 128 | signature-differs, 129 | standarderror-builtin, 130 | suppressed-message, 131 | sys-max-int, 132 | too-few-public-methods, 133 | too-many-ancestors, 134 | too-many-arguments, 135 | too-many-boolean-expressions, 136 | too-many-branches, 137 | too-many-instance-attributes, 138 | too-many-locals, 139 | too-many-nested-blocks, 140 | too-many-public-methods, 141 | too-many-return-statements, 142 | too-many-statements, 143 | # trailing-newlines, 144 | unichr-builtin, 145 | unicode-builtin, 146 | unnecessary-pass, 147 | unpacking-in-except, 148 | useless-else-on-loop, 149 | useless-object-inheritance, 150 | useless-suppression, 151 | using-cmp-argument, 152 | # wrong-import-order, 153 | xrange-builtin, 154 | zip-builtin-not-iterating, 155 | 156 | 157 | [REPORTS] 158 | 159 | # Set the output format. Available formats are text, parseable, colorized, msvs 160 | # (visual studio) and html. You can also give a reporter class, eg 161 | # mypackage.mymodule.MyReporterClass. 162 | output-format=text 163 | 164 | # Tells whether to display a full report or only the messages 165 | reports=no 166 | 167 | # Python expression which should return a note less than 10 (10 is the highest 168 | # note). You have access to the variables errors warning, statement which 169 | # respectively contain the number of errors / warnings messages and the total 170 | # number of statements analyzed. This is used by the global evaluation report 171 | # (RP0004). 172 | evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) 173 | 174 | # Template used to display messages. This is a python new-style format string 175 | # used to format the message information. See doc for all details 176 | #msg-template= 177 | 178 | 179 | [BASIC] 180 | 181 | # Good variable names which should always be accepted, separated by a comma 182 | good-names=main,_ 183 | 184 | # Bad variable names which should always be refused, separated by a comma 185 | bad-names= 186 | 187 | # Colon-delimited sets of names that determine each other's naming style when 188 | # the name regexes allow several styles. 189 | name-group= 190 | 191 | # Include a hint for the correct naming format with invalid-name 192 | include-naming-hint=no 193 | 194 | # List of decorators that produce properties, such as abc.abstractproperty. Add 195 | # to this list to register other decorators that produce valid properties. 196 | property-classes=abc.abstractproperty,cached_property.cached_property,cached_property.threaded_cached_property,cached_property.cached_property_with_ttl,cached_property.threaded_cached_property_with_ttl 197 | 198 | # Regular expression matching correct function names 199 | function-rgx=^(?:(?PsetUp|tearDown|setUpModule|tearDownModule)|(?P_?[A-Z][a-zA-Z0-9]*)|(?P_?[a-z][a-z0-9_]*))$ 200 | 201 | # Regular expression matching correct variable names 202 | variable-rgx=^[a-z][a-z0-9_]*$ 203 | 204 | # Regular expression matching correct constant names 205 | const-rgx=^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$ 206 | 207 | # Regular expression matching correct attribute names 208 | attr-rgx=^_{0,2}[a-z][a-z0-9_]*$ 209 | 210 | # Regular expression matching correct argument names 211 | argument-rgx=^[a-z][a-z0-9_]*$ 212 | 213 | # Regular expression matching correct class attribute names 214 | class-attribute-rgx=^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$ 215 | 216 | # Regular expression matching correct inline iteration names 217 | inlinevar-rgx=^[a-z][a-z0-9_]*$ 218 | 219 | # Regular expression matching correct class names 220 | class-rgx=^_?[A-Z][a-zA-Z0-9]*$ 221 | 222 | # Regular expression matching correct module names 223 | module-rgx=^(_?[a-z][a-z0-9_]*|__init__)$ 224 | 225 | # Regular expression matching correct method names 226 | method-rgx=(?x)^(?:(?P_[a-z0-9_]+__|runTest|setUp|tearDown|setUpTestCase|tearDownTestCase|setupSelf|tearDownClass|setUpClass|(test|assert)_*[A-Z0-9][a-zA-Z0-9_]*|next)|(?P_{0,2}[A-Z][a-zA-Z0-9_]*)|(?P_{0,2}[a-z][a-z0-9_]*))$ 227 | 228 | # Regular expression which should only match function or class names that do 229 | # not require a docstring. 230 | no-docstring-rgx=(__.*__|main|test.*|.*test|.*Test)$ 231 | 232 | # Minimum line length for functions/classes that require docstrings, shorter 233 | # ones are exempt. 234 | docstring-min-length=10 235 | 236 | 237 | [TYPECHECK] 238 | 239 | # List of decorators that produce context managers, such as 240 | # contextlib.contextmanager. Add to this list to register other decorators that 241 | # produce valid context managers. 242 | contextmanager-decorators=contextlib.contextmanager,contextlib2.contextmanager 243 | 244 | # Tells whether missing members accessed in mixin class should be ignored. A 245 | # mixin class is detected if its name ends with "mixin" (case insensitive). 246 | ignore-mixin-members=yes 247 | 248 | # List of module names for which member attributes should not be checked 249 | # (useful for modules/projects where namespaces are manipulated during runtime 250 | # and thus existing member attributes cannot be deduced by static analysis. It 251 | # supports qualified module names, as well as Unix pattern matching. 252 | ignored-modules= 253 | 254 | # List of class names for which member attributes should not be checked (useful 255 | # for classes with dynamically set attributes). This supports the use of 256 | # qualified names. 257 | ignored-classes=optparse.Values,thread._local,_thread._local 258 | 259 | # List of members which are set dynamically and missed by pylint inference 260 | # system, and so shouldn't trigger E1101 when accessed. Python regular 261 | # expressions are accepted. 262 | generated-members= 263 | 264 | 265 | [FORMAT] 266 | 267 | # Maximum number of characters on a single line. 268 | max-line-length=120 269 | 270 | # TODO(https://github.com/PyCQA/pylint/issues/3352): Direct pylint to exempt 271 | # lines made too long by directives to pytype. 272 | 273 | # Regexp for a line that is allowed to be longer than the limit. 274 | ignore-long-lines=(?x)( 275 | ^\s*(\#\ )??$| 276 | ^\s*(from\s+\S+\s+)?import\s+.+$) 277 | 278 | # Allow the body of an if to be on the same line as the test if there is no 279 | # else. 280 | single-line-if-stmt=yes 281 | 282 | # Maximum number of lines in a module 283 | max-module-lines=99999 284 | 285 | # String used as indentation unit. The internal Google style guide mandates 2 286 | # spaces. Google's externaly-published style guide says 4, consistent with 287 | # PEP 8. Here, we use 2 spaces, for conformity with many open-sourced Google 288 | # projects (like TensorFlow). 289 | # indent-string=' ' 290 | indent-string=' ' 291 | 292 | # Number of spaces of indent required inside a hanging or continued line. 293 | indent-after-paren=4 294 | 295 | # Expected format of line ending, e.g. empty (any line ending), LF or CRLF. 296 | expected-line-ending-format= 297 | 298 | 299 | [MISCELLANEOUS] 300 | 301 | # List of note tags to take in consideration, separated by a comma. 302 | notes=TODO 303 | 304 | 305 | [STRING] 306 | 307 | # This flag controls whether inconsistent-quotes generates a warning when the 308 | # character used as a quote delimiter is used inconsistently within a module. 309 | check-quote-consistency=yes 310 | 311 | 312 | [VARIABLES] 313 | 314 | # Tells whether we should check for unused import in __init__ files. 315 | init-import=no 316 | 317 | # A regular expression matching the name of dummy variables (i.e. expectedly 318 | # not used). 319 | dummy-variables-rgx=^\*{0,2}(_$|unused_|dummy_) 320 | 321 | # List of additional names supposed to be defined in builtins. Remember that 322 | # you should avoid to define new builtins when possible. 323 | additional-builtins= 324 | 325 | # List of strings which can identify a callback function by name. A callback 326 | # name must start or end with one of those strings. 327 | callbacks=cb_,_cb 328 | 329 | # List of qualified module names which can have objects that can redefine 330 | # builtins. 331 | redefining-builtins-modules=six,six.moves,past.builtins,future.builtins,functools 332 | 333 | 334 | [LOGGING] 335 | 336 | # Logging modules to check that the string format arguments are in logging 337 | # function parameter format 338 | logging-modules=logging,absl.logging,tensorflow.io.logging 339 | 340 | 341 | [SIMILARITIES] 342 | 343 | # Minimum lines number of a similarity. 344 | min-similarity-lines=4 345 | 346 | # Ignore comments when computing similarities. 347 | ignore-comments=yes 348 | 349 | # Ignore docstrings when computing similarities. 350 | ignore-docstrings=yes 351 | 352 | # Ignore imports when computing similarities. 353 | ignore-imports=no 354 | 355 | 356 | [SPELLING] 357 | 358 | # Spelling dictionary name. Available dictionaries: none. To make it working 359 | # install python-enchant package. 360 | spelling-dict= 361 | 362 | # List of comma separated words that should not be checked. 363 | spelling-ignore-words= 364 | 365 | # A path to a file that contains private dictionary; one word per line. 366 | spelling-private-dict-file= 367 | 368 | # Tells whether to store unknown words to indicated private dictionary in 369 | # --spelling-private-dict-file option instead of raising a message. 370 | spelling-store-unknown-words=no 371 | 372 | 373 | [IMPORTS] 374 | 375 | # Deprecated modules which should not be used, separated by a comma 376 | deprecated-modules=regsub, 377 | TERMIOS, 378 | Bastion, 379 | rexec, 380 | sets 381 | 382 | # Create a graph of every (i.e. internal and external) dependencies in the 383 | # given file (report RP0402 must not be disabled) 384 | import-graph= 385 | 386 | # Create a graph of external dependencies in the given file (report RP0402 must 387 | # not be disabled) 388 | ext-import-graph= 389 | 390 | # Create a graph of internal dependencies in the given file (report RP0402 must 391 | # not be disabled) 392 | int-import-graph= 393 | 394 | # Force import order to recognize a module as part of the standard 395 | # compatibility libraries. 396 | known-standard-library= 397 | 398 | # Force import order to recognize a module as part of a third party library. 399 | known-third-party=enchant, absl 400 | 401 | # Analyse import fallback blocks. This can be used to support both Python 2 and 402 | # 3 compatible code, which means that the block might have code that exists 403 | # only in one or another interpreter, leading to false positives when analysed. 404 | analyse-fallback-blocks=no 405 | 406 | 407 | [CLASSES] 408 | 409 | # List of method names used to declare (i.e. assign) instance attributes. 410 | defining-attr-methods=__init__, 411 | __new__, 412 | setUp 413 | 414 | # List of member names, which should be excluded from the protected access 415 | # warning. 416 | exclude-protected=_asdict, 417 | _fields, 418 | _replace, 419 | _source, 420 | _make 421 | 422 | # List of valid names for the first argument in a class method. 423 | valid-classmethod-first-arg=cls, 424 | class_ 425 | 426 | # List of valid names for the first argument in a metaclass class method. 427 | valid-metaclass-classmethod-first-arg=mcs 428 | 429 | 430 | [EXCEPTIONS] 431 | 432 | # Exceptions that will emit a warning when being caught. Defaults to 433 | # "Exception" 434 | overgeneral-exceptions=StandardError, 435 | Exception, 436 | BaseException 437 | -------------------------------------------------------------------------------- /nvim/.config/yamllint/config: -------------------------------------------------------------------------------- 1 | rules: 2 | document-start: disable 3 | indentation: 4 | spaces: 2 5 | line-length: 6 | max: 120 7 | -------------------------------------------------------------------------------- /nvim/.editorconfig: -------------------------------------------------------------------------------- 1 | [*] 2 | end_of_line = LF 3 | charset = utf-8 4 | indent_size = 4 5 | indent_style = space 6 | trim_trailing_whitespace = true 7 | insert_final_newline = true 8 | 9 | [*.{js,css,json,yml,yaml,lua,toml}] 10 | indent_size = 2 11 | max_line_length = 120 12 | 13 | [*.py] 14 | profile = black 15 | indent_style = space 16 | indent_size = 4 17 | max_line_length = 120 18 | 19 | [*.go] 20 | indent_style = tab 21 | max_line_length = 120 22 | 23 | [Makefile] 24 | indent_style = tab 25 | max_line_length = 120 26 | -------------------------------------------------------------------------------- /nvim/.gemrc: -------------------------------------------------------------------------------- 1 | --- 2 | :backtrace: false 3 | :bulk_threshold: 1000 4 | :sources: 5 | - https://gems.ruby-china.com/ 6 | :update_sources: true 7 | :verbose: true 8 | :concurrent_downloads: 8 9 | gem: "--user-install" 10 | -------------------------------------------------------------------------------- /nvim/.gitconfig: -------------------------------------------------------------------------------- 1 | [user] 2 | email = chaneyzorn@gmail.com 3 | name = chaney 4 | [core] 5 | editor = nvim 6 | quotepath = false 7 | pager = less -x1,5 8 | [pull] 9 | ff = only 10 | [alias] 11 | root = rev-parse --show-toplevel 12 | showf = show --name-only 13 | logf = log --name-only 14 | diffc = diff --cached 15 | [log] 16 | date = iso 17 | [url "ssh://git@ssh.github.com:443/"] 18 | insteadOf = git@github.com: 19 | -------------------------------------------------------------------------------- /nvim/.isort.cfg: -------------------------------------------------------------------------------- 1 | [settings] 2 | profile = black 3 | # profile = google 4 | -------------------------------------------------------------------------------- /nvim/.npmrc: -------------------------------------------------------------------------------- 1 | prefix=~/.node_modules 2 | registry=https://registry.npmmirror.com 3 | -------------------------------------------------------------------------------- /nvim/.shellcheckrc: -------------------------------------------------------------------------------- 1 | disable=SC2086 2 | -------------------------------------------------------------------------------- /nvim/.yarnrc: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | registry "https://registry.npm.taobao.org" 6 | disable-self-update-check true 7 | -------------------------------------------------------------------------------- /selene.toml: -------------------------------------------------------------------------------- 1 | std = "neovim" 2 | 3 | [rules] 4 | global_usage = "allow" 5 | multiple_statements = "allow" 6 | incorrect_standard_library_use = "allow" 7 | mixed_table = "allow" 8 | -------------------------------------------------------------------------------- /ssh/.ssh/config: -------------------------------------------------------------------------------- 1 | Include ~/.orbstack/ssh/config 2 | 3 | Host * 4 | ServerAliveInterval 240 5 | PubkeyAcceptedKeyTypes +ssh-rsa 6 | KexAlgorithms +diffie-hellman-group1-sha1,diffie-hellman-group14-sha1 7 | ControlMaster auto 8 | ControlPath ~/.ssh/session/%h-%p-%r 9 | ControlPersist 12h 10 | Host 192.168.*.* 11 | CheckHostIP no 12 | StrictHostKeyChecking no 13 | UserKnownHostsFile=/dev/null 14 | Host 172.20.*.* 15 | CheckHostIP no 16 | StrictHostKeyChecking no 17 | UserKnownHostsFile=/dev/null 18 | Host chaney-dev.local 19 | CheckHostIP no 20 | StrictHostKeyChecking no 21 | UserKnownHostsFile=/dev/null 22 | User chaney 23 | ForwardAgent yes 24 | Host chaney-wk1.local 25 | CheckHostIP no 26 | StrictHostKeyChecking no 27 | UserKnownHostsFile=/dev/null 28 | User chaney 29 | ForwardAgent yes 30 | Host *.local 31 | CheckHostIP no 32 | StrictHostKeyChecking no 33 | UserKnownHostsFile=/dev/null 34 | Host chaney-* 35 | CheckHostIP no 36 | StrictHostKeyChecking no 37 | UserKnownHostsFile=/dev/null 38 | User chaney 39 | ForwardAgent yes 40 | -------------------------------------------------------------------------------- /ssh/.ssh/session/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaneyzorn/dotfiles/8347f6aaadc2709f95b2cefeb0137e87c2eec0bc/ssh/.ssh/session/.gitkeep -------------------------------------------------------------------------------- /stylua.toml: -------------------------------------------------------------------------------- 1 | indent_type = "Spaces" 2 | indent_width = 2 3 | 4 | -------------------------------------------------------------------------------- /systemd/.config/systemd/user/clash.service: -------------------------------------------------------------------------------- 1 | ; see https://docs.syncthing.net/users/autostart.html#linux 2 | ; see https://www.freedesktop.org/software/systemd/man/systemd.unit.html 3 | ; 4 | ; enable and start as system service: 5 | ; systemctl enable clash@chaney.service 6 | ; systemctl start clash@chaney.service 7 | ; 8 | ; enable and start as user service: 9 | ; copy clash.service to ~/.config/systemd/user/ 10 | ; systemctl --user enable clash.service 11 | ; systemctl --user start clash.service 12 | 13 | [Unit] 14 | Description=A rule based proxy in Go. 15 | After=network.target 16 | 17 | [Service] 18 | Type=exec 19 | Restart=on-abort 20 | ExecStart=/usr/bin/clash 21 | 22 | [Install] 23 | WantedBy=default.target 24 | -------------------------------------------------------------------------------- /systemd/.config/systemd/user/default.target.wants/clash.service: -------------------------------------------------------------------------------- 1 | /home/chaney/.config/systemd/user/clash.service -------------------------------------------------------------------------------- /systemd/.config/systemd/user/default.target.wants/syncthing.service: -------------------------------------------------------------------------------- 1 | /home/chaney/.config/systemd/user/syncthing.service -------------------------------------------------------------------------------- /systemd/.config/systemd/user/efi-boot-steamos.service: -------------------------------------------------------------------------------- 1 | # /etc/systemd/system/efi-boot-steamos.service 2 | 3 | ### Fixes dual-boot after SteamOS upgrade: 4 | # - VUP + Power to BIOS 5 | # - Boot From File: esp/efi/steamos/steamcl.efi 6 | # - Login to shell through ssh with user deck 7 | # - sudo efibootmgr -c -L "SteamOS" -l "\EFI\steamos\steamcl.efi" -d /dev/nvme0n1p1 -b0001 8 | # - sudo efibootmgr -n 0001 9 | 10 | [Unit] 11 | Description=Force SteamOS on next Boot 12 | 13 | [Service] 14 | Type=oneshot 15 | RemainAfterExit=true 16 | ExecCondition=/bin/bash -c "efibootmgr | grep -Po 'BootCurrent: [0-9].*'" 17 | ExecStart=/bin/bash -c "efibootmgr -n $(efibootmgr | grep BootCurrent | awk '{ print $NF }')" 18 | 19 | [Install] 20 | WantedBy=multi-user.target 21 | -------------------------------------------------------------------------------- /systemd/.config/systemd/user/notify-me.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Remind My Soul 3 | Documentation=man:notify-send(1) 4 | 5 | [Service] 6 | Type=oneshot 7 | Environment="T1=💪 身体健康,精神充盈;" 8 | Environment="T2=✨ 自我实现,自我解放;" 9 | Environment="T3=💞 行我所向,寻我所念;" 10 | ExecStart=/usr/bin/notify-send "Notify My Soul !" "${T1}\n${T2}\n${T3}" --icon=accessories-text-editor 11 | -------------------------------------------------------------------------------- /systemd/.config/systemd/user/notify-me.timer: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Notify My Soul Timer 3 | Documentation=man:notify-send(1) man:systemd.special(7) 4 | 5 | [Timer] 6 | OnCalendar=hourly 7 | RandomizedDelaySec=800 8 | Persistent=true 9 | 10 | [Install] 11 | WantedBy=timers.target 12 | -------------------------------------------------------------------------------- /systemd/.config/systemd/user/syncthing.service: -------------------------------------------------------------------------------- 1 | ; see https://docs.syncthing.net/users/autostart.html#linux 2 | ; see https://www.freedesktop.org/software/systemd/man/systemd.unit.html 3 | ; 4 | ; enable and start as system service: 5 | ; systemctl enable syncthing@chaney.service 6 | ; systemctl start syncthing@chaney.service 7 | ; 8 | ; enable and start as user service: 9 | ; copy syncthing.service to ~/.config/systemd/user/ 10 | ; systemctl --user enable syncthing.service 11 | ; systemctl --user start syncthing.service 12 | 13 | [Unit] 14 | Description=Syncthing - Open Source Continuous File Synchronization 15 | Documentation=man:syncthing(1) 16 | 17 | [Service] 18 | ExecStart=/usr/bin/syncthing -no-browser -no-restart -logflags=0 19 | Restart=on-failure 20 | SuccessExitStatus=3 4 21 | RestartForceExitStatus=3 4 22 | 23 | # Hardening 24 | SystemCallArchitectures=native 25 | MemoryDenyWriteExecute=true 26 | NoNewPrivileges=true 27 | 28 | [Install] 29 | WantedBy=default.target 30 | -------------------------------------------------------------------------------- /systemd/.config/systemd/user/timers.target.wants/notify-me.timer: -------------------------------------------------------------------------------- 1 | /home/chaney/.config/systemd/user/notify-me.timer -------------------------------------------------------------------------------- /tmux/.teamocil/.gitignore: -------------------------------------------------------------------------------- 1 | *.tmp.yml 2 | -------------------------------------------------------------------------------- /tmux/.teamocil/chaney-pi.local.yml: -------------------------------------------------------------------------------- 1 | name: chaney 2 | windows: 3 | - name: chaney-pi 4 | root: ~ 5 | layout: main-vertical 6 | panes: 7 | - ssh chaney-pi1.local 8 | - ssh chaney-pi2.local 9 | - ssh chaney-pi3.local 10 | -------------------------------------------------------------------------------- /tmux/.teamocil/chaney-pi.yml: -------------------------------------------------------------------------------- 1 | name: chaney 2 | windows: 3 | - name: chaney-pi 4 | root: ~ 5 | layout: main-vertical 6 | panes: 7 | - ssh chaney-pi1 8 | - ssh chaney-pi2 9 | - ssh chaney-pi3 10 | -------------------------------------------------------------------------------- /tmux/.tmux.conf: -------------------------------------------------------------------------------- 1 | # 默认开启鼠标支持,可以点选窗口,拖拽调整窗口大小,鼠标滚动查看历史输出 2 | # set-option -g mouse on 3 | 4 | # 设置启动后的默认shell,$SHELL 环境变量在 zshrc 中进行了显式设定 5 | set-option -g default-shell $SHELL 6 | 7 | set-option -g history-limit 50000 8 | 9 | # see https://github.com/tmux/tmux/wiki/Clipboard#quick-summary 10 | set -s set-clipboard on 11 | 12 | # 调整tmux的escape-time,减少vim中键的延迟 13 | # see http://man.openbsd.org/OpenBSD-current/man1/tmux.1#escape-time 14 | # see https://github.com/neovim/neovim/wiki/FAQ#esc-in-tmux-or-gnu-screen-is-delayed 15 | set-option -sg escape-time 10 16 | 17 | # 设置tmux的前置键(默认设置是C-b) 18 | set-option -g prefix C-x 19 | # 由于现在C-x被tmux所用,tmux内的应用将不能直接接收到C-x 20 | # 制定向tmux内应用发送C-x的方式,原方式是C-b C-b 21 | unbind C-b 22 | # 设置向tmux内应用发送C-x的方式为 C-x C-x 23 | bind C-x send-prefix 24 | 25 | # 快捷键切换鼠标,方便鼠标选中文本 26 | bind a set-option mouse 27 | # 快捷键切换状态栏 28 | bind s set-option status 29 | # 快捷键切换同步操作pane 30 | bind e set-window-option synchronize-panes 31 | # 快捷键重新加载配置 32 | bind r source ~/.tmux.conf\; display "~/.tmux.conf sourced!" 33 | 34 | # 设置终端字符序列兼容性,比如斜体和true color 35 | # see https://github.com/neovim/neovim/wiki/FAQ#how-can-i-use-true-color-in-the-terminal 36 | # see https://github.com/neovim/neovim/wiki/FAQ#colors-arent-displayed-correctly 37 | # see https://www.reddit.com/r/neovim/comments/825dj7/the_endless_litany_of_tmux_and_nvim_color_problems/dvc2boh/ 38 | set -s default-terminal "tmux-256color" 39 | set -as terminal-features ',*-256color:Tc,*-256color:RGB' 40 | 41 | # set underline curly capacity 42 | # see https://evantravers.com/articles/2021/02/05/curly-underlines-in-kitty-tmux-neovim/ 43 | # undercurl support 44 | set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' 45 | # underscore colours - needs tmux-3.0 46 | set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' 47 | 48 | # 连续使用方向键可以连续切换 pane 49 | bind-key Up select-pane -U 50 | bind-key Down select-pane -D 51 | bind-key Left select-pane -L 52 | bind-key Right select-pane -R 53 | 54 | bind-key i select-pane -U 55 | bind-key k select-pane -D 56 | bind-key j select-pane -L 57 | bind-key l select-pane -R 58 | 59 | # 但是经常会干扰到方向键的回翻历史命令的功能,禁止连续切换 60 | # see https://stackoverflow.com/a/13670895 61 | # set-option repeat-time 0 62 | 63 | # pane 窗格边框样式 64 | set-option -g pane-border-style fg=colour238 #fg=base02 65 | set-option -g pane-active-border-style fg=colour238 #fg=base01 66 | 67 | # 消息提示样式 68 | set-option -g message-style bg=colour233,fg=colour215 # bg=base02, fg=orange 69 | 70 | # see https://github.com/tmux-plugins/tpm 71 | set -g @plugin 'tmux-plugins/tpm' 72 | set -g @plugin 'tmux-plugins/tmux-sensible' 73 | set -g @plugin 'tmux-plugins/tmux-yank' 74 | set -g @plugin "arcticicestudio/nord-tmux" 75 | set -g @plugin 'tmux-plugins/tmux-prefix-highlight' 76 | 77 | set -g @prefix_highlight_prefix_prompt 'Wait' 78 | set -g @prefix_highlight_copy_prompt 'Copy' 79 | 80 | # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) 81 | run -b '~/.tmux/plugins/tpm/tpm' 82 | -------------------------------------------------------------------------------- /wezterm/.config/wezterm/wezterm.lua: -------------------------------------------------------------------------------- 1 | local wezterm = require("wezterm") 2 | 3 | local hostname = wezterm.hostname() 4 | 5 | local M = { 6 | font = wezterm.font_with_fallback({ "JetBrains Mono", "Noto Sans CJK SC", "Symbols Nerd Font Mono" }), 7 | font_size = 12.0, 8 | adjust_window_size_when_changing_font_size = false, 9 | color_scheme = "Ayu Mirage (Gogh)", 10 | use_fancy_tab_bar = false, 11 | tab_bar_at_bottom = true, 12 | hide_tab_bar_if_only_one_tab = true, 13 | scrollback_lines = 100000, 14 | enable_scroll_bar = false, 15 | exit_behavior = "Close", 16 | 17 | -- https://github.com/wez/wezterm/issues/1928 18 | -- custom_block_glyphs = false, 19 | selection_word_boundary = " \t\n{}[]()\"'`│,;:!@#$&-=+\\", 20 | 21 | send_composed_key_when_left_alt_is_pressed = false, 22 | send_composed_key_when_right_alt_is_pressed = false, 23 | 24 | use_ime = false, 25 | } 26 | 27 | local function ends_with(str, ending) 28 | return ending == "" or str:sub(-#ending) == ending 29 | end 30 | 31 | -- x86_64-apple-darwin 32 | -- aarch64-apple-darwin 33 | if ends_with(wezterm.target_triple, "apple-darwin") then 34 | M.font_size = 14.0 35 | M.window_background_opacity = 0.8 36 | M.macos_window_background_blur = 20 37 | M.window_decorations = "TITLE | RESIZE | MACOS_FORCE_ENABLE_SHADOW" 38 | end 39 | 40 | if wezterm.target_triple == "x86_64-unknown-linux-gnu" then 41 | M.window_background_opacity = 0.9 42 | M.window_decorations = "RESIZE" 43 | M.window_padding = { left = 1, right = 1, top = 0, bottom = 0 } 44 | end 45 | 46 | if wezterm.target_triple == "x86_64-pc-windows-msvc" then 47 | M.window_background_opacity = 0.8 48 | M.win32_system_backdrop = "Acrylic" 49 | M.default_prog = { "I:/msys64/msys2_shell.cmd", "-defterm", "-here", "-no-start", "-ucrt64", "-shell", "zsh" } 50 | M.default_cwd = "I:/msys64/home/Chaney/" 51 | end 52 | 53 | wezterm.on("format-window-title", function(tab, pane, tabs, panes, config) 54 | return "$" .. tab.active_pane.foreground_process_name 55 | end) 56 | 57 | return M 58 | -------------------------------------------------------------------------------- /yazi/.config/yazi/.gitignore: -------------------------------------------------------------------------------- 1 | flavors/ 2 | -------------------------------------------------------------------------------- /yazi/.config/yazi/theme.toml: -------------------------------------------------------------------------------- 1 | [flavor] 2 | # https://github.com/yazi-rs/flavors.git 3 | use = "catppuccin-mocha" 4 | 5 | [status] 6 | separator_open = "" 7 | separator_close = "" 8 | -------------------------------------------------------------------------------- /yazi/.config/yazi/yazi.toml: -------------------------------------------------------------------------------- 1 | [manager] 2 | ratio = [2, 2, 4] 3 | sort_by = "natural" 4 | sort_sensitive = true 5 | show_hidden = true 6 | -------------------------------------------------------------------------------- /zellij/.config/zellij/config.kdl: -------------------------------------------------------------------------------- 1 | // If you'd like to override the default keybindings completely, be sure to change "keybinds" to "keybinds clear-defaults=true" 2 | keybinds { 3 | normal { 4 | // uncomment this and adjust key if using copy_on_select=false 5 | // bind "Alt c" { Copy; } 6 | } 7 | locked { 8 | bind "Ctrl g" { SwitchToMode "Normal"; } 9 | } 10 | resize { 11 | bind "Ctrl n" { SwitchToMode "Normal"; } 12 | bind "h" "Left" { Resize "Increase Left"; } 13 | bind "j" "Down" { Resize "Increase Down"; } 14 | bind "k" "Up" { Resize "Increase Up"; } 15 | bind "l" "Right" { Resize "Increase Right"; } 16 | bind "H" { Resize "Decrease Left"; } 17 | bind "J" { Resize "Decrease Down"; } 18 | bind "K" { Resize "Decrease Up"; } 19 | bind "L" { Resize "Decrease Right"; } 20 | bind "=" "+" { Resize "Increase"; } 21 | bind "-" { Resize "Decrease"; } 22 | } 23 | pane { 24 | bind "Ctrl p" { SwitchToMode "Normal"; } 25 | bind "h" "Left" { MoveFocus "Left"; } 26 | bind "l" "Right" { MoveFocus "Right"; } 27 | bind "j" "Down" { MoveFocus "Down"; } 28 | bind "k" "Up" { MoveFocus "Up"; } 29 | bind "p" { SwitchFocus; } 30 | bind "n" { NewPane; SwitchToMode "Normal"; } 31 | bind "d" { NewPane "Down"; SwitchToMode "Normal"; } 32 | bind "r" { NewPane "Right"; SwitchToMode "Normal"; } 33 | bind "x" { CloseFocus; SwitchToMode "Normal"; } 34 | bind "f" { ToggleFocusFullscreen; SwitchToMode "Normal"; } 35 | bind "z" { TogglePaneFrames; SwitchToMode "Normal"; } 36 | bind "w" { ToggleFloatingPanes; SwitchToMode "Normal"; } 37 | bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "Normal"; } 38 | bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0;} 39 | } 40 | move { 41 | bind "Ctrl h" { SwitchToMode "Normal"; } 42 | bind "n" "Tab" { MovePane; } 43 | bind "p" { MovePaneBackwards; } 44 | bind "h" "Left" { MovePane "Left"; } 45 | bind "j" "Down" { MovePane "Down"; } 46 | bind "k" "Up" { MovePane "Up"; } 47 | bind "l" "Right" { MovePane "Right"; } 48 | } 49 | tab { 50 | bind "Ctrl t" { SwitchToMode "Normal"; } 51 | bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; } 52 | bind "h" "Left" "Up" "k" { GoToPreviousTab; } 53 | bind "l" "Right" "Down" "j" { GoToNextTab; } 54 | bind "n" { NewTab; SwitchToMode "Normal"; } 55 | bind "x" { CloseTab; SwitchToMode "Normal"; } 56 | bind "s" { ToggleActiveSyncTab; SwitchToMode "Normal"; } 57 | bind "b" { BreakPane; SwitchToMode "Normal"; } 58 | bind "]" { BreakPaneRight; SwitchToMode "Normal"; } 59 | bind "[" { BreakPaneLeft; SwitchToMode "Normal"; } 60 | bind "1" { GoToTab 1; SwitchToMode "Normal"; } 61 | bind "2" { GoToTab 2; SwitchToMode "Normal"; } 62 | bind "3" { GoToTab 3; SwitchToMode "Normal"; } 63 | bind "4" { GoToTab 4; SwitchToMode "Normal"; } 64 | bind "5" { GoToTab 5; SwitchToMode "Normal"; } 65 | bind "6" { GoToTab 6; SwitchToMode "Normal"; } 66 | bind "7" { GoToTab 7; SwitchToMode "Normal"; } 67 | bind "8" { GoToTab 8; SwitchToMode "Normal"; } 68 | bind "9" { GoToTab 9; SwitchToMode "Normal"; } 69 | bind "Tab" { ToggleTab; } 70 | } 71 | scroll { 72 | bind "Ctrl s" { SwitchToMode "Normal"; } 73 | bind "e" { EditScrollback; SwitchToMode "Normal"; } 74 | bind "s" { SwitchToMode "EnterSearch"; SearchInput 0; } 75 | bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; } 76 | bind "j" "Down" { ScrollDown; } 77 | bind "k" "Up" { ScrollUp; } 78 | bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } 79 | bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } 80 | bind "d" { HalfPageScrollDown; } 81 | bind "u" { HalfPageScrollUp; } 82 | // uncomment this and adjust key if using copy_on_select=false 83 | // bind "Alt c" { Copy; } 84 | } 85 | search { 86 | bind "Ctrl s" { SwitchToMode "Normal"; } 87 | bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; } 88 | bind "j" "Down" { ScrollDown; } 89 | bind "k" "Up" { ScrollUp; } 90 | bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } 91 | bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } 92 | bind "d" { HalfPageScrollDown; } 93 | bind "u" { HalfPageScrollUp; } 94 | bind "n" { Search "down"; } 95 | bind "p" { Search "up"; } 96 | bind "c" { SearchToggleOption "CaseSensitivity"; } 97 | bind "w" { SearchToggleOption "Wrap"; } 98 | bind "o" { SearchToggleOption "WholeWord"; } 99 | } 100 | entersearch { 101 | bind "Ctrl c" "Esc" { SwitchToMode "Scroll"; } 102 | bind "Enter" { SwitchToMode "Search"; } 103 | } 104 | renametab { 105 | bind "Ctrl c" { SwitchToMode "Normal"; } 106 | bind "Esc" { UndoRenameTab; SwitchToMode "Tab"; } 107 | } 108 | renamepane { 109 | bind "Ctrl c" { SwitchToMode "Normal"; } 110 | bind "Esc" { UndoRenamePane; SwitchToMode "Pane"; } 111 | } 112 | session { 113 | bind "Ctrl o" { SwitchToMode "Normal"; } 114 | bind "Ctrl s" { SwitchToMode "Scroll"; } 115 | bind "d" { Detach; } 116 | bind "w" { 117 | LaunchOrFocusPlugin "session-manager" { 118 | floating true 119 | move_to_focused_tab true 120 | }; 121 | SwitchToMode "Normal" 122 | } 123 | } 124 | tmux { 125 | bind "[" { SwitchToMode "Scroll"; } 126 | bind "Ctrl b" { Write 2; SwitchToMode "Normal"; } 127 | bind "\"" { NewPane "Down"; SwitchToMode "Normal"; } 128 | bind "%" { NewPane "Right"; SwitchToMode "Normal"; } 129 | bind "z" { ToggleFocusFullscreen; SwitchToMode "Normal"; } 130 | bind "c" { NewTab; SwitchToMode "Normal"; } 131 | bind "," { SwitchToMode "RenameTab"; } 132 | bind "p" { GoToPreviousTab; SwitchToMode "Normal"; } 133 | bind "n" { GoToNextTab; SwitchToMode "Normal"; } 134 | bind "Left" { MoveFocus "Left"; SwitchToMode "Normal"; } 135 | bind "Right" { MoveFocus "Right"; SwitchToMode "Normal"; } 136 | bind "Down" { MoveFocus "Down"; SwitchToMode "Normal"; } 137 | bind "Up" { MoveFocus "Up"; SwitchToMode "Normal"; } 138 | bind "h" { MoveFocus "Left"; SwitchToMode "Normal"; } 139 | bind "l" { MoveFocus "Right"; SwitchToMode "Normal"; } 140 | bind "j" { MoveFocus "Down"; SwitchToMode "Normal"; } 141 | bind "k" { MoveFocus "Up"; SwitchToMode "Normal"; } 142 | bind "o" { FocusNextPane; } 143 | bind "d" { Detach; } 144 | bind "Space" { NextSwapLayout; } 145 | bind "x" { CloseFocus; SwitchToMode "Normal"; } 146 | } 147 | shared_except "locked" { 148 | bind "Ctrl g" { SwitchToMode "Locked"; } 149 | bind "Ctrl q" { Quit; } 150 | bind "Alt n" { NewPane; } 151 | bind "Alt m" { ToggleMouseMode; } 152 | bind "Alt i" { MoveTab "Left"; } 153 | bind "Alt o" { MoveTab "Right"; } 154 | bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } 155 | bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } 156 | bind "Alt j" "Alt Down" { MoveFocus "Down"; } 157 | bind "Alt k" "Alt Up" { MoveFocus "Up"; } 158 | bind "Alt =" "Alt +" { Resize "Increase"; } 159 | bind "Alt -" { Resize "Decrease"; } 160 | bind "Alt [" { PreviousSwapLayout; } 161 | bind "Alt ]" { NextSwapLayout; } 162 | } 163 | shared_except "normal" "locked" { 164 | bind "Enter" "Esc" { SwitchToMode "Normal"; } 165 | } 166 | shared_except "pane" "locked" { 167 | bind "Ctrl p" { SwitchToMode "Pane"; } 168 | } 169 | shared_except "resize" "locked" { 170 | bind "Ctrl n" { SwitchToMode "Resize"; } 171 | } 172 | shared_except "scroll" "locked" { 173 | bind "Ctrl s" { SwitchToMode "Scroll"; } 174 | } 175 | shared_except "session" "locked" { 176 | bind "Ctrl o" { SwitchToMode "Session"; } 177 | } 178 | shared_except "tab" "locked" { 179 | bind "Ctrl t" { SwitchToMode "Tab"; } 180 | } 181 | shared_except "move" "locked" { 182 | bind "Ctrl h" { SwitchToMode "Move"; } 183 | } 184 | shared_except "tmux" "locked" { 185 | bind "Ctrl b" { SwitchToMode "Tmux"; } 186 | } 187 | } 188 | 189 | plugins { 190 | tab-bar location="zellij:tab-bar" 191 | status-bar location="zellij:status-bar" 192 | strider location="zellij:strider" 193 | compact-bar location="zellij:compact-bar" 194 | session-manager location="zellij:session-manager" 195 | welcome-screen location="zellij:session-manager" { 196 | welcome_screen true 197 | } 198 | filepicker location="zellij:strider" { 199 | cwd "/" 200 | } 201 | } 202 | 203 | // Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP 204 | // eg. when terminal window with an active zellij session is closed 205 | // Options: 206 | // - detach (Default) 207 | // - quit 208 | // 209 | // on_force_close "quit" 210 | 211 | // Send a request for a simplified ui (without arrow fonts) to plugins 212 | // Options: 213 | // - true 214 | // - false (Default) 215 | // 216 | // simplified_ui true 217 | 218 | // Choose the path to the default shell that zellij will use for opening new panes 219 | // Default: $SHELL 220 | // 221 | // default_shell "fish" 222 | 223 | // Choose the path to override cwd that zellij will use for opening new panes 224 | // 225 | // default_cwd "" 226 | 227 | // Toggle between having pane frames around the panes 228 | // Options: 229 | // - true (default) 230 | // - false 231 | // 232 | pane_frames false 233 | 234 | // Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible 235 | // Options: 236 | // - true (default) 237 | // - false 238 | // 239 | // auto_layout true 240 | 241 | // Whether sessions should be serialized to the cache folder (including their tabs/panes, cwds and running commands) so that they can later be resurrected 242 | // Options: 243 | // - true (default) 244 | // - false 245 | // 246 | // session_serialization false 247 | 248 | // Whether pane viewports are serialized along with the session, default is false 249 | // Options: 250 | // - true 251 | // - false (default) 252 | // serialize_pane_viewport true 253 | 254 | // Scrollback lines to serialize along with the pane viewport when serializing sessions, 0 255 | // defaults to the scrollback size. If this number is higher than the scrollback size, it will 256 | // also default to the scrollback size. This does nothing if `serialize_pane_viewport` is not true. 257 | // 258 | // scrollback_lines_to_serialize 10000 259 | 260 | // Define color themes for Zellij 261 | // For more examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes 262 | // Once these themes are defined, one of them should to be selected in the "theme" section of this file 263 | // 264 | // themes { 265 | // dracula { 266 | // fg 248 248 242 267 | // bg 40 42 54 268 | // red 255 85 85 269 | // green 80 250 123 270 | // yellow 241 250 140 271 | // blue 98 114 164 272 | // magenta 255 121 198 273 | // orange 255 184 108 274 | // cyan 139 233 253 275 | // black 0 0 0 276 | // white 255 255 255 277 | // } 278 | // } 279 | 280 | // Choose the theme that is specified in the themes section. 281 | // Default: default 282 | // 283 | theme "catppuccin-frappe" 284 | 285 | // The name of the default layout to load on startup 286 | // Default: "default" 287 | // 288 | default_layout "compact" 289 | 290 | // Choose the mode that zellij uses when starting up. 291 | // Default: normal 292 | // 293 | // default_mode "locked" 294 | 295 | // Toggle enabling the mouse mode. 296 | // On certain configurations, or terminals this could 297 | // potentially interfere with copying text. 298 | // Options: 299 | // - true (default) 300 | // - false 301 | // 302 | mouse_mode false 303 | 304 | // Configure the scroll back buffer size 305 | // This is the number of lines zellij stores for each pane in the scroll back 306 | // buffer. Excess number of lines are discarded in a FIFO fashion. 307 | // Valid values: positive integers 308 | // Default value: 10000 309 | // 310 | // scroll_buffer_size 10000 311 | 312 | // Provide a command to execute when copying text. The text will be piped to 313 | // the stdin of the program to perform the copy. This can be used with 314 | // terminal emulators which do not support the OSC 52 ANSI control sequence 315 | // that will be used by default if this option is not set. 316 | // Examples: 317 | // 318 | // copy_command "xclip -selection clipboard" // x11 319 | // copy_command "wl-copy" // wayland 320 | // copy_command "pbcopy" // osx 321 | 322 | // Choose the destination for copied text 323 | // Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. 324 | // Does not apply when using copy_command. 325 | // Options: 326 | // - system (default) 327 | // - primary 328 | // 329 | // copy_clipboard "primary" 330 | 331 | // Enable or disable automatic copy (and clear) of selection when releasing mouse 332 | // Default: true 333 | // 334 | // copy_on_select false 335 | 336 | // Path to the default editor to use to edit pane scrollbuffer 337 | // Default: $EDITOR or $VISUAL 338 | // 339 | // scrollback_editor "/usr/bin/vim" 340 | 341 | // When attaching to an existing session with other users, 342 | // should the session be mirrored (true) 343 | // or should each user have their own cursor (false) 344 | // Default: false 345 | // 346 | // mirror_session true 347 | 348 | // The folder in which Zellij will look for layouts 349 | // 350 | // layout_dir "/path/to/my/layout_dir" 351 | 352 | // The folder in which Zellij will look for themes 353 | // 354 | // theme_dir "/path/to/my/theme_dir" 355 | 356 | // Enable or disable the rendering of styled and colored underlines (undercurl). 357 | // May need to be disabled for certain unsupported terminals 358 | // Default: true 359 | // 360 | // styled_underlines false 361 | 362 | // Enable or disable writing of session metadata to disk (if disabled, other sessions might not know 363 | // metadata info on this session) 364 | // Default: false 365 | // 366 | // disable_session_metadata true 367 | -------------------------------------------------------------------------------- /zsh/.config/starship.toml: -------------------------------------------------------------------------------- 1 | add_newline = false 2 | 3 | [line_break] 4 | disabled = true 5 | 6 | [character] 7 | success_symbol = "[➜](bold green)" 8 | error_symbol = "[➜](bold red)" 9 | -------------------------------------------------------------------------------- /zsh/.myutil.zsh: -------------------------------------------------------------------------------- 1 | gitls() { 2 | for i in $(ls); do 3 | echo -e "\033[1;32m================================ $i =================================\033[0m" 4 | git -C $i status --short 5 | echo "" 6 | done 7 | } 8 | 9 | gitup() { 10 | for i in $(ls); do 11 | echo -e "\033[1;32m================================ $i =================================\033[0m" 12 | git -C $i pull 13 | echo "" 14 | done 15 | } 16 | 17 | envproxy() { 18 | echo "export https_proxy=http://$1:7890;export http_proxy=http://$1:7890;export all_proxy=socks5://$1:7890" 19 | } 20 | -------------------------------------------------------------------------------- /zsh/.zprofile: -------------------------------------------------------------------------------- 1 | # Added by OrbStack: command-line tools and integration 2 | if [[ -f ~/.orbstack/shell/init.zsh ]]; then 3 | source ~/.orbstack/shell/init.zsh 2>/dev/null || : 4 | fi 5 | 6 | if [[ -f /opt/homebrew/bin/brew ]]; then 7 | eval "$(/opt/homebrew/bin/brew shellenv)" 8 | fi 9 | -------------------------------------------------------------------------------- /zsh/.zshenv: -------------------------------------------------------------------------------- 1 | if [[ -f "$HOME/.cargo/env" ]]; then 2 | source "$HOME/.cargo/env" 3 | fi 4 | -------------------------------------------------------------------------------- /zsh/.zshrc: -------------------------------------------------------------------------------- 1 | # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. 2 | # Initialization code that may require console input (password prompts, [y/n] 3 | # confirmations, etc.) must go above this block; everything else may go below. 4 | if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then 5 | source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" 6 | fi 7 | 8 | # If you come from bash you might have to change your $PATH. 9 | if [ ! $BASE_PATH ]; then 10 | export BASE_PATH=$PATH 11 | fi 12 | 13 | export GOROOT=$(go env GOROOT) 14 | export GOPATH=$(go env GOPATH) 15 | export PNPM_HOME="$HOME/.local/share/pnpm" 16 | 17 | LOCAL_BIN=/usr/local/bin 18 | LOCAL_SBIN=/usr/local/sbin 19 | GO_BIN=$GOPATH/bin 20 | MY_LOCAL_BIN=$HOME/.local/bin 21 | RUST_BIN=$HOME/.cargo/bin 22 | LUA_BIN=$HOME/.luarocks/bin 23 | NODE_BIN=$HOME/.node_modules/bin 24 | RUBY_BIN=$(ruby -r rubygems -e 'puts Gem.user_dir')/bin 25 | MY_PATH=$MY_LOCAL_BIN:$GO_BIN:$RUST_BIN:$PNPM_HOME:$NODE_BIN:$RUBY_BIN:$LUA_BIN:$LOCAL_BIN:$LOCAL_SBIN 26 | 27 | export PATH=$MY_PATH:$BASE_PATH 28 | 29 | export XDG_CONFIG_HOME="$HOME/.config" 30 | export SHELL=$(which zsh) 31 | 32 | export UV_TOOL_DIR=$(uv tool dir) 33 | eval `luarocks path --no-bin` 34 | 35 | export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git" 36 | export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git" 37 | export HOMEBREW_API_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/api" 38 | export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles" 39 | 40 | # Path to your oh-my-zsh installation. 41 | if [[ -d $HOME/.oh-my-zsh ]]; then 42 | export ZSH=$HOME/.oh-my-zsh 43 | fi 44 | 45 | # Set name of the theme to load. Optionally, if you set this to "random" 46 | # it'll load a random theme each time that oh-my-zsh is loaded. 47 | # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes 48 | if [[ -d $HOME/.oh-my-zsh ]]; then 49 | # macOS: 50 | # iTerm2 > Profiles > Text > Font: "Use a different font for non-ASCII text" 51 | # then https://github.com/ryanoasis/nerd-fonts#option-4-homebrew-fonts 52 | # git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $HOME/.oh-my-zsh/custom/themes/powerlevel10k 53 | ZSH_THEME="powerlevel10k/powerlevel10k" 54 | fi 55 | 56 | # Set list of themes to load 57 | # Setting this variable when ZSH_THEME=random 58 | # cause zsh load theme from this variable instead of 59 | # looking in ~/.oh-my-zsh/themes/ 60 | # An empty array have no effect 61 | # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) 62 | 63 | # Uncomment the following line to use case-sensitive completion. 64 | # CASE_SENSITIVE="true" 65 | 66 | # Uncomment the following line to use hyphen-insensitive completion. Case 67 | # sensitive completion must be off. _ and - will be interchangeable. 68 | # HYPHEN_INSENSITIVE="true" 69 | 70 | # Uncomment the following line to disable bi-weekly auto-update checks. 71 | # DISABLE_AUTO_UPDATE="true" 72 | 73 | # Uncomment the following line to change how often to auto-update (in days). 74 | export UPDATE_ZSH_DAYS=7 75 | 76 | # Uncomment the following line to disable colors in ls. 77 | # DISABLE_LS_COLORS="true" 78 | 79 | # Uncomment the following line to disable auto-setting terminal title. 80 | # DISABLE_AUTO_TITLE="true" 81 | 82 | # Uncomment the following line to enable command auto-correction. 83 | # ENABLE_CORRECTION="true" 84 | 85 | # Uncomment the following line to display red dots whilst waiting for completion. 86 | # COMPLETION_WAITING_DOTS="true" 87 | 88 | # Uncomment the following line if you want to disable marking untracked files 89 | # under VCS as dirty. This makes repository status check for large repositories 90 | # much, much faster. 91 | # DISABLE_UNTRACKED_FILES_DIRTY="true" 92 | 93 | # Uncomment the following line if you want to change the command execution time 94 | # stamp shown in the history command output. 95 | # The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" 96 | # HIST_STAMPS="mm/dd/yyyy" 97 | 98 | # Would you like to use another custom folder than $ZSH/custom? 99 | ZSH_CUSTOM=$HOME/.oh-my-zsh/custom/ 100 | 101 | # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) 102 | # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ 103 | # Example format: plugins=(rails git textmate ruby lighthouse) 104 | # Add wisely, as too many plugins slow down shell startup. 105 | plugins=( 106 | git 107 | pip 108 | python 109 | z 110 | ) 111 | autoload -U compinit && compinit 112 | 113 | # User configuration 114 | 115 | # export MANPATH="/usr/local/man:$MANPATH" 116 | 117 | # You may need to manually set your language environment 118 | # export LANG=en_US.UTF-8 119 | 120 | # Preferred editor for local and remote sessions 121 | # if [[ -n $SSH_CONNECTION ]]; then 122 | # export EDITOR='vim' 123 | # else 124 | # export EDITOR='mvim' 125 | # fi 126 | export EDITOR='nvim' 127 | 128 | # Compilation flags 129 | # export ARCHFLAGS="-arch x86_64" 130 | 131 | # ssh 132 | # export SSH_KEY_PATH="~/.ssh/rsa_id" 133 | 134 | ZSH_CACHE_DIR=$HOME/.cache/.oh-my-zsh-cache 135 | if [[ ! -d $ZSH_CACHE_DIR ]]; then 136 | mkdir $ZSH_CACHE_DIR 137 | fi 138 | 139 | source $ZSH/oh-my-zsh.sh 140 | 141 | # auto completion 142 | compctl -g '~/.teamocil/*(:t:r)' teamocil 143 | 144 | # Set personal aliases, overriding those provided by oh-my-zsh libs, 145 | # plugins, and themes. Aliases can be placed here, though oh-my-zsh 146 | # users are encouraged to define aliases within the ZSH_CUSTOM folder. 147 | # For a full list of active aliases, run `alias`. 148 | # 149 | # Example aliases 150 | # alias zshconfig="mate ~/.zshrc" 151 | # alias ohmyzsh="mate ~/.oh-my-zsh" 152 | 153 | # alias ls='lsd' 154 | alias la='ls -la' 155 | alias lt='ls --tree' 156 | 157 | alias t='tmux' 158 | alias ta='tmux attach' 159 | alias tt='ta || t' 160 | alias tm='teamocil' 161 | alias pi='teamocil chaney-pi' 162 | alias zj='zellij attach --create' 163 | 164 | # virtualenv --python=/usr/bin/python2 ~/Pyvenv/venv2.7/ 165 | alias py2='source ~/Pyvenv/venv2.7/bin/activate' 166 | # python3 -m venv ~/Pyvenv/venv3/ 167 | alias py3='source ~/Pyvenv/venv3/bin/activate' 168 | 169 | alias v=nvim 170 | if [[ "$(uname)" == "Darwin" ]]; then 171 | alias vx="neovide --fork --frame transparent" 172 | else 173 | alias vx="neovide --fork --frame none" 174 | fi 175 | 176 | alias ssh='TERM=xterm-256color \ssh' 177 | 178 | alias systemctlu="systemctl --user" 179 | alias dblackf="git diff --name-only | xargs -L1 black" 180 | 181 | # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. 182 | [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh 183 | 184 | [[ ! -f ~/.myutil.zsh ]] || source ~/.myutil.zsh 185 | --------------------------------------------------------------------------------