├── .gitignore ├── LICENSE ├── Linux ├── Code │ └── .config │ │ └── Code │ │ └── User │ │ ├── keybindings.json │ │ └── settings.json ├── alacritty │ └── .config │ │ └── alacritty │ │ └── alacritty.toml └── fontconfig │ └── .config │ └── fontconfig │ └── fonts.conf ├── README.md ├── Windows ├── AutoHotKey │ └── volumn.ahk └── alacritty │ └── alacritty.toml ├── backup ├── alacritty │ └── .config │ │ └── alacritty │ │ ├── alacritty-linux.yml │ │ ├── alacritty-macos.yml │ │ └── themes │ │ ├── Cobalt2.yaml │ │ ├── afterglow.yaml │ │ ├── argonaut.yaml │ │ ├── atom_one_light.yaml │ │ ├── ayu_dark.yaml │ │ ├── base16_default_dark.yaml │ │ ├── blood_moon.yaml │ │ ├── breeze.yaml │ │ ├── campbell.yaml │ │ ├── challenger_deep.yaml │ │ ├── cyber_punk_neon.yaml │ │ ├── darcula.yaml │ │ ├── dark_pastels.yaml │ │ ├── doom_one.yml │ │ ├── dracula.yaml │ │ ├── falcon.yaml │ │ ├── flat_remix.yml │ │ ├── gotham.yaml │ │ ├── gruvbox_dark.yaml │ │ ├── gruvbox_light.yaml │ │ ├── gruvbox_material.yml │ │ ├── high_contrast.yaml │ │ ├── horizon-dark.yaml │ │ ├── hyper.yaml │ │ ├── iterm.yaml │ │ ├── konsole_linux.yaml │ │ ├── low_contrast.yaml │ │ ├── material_theme.yaml │ │ ├── material_theme_mod.yaml │ │ ├── moonlight_ii_vscode.yaml │ │ ├── night_owlish_light.yaml │ │ ├── nord.yaml │ │ ├── oceanic_next.yaml │ │ ├── omni.yml │ │ ├── one_dark.yaml │ │ ├── palenight.yml │ │ ├── papercolor_dark.yaml │ │ ├── papercolor_light.yaml │ │ ├── pencil_dark.yaml │ │ ├── pencil_light.yaml │ │ ├── remedy_dark.yaml │ │ ├── seashells.yaml │ │ ├── smoooooth.yml │ │ ├── snazzy.yaml │ │ ├── solarized_dark.yaml │ │ ├── solarized_light.yaml │ │ ├── taerminal.yaml │ │ ├── tango_dark.yaml │ │ ├── tender.yaml │ │ ├── terminal_app.yaml │ │ ├── thelovelace.yaml │ │ ├── tokyo-night-storm.yaml │ │ ├── tokyo-night.yaml │ │ ├── tomorrow_night.yaml │ │ ├── tomorrow_night_bright.yaml │ │ ├── wombat.yaml │ │ └── xterm.yaml ├── miscellaneous │ └── recursive-code-config │ │ └── config.yaml ├── repro.lua └── zsh │ ├── .config │ └── zsh │ │ ├── config.linux.zsh │ │ ├── config.macos.zsh │ │ ├── config.toml │ │ ├── config.wsl.zsh │ │ ├── vanilla.zsh │ │ ├── z.lua │ │ └── zinit.zsh │ ├── .fzf.zsh │ └── .zshrc ├── bash └── .bash_profile ├── data └── .data │ ├── .golangci-strict.yml │ └── .golangci.yml ├── fd └── .config │ └── fd │ └── ignore ├── fish └── .config │ └── fish │ ├── config.fish │ ├── starship.toml │ └── z.lua ├── gitui └── .config │ └── gitui │ └── key_bindings.ron ├── kitty └── .config │ ├── kitty.conf │ ├── moonfly.conf │ └── taiga.conf ├── lf └── .config │ └── lf │ └── lfrc ├── local └── .local │ └── bin │ ├── clone │ ├── gl │ └── ins ├── logo ├── airmail │ ├── airmail.icns │ └── airmail.png ├── auto.sh ├── big_duck │ ├── cyberduck.png │ └── icon.icns ├── cat │ ├── cat.icns │ └── cat.png ├── changjinglu │ ├── changjinglu.icns │ └── changjinglu.png ├── duck │ ├── duck.icns │ └── duck.png ├── firefox │ ├── firefox.icns │ ├── firefox.png │ ├── firefox2.icns │ └── firefox2.png ├── hep │ ├── hep.icns │ └── hep.png ├── kitty │ ├── kitty-new.icns │ └── kitty.icns ├── normal │ ├── cry-terminal.icns │ ├── purple-vs.icns │ ├── red-vs.icns │ ├── red-vs2.icns │ ├── steam.icns │ ├── vim.icns │ └── vs.icns ├── panhai │ ├── panhai-origin.png │ ├── panhai.icns │ ├── panhai.png │ ├── panhai2.icns │ └── panhai2.png ├── rubber-duck │ ├── rubber-duck.icns │ ├── rubber-duck.png │ └── rubber-duck.svg └── wizard │ ├── wizard.icns │ └── wizard.png ├── macOS ├── Code │ └── Library │ │ └── Application Support │ │ └── Code │ │ └── User │ │ ├── keybindings.json │ │ └── settings.json ├── alacritty │ └── .config │ │ └── alacritty │ │ └── alacritty.toml ├── brew │ └── Brewfile ├── hammerspoon │ └── .hammerspoon │ │ └── init.lua └── karabiner │ └── .config │ └── karabiner │ ├── .gitignore │ ├── assets │ └── complex_modifications │ │ ├── Dota2.json │ │ ├── com.microsoft.VSCode.json │ │ └── org.alacritty.json │ └── karabiner.json ├── nvim └── .config │ └── nvim │ ├── coc-settings.json │ ├── ftplugin │ └── go.vim │ ├── init.lua │ ├── lua │ ├── keymaps.vim │ ├── options_post.vim │ ├── options_prev.vim │ ├── plugins │ │ ├── blink.lua │ │ ├── coc.lua │ │ ├── color.lua │ │ ├── conform.lua │ │ ├── fzf.lua │ │ ├── gitsigns.lua │ │ ├── global.lua │ │ ├── lsp.lua │ │ ├── mini.lua │ │ ├── neotree.lua │ │ ├── treesitter.lua │ │ ├── ui.lua │ │ └── vim-plugins.lua │ └── vim-plugins.vim │ ├── queries │ ├── go │ │ └── textobjects.scm │ └── typescript │ │ └── textobjects.scm │ └── ultisnips │ └── go.snippets ├── pg_format └── .pg_format ├── selene └── .config │ └── selene │ ├── selene.toml │ └── vim.toml ├── server ├── .bash_profile ├── .config │ ├── fish │ │ └── config.fish │ └── init │ │ └── init.vim ├── .local │ └── bin │ │ └── clone ├── .tmux.conf └── .vimrc ├── sqlite3 └── .sqliterc ├── stow └── .stowrc ├── stylua.toml └── tmux ├── .local └── bin │ ├── tmux-new-window │ └── tmux-sessionizer └── .tmux.conf /.gitignore: -------------------------------------------------------------------------------- 1 | .luarc.json 2 | .env 3 | .repro/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Shuxiao WANG 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Linux/Code/.config/Code/User/keybindings.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "key": "alt+s", 4 | "command": "workbench.action.files.save" 5 | }, 6 | { 7 | "key": "ctrl+s", 8 | "command": "-workbench.action.files.save" 9 | }, 10 | { 11 | "key": "alt+b", 12 | "command": "editor.action.revealDefinition", 13 | "when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor" 14 | }, 15 | { 16 | "key": "f12", 17 | "command": "-editor.action.revealDefinition", 18 | "when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor" 19 | }, 20 | { 21 | "key": "alt+[", 22 | "command": "workbench.action.navigateBack", 23 | "when": "canNavigateBack" 24 | }, 25 | { 26 | "key": "ctrl+alt+-", 27 | "command": "-workbench.action.navigateBack", 28 | "when": "canNavigateBack" 29 | }, 30 | { 31 | "key": "alt+]", 32 | "command": "workbench.action.navigateForward", 33 | "when": "canNavigateForward" 34 | }, 35 | { 36 | "key": "ctrl+shift+-", 37 | "command": "-workbench.action.navigateForward", 38 | "when": "canNavigateForward" 39 | }, 40 | { 41 | "key": "alt+]", 42 | "command": "workbench.action.navigateRight" 43 | }, 44 | { 45 | "key": "alt+l", 46 | "command": "workbench.action.nextEditor", 47 | "when": "vim.mode != Insert" 48 | }, 49 | { 50 | "key": "ctrl+pagedown", 51 | "command": "-workbench.action.nextEditor" 52 | }, 53 | { 54 | "key": "alt+h", 55 | "command": "workbench.action.previousEditor", 56 | "when": "vim.mode != Insert" 57 | }, 58 | { 59 | "key": "ctrl+pageup", 60 | "command": "-workbench.action.previousEditor" 61 | }, 62 | { 63 | "key": "alt+w", 64 | "command": "workbench.action.closeActiveEditor" 65 | }, 66 | { 67 | "key": "ctrl+w", 68 | "command": "-workbench.action.closeActiveEditor" 69 | }, 70 | { 71 | "key": "ctrl+k e", 72 | "command": "-workbench.files.action.focusOpenEditorsView", 73 | "when": "workbench.explorer.openEditorsView.active" 74 | }, 75 | { 76 | "key": "ctrl+h", 77 | "command": "workbench.action.focusSideBar" 78 | }, 79 | { 80 | "key": "ctrl+l", 81 | "command": "workbench.action.focusLastEditorGroup" 82 | }, 83 | { 84 | "key": "alt+h", 85 | "command": "cursorLeft", 86 | "when": "textInputFocus && vim.mode == Insert" 87 | }, 88 | { 89 | "key": "alt+j", 90 | "command": "cursorDown", 91 | "when": "textInputFocus && vim.mode == Insert" 92 | }, 93 | { 94 | "key": "alt+l", 95 | "command": "cursorRight", 96 | "when": "textInputFocus && vim.mode == Insert" 97 | }, 98 | { 99 | "key": "alt+k", 100 | "command": "cursorUp", 101 | "when": "textInputFocus && vim.mode == Insert" 102 | }, 103 | { 104 | "key": "alt+v", 105 | "command": "editor.action.clipboardPasteAction" 106 | }, 107 | { 108 | "key": "alt+c", 109 | "command": "-toggleSearchCaseSensitive", 110 | "when": "searchViewletFocus" 111 | }, 112 | { 113 | "key": "alt+c", 114 | "command": "-toggleFindCaseSensitive", 115 | "when": "editorFocus" 116 | }, 117 | { 118 | "key": "alt+c", 119 | "command": "-workbench.action.terminal.toggleFindCaseSensitive", 120 | "when": "terminalFindFocused && terminalHasBeenCreated || terminalFindFocused && terminalProcessSupported || terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported" 121 | }, 122 | { 123 | "key": "alt+c", 124 | "command": "-toggleSearchEditorCaseSensitive", 125 | "when": "inSearchEditor && searchInputBoxFocus" 126 | }, 127 | { 128 | "key": "alt+c", 129 | "command": "editor.action.clipboardCopyAction" 130 | }, 131 | { 132 | "key": "ctrl+j", 133 | "command": "-editor.action.joinLines", 134 | "when": "editorTextFocus && !editorReadonly" 135 | }, 136 | { 137 | "key": "ctrl+j", 138 | "command": "-extension.vim_ctrl+j", 139 | "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" 140 | }, 141 | { 142 | "key": "ctrl+j", 143 | "command": "workbench.action.focusPanel" 144 | }, 145 | { 146 | "key": "ctrl+k", 147 | "command": "workbench.action.focusActiveEditorGroup" 148 | }, 149 | { 150 | "key": "ctrl+k", 151 | "command": "-deleteAllRight", 152 | "when": "textInputFocus && !editorReadonly" 153 | }, 154 | { 155 | "key": "ctrl+k", 156 | "command": "-extension.vim_ctrl+k", 157 | "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" 158 | }, 159 | { 160 | "key": "alt+a", 161 | "command": "editor.action.selectAll" 162 | }, 163 | { 164 | "key": "cmd+a", 165 | "command": "-editor.action.selectAll" 166 | } 167 | ] 168 | -------------------------------------------------------------------------------- /Linux/Code/.config/Code/User/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "[csharp]": { 3 | "editor.defaultFormatter": "ms-dotnettools.csharp" 4 | }, 5 | "[css]": { 6 | "editor.defaultFormatter": "esbenp.prettier-vscode" 7 | }, 8 | "[go]": { 9 | "editor.codeActionsOnSave": { 10 | "source.organizeImports": "explicit" 11 | }, 12 | "editor.formatOnSave": true, 13 | "editor.insertSpaces": false, 14 | "editor.snippetSuggestions": "inline" 15 | }, 16 | "[html]": { 17 | "editor.defaultFormatter": "esbenp.prettier-vscode" 18 | }, 19 | "[javascript]": { 20 | "editor.defaultFormatter": "esbenp.prettier-vscode" 21 | }, 22 | "[json]": { 23 | "editor.defaultFormatter": "vscode.json-language-features" 24 | }, 25 | "[jsonc]": { 26 | "editor.defaultFormatter": "vscode.json-language-features" 27 | }, 28 | "[lua]": { 29 | "editor.defaultFormatter": "sumneko.lua" 30 | }, 31 | "[python]": { 32 | "editor.formatOnType": true 33 | }, 34 | "[sql]": { 35 | "editor.defaultFormatter": "adpyke.vscode-sql-formatter" 36 | }, 37 | "[typescript]": { 38 | "editor.defaultFormatter": "esbenp.prettier-vscode" 39 | }, 40 | "[typescriptreact]": { 41 | "editor.defaultFormatter": "esbenp.prettier-vscode" 42 | }, 43 | "application.shellEnvironmentResolutionTimeout": 120, 44 | "cSpell.userWords": [ 45 | "Aggs", 46 | "agollo", 47 | "bson", 48 | "CDNURL", 49 | "CQRs", 50 | "crondatalib", 51 | "curioim", 52 | "curioretail", 53 | "dbname", 54 | "dtask", 55 | "Errorln", 56 | "eshop", 57 | "Gitlab", 58 | "gjson", 59 | "golibs", 60 | "instanceid", 61 | "jinzhu", 62 | "JSID", 63 | "Lookupd", 64 | "mediaid", 65 | "mongodb", 66 | "mongoh", 67 | "Neovim", 68 | "nsqd", 69 | "nsqh", 70 | "nsqlookupd", 71 | "nvim", 72 | "oexcel", 73 | "olivere", 74 | "Openid", 75 | "oper", 76 | "parentid", 77 | "postgres", 78 | "qrcode", 79 | "qrcodes", 80 | "Repos", 81 | "resty", 82 | "signup", 83 | "structs", 84 | "sysphoto", 85 | "tagid", 86 | "Tampermonkey", 87 | "Unionid", 88 | "wechat", 89 | "Weixin", 90 | "Wesociety", 91 | "wxwork", 92 | "yorozuya" 93 | ], 94 | "diffEditor.wordWrap": "off", 95 | "editor.fontFamily": "'Consolas Nerd Font', 'Recursive Nerd Font', 'Source Code Pro', Menlo, monospace", 96 | "editor.fontWeight": "400", 97 | "editor.formatOnSave": true, 98 | "editor.inlineSuggest.enabled": true, 99 | "editor.lineHeight": 19, 100 | "editor.lineNumbers": "relative", 101 | "editor.rulers": [ 102 | 80, 103 | 120 104 | ], 105 | "editor.suggest.snippetsPreventQuickSuggestions": false, 106 | "editor.suggestSelection": "first", 107 | "editor.unicodeHighlight.ambiguousCharacters": false, 108 | "editor.wordWrapColumn": 100, 109 | "emmet.includeLanguages": { 110 | "wxml": "html" 111 | }, 112 | "explorer.confirmDelete": false, 113 | "explorer.confirmDragAndDrop": false, 114 | "extensions.ignoreRecommendations": true, 115 | "files.associations": { 116 | "*.cjson": "jsonc", 117 | "*.dae": "shellscript", 118 | "*.wxs": "javascript", 119 | "*.wxss": "css" 120 | }, 121 | "files.autoSaveDelay": 300, 122 | "files.defaultLanguage": "json", 123 | "files.exclude": { 124 | "**/.classpath": true, 125 | "**/.factorypath": true, 126 | "**/.git": false, 127 | "**/.project": true, 128 | "**/.settings": true 129 | }, 130 | "git.enableSmartCommit": true, 131 | "git.openRepositoryInParentFolders": "never", 132 | "go.formatTool": "goimports", 133 | "go.lintTool": "golangci-lint", 134 | "go.testEnvVars": { 135 | "APP_ENV": "dev" 136 | }, 137 | "go.toolsManagement.autoUpdate": true, 138 | "go.useLanguageServer": true, 139 | "go.vetOnSave": "off", 140 | "gopls": { 141 | "ui.completion.usePlaceholders": false 142 | }, 143 | "javascript.updateImportsOnFileMove.enabled": "always", 144 | "python.languageServer": "Pylance", 145 | "search.exclude": { 146 | "**/node_modules": false 147 | }, 148 | "security.workspace.trust.untrustedFiles": "newWindow", 149 | "terminal.integrated.fontSize": 12, 150 | "terminal.integrated.profiles.osx": { 151 | "bash": { 152 | "args": [ 153 | "-l" 154 | ], 155 | "icon": "terminal-bash", 156 | "path": "bash" 157 | }, 158 | "fish": { 159 | "args": [ 160 | "-l" 161 | ], 162 | "path": "fish" 163 | }, 164 | "pwsh": { 165 | "icon": "terminal-powershell", 166 | "path": "pwsh" 167 | }, 168 | "tmux": { 169 | "icon": "terminal-tmux", 170 | "path": "tmux" 171 | }, 172 | "zsh": { 173 | "args": [ 174 | "-l" 175 | ], 176 | "path": "zsh" 177 | } 178 | }, 179 | "typescript.updateImportsOnFileMove.enabled": "always", 180 | "vim.autoSwitchInputMethod.defaultIM": "keyboard-us", 181 | "vim.autoSwitchInputMethod.enable": true, 182 | "vim.autoSwitchInputMethod.obtainIMCmd": "fcitx5-remote -n", 183 | "vim.autoSwitchInputMethod.switchIMCmd": "fcitx5-remote -s {im}", 184 | "vim.cursorStylePerMode.replace": "block-outline", 185 | "vim.easymotion": true, 186 | "vim.easymotionKeys": "hklyuiopnmqwertzxcvbasdgjf", 187 | "vim.leader": "", 188 | "vim.useSystemClipboard": true, 189 | "vim.normalModeKeyBindingsNonRecursive": [ 190 | { 191 | "after": [ 192 | "C-y", 193 | "C-y", 194 | "C-y", 195 | "C-y", 196 | "C-y", 197 | "C-y", 198 | "C-y" 199 | ], 200 | "before": [ 201 | "C-y" 202 | ] 203 | }, 204 | { 205 | "after": [ 206 | "C-e", 207 | "C-e", 208 | "C-e", 209 | "C-e", 210 | "C-e", 211 | "C-e", 212 | "C-e", 213 | "C-e" 214 | ], 215 | "before": [ 216 | "C-e" 217 | ] 218 | }, 219 | { 220 | "after": [ 221 | "leader", 222 | "leader", 223 | "2", 224 | "s" 225 | ], 226 | "before": [ 227 | "s" 228 | ] 229 | } 230 | ], 231 | "vim.useCtrlKeys": true, 232 | "window.title": "${dirty}${rootName}", 233 | "workbench.editor.wrapTabs": true, 234 | "workbench.editorAssociations": { 235 | "*.ipynb": "jupyter.notebook.ipynb" 236 | }, 237 | "workbench.layoutControl.enabled": false, 238 | "workbench.startupEditor": "none", 239 | "workbench.colorTheme": "Default Light Modern", 240 | "symbols.hidesExplorerArrows": false, 241 | "redhat.telemetry.enabled": true, 242 | "editor.fontSize": 13, 243 | "[vue]": { 244 | "editor.defaultFormatter": "esbenp.prettier-vscode" 245 | }, 246 | "editor.largeFileOptimizations": false, 247 | "window.customTitleBarVisibility": "never" 248 | } -------------------------------------------------------------------------------- /Linux/fontconfig/.config/fontconfig/fonts.conf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | rgb 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | hintslight 16 | 17 | 18 | 19 | 20 | 21 | true 22 | 23 | 24 | 25 | 26 | 27 | 28 | zh_CN 29 | 30 | 31 | 32 | Noto Sans CJK SC 33 | 34 | 35 | 36 | 37 | 38 | 39 | sans-serif 40 | 41 | 42 | Noto Sans 43 | 44 | 45 | 46 | 47 | 48 | 49 | serif 50 | 51 | 52 | Noto Serif 53 | 54 | 55 | 56 | 57 | 58 | 59 | monospace 60 | 61 | 62 | Source Code Pro Medium 63 | 64 | 65 | 66 | 67 | sans-serif 68 | 69 | Noto Sans 70 | Noto Sans CJK SC 71 | Noto Sans CJK TC 72 | Noto Sans CJK JP 73 | Noto Sans CJK KR 74 | Noto Color Emoji 75 | Noto Emoji 76 | 77 | 78 | 79 | serif 80 | 81 | Noto Serif 82 | Noto Serif CJK SC 83 | Noto Serif CJK TC 84 | Noto Serif CJK JP 85 | Noto Serif CJK KR 86 | Noto Color Emoji 87 | Noto Emoji 88 | 89 | 90 | 91 | monospace 92 | 93 | JetBrainsMono Nerd Font 94 | Sarasa Term SC 95 | Sarasa Term TC 96 | Sarasa Term J 97 | Noto Serif 98 | Noto Serif CJK SC 99 | Noto Serif CJK TC 100 | Noto Serif CJK JP 101 | Noto Serif CJK KR 102 | Noto Color Emoji 103 | Noto Emoji 104 | 105 | 106 | 107 | 108 | 109 | 110 | Liberation Sans 111 | 112 | 113 | sans-serif 114 | 115 | 116 | 117 | 118 | Liberation Mono 119 | 120 | 121 | monospace 122 | 123 | 124 | 125 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dotfile 2 | 3 | ```shell 4 | # 1.all components managed by stow, install stow first. 5 | 6 | # 2. set .stowrc 7 | stow -vt ~ stow 8 | 9 | # 3. other components can just: 10 | stow {alacritty|vim|tmux|zsh} 11 | ``` 12 | -------------------------------------------------------------------------------- /Windows/AutoHotKey/volumn.ahk: -------------------------------------------------------------------------------- 1 | ; C:\Users\shuxiao\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup 2 | 3 | >!j::Send "{Volume_Down}" 4 | >!k::Send "{Volume_Up}" 5 | >!h::Send "{Volume_Mute}" 6 | ^!j::Send "{Volume_Down}" 7 | ^!k::Send "{Volume_Up}" 8 | ^!h::Send "{Volume_Mute}" 9 | -------------------------------------------------------------------------------- /Windows/alacritty/alacritty.toml: -------------------------------------------------------------------------------- 1 | [terminal.shell] 2 | program = "Arch" 3 | 4 | [general] 5 | # import = ["gruvbox.toml"] 6 | 7 | [env] 8 | TERM = "screen-256color" 9 | 10 | [terminal] 11 | osc52 = "CopyPaste" 12 | 13 | [window] 14 | dimensions = { columns = 120, lines = 45 } 15 | padding = { x = 1, y = 1 } 16 | decorations = "full" 17 | dynamic_title = false 18 | # opacity = 0.9 19 | 20 | [font] 21 | # normal = { family = "Recursive Nerd Font", style = "Regular" } 22 | # size = 11 23 | # offset = { x = 1, y = 1 } 24 | normal = { family = "Consolas Nerd Font", style = "Regular" } 25 | # normal = { family = "IosevkaTaiga Nerd Font", style = "Regular" } 26 | size = 12 27 | offset = { x = 1, y = 1 } 28 | 29 | [keyboard] 30 | bindings = [ 31 | { action = "Paste", key = "V", mods = "Alt" }, 32 | { action = "Copy", key = "C", mods = "Alt" }, 33 | ] 34 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/Cobalt2.yaml: -------------------------------------------------------------------------------- 1 | # From the famous Cobalt2 sublime theme 2 | # Source : https://github.com/wesbos/cobalt2/tree/master/Cobalt2 3 | colors: 4 | # Default colors 5 | primary: 6 | background: '0x122637' 7 | foreground: '0xffffff' 8 | 9 | # Colors the cursor will use if `custom_cursor_colors` is true 10 | cursor: 11 | text: '0x122637' 12 | cursor: '0xf0cb09' 13 | 14 | # Normal colors 15 | normal: 16 | black: '0x000000' 17 | red: '0xff0000' 18 | green: '0x37dd21' 19 | yellow: '0xfee409' 20 | blue: '0x1460d2' 21 | magenta: '0xff005d' 22 | cyan: '0x00bbbb' 23 | white: '0xbbbbbb' 24 | 25 | # Bright colors 26 | bright: 27 | black: '0x545454' 28 | red: '0xf40d17' 29 | green: '0x3bcf1d' 30 | yellow: '0xecc809' 31 | blue: '0x5555ff' 32 | magenta: '0xff55ff' 33 | cyan: '0x6ae3f9' 34 | white: '0xffffff' 35 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/afterglow.yaml: -------------------------------------------------------------------------------- 1 | colors: 2 | # Default colors 3 | primary: 4 | background: '0x2c2c2c' 5 | foreground: '0xd6d6d6' 6 | 7 | dim_foreground: '0xdbdbdb' 8 | bright_foreground: '0xd9d9d9' 9 | dim_background: '0x202020' # not sure 10 | bright_background: '0x3a3a3a' # not sure 11 | 12 | # Cursor colors 13 | cursor: 14 | text: '0x2c2c2c' 15 | cursor: '0xd9d9d9' 16 | 17 | # Normal colors 18 | normal: 19 | black: '0x1c1c1c' 20 | red: '0xbc5653' 21 | green: '0x909d63' 22 | yellow: '0xebc17a' 23 | blue: '0x7eaac7' 24 | magenta: '0xaa6292' 25 | cyan: '0x86d3ce' 26 | white: '0xcacaca' 27 | 28 | # Bright colors 29 | bright: 30 | black: '0x636363' 31 | red: '0xbc5653' 32 | green: '0x909d63' 33 | yellow: '0xebc17a' 34 | blue: '0x7eaac7' 35 | magenta: '0xaa6292' 36 | cyan: '0x86d3ce' 37 | white: '0xf7f7f7' 38 | 39 | # Dim colors 40 | dim: 41 | black: '0x232323' 42 | red: '0x74423f' 43 | green: '0x5e6547' 44 | yellow: '0x8b7653' 45 | blue: '0x556b79' 46 | magenta: '0x6e4962' 47 | cyan: '0x5c8482' 48 | white: '0x828282' 49 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/argonaut.yaml: -------------------------------------------------------------------------------- 1 | colors: 2 | # Default colors 3 | primary: 4 | background: '0x292C3E' 5 | foreground: '0xEBEBEB' 6 | 7 | # Cursor colors 8 | cursor: 9 | text: '0xFF261E' 10 | cursor: '0xFF261E' 11 | 12 | # Normal colors 13 | normal: 14 | black: '0x0d0d0d' 15 | red: '0xFF301B' 16 | green: '0xA0E521' 17 | yellow: '0xFFC620' 18 | blue: '0x1BA6FA' 19 | magenta: '0x8763B8' 20 | cyan: '0x21DEEF' 21 | white: '0xEBEBEB' 22 | 23 | # Bright colors 24 | bright: 25 | black: '0x6D7070' 26 | red: '0xFF4352' 27 | green: '0xB8E466' 28 | yellow: '0xFFD750' 29 | blue: '0x1BA6FA' 30 | magenta: '0xA578EA' 31 | cyan: '0x73FBF1' 32 | white: '0xFEFEF8' 33 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/atom_one_light.yaml: -------------------------------------------------------------------------------- 1 | colors: 2 | primary: 3 | background: '0xf8f8f8' 4 | foreground: '0x2a2b33' 5 | 6 | normal: 7 | black: '0x000000' 8 | red: '0xde3d35' 9 | green: '0x3e953a' 10 | yellow: '0xd2b67b' 11 | blue: '0x2f5af3' 12 | magenta: '0xa00095' 13 | cyan: '0x3e953a' 14 | white: '0xbbbbbb' 15 | 16 | bright: 17 | black: '0x000000' 18 | red: '0xde3d35' 19 | green: '0x3e953a' 20 | yellow: '0xd2b67b' 21 | blue: '0x2f5af3' 22 | magenta: '0xa00095' 23 | cyan: '0x3e953a' 24 | white: '0xffffff' 25 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/ayu_dark.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Ayu Dark) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x0A0E14' 6 | foreground: '0xB3B1AD' 7 | 8 | # Normal colors 9 | normal: 10 | black: '0x01060E' 11 | red: '0xEA6C73' 12 | green: '0x91B362' 13 | yellow: '0xF9AF4F' 14 | blue: '0x53BDFA' 15 | magenta: '0xFAE994' 16 | cyan: '0x90E1C6' 17 | white: '0xC7C7C7' 18 | 19 | # Bright colors 20 | bright: 21 | black: '0x686868' 22 | red: '0xF07178' 23 | green: '0xC2D94C' 24 | yellow: '0xFFB454' 25 | blue: '0x59C2FF' 26 | magenta: '0xFFEE99' 27 | cyan: '0x95E6CB' 28 | white: '0xFFFFFF' -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/base16_default_dark.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Base16 Default Dark) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x181818' 6 | foreground: '0xd8d8d8' 7 | 8 | # Colors the cursor will use if `custom_cursor_colors` is true 9 | cursor: 10 | text: '0xd8d8d8' 11 | cursor: '0xd8d8d8' 12 | 13 | # Normal colors 14 | normal: 15 | black: '0x181818' 16 | red: '0xab4642' 17 | green: '0xa1b56c' 18 | yellow: '0xf7ca88' 19 | blue: '0x7cafc2' 20 | magenta: '0xba8baf' 21 | cyan: '0x86c1b9' 22 | white: '0xd8d8d8' 23 | 24 | # Bright colors 25 | bright: 26 | black: '0x585858' 27 | red: '0xab4642' 28 | green: '0xa1b56c' 29 | yellow: '0xf7ca88' 30 | blue: '0x7cafc2' 31 | magenta: '0xba8baf' 32 | cyan: '0x86c1b9' 33 | white: '0xf8f8f8' -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/blood_moon.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Blood Moon) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x10100E' 6 | foreground: '0xC6C6C4' 7 | 8 | # Normal colors 9 | normal: 10 | black: '0x10100E' 11 | red: '0xC40233' 12 | green: '0x009F6B' 13 | yellow: '0xFFD700' 14 | blue: '0x0087BD' 15 | magenta: '0x9A4EAE' 16 | cyan: '0x20B2AA' 17 | white: '0xC6C6C4' 18 | 19 | # Bright colors 20 | bright: 21 | black: '0x696969' 22 | red: '0xFF2400' 23 | green: '0x03C03C' 24 | yellow: '0xFDFF00' 25 | blue: '0x007FFF' 26 | magenta: '0xFF1493' 27 | cyan: '0x00CCCC' 28 | white: '0xFFFAFA' -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/breeze.yaml: -------------------------------------------------------------------------------- 1 | # KDE Breeze (Ported from Konsole) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x232627' 6 | foreground: '0xfcfcfc' 7 | 8 | dim_foreground: '0xeff0f1' 9 | bright_foreground: '0xffffff' 10 | dim_background: '0x31363b' 11 | bright_background: '0x000000' 12 | 13 | # Normal colors 14 | normal: 15 | black: '0x232627' 16 | red: '0xed1515' 17 | green: '0x11d116' 18 | yellow: '0xf67400' 19 | blue: '0x1d99f3' 20 | magenta: '0x9b59b6' 21 | cyan: '0x1abc9c' 22 | white: '0xfcfcfc' 23 | 24 | # Bright colors 25 | bright: 26 | black: '0x7f8c8d' 27 | red: '0xc0392b' 28 | green: '0x1cdc9a' 29 | yellow: '0xfdbc4b' 30 | blue: '0x3daee9' 31 | magenta: '0x8e44ad' 32 | cyan: '0x16a085' 33 | white: '0xffffff' 34 | 35 | # Dim colors 36 | dim: 37 | black: '0x31363b' 38 | red: '0x783228' 39 | green: '0x17a262' 40 | yellow: '0xb65619' 41 | blue: '0x1b668f' 42 | magenta: '0x614a73' 43 | cyan: '0x186c60' 44 | white: '0x63686d' 45 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/campbell.yaml: -------------------------------------------------------------------------------- 1 | # Campbell (Windows 10 default) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x0c0c0c' 6 | foreground: '0xcccccc' 7 | 8 | # Normal colors 9 | normal: 10 | black: '0x0c0c0c' 11 | red: '0xc50f1f' 12 | green: '0x13a10e' 13 | yellow: '0xc19c00' 14 | blue: '0x0037da' 15 | magenta: '0x881798' 16 | cyan: '0x3a96dd' 17 | white: '0xcccccc' 18 | 19 | # Bright colors 20 | bright: 21 | black: '0x767676' 22 | red: '0xe74856' 23 | green: '0x16c60c' 24 | yellow: '0xf9f1a5' 25 | blue: '0x3b78ff' 26 | magenta: '0xb4009e' 27 | cyan: '0x61d6d6' 28 | white: '0xf2f2f2' 29 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/challenger_deep.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Challenger Deep) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x1e1c31' 6 | foreground: '0xcbe1e7' 7 | # Colors the cursor will use if `custom_cursor_colors` is true 8 | cursor: 9 | text: '0xff271d' 10 | cursor: '0xfbfcfc' 11 | # Normal colors 12 | normal: 13 | black: '0x141228' 14 | red: '0xff5458' 15 | green: '0x62d196' 16 | yellow: '0xffb378' 17 | blue: '0x65b2ff' 18 | magenta: '0x906cff' 19 | cyan: '0x63f2f1' 20 | white: '0xa6b3cc' 21 | # Bright colors 22 | bright: 23 | black: '0x565575' 24 | red: '0xff8080' 25 | green: '0x95ffa4' 26 | yellow: '0xffe9aa' 27 | blue: '0x91ddff' 28 | magenta: '0xc991e1' 29 | cyan: '0xaaffe4' 30 | white: '0xcbe3e7' 31 | 32 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/cyber_punk_neon.yaml: -------------------------------------------------------------------------------- 1 | # Cyber Punk Neon 2 | # Source: https://github.com/Roboron3042/Cyberpunk-Neon 3 | colors: 4 | # Default colors 5 | primary: 6 | background: "0x000b1e" 7 | foreground: "0x0abdc6" 8 | 9 | # Colors the cursor will use if `custom_cursor_colors` is true 10 | cursor: 11 | text: "0x000b1e" 12 | cursor: "0x0abdc6" 13 | 14 | # Normal colors 15 | normal: 16 | black: "0x123e7c" 17 | red: "0xff0000" 18 | green: "0xd300c4" 19 | yellow: "0xf57800" 20 | blue: "0x123e7c" 21 | magenta: "0x711c91" 22 | cyan: "0x0abdc6" 23 | white: "0xd7d7d5" 24 | 25 | # Bright colors 26 | bright: 27 | black: "0x1c61c2" 28 | red: "0xff0000" 29 | green: "0xd300c4" 30 | yellow: "0xf57800" 31 | blue: "0x00ff00" 32 | magenta: "0x711c91" 33 | cyan: "0x0abdc6" 34 | white: "0xd7d7d5" 35 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/darcula.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Dracula) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x282a36' 6 | foreground: '0xf8f8f2' 7 | 8 | # Normal colors 9 | normal: 10 | black: '0x000000' 11 | red: '0xff5555' 12 | green: '0x50fa7b' 13 | yellow: '0xf1fa8c' 14 | blue: '0xcaa9fa' 15 | magenta: '0xff79c6' 16 | cyan: '0x8be9fd' 17 | white: '0xbfbfbf' 18 | 19 | # Bright colors 20 | bright: 21 | black: '0x282a35' 22 | red: '0xff6e67' 23 | green: '0x5af78e' 24 | yellow: '0xf4f99d' 25 | blue: '0xcaa9fa' 26 | magenta: '0xff92d0' 27 | cyan: '0x9aedfe' 28 | white: '0xe6e6e6' -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/dark_pastels.yaml: -------------------------------------------------------------------------------- 1 | 2 | # Colors (Konsole's Dark Pastels) 3 | colors: 4 | # Default colors 5 | primary: 6 | background: '0x2C2C2C' 7 | foreground: '0xDCDCCC' 8 | 9 | # Normal colors 10 | normal: 11 | black: '0x3F3F3F' 12 | red: '0x705050' 13 | green: '0x60B48A' 14 | yellow: '0xDFAF8F' 15 | blue: '0x9AB8D7' 16 | magenta: '0xDC8CC3' 17 | cyan: '0x8CD0D3' 18 | white: '0xDCDCCC' 19 | 20 | # Bright colors 21 | bright: 22 | black: '0x709080' 23 | red: '0xDCA3A3' 24 | green: '0x72D5A3' 25 | yellow: '0xF0DFAF' 26 | blue: '0x94BFF3' 27 | magenta: '0xEC93D3' 28 | cyan: '0x93E0E3' 29 | white: '0xFFFFFF' 30 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/doom_one.yml: -------------------------------------------------------------------------------- 1 | # Colors (Doom One) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x282c34' 6 | foreground: '0xbbc2cf' 7 | 8 | # Normal colors 9 | normal: 10 | black: '0x282c34' 11 | red: '0xff6c6b' 12 | green: '0x98be65' 13 | yellow: '0xecbe7b' 14 | blue: '0x51afef' 15 | magenta: '0xc678dd' 16 | cyan: '0x46d9ff' 17 | white: '0xbbc2cf' 18 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/dracula.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Dracula) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x282a36' 6 | foreground: '0xf8f8f2' 7 | 8 | # Normal colors 9 | normal: 10 | black: '0x000000' 11 | red: '0xff5555' 12 | green: '0x50fa7b' 13 | yellow: '0xf1fa8c' 14 | blue: '0xbd93f9' 15 | magenta: '0xff79c6' 16 | cyan: '0x8be9fd' 17 | white: '0xbbbbbb' 18 | 19 | # Bright colors 20 | bright: 21 | black: '0x555555' 22 | red: '0xff5555' 23 | green: '0x50fa7b' 24 | yellow: '0xf1fa8c' 25 | blue: '0xcaa9fa' 26 | magenta: '0xff79c6' 27 | cyan: '0x8be9fd' 28 | white: '0xffffff' -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/falcon.yaml: -------------------------------------------------------------------------------- 1 | # falcon colorscheme for alacritty 2 | # by fenetikm, https://github.com/fenetikm/falcon 3 | colors: 4 | # Default colors 5 | primary: 6 | background: '0x020221' 7 | foreground: '0xb4b4b9' 8 | 9 | # Colors the cursor will use if `custom_cursor_colors` is true 10 | cursor: 11 | text: '0x020221' 12 | cursor: '0xffe8c0' 13 | 14 | # Normal colors 15 | normal: 16 | black: '0x000004' 17 | red: '0xff3600' 18 | green: '0x718e3f' 19 | yellow: '0xffc552' 20 | blue: '0x635196' 21 | magenta: '0xff761a' 22 | cyan: '0x34bfa4' 23 | white: '0xb4b4b9' 24 | 25 | # Bright colors 26 | bright: 27 | black: '0x020221' 28 | red: '0xff8e78' 29 | green: '0xb1bf75' 30 | yellow: '0xffd392' 31 | blue: '0x99a4bc' 32 | magenta: '0xffb07b' 33 | cyan: '0x8bccbf' 34 | white: '0xf8f8ff' 35 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/flat_remix.yml: -------------------------------------------------------------------------------- 1 | colors: 2 | primary: 3 | background: '0x272a34' 4 | foreground: '0xFFFFFF' 5 | 6 | normal: 7 | black: '0x1F2229' 8 | red: '0xEC0101' 9 | green: '0x47D4B9' 10 | yellow: '0xFF8A18' 11 | blue: '0x277FFF' 12 | magenta: '0xD71655' 13 | cyan: '0x05A1F7' 14 | white: '0xFFFFFF' 15 | 16 | 17 | bright: 18 | black: '0x1F2229' 19 | red: '0xD41919' 20 | green: '0x5EBDAB' 21 | yellow: '0xFEA44C' 22 | blue: '0x367bf0' 23 | magenta: '0xBF2E5D' 24 | cyan: '0x49AEE6' 25 | white: '0xFFFFFF' 26 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/gotham.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Gotham) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x0a0f14' 6 | foreground: '0x98d1ce' 7 | 8 | # Normal colors 9 | normal: 10 | black: '0x0a0f14' 11 | red: '0xc33027' 12 | green: '0x26a98b' 13 | yellow: '0xedb54b' 14 | blue: '0x195465' 15 | magenta: '0x4e5165' 16 | cyan: '0x33859d' 17 | white: '0x98d1ce' 18 | 19 | # Bright colors 20 | bright: 21 | black: '0x10151b' 22 | red: '0xd26939' 23 | green: '0x081f2d' 24 | yellow: '0x245361' 25 | blue: '0x093748' 26 | magenta: '0x888ba5' 27 | cyan: '0x599caa' 28 | white: '0xd3ebe9' -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/gruvbox_dark.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Gruvbox dark) 2 | colors: 3 | # Default colors 4 | primary: 5 | # hard contrast: background = '0x1d2021' 6 | background: '0x282828' 7 | # soft contrast: background = '0x32302f' 8 | foreground: '0xebdbb2' 9 | 10 | # Normal colors 11 | normal: 12 | black: '0x282828' 13 | red: '0xcc241d' 14 | green: '0x98971a' 15 | yellow: '0xd79921' 16 | blue: '0x458588' 17 | magenta: '0xb16286' 18 | cyan: '0x689d6a' 19 | white: '0xa89984' 20 | 21 | # Bright colors 22 | bright: 23 | black: '0x928374' 24 | red: '0xfb4934' 25 | green: '0xb8bb26' 26 | yellow: '0xfabd2f' 27 | blue: '0x83a598' 28 | magenta: '0xd3869b' 29 | cyan: '0x8ec07c' 30 | white: '0xebdbb2' -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/gruvbox_light.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Gruvbox light) 2 | colors: 3 | # Default colors 4 | primary: 5 | # hard contrast: background = '0xf9f5d7' 6 | background: '0xfbf1c7' 7 | # soft contrast: background = '0xf2e5bc' 8 | foreground: '0x3c3836' 9 | 10 | # Normal colors 11 | normal: 12 | black: '0xfbf1c7' 13 | red: '0xcc241d' 14 | green: '0x98971a' 15 | yellow: '0xd79921' 16 | blue: '0x458588' 17 | magenta: '0xb16286' 18 | cyan: '0x689d6a' 19 | white: '0x7c6f64' 20 | 21 | # Bright colors 22 | bright: 23 | black: '0x928374' 24 | red: '0x9d0006' 25 | green: '0x79740e' 26 | yellow: '0xb57614' 27 | blue: '0x076678' 28 | magenta: '0x8f3f71' 29 | cyan: '0x427b58' 30 | white: '0x3c3836' -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/gruvbox_material.yml: -------------------------------------------------------------------------------- 1 | # Colors (Gruvbox Material Dark Medium) 2 | colors: 3 | primary: 4 | background: '0x282828' 5 | foreground: '0xdfbf8e' 6 | 7 | normal: 8 | black: '0x665c54' 9 | red: '0xea6962' 10 | green: '0xa9b665' 11 | yellow: '0xe78a4e' 12 | blue: '0x7daea3' 13 | magenta: '0xd3869b' 14 | cyan: '0x89b482' 15 | white: '0xdfbf8e' 16 | 17 | bright: 18 | black: '0x928374' 19 | red: '0xea6962' 20 | green: '0xa9b665' 21 | yellow: '0xe3a84e' 22 | blue: '0x7daea3' 23 | magenta: '0xd3869b' 24 | cyan: '0x89b482' 25 | white: '0xdfbf8e' 26 | 27 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/high_contrast.yaml: -------------------------------------------------------------------------------- 1 | # Colors (High Contrast) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x444444' 6 | foreground: '0xdddddd' 7 | 8 | # Colors the cursor will use if `custom_cursor_colors` is true 9 | cursor: 10 | text: '0xaaaaaa' 11 | cursor: '0xffffff' 12 | 13 | # Normal colors 14 | normal: 15 | black: '0x000000' 16 | red: '0xff0000' 17 | green: '0x00ff00' 18 | yellow: '0xffff00' 19 | blue: '0x0000ff' 20 | magenta: '0xff00ff' 21 | cyan: '0x00ffff' 22 | white: '0xffffff' 23 | 24 | # Bright colors 25 | bright: 26 | black: '0x000000' 27 | red: '0xff0000' 28 | green: '0x00ff00' 29 | yellow: '0xffff00' 30 | blue: '0x0000ff' 31 | magenta: '0xff00ff' 32 | cyan: '0x00ffff' 33 | white: '0xffffff' 34 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/horizon-dark.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Horizon Dark) 2 | colors: 3 | # Primary colors 4 | primary: 5 | background: '0x1c1e26' 6 | foreground: '0xe0e0e0' 7 | 8 | # Normal colors 9 | normal: 10 | black: '0x16161c' 11 | red: '0xe95678' 12 | green: '0x29d398' 13 | yellow: '0xfab795' 14 | blue: '0x26bbd9' 15 | magenta: '0xee64ac' 16 | cyan: '0x59e1e3' 17 | white: '0xd5d8da' 18 | 19 | # Bright colors 20 | bright: 21 | black: '0x5b5858' 22 | red: '0xec6a88' 23 | green: '0x3fdaa4' 24 | yellow: '0xfbc3a7' 25 | blue: '0x3fc4de' 26 | magenta: '0xf075b5' 27 | cyan: '0x6be4e6' 28 | white: '0xd5d8da' 29 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/hyper.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Hyper) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x000000' 6 | foreground: '0xffffff' 7 | cursor: 8 | text: '0xF81CE5' 9 | cursor: '0xffffff' 10 | 11 | # Normal colors 12 | normal: 13 | black: '0x000000' 14 | red: '0xfe0100' 15 | green: '0x33ff00' 16 | yellow: '0xfeff00' 17 | blue: '0x0066ff' 18 | magenta: '0xcc00ff' 19 | cyan: '0x00ffff' 20 | white: '0xd0d0d0' 21 | 22 | # Bright colors 23 | bright: 24 | black: '0x808080' 25 | red: '0xfe0100' 26 | green: '0x33ff00' 27 | yellow: '0xfeff00' 28 | blue: '0x0066ff' 29 | magenta: '0xcc00ff' 30 | cyan: '0x00ffff' 31 | white: '0xFFFFFF' -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/iterm.yaml: -------------------------------------------------------------------------------- 1 | # Colors (iTerm 2 default theme) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x101421' 6 | foreground: '0xfffbf6' 7 | 8 | # Normal colors 9 | normal: 10 | black: '0x2e2e2e' 11 | red: '0xeb4129' 12 | green: '0xabe047' 13 | yellow: '0xf6c744' 14 | blue: '0x47a0f3' 15 | magenta: '0x7b5cb0' 16 | cyan: '0x64dbed' 17 | white: '0xe5e9f0' 18 | 19 | # Bright colors 20 | bright: 21 | black: '0x565656' 22 | red: '0xec5357' 23 | green: '0xc0e17d' 24 | yellow: '0xf9da6a' 25 | blue: '0x49a4f8' 26 | magenta: '0xa47de9' 27 | cyan: '0x99faf2' 28 | white: '0xffffff' 29 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/konsole_linux.yaml: -------------------------------------------------------------------------------- 1 | # Color theme ported from Konsole: Linux colors 2 | colors: 3 | primary: 4 | foreground: '0xe3e3e3' 5 | bright_foreground: '0xffffff' 6 | dim_foreground: '0xe3e3e3' 7 | background: '0x1f1f1f' 8 | bright_background: '0x686868' # not sure 9 | dim_background: '0x1f1f1f' # not sure 10 | 11 | cursor: 12 | text: '0x191622' 13 | cursor: '0xf8f8f2' 14 | 15 | search: 16 | matches: 17 | foreground: '0xb2b2b2' 18 | background: '0xb26818' 19 | focused_match: 20 | foreground: CellBackground 21 | background: CellForeground 22 | 23 | normal: 24 | black: '0x000000' 25 | red: '0xb21818' 26 | green: '0x18b218' 27 | yellow: '0xb26818' 28 | blue: '0x1818b2' 29 | magenta: '0xb218b2' 30 | cyan: '0x18b2b2' 31 | white: '0xb2b2b2' 32 | 33 | bright: 34 | black: '0x686868' 35 | red: '0xff5454' 36 | green: '0x54ff54' 37 | yellow: '0xffff54' 38 | blue: '0x5454ff' 39 | magenta: '0xff54ff' 40 | cyan: '0x54ffff' 41 | white: '0xffffff' 42 | 43 | dim: 44 | black: '0x000000' 45 | red: '0xb21818' 46 | green: '0x18b218' 47 | yellow: '0xb26818' 48 | blue: '0x1818b2' 49 | magenta: '0xb218b2' 50 | cyan: '0x18b2b2' 51 | white: '0xb2b2b2' 52 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/low_contrast.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Dim) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x333333' 6 | foreground: '0xdddddd' 7 | 8 | # Colors the cursor will use if `custom_cursor_colors` is true 9 | cursor: 10 | text: '0xaaaaaa' 11 | cursor: '0xffffff' 12 | 13 | # Normal colors 14 | normal: 15 | black: '0x000000' 16 | red: '0xbb0000' 17 | green: '0x00bb00' 18 | yellow: '0xbbbb00' 19 | blue: '0x0000bb' 20 | magenta: '0xbb00bb' 21 | cyan: '0x00bbbb' 22 | white: '0xbbbbbb' 23 | 24 | # Bright colors 25 | bright: 26 | black: '0x000000' 27 | red: '0xbb0000' 28 | green: '0x00bb00' 29 | yellow: '0xbbbb00' 30 | blue: '0x0000bb' 31 | magenta: '0xbb00bb' 32 | cyan: '0x00bbbb' 33 | white: '0xbbbbbb' 34 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/material_theme.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Material Theme) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x1e282d' 6 | foreground: '0xc4c7d1' 7 | 8 | # Normal colors 9 | normal: 10 | black: '0x666666' 11 | red: '0xeb606b' 12 | green: '0xc3e88d' 13 | yellow: '0xf7eb95' 14 | blue: '0x80cbc4' 15 | magenta: '0xff2f90' 16 | cyan: '0xaeddff' 17 | white: '0xffffff' 18 | 19 | # Bright colors 20 | bright: 21 | black: '0xff262b' 22 | red: '0xeb606b' 23 | green: '0xc3e88d' 24 | yellow: '0xf7eb95' 25 | blue: '0x7dc6bf' 26 | magenta: '0x6c71c4' 27 | cyan: '0x35434d' 28 | white: '0xffffff' 29 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/material_theme_mod.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Material Theme) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x1e282d' 6 | foreground: '0xc4c7d1' 7 | 8 | # Normal colors 9 | normal: 10 | black: '0x666666' 11 | red: '0xeb606b' 12 | green: '0xc3e88d' 13 | yellow: '0xf7eb95' 14 | blue: '0x80cbc4' 15 | magenta: '0xff2f90' 16 | cyan: '0xaeddff' 17 | white: '0xffffff' 18 | 19 | # Bright colors 20 | bright: 21 | black: '0xa1a1a1' 22 | red: '0xeb606b' 23 | green: '0xc3e88d' 24 | yellow: '0xf7eb95' 25 | blue: '0x7dc6bf' 26 | magenta: '0x6c71c4' 27 | cyan: '0x35434d' 28 | white: '0xffffff' 29 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/moonlight_ii_vscode.yaml: -------------------------------------------------------------------------------- 1 | colors: 2 | primary: 3 | background: '0x1e2030' 4 | foreground: '0x7f85a3' 5 | 6 | cursor: 7 | text: '0x7f85a3' 8 | cursor: '0x808080' 9 | 10 | normal: 11 | black: '0x444a73' 12 | red: '0xff5370' 13 | green: '0x4fd6be' 14 | yellow: '0xffc777' 15 | blue: '0x3e68d7' 16 | magenta: '0xfc7b7b' 17 | cyan: '0x86e1fc' 18 | white: '0xd0d0d0' 19 | 20 | bright: 21 | black: '0x828bb8' 22 | red: '0xff98a4' 23 | green: '0xc3e88d' 24 | yellow: '0xffc777' 25 | blue: '0x82aaff' 26 | magenta: '0xff966c' 27 | cyan: '0xb4f9f8' 28 | white: '0x5f8787' -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/night_owlish_light.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Night Owlish Light) 2 | colors: 3 | bright: 4 | black: '#7a8181' 5 | blue: '#5ca7e4' 6 | cyan: '#00c990' 7 | green: '#49d0c5' 8 | magenta: '#697098' 9 | red: '#f76e6e' 10 | white: '#989fb1' 11 | yellow: '#dac26b' 12 | cursor: 13 | cursor: '#403f53' 14 | text: '#fbfbfb' 15 | normal: 16 | black: '#011627' 17 | blue: '#4876d6' 18 | cyan: '#08916a' 19 | green: '#2aa298' 20 | magenta: '#403f53' 21 | red: '#d3423e' 22 | white: '#7a8181' 23 | yellow: '#daaa01' 24 | primary: 25 | background: '#ffffff' 26 | foreground: '#403f53' 27 | selection: 28 | background: '#f2f2f2' 29 | text: '#403f53' -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/nord.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Nord) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x2E3440' 6 | foreground: '0xD8DEE9' 7 | 8 | # Normal colors 9 | normal: 10 | black: '0x3B4252' 11 | red: '0xBF616A' 12 | green: '0xA3BE8C' 13 | yellow: '0xEBCB8B' 14 | blue: '0x81A1C1' 15 | magenta: '0xB48EAD' 16 | cyan: '0x88C0D0' 17 | white: '0xE5E9F0' 18 | 19 | # Bright colors 20 | bright: 21 | black: '0x4C566A' 22 | red: '0xBF616A' 23 | green: '0xA3BE8C' 24 | yellow: '0xEBCB8B' 25 | blue: '0x81A1C1' 26 | magenta: '0xB48EAD' 27 | cyan: '0x8FBCBB' 28 | white: '0xECEFF4' 29 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/oceanic_next.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Oceanic Next) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x1b2b34' 6 | foreground: '0xd8dee9' 7 | 8 | # Normal colors 9 | normal: 10 | black: '0x29414f' 11 | red: '0xec5f67' 12 | green: '0x99c794' 13 | yellow: '0xfac863' 14 | blue: '0x6699cc' 15 | magenta: '0xc594c5' 16 | cyan: '0x5fb3b3' 17 | white: '0x65737e' 18 | 19 | # Bright colors 20 | bright: 21 | black: '0x405860' 22 | red: '0xec5f67' 23 | green: '0x99c794' 24 | yellow: '0xfac863' 25 | blue: '0x6699cc' 26 | magenta: '0xc594c5' 27 | cyan: '0x5fb3b3' 28 | white: '0xadb5c0' 29 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/omni.yml: -------------------------------------------------------------------------------- 1 | colors: 2 | primary: 3 | background: '0x191622' 4 | foreground: '0xe1e1e6' 5 | 6 | cursor: 7 | text: '0x191622' 8 | cursor: '0xf8f8f2' 9 | 10 | normal: 11 | black: '0x000000' 12 | red: '0xff5555' 13 | green: '0x50fa7b' 14 | yellow: '0xeffa78' 15 | blue: '0xbd93f9' 16 | magenta: '0xff79c6' 17 | cyan: '0x8d79ba' 18 | white: '0xbfbfbf' 19 | 20 | bright: 21 | black: '0x4d4d4d' 22 | red: '0xff6e67' 23 | green: '0x5af78e' 24 | yellow: '0xeaf08d' 25 | blue: '0xcaa9fa' 26 | magenta: '0xff92d0' 27 | cyan: '0xaa91e3' 28 | white: '0xe6e6e6' 29 | 30 | dim: 31 | black: '0x000000' 32 | red: '0xa90000' 33 | green: '0x049f2b' 34 | yellow: '0xa3b106' 35 | blue: '0x530aba' 36 | magenta: '0xbb006b' 37 | cyan: '0x433364' 38 | white: '0x5f5f5f' 39 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/one_dark.yaml: -------------------------------------------------------------------------------- 1 | # Colors (One Dark) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x1e2127' 6 | foreground: '0xabb2bf' 7 | 8 | # Normal colors 9 | normal: 10 | black: '0x1e2127' 11 | red: '0xe06c75' 12 | green: '0x98c379' 13 | yellow: '0xd19a66' 14 | blue: '0x61afef' 15 | magenta: '0xc678dd' 16 | cyan: '0x56b6c2' 17 | white: '0xabb2bf' 18 | 19 | # Bright colors 20 | bright: 21 | black: '0x5c6370' 22 | red: '0xe06c75' 23 | green: '0x98c379' 24 | yellow: '0xd19a66' 25 | blue: '0x61afef' 26 | magenta: '0xc678dd' 27 | cyan: '0x56b6c2' 28 | white: '0xffffff' -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/palenight.yml: -------------------------------------------------------------------------------- 1 | # iTerm2 Material Design - Palenight theme for Alacritty 2 | # Source : https://github.com/JonathanSpeek/palenight-iterm2 3 | 4 | colors: 5 | # Default colors 6 | primary: 7 | background: '0x292d3e' 8 | foreground: '0xd0d0d0' 9 | 10 | # Normal colors 11 | normal: 12 | black: '0x292d3e' 13 | red: '0xf07178' 14 | green: '0xc3e88d' 15 | yellow: '0xffcb6b' 16 | blue: '0x82aaff' 17 | magenta: '0xc792ea' 18 | cyan: '0x89ddff' 19 | white: '0xd0d0d0' 20 | 21 | # Bright colors 22 | bright: 23 | black: '0x434758' 24 | red: '0xff8b92' 25 | green: '0xddffa7' 26 | yellow: '0xffe585' 27 | blue: '0x9cc4ff' 28 | magenta: '0xe1acff' 29 | cyan: '0xa3f7ff' 30 | white: '0xffffff' 31 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/papercolor_dark.yaml: -------------------------------------------------------------------------------- 1 | # Colors (PaperColor - Dark) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x1c1c1c' 6 | foreground: '0x808080' 7 | 8 | cursor: 9 | text: '0x1c1c1c' 10 | cursor: '0x808080' 11 | 12 | # Normal colors 13 | normal: 14 | black: '0x1c1c1c' 15 | red: '0xaf005f' 16 | green: '0x5faf00' 17 | yellow: '0xd7af5f' 18 | blue: '0x5fafd7' 19 | magenta: '0x808080' 20 | cyan: '0xd7875f' 21 | white: '0xd0d0d0' 22 | 23 | # Bright colors 24 | bright: 25 | black: '0x585858' 26 | red: '0x5faf5f' 27 | green: '0xafd700' 28 | yellow: '0xaf87d7' 29 | blue: '0xffaf00' 30 | magenta: '0xffaf00' 31 | cyan: '0x00afaf' 32 | white: '0x5f8787' 33 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/papercolor_light.yaml: -------------------------------------------------------------------------------- 1 | # Colors (PaperColor - Light) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0xeeeeee' 6 | foreground: '0x878787' 7 | 8 | cursor: 9 | text: '0xeeeeee' 10 | cursor: '0x878787' 11 | 12 | # Normal colors 13 | normal: 14 | black: '0xeeeeee' 15 | red: '0xaf0000' 16 | green: '0x008700' 17 | yellow: '0x5f8700' 18 | blue: '0x0087af' 19 | magenta: '0x878787' 20 | cyan: '0x005f87' 21 | white: '0x444444' 22 | 23 | # Bright colors 24 | bright: 25 | black: '0xbcbcbc' 26 | red: '0xd70000' 27 | green: '0xd70087' 28 | yellow: '0x8700af' 29 | blue: '0xd75f00' 30 | magenta: '0xd75f00' 31 | cyan: '0x005faf' 32 | white: '0x005f87' -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/pencil_dark.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Pencil Dark) 2 | colors: 3 | # Default Colors 4 | primary: 5 | background: '0x212121' 6 | foreground: '0xf1f1f1' 7 | # Normal colors 8 | normal: 9 | black: '0x212121' 10 | red: '0xc30771' 11 | green: '0x10a778' 12 | yellow: '0xa89c14' 13 | blue: '0x008ec4' 14 | magenta: '0x523c79' 15 | cyan: '0x20a5ba' 16 | white: '0xe0e0e0' 17 | # Bright colors 18 | bright: 19 | black: '0x818181' 20 | red: '0xfb007a' 21 | green: '0x5fd7af' 22 | yellow: '0xf3e430' 23 | blue: '0x20bbfc' 24 | magenta: '0x6855de' 25 | cyan: '0x4fb8cc' 26 | white: '0xf1f1f1' 27 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/pencil_light.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Pencil Light) 2 | colors: 3 | # Default Colors 4 | primary: 5 | background: '0xf1f1f1' 6 | foreground: '0x424242' 7 | # Normal colors 8 | normal: 9 | black: '0x212121' 10 | red: '0xc30771' 11 | green: '0x10a778' 12 | yellow: '0xa89c14' 13 | blue: '0x008ec4' 14 | magenta: '0x523c79' 15 | cyan: '0x20a5ba' 16 | white: '0xe0e0e0' 17 | # Bright colors 18 | bright: 19 | black: '0x212121' 20 | red: '0xfb007a' 21 | green: '0x5fd7af' 22 | yellow: '0xf3e430' 23 | blue: '0x20bbfc' 24 | magenta: '0x6855de' 25 | cyan: '0x4fb8cc' 26 | white: '0xf1f1f1' 27 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/remedy_dark.yaml: -------------------------------------------------------------------------------- 1 | colors: 2 | # Default colors 3 | primary: 4 | background: '0x2c2b2a' 5 | foreground: '0xf9e7c4' 6 | 7 | dim_foreground: '0x685E4A' 8 | bright_foreground: '0x1C1508' 9 | dim_background: '0x202322' 10 | bright_background: '0x353433' 11 | 12 | # Cursor colors 13 | cursor: 14 | text: '0xf9e7c4' 15 | cursor: '0xf9e7c4' 16 | 17 | # Normal colors 18 | normal: 19 | black: '0x282a2e' 20 | blue: '0x5f819d' 21 | cyan: '0x5e8d87' 22 | green: '0x8c9440' 23 | magenta: '0x85678f' 24 | orange: '0xcc6953' 25 | red: '0xa54242' 26 | white: '0x707880' 27 | yellow: '0xde935f' 28 | 29 | # Bright colors 30 | bright: 31 | black: '0x373b41' 32 | blue: '0x81a2be' 33 | cyan: '0x8abeb7' 34 | green: '0xb5bd68' 35 | magenta: '0xb294bb' 36 | red: '0xcc6666' 37 | white: '0xc5c8c6' 38 | yellow: '0xf0c674' -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/seashells.yaml: -------------------------------------------------------------------------------- 1 | # Colors (SeaShells) 2 | # Source : https://raw.githubusercontent.com/mbadolato/iTerm2-Color-Schemes/master/schemes/SeaShells.itermcolors 3 | colors: 4 | # Default colors 5 | primary: 6 | background: '#061923' 7 | foreground: '#e5c49e' 8 | 9 | # Colors the cursor will use if `custom_cursor_colors` is true 10 | cursor: 11 | text: '#061822' 12 | cursor: '#feaf3c' 13 | 14 | selection: 15 | text: '#ffe9d7' 16 | background: '#265b75' 17 | 18 | # Normal colors 19 | normal: 20 | black: '#1d485f' 21 | red: '#db662d' 22 | green: '#008eab' 23 | yellow: '#feaf3c' 24 | blue: '#255a62' 25 | magenta: '#77dbf4' 26 | cyan: '#5fb1c2' 27 | white: '#e5c49e' 28 | 29 | # Bright colors 30 | bright: 31 | black: '#545d65' 32 | red: '#dd998a' 33 | green: '#739da8' 34 | yellow: '#fedaae' 35 | blue: '#0bc7e3' 36 | magenta: '#c6e8f1' 37 | cyan: '#97b9c0' 38 | white: '#ffe9d7' -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/smoooooth.yml: -------------------------------------------------------------------------------- 1 | # Color theme ported from iTerm 2: Smoooooth 2 | 3 | colors: 4 | primary: 5 | foreground: '0xdbdbdb' 6 | background: '0x14191e' 7 | cursor: 8 | text: '0x000000' 9 | cursor: '0xfefffe' 10 | selection: 11 | text: '0x000000' 12 | background: '0xb3d7ff' 13 | normal: 14 | black: '0x14191e' 15 | red: '0xb43c29' 16 | green: '0x00c200' 17 | yellow: '0xc7c400' 18 | blue: '0x2743c7' 19 | magenta: '0xbf3fbd' 20 | cyan: '0x00c5c7' 21 | white: '0xc7c7c7' 22 | bright: 23 | black: '0x676767' 24 | red: '0xdc7974' 25 | green: '0x57e690' 26 | yellow: '0xece100' 27 | blue: '0xa6aaf1' 28 | magenta: '0xe07de0' 29 | cyan: '0x5ffdff' 30 | white: '0xfeffff' 31 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/snazzy.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Snazzy) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x282a36' 6 | foreground: '0xeff0eb' 7 | 8 | # Normal colors 9 | normal: 10 | black: '0x282a36' 11 | red: '0xff5c57' 12 | green: '0x5af78e' 13 | yellow: '0xf3f99d' 14 | blue: '0x57c7ff' 15 | magenta: '0xff6ac1' 16 | cyan: '0x9aedfe' 17 | white: '0xf1f1f0' 18 | 19 | # Bright colors 20 | bright: 21 | black: '0x686868' 22 | red: '0xff5c57' 23 | green: '0x5af78e' 24 | yellow: '0xf3f99d' 25 | blue: '0x57c7ff' 26 | magenta: '0xff6ac1' 27 | cyan: '0x9aedfe' 28 | white: '0xf1f1f0' -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/solarized_dark.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Solarized Dark) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x002b36' 6 | foreground: '0x839496' 7 | 8 | # Normal colors 9 | normal: 10 | black: '0x073642' 11 | red: '0xdc322f' 12 | green: '0x859900' 13 | yellow: '0xb58900' 14 | blue: '0x268bd2' 15 | magenta: '0xd33682' 16 | cyan: '0x2aa198' 17 | white: '0xeee8d5' 18 | 19 | # Bright colors 20 | bright: 21 | black: '0x002b36' 22 | red: '0xcb4b16' 23 | green: '0x586e75' 24 | yellow: '0x657b83' 25 | blue: '0x839496' 26 | magenta: '0x6c71c4' 27 | cyan: '0x93a1a1' 28 | white: '0xfdf6e3' -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/solarized_light.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Solarized Light) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0xfdf6e3' 6 | foreground: '0x586e75' 7 | 8 | # Normal colors 9 | normal: 10 | black: '0x073642' 11 | red: '0xdc322f' 12 | green: '0x859900' 13 | yellow: '0xb58900' 14 | blue: '0x268bd2' 15 | magenta: '0xd33682' 16 | cyan: '0x2aa198' 17 | white: '0xeee8d5' 18 | 19 | # Bright colors 20 | bright: 21 | black: '0x002b36' 22 | red: '0xcb4b16' 23 | green: '0x586e75' 24 | yellow: '0x657b83' 25 | blue: '0x839496' 26 | magenta: '0x6c71c4' 27 | cyan: '0x93a1a1' 28 | white: '0xfdf6e3' -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/taerminal.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Taerminal) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x26282a' 6 | foreground: '0xf0f0f0' 7 | cursor: 8 | background: '0xf0f0f0' 9 | foreground: '0x26282a' 10 | 11 | # Normal colors 12 | normal: 13 | black: '0x26282a' 14 | red: '0xff8878' 15 | green: '0xb4fb73' 16 | yellow: '0xfffcb7' 17 | blue: '0x8bbce5' 18 | magenta: '0xffb2fe' 19 | cyan: '0xa2e1f8' 20 | white: '0xf1f1f1' 21 | 22 | # Bright colors 23 | bright: 24 | black: '0x6f6f6f' 25 | red: '0xfe978b' 26 | green: '0xd6fcba' 27 | yellow: '0xfffed5' 28 | blue: '0xc2e3ff' 29 | magenta: '0xffc6ff' 30 | cyan: '0xc0e9f8' 31 | white: '0xffffff' -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/tango_dark.yaml: -------------------------------------------------------------------------------- 1 | # GNOME Terminal Tango Dark 2 | colors: 3 | primary: 4 | background: '0x2e3436' 5 | foreground: '0xd3d7cf' 6 | 7 | normal: 8 | black: '0x2e3436' 9 | red: '0xcc0000' 10 | green: '0x4e9a06' 11 | yellow: '0xc4a000' 12 | blue: '0x3465a4' 13 | magenta: '0x75507b' 14 | cyan: '0x06989a' 15 | white: '0xd3d7cf' 16 | 17 | bright: 18 | black: '0x555753' 19 | red: '0xef2929' 20 | green: '0x8ae234' 21 | yellow: '0xfce94f' 22 | blue: '0x729fcf' 23 | magenta: '0xad7fa8' 24 | cyan: '0x34e2e2' 25 | white: '0xeeeeec' 26 | 27 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/tender.yaml: -------------------------------------------------------------------------------- 1 | colors: 2 | # Default colors 3 | primary: 4 | background: '0x282828' 5 | foreground: '0xeeeeee' 6 | 7 | # Normal colors 8 | normal: 9 | black: '0x282828' 10 | red: '0xf43753' 11 | green: '0xc9d05c' 12 | yellow: '0xffc24b' 13 | blue: '0xb3deef' 14 | magenta: '0xd3b987' 15 | cyan: '0x73cef4' 16 | white: '0xeeeeee' 17 | 18 | # Bright colors 19 | bright: 20 | black: '0x4c4c4c' 21 | red: '0xf43753' 22 | green: '0xc9d05c' 23 | yellow: '0xffc24b' 24 | blue: '0xb3deef' 25 | magenta: '0xd3b987' 26 | cyan: '0x73cef4' 27 | white: '0xfeffff' 28 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/terminal_app.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Terminal.app) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x000000' 6 | foreground: '0xb6b6b6' 7 | 8 | # Normal colors 9 | normal: 10 | black: '0x000000' 11 | red: '0x990000' 12 | green: '0x00a600' 13 | yellow: '0x999900' 14 | blue: '0x0000b2' 15 | magenta: '0xb200b2' 16 | cyan: '0x00a6b2' 17 | white: '0xbfbfbf' 18 | 19 | # Bright colors 20 | bright: 21 | black: '0x666666' 22 | red: '0xe50000' 23 | green: '0x00d900' 24 | yellow: '0xe5e500' 25 | blue: '0x0000ff' 26 | magenta: '0xe500e5' 27 | cyan: '0x00e5e5' 28 | white: '0xe5e5e5' -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/thelovelace.yaml: -------------------------------------------------------------------------------- 1 | colors: 2 | # Default colors 3 | primary: 4 | background: '0x1D1F28' 5 | foreground: '0xFDFDFD' 6 | 7 | # Normal colors 8 | normal: 9 | # Bright colors 10 | black: '0x282A36' 11 | red: '0xF37F97' 12 | green: '0x5ADECD' 13 | yellow: '0xF2A272' 14 | blue: '0x8897F4' 15 | magenta: '0xC574DD' 16 | cyan: '0x79E6F3' 17 | white: '0xFDFDFD' 18 | bright: 19 | black: '0x414458' 20 | red: '0xFF4971' 21 | green: '0x18E3C8' 22 | yellow: '0xEBCB8B' 23 | blue: '0xFF8037' 24 | magenta: '0x556FFF' 25 | cyan: '0x3FDCEE' 26 | white: '0xBEBEC1' 27 | indexed_colors: [] 28 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/tokyo-night-storm.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Tokyo Night: Storm variant) 2 | # Source: https://github.com/zatchheems/tokyo-night-alacritty-theme 3 | colors: 4 | # Default colors 5 | primary: 6 | background: '0x24283b' 7 | foreground: '0xa9b1d6' 8 | 9 | # Normal colors 10 | normal: 11 | black: '0x32344a' 12 | red: '0xf7768e' 13 | green: '0x9ece6a' 14 | yellow: '0xe0af68' 15 | blue: '0x7aa2f7' 16 | magenta: '0xad8ee6' 17 | cyan: '0x449dab' 18 | white: '0x9699a8' 19 | 20 | # Bright colors 21 | bright: 22 | black: '0x444b6a' 23 | red: '0xff7a93' 24 | green: '0xb9f27c' 25 | yellow: '0xff9e64' 26 | blue: '0x7da6ff' 27 | magenta: '0xbb9af7' 28 | cyan: '0x0db9d7' 29 | white: '0xacb0d0' 30 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/tokyo-night.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Tokyo Night) 2 | # Source: https://github.com/zatchheems/tokyo-night-alacritty-theme 3 | colors: 4 | # Default colors 5 | primary: 6 | background: '0x1a1b26' 7 | foreground: '0xa9b1d6' 8 | 9 | # Normal colors 10 | normal: 11 | black: '0x32344a' 12 | red: '0xf7768e' 13 | green: '0x9ece6a' 14 | yellow: '0xe0af68' 15 | blue: '0x7aa2f7' 16 | magenta: '0xad8ee6' 17 | cyan: '0x449dab' 18 | white: '0x787c99' 19 | 20 | # Bright colors 21 | bright: 22 | black: '0x444b6a' 23 | red: '0xff7a93' 24 | green: '0xb9f27c' 25 | yellow: '0xff9e64' 26 | blue: '0x7da6ff' 27 | magenta: '0xbb9af7' 28 | cyan: '0x0db9d7' 29 | white: '0xacb0d0' 30 | -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/tomorrow_night.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Tomorrow Night) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x1d1f21' 6 | foreground: '0xc5c8c6' 7 | 8 | # Colors the cursor will use if `custom_cursor_colors` is true 9 | cursor: 10 | text: '0x1d1f21' 11 | cursor: '0xffffff' 12 | 13 | # Normal colors 14 | normal: 15 | black: '0x1d1f21' 16 | red: '0xcc6666' 17 | green: '0xb5bd68' 18 | yellow: '0xe6c547' 19 | blue: '0x81a2be' 20 | magenta: '0xb294bb' 21 | cyan: '0x70c0ba' 22 | white: '0x373b41' 23 | 24 | # Bright colors 25 | bright: 26 | black: '0x666666' 27 | red: '0xff3334' 28 | green: '0x9ec400' 29 | yellow: '0xf0c674' 30 | blue: '0x81a2be' 31 | magenta: '0xb77ee0' 32 | cyan: '0x54ced6' 33 | white: '0x282a2e' -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/tomorrow_night_bright.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Tomorrow Night Bright) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x000000' 6 | foreground: '0xeaeaea' 7 | 8 | # Normal colors 9 | normal: 10 | black: '0x000000' 11 | red: '0xd54e53' 12 | green: '0xb9ca4a' 13 | yellow: '0xe6c547' 14 | blue: '0x7aa6da' 15 | magenta: '0xc397d8' 16 | cyan: '0x70c0ba' 17 | white: '0x424242' 18 | 19 | # Bright colors 20 | bright: 21 | black: '0x666666' 22 | red: '0xff3334' 23 | green: '0x9ec400' 24 | yellow: '0xe7c547' 25 | blue: '0x7aa6da' 26 | magenta: '0xb77ee0' 27 | cyan: '0x54ced6' 28 | white: '0x2a2a2a' -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/wombat.yaml: -------------------------------------------------------------------------------- 1 | # Colors (Wombat) 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x1f1f1f' 6 | foreground: '0xe5e1d8' 7 | 8 | # Normal colors 9 | normal: 10 | black: '0x000000' 11 | red: '0xf7786d' 12 | green: '0xbde97c' 13 | yellow: '0xefdfac' 14 | blue: '0x6ebaf8' 15 | magenta: '0xef88ff' 16 | cyan: '0x90fdf8' 17 | white: '0xe5e1d8' 18 | 19 | # Bright colors 20 | bright: 21 | black: '0xb4b4b4' 22 | red: '0xf99f92' 23 | green: '0xe3f7a1' 24 | yellow: '0xf2e9bf' 25 | blue: '0xb3d2ff' 26 | magenta: '0xe5bdff' 27 | cyan: '0xc2fefa' 28 | white: '0xffffff' -------------------------------------------------------------------------------- /backup/alacritty/.config/alacritty/themes/xterm.yaml: -------------------------------------------------------------------------------- 1 | # XTerm's default colors 2 | colors: 3 | # Default colors 4 | primary: 5 | background: '0x000000' 6 | foreground: '0xffffff' 7 | # Normal colors 8 | normal: 9 | black: '0x000000' 10 | red: '0xcd0000' 11 | green: '0x00cd00' 12 | yellow: '0xcdcd00' 13 | blue: '0x0000ee' 14 | magenta: '0xcd00cd' 15 | cyan: '0x00cdcd' 16 | white: '0xe5e5e5' 17 | 18 | # Bright colors 19 | bright: 20 | black: '0x7f7f7f' 21 | red: '0xff0000' 22 | green: '0x00ff00' 23 | yellow: '0xffff00' 24 | blue: '0x5c5cff' 25 | magenta: '0xff00ff' 26 | cyan: '0x00ffff' 27 | white: '0xffffff' 28 | -------------------------------------------------------------------------------- /backup/miscellaneous/recursive-code-config/config.yaml: -------------------------------------------------------------------------------- 1 | # Configure your own custom Rec Mono for Code font 2 | 3 | # 4 | # /$$$$$$ /$$ 5 | # /$$ / / / $$$ 6 | # /$$$$$$$ /$$$$$$$ /$$ $$$$$ /$$$$$$$$$ /$$$$$ /$$$$$$$ / 7 | # /$$_____/ /$$____ $$ | $$$___ $$ |___ $$__/ |___ $$ /$$ $$ 8 | # | $$ | $$ | $$ | $$ | $$ | $$ | $$ \ $$$$$$$ 9 | # | $$ | $$ | $$ | $$ | $$ | $$ | $$ \ $$ / 10 | # \ $$$$$$$ \ $$$$$$$ | $$ | $$ /$$$$$$$$$ /$$$$$$$$$ / $$$$$$$$ 11 | # \_______/ \_______/ |__/ |__/ |_________/ |_________/ | $$ $$ 12 | # \ $$$$$$$$ 13 | # \_______/ 14 | # 15 | 16 | # ----------------------------------------------------------------------------- 17 | # Family Name 18 | 19 | # The name you want after "Rec Mono" in your custom fonts. 20 | # Example: "Custom" will yield the family "Rec Mono Custom". 21 | # Keep under 13 characters in length to avoid potential OS bugs. 22 | 23 | Family Name: Wang 24 | 25 | # ----------------------------------------------------------------------------- 26 | # Font Styles 27 | 28 | # The variable axis values for the Regular, Italic, Bold, & Bold Italic fonts. 29 | # See https://recursive.design for more information on these. 30 | 31 | # MONO: 0 for Sans, 1 for Mono (or anything in-between) 32 | # CASL: 0 for Linear, 1 for Casual (or anything in-between) 33 | # wght: 300–1000 (realistically, about 400 for Regular & Italic and about 700 for Bold & Bold Italic) 34 | # slnt: 0 to -15 (negative numbers are more slanted, and approximately equal to degrees of slope) 35 | # CRSV: 0 (0 for Roman, 1 for Cursive) 36 | 37 | Fonts: 38 | Regular: 39 | MONO: 1 40 | CASL: 0.72 41 | wght: 500 42 | slnt: 0 43 | CRSV: 1 44 | 45 | Italic: 46 | MONO: 1 47 | CASL: 1 48 | wght: 500 49 | slnt: -10 50 | CRSV: 1 51 | 52 | Bold: 53 | MONO: 1 54 | CASL: 0.72 55 | wght: 750 56 | slnt: 0 57 | CRSV: 0 58 | 59 | Bold Italic: 60 | MONO: 1 61 | CASL: 1 62 | wght: 750 63 | slnt: -10 64 | CRSV: 1 65 | 66 | # ----------------------------------------------------------------------------- 67 | # Font Features 68 | 69 | # Freeze in code ligatures? True or False 70 | Code Ligatures: True 71 | 72 | # Include font features to freeze in stylistic options. Copy them below to use. 73 | # See README for details. 74 | 75 | # These options only have an affect at CRSV<=0.5 (Roman/normal styles) 76 | # ss01 # Single-story a 77 | # ss02 # Single-story g 78 | # ss03 # Simplified f 79 | # ss04 # Simplified i ### NOT CURRENTLY WORKING, see issue #4 80 | # ss05 # Simplified l 81 | # ss06 # Simplified r 82 | 83 | # These options affect both Roman & Cursive styles 84 | # ss07 # Simplified italic diagonals (kwxyz) ### NOT CURRENTLY WORKING, see issue #4 85 | # ss08 # No-serif L and Z 86 | # ss09 # Simplified 6 and 9 87 | # ss10 # Dotted 0 88 | # ss11 # Simplified 1 89 | # ss12 # Simplified @ 90 | 91 | # NOTE: 92 | # Only Sylistic Set features are recommended below. 93 | # Some features (especially "case") will disrupt code ligatures. 94 | # See Issue #20 for more details. 95 | 96 | # If you want to turn off all features, you can specify an empty array in YAML like this: 97 | # Features: [] 98 | 99 | # (Keep the hyphen before each list item) 100 | # The quick brown fox jumps over the lazy dog 101 | # THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG 102 | Features: 103 | - ss01 # Single-story a 104 | - ss02 # Single-story g 105 | - ss03 # Simplified f 106 | - ss04 # Simplified i 107 | - ss05 # Simplified l 108 | - ss06 # Simplified r 109 | # - ss07 # Simplified italic diagonals (kwxyz) 110 | - ss08 # Serifless L and Z 111 | - ss09 # Simplified 6 and 9 112 | # - ss10 # Dotted 0 113 | - ss11 # Simplified 1 114 | - ss12 # Simplified @ 115 | - titl 116 | # That’s it! See README for next steps. 117 | # 118 | -------------------------------------------------------------------------------- /backup/repro.lua: -------------------------------------------------------------------------------- 1 | -- DO NOT change the paths and don't remove the colorscheme 2 | local root = vim.fn.fnamemodify("./.repro", ":p") 3 | 4 | -- set stdpaths to use .repro 5 | for _, name in ipairs({ "config", "data", "state", "cache" }) do 6 | vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name 7 | end 8 | 9 | -- bootstrap lazy 10 | local lazypath = root .. "/plugins/lazy.nvim" 11 | if not vim.loop.fs_stat(lazypath) then 12 | vim.fn.system({ 13 | "git", 14 | "clone", 15 | "--filter=blob:none", 16 | "--single-branch", 17 | "https://github.com/folke/lazy.nvim.git", 18 | lazypath, 19 | }) 20 | end 21 | vim.opt.runtimepath:prepend(lazypath) 22 | 23 | -- install plugins 24 | vim.keymap.set("n", "e", "(x-file-explorer)", { silent = true }) 25 | local M = { 26 | "nvim-telescope/telescope.nvim", 27 | dependencies = { 28 | "nvim-lua/plenary.nvim", 29 | "nvim-telescope/telescope-ui-select.nvim", 30 | "nvim-treesitter/nvim-treesitter", 31 | }, 32 | config = function() 33 | local bufopts = { noremap = true, silent = true } 34 | local builtin = require("telescope.builtin") 35 | vim.keymap.set("n", "gb", function() 36 | builtin.git_bcommits({ 37 | git_command = { 38 | "git", 39 | "log", 40 | -- "--pretty=oneline", 41 | -- "--abbrev-commit", 42 | "--date=format:%y/%m/%d", 43 | "--pretty=format:%C(auto) %h %ad %s", 44 | "--follow", 45 | }, 46 | }) 47 | end, bufopts) 48 | vim.keymap.set("n", "gj", builtin.git_bcommits, bufopts) 49 | 50 | require("telescope").setup({}) 51 | end, 52 | } 53 | local plugins = { 54 | M, 55 | } 56 | require("lazy").setup(plugins, { 57 | root = root .. "/plugins", 58 | }) 59 | -------------------------------------------------------------------------------- /backup/zsh/.config/zsh/config.linux.zsh: -------------------------------------------------------------------------------- 1 | alias j='sudo journalctl' 2 | alias s='sudo systemctl' 3 | alias i='sudo apt install' 4 | if hash apt 2>/dev/null; then 5 | alias i='sudo apt install' 6 | elif hash pacman 2>/dev/null; then 7 | alias i='sudo pacman -S' 8 | fi 9 | 10 | alias ts='sudo tailscale' 11 | -------------------------------------------------------------------------------- /backup/zsh/.config/zsh/config.macos.zsh: -------------------------------------------------------------------------------- 1 | # homebrew 2 | export HOMEBREW_NO_AUTO_UPDATE=1 3 | export HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK=1 4 | 5 | alias i='brew install' 6 | alias ic='brew cask install' 7 | alias dnsm='sudo brew services restart dnsmasq' 8 | alias tailscale="/Applications/Tailscale.app/Contents/MacOS/Tailscale" 9 | alias ts="sudo /Applications/Tailscale.app/Contents/MacOS/Tailscale" 10 | -------------------------------------------------------------------------------- /backup/zsh/.config/zsh/config.toml: -------------------------------------------------------------------------------- 1 | # Inserts a blank line between shell prompts 2 | add_newline = true 3 | command_timeout = 1000 4 | 5 | [directory] 6 | truncation_length = 0 7 | truncate_to_repo = false 8 | 9 | [git_branch] 10 | format = "[$branch]($style) " 11 | # format = "[$symbol$branch]($style) " 12 | 13 | [golang] 14 | format = "[$symbol()]($style)" 15 | disabled = true 16 | 17 | [cmd_duration] 18 | format = "[$duration]($style) " 19 | min_time = 3_000 20 | 21 | [character] 22 | success_symbol = "[Δ](bold green)" 23 | error_symbol = "[✘](bold red)" 24 | vicmd_symbol = "[Ε](bold blue) " 25 | 26 | [username] 27 | style_user = "yellow bold" 28 | style_root = "black bold" 29 | format = "[$user@]($style)" 30 | disabled = false 31 | 32 | [hostname] 33 | ssh_only = true 34 | format = "[$hostname](bold yellow) " 35 | disabled = false 36 | 37 | [git_status] 38 | format = '([\[$conflicted$deleted$renamed$modified$staged$untracked\]]($style))' 39 | conflicted = '!' 40 | 41 | [package] 42 | disabled = true 43 | 44 | [gcloud] 45 | disabled = true 46 | 47 | [aws] 48 | disabled = true 49 | 50 | [dotnet] 51 | disabled = true 52 | 53 | [lua] 54 | disabled = true 55 | 56 | [docker_context] 57 | disabled = true 58 | -------------------------------------------------------------------------------- /backup/zsh/.config/zsh/config.wsl.zsh: -------------------------------------------------------------------------------- 1 | alias ts='sudo tailscale' 2 | -------------------------------------------------------------------------------- /backup/zsh/.config/zsh/zinit.zsh: -------------------------------------------------------------------------------- 1 | 2 | export ZINIT_PATH="$HOME/.zinit/bin" 3 | 4 | 5 | 6 | # ================================================================== 7 | # Install zinit if not exist 8 | # ================================================================== 9 | if [ ! -f "$ZINIT_PATH/zinit.zsh" ]; then 10 | echo "Installing zinit ..." 11 | [ ! -d "$ZINIT_PATH" ] && mkdir -p "$ZINIT" 2> /dev/null 12 | if [ -x "$(which git)" ]; then 13 | setpx 14 | git clone https://github.com/zdharma/zinit.git $ZINIT_PATH 15 | else 16 | echo "ERROR: please install git before installation !!" 17 | exit 1 18 | fi 19 | if [ ! $? -eq 0 ]; then 20 | echo "" 21 | echo "ERROR: downloading zinit failed !!" 22 | exit 1 23 | fi; 24 | # zplug install 25 | fi 26 | 27 | # ================================================================== 28 | # source zplug 29 | # ================================================================== 30 | source "$ZINIT_PATH/zinit.zsh" 31 | 32 | 33 | # ================================================================== 34 | # claim plugins 35 | # ================================================================== 36 | zinit light jocelynmallon/zshmarks 37 | zinit light mafredri/zsh-async 38 | # zinit light zdharma/fast-syntax-highlighting 39 | zinit light zsh-users/zsh-autosuggestions 40 | zinit light zsh-users/zsh-syntax-highlighting 41 | 42 | # If completion is needed, de-comment lines below. 43 | # this will add 200ms loading time. 44 | # zinit ice wait lucid atload"zicompinit" 45 | # zinit light zsh-users/zsh-completions 46 | 47 | # https://medium.com/@dannysmith/little-thing-2-speeding-up-zsh-f1860390f92 48 | autoload -Uz compinit 49 | for dump in ~/.zcompdump(N.mh+24); do 50 | compinit 51 | done 52 | compinit -C 53 | 54 | # ================================================================== 55 | # update zinit, only run update or first install 56 | # ================================================================== 57 | # zinit self-update 58 | 59 | # ================================================================== 60 | # plugin config 61 | # ================================================================== 62 | 63 | # ZSH_AUTOSUGGEST 64 | ZSH_AUTOSUGGEST_USE_ASYNC=1 65 | ZSH_HIGHLIGHT_STYLES[comment]=fg=245 66 | -------------------------------------------------------------------------------- /backup/zsh/.fzf.zsh: -------------------------------------------------------------------------------- 1 | # Key bindings 2 | # ------------ 3 | if [[ $- == *i* ]]; then 4 | 5 | # CTRL-T - Paste the selected file path(s) into the command line 6 | __fsel() { 7 | local cmd="${FZF_CTRL_T_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \ 8 | -o -type f -print \ 9 | -o -type d -print \ 10 | -o -type l -print 2> /dev/null | cut -b3-"}" 11 | setopt localoptions pipefail no_aliases 2> /dev/null 12 | eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_CTRL_T_OPTS" $(__fzfcmd) -m "$@" | while read item; do 13 | echo -n "${(q)item} " 14 | done 15 | local ret=$? 16 | echo 17 | return $ret 18 | } 19 | 20 | __fzf_use_tmux__() { 21 | [ -n "$TMUX_PANE" ] && [ "${FZF_TMUX:-0}" != 0 ] && [ ${LINES:-40} -gt 15 ] 22 | } 23 | 24 | __fzfcmd() { 25 | __fzf_use_tmux__ && 26 | echo "fzf-tmux -d${FZF_TMUX_HEIGHT:-40%}" || echo "fzf" 27 | } 28 | 29 | fzf-file-widget() { 30 | LBUFFER="${LBUFFER}$(__fsel)" 31 | local ret=$? 32 | zle reset-prompt 33 | return $ret 34 | } 35 | zle -N fzf-file-widget 36 | bindkey '^T' fzf-file-widget 37 | 38 | # Ensure precmds are run after cd 39 | fzf-redraw-prompt() { 40 | local precmd 41 | for precmd in $precmd_functions; do 42 | $precmd 43 | done 44 | zle reset-prompt 45 | } 46 | zle -N fzf-redraw-prompt 47 | 48 | # ALT-C - cd into the selected directory 49 | fzf-cd-widget() { 50 | local cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \ 51 | -o -type d -print 2> /dev/null | cut -b3-"}" 52 | setopt localoptions pipefail no_aliases 2> /dev/null 53 | local dir="$(eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_ALT_C_OPTS" $(__fzfcmd) +m)" 54 | if [[ -z "$dir" ]]; then 55 | zle redisplay 56 | return 0 57 | fi 58 | cd "$dir" 59 | unset dir # ensure this doesn't end up appearing in prompt expansion 60 | local ret=$? 61 | zle fzf-redraw-prompt 62 | return $ret 63 | } 64 | zle -N fzf-cd-widget 65 | bindkey '\ec' fzf-cd-widget 66 | 67 | # CTRL-R - Paste the selected command from history into the command line 68 | fzf-history-widget() { 69 | local selected num 70 | setopt localoptions noglobsubst noposixbuiltins pipefail no_aliases 2> /dev/null 71 | selected=( $(fc -rl 1 | 72 | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} $FZF_DEFAULT_OPTS -n2..,.. --tiebreak=index --bind=ctrl-r:toggle-sort $FZF_CTRL_R_OPTS --query=${(qqq)LBUFFER} +m" $(__fzfcmd)) ) 73 | local ret=$? 74 | if [ -n "$selected" ]; then 75 | num=$selected[1] 76 | if [ -n "$num" ]; then 77 | zle vi-fetch-history -n $num 78 | fi 79 | fi 80 | zle reset-prompt 81 | return $ret 82 | } 83 | zle -N fzf-history-widget 84 | bindkey '^R' fzf-history-widget 85 | 86 | fi 87 | -------------------------------------------------------------------------------- /backup/zsh/.zshrc: -------------------------------------------------------------------------------- 1 | export ZSH_CONF="$HOME/.config/zsh" 2 | 3 | # import from secret project 4 | _config_files=( 5 | "$ZSH_CONF/vanilla.zsh" 6 | "$ZSH_CONF/cc.zsh" 7 | ) 8 | 9 | for _config_file in $_config_files[@]; do 10 | [[ -f "${_config_file}" ]] && source "${_config_file}" 11 | done 12 | 13 | # system specified --- {{{ 14 | if [ "$(uname 2> /dev/null)" = "Linux" ]; then 15 | source "$ZSH_CONF/config.linux.zsh" 16 | if [ $"uname -r | grep -q 'Microsoft'" ]; # if in wsl 17 | then 18 | source "$ZSH_CONF/config.wsl.zsh" 19 | fi 20 | fi 21 | 22 | if [ "$(uname 2> /dev/null)" = "Darwin" ]; then 23 | source "$ZSH_CONF/config.macos.zsh" 24 | fi 25 | # --- }}} 26 | 27 | 28 | 29 | # starship --- {{{ 30 | export STARSHIP_CONFIG=$HOME/.config/zsh/config.toml 31 | if [ ! -f "`which starship`" ]; then 32 | echo "Installing starship ..." 33 | # setpx 34 | sh -c "$(curl -fsSL https://starship.rs/install.sh)" 35 | fi 36 | eval "$(starship init zsh)" 37 | 38 | # --- }}} 39 | 40 | 41 | 42 | # plugins --- {{{ 43 | export ZINIT_PATH="$HOME/.zinit/bin" 44 | 45 | if [ ! -f "$ZINIT_PATH/zinit.zsh" ]; then 46 | echo "Installing zinit ..." 47 | [ ! -d "$ZINIT_PATH" ] && mkdir -p "$ZINIT" 2> /dev/null 48 | if [ -x "$(which git)" ]; then 49 | # setpx 50 | git clone https://github.com/zdharma-continuum/zinit.git $ZINIT_PATH 51 | else 52 | echo "ERROR: please install git before installation !!" 53 | exit 1 54 | fi 55 | if [ ! $? -eq 0 ]; then 56 | echo "" 57 | echo "ERROR: downloading zinit failed !!" 58 | exit 1 59 | fi; 60 | fi 61 | 62 | source "$ZINIT_PATH/zinit.zsh" 63 | 64 | zinit light jocelynmallon/zshmarks 65 | zinit light mafredri/zsh-async 66 | # zinit light zdharma/fast-syntax-highlighting 67 | zinit light zsh-users/zsh-autosuggestions 68 | zinit light zsh-users/zsh-syntax-highlighting 69 | 70 | # If completion is needed, de-comment lines below. 71 | # this will add 200ms loading time. 72 | # zinit ice wait lucid atload"zicompinit" 73 | # zinit light zsh-users/zsh-completions 74 | 75 | # https://medium.com/@dannysmith/little-thing-2-speeding-up-zsh-f1860390f92 76 | autoload -Uz compinit 77 | for dump in ~/.zcompdump(N.mh+24); do 78 | compinit 79 | done 80 | compinit -C 81 | 82 | # update zinit, only run update or first install 83 | # zinit self-update 84 | 85 | # ZSH_AUTOSUGGEST 86 | ZSH_AUTOSUGGEST_USE_ASYNC=1 87 | ZSH_HIGHLIGHT_STYLES[comment]=fg=245 88 | 89 | # put these 2 lines at the end of plugins settings 90 | autoload -Uz _zinit 91 | (( ${+_comps} )) && _comps[zinit]=_zinit 92 | 93 | # --- }}} 94 | 95 | 96 | 97 | # must be end --- {{{ 98 | 99 | # # fzf 100 | export FZF_DEFAULT_OPTS='--height 60% --layout=reverse --border' 101 | export FZF_COMPLETION_TRIGGER='ll' 102 | _fzf_compgen_dir() { 103 | fd --type d --hidden --follow . "$HOME/code" 104 | } 105 | [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh 106 | 107 | # z.lua 108 | export _ZL_MATCH_MODE=1 109 | export _ZL_CMD=z 110 | export _ZL_ADD_ONCE=1 111 | eval "$(lua $ZSH_CONF/z.lua --init zsh)" # once enhanced)" 112 | 113 | # --- }} 114 | 115 | -------------------------------------------------------------------------------- /bash/.bash_profile: -------------------------------------------------------------------------------- 1 | # path 2 | _enabled_paths=( 3 | "/usr/local/go/bin" 4 | "/usr/sbin" 5 | "/usr/local" 6 | "/usr/local/bin" 7 | "/usr/local/sbin" 8 | "$HOME/code/go/bin" 9 | ) 10 | 11 | for _enabled_path in ${_enabled_paths[@]}; do 12 | # only add to $PATH when path exist and path not in $PATH 13 | [[ ! :$PATH: == *":${_enabled_path}:"* ]] && 14 | PATH="$PATH:${_enabled_path}" 15 | done 16 | 17 | # alias 18 | alias .='cd .' 19 | alias ..='cd ..' 20 | alias ...='cd ../..' 21 | alias ....='cd ../../..' 22 | alias .....='cd ../../../..' 23 | alias i='sudo apt install' 24 | alias ll='ls -al' 25 | alias s='sudo systemctl' 26 | alias j='sudo journalctl' 27 | alias d='docker' 28 | alias dc='docker compose' 29 | alias ts='sudo tailscale' 30 | alias vi=vim 31 | 32 | # settings 33 | export VISUAL=vim 34 | export EDITOR=vim 35 | # go env 36 | export GOPROXY=https://goproxy.cn 37 | export GOPATH=$HOME/code/go 38 | 39 | # prompt 40 | PS1_PROMPT() { 41 | local e=$? 42 | (( e )) && printf "\033[0;31m $e> \033[0m\n" || printf "$ " 43 | return $e 44 | } 45 | PS1='\[\e[0m\]\u@\h:\w\[\e[0m\]' 46 | PS1="$PS1"'$(PS1_PROMPT)' 47 | 48 | # functions 49 | mc() { 50 | mkdir -p -- "$1" && cd -P -- "$1" 51 | } 52 | 53 | extract() { 54 | if [ -f $1 ]; then 55 | case $1 in 56 | *.tar.bz2) tar xjf $1 ;; 57 | *.tar.gz) tar xzf $1 ;; 58 | *.tar.xz) tar xf $1 ;; 59 | *.bz2) bunzip2 $1 ;; 60 | *.rar) unrar e $1 ;; 61 | *.gz) gunzip $1 ;; 62 | *.tar) tar xf $1 ;; 63 | *.tbz2) tar xjf $1 ;; 64 | *.tgz) tar xzf $1 ;; 65 | *.zip) unzip $1 ;; 66 | *.Z) uncompress $1 ;; 67 | *.7z) 7z x $1 ;; 68 | *) echo "'$1' cannot be extracted via extract()" ;; 69 | esac 70 | else 71 | echo "'$1' is not a valid file" 72 | fi 73 | } 74 | 75 | set_timezone() { 76 | sudo timedatectl set-timezone Asia/Shanghai 77 | } 78 | 79 | add_no_login_user() { 80 | sudo groupadd $1 81 | sudo useradd --system \ 82 | --gid $1 \ 83 | --create-home \ 84 | --home-dir /var/lib/$1 \ 85 | --shell /usr/sbin/nologin \ 86 | $1 87 | } 88 | 89 | add_user() { 90 | sudo groupadd $1 91 | sudo useradd \ 92 | --gid $1 93 | $1 94 | 95 | usermod -aG sudo $1 96 | } 97 | 98 | install_docker() { 99 | curl -fsSL https://get.docker.com -o get-docker.sh 100 | 101 | sudo sh get-docker.sh 102 | 103 | sudo groupadd docker 104 | sudo usermod -aG docker $USER 105 | 106 | newgrp docker 107 | docker info 108 | } 109 | 110 | install_tailscale() { 111 | curl -fsSL https://tailscale.com/install.sh | sh 112 | } 113 | -------------------------------------------------------------------------------- /data/.data/.golangci-strict.yml: -------------------------------------------------------------------------------- 1 | run: 2 | # timeout for analysis, e.g. 30s, 5m, default is 1m 3 | timeout: 10m 4 | skip-dirs: 5 | - static 6 | skip-dirs-use-default: true 7 | 8 | output: 9 | # colored-line-number|line-number|json|tab|checkstyle|code-climate|junit-xml|github-actions 10 | # default is "colored-line-number" 11 | # format: checkstyle 12 | 13 | linters: 14 | enable: 15 | - goimports 16 | - gosec 17 | # 严格模式额外的 18 | - revive 19 | - depguard 20 | - gocognit 21 | - goconst 22 | - gofmt 23 | - misspell 24 | 25 | linters-settings: 26 | govet: 27 | # report about shadowed variables 28 | check-shadowing: true 29 | 30 | issues: 31 | # don't report shadowed variables of err and ctx 32 | exclude: 33 | - 'declaration of "err" shadows declaration at' 34 | 35 | -------------------------------------------------------------------------------- /data/.data/.golangci.yml: -------------------------------------------------------------------------------- 1 | run: 2 | # timeout for analysis, e.g. 30s, 5m, default is 1m 3 | timeout: 10m 4 | skip-dirs: 5 | - static 6 | skip-dirs-use-default: true 7 | 8 | output: 9 | # colored-line-number|line-number|json|tab|checkstyle|code-climate|junit-xml|github-actions 10 | # default is "colored-line-number" 11 | # format: checkstyle 12 | 13 | linters: 14 | enable: 15 | - goimports 16 | - gosec 17 | - gomodguard 18 | 19 | linters-settings: 20 | govet: 21 | # report about shadowed variables 22 | check-shadowing: true 23 | gomodguard: 24 | blocked: 25 | # modules: 26 | # - go.mongodb.org/mongo-driver: 27 | versions: 28 | - go.mongodb.org/mongo-driver: 29 | # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons. 30 | version: ">= 1.11.0" 31 | reason: "From v1.11.0, the Go driver now requires MongoDB 3.6 or newer, https://github.com/mongodb/mongo-go-driver/releases/tag/v1.11.0" 32 | 33 | issues: 34 | # don't report shadowed variables of err and ctx 35 | exclude: 36 | - 'declaration of "err" shadows declaration at' 37 | -------------------------------------------------------------------------------- /fd/.config/fd/ignore: -------------------------------------------------------------------------------- 1 | .git 2 | .DS_Store 3 | /Users/taiga/code/go/pkg/ 4 | /home/taiga/code/go/pkg/ 5 | -------------------------------------------------------------------------------- /fish/.config/fish/starship.toml: -------------------------------------------------------------------------------- 1 | # Inserts a blank line between shell prompts 2 | add_newline = true 3 | command_timeout = 1000 4 | 5 | [directory] 6 | truncation_length = 0 7 | truncate_to_repo = false 8 | 9 | [git_branch] 10 | format = "[$branch]($style) " 11 | # format = "[$symbol$branch]($style) " 12 | 13 | [golang] 14 | format = "[$symbol()]($style)" 15 | disabled = true 16 | 17 | [cmd_duration] 18 | format = "[$duration]($style) " 19 | min_time = 3_000 20 | 21 | [character] 22 | success_symbol = "[Δ](bold green)" 23 | error_symbol = "[✘](bold red)" 24 | vicmd_symbol = "[Ε](bold blue) " 25 | 26 | [username] 27 | style_user = "yellow bold" 28 | style_root = "black bold" 29 | format = "[$user@]($style)" 30 | disabled = false 31 | 32 | [hostname] 33 | ssh_only = true 34 | format = "[$hostname](bold yellow) " 35 | disabled = false 36 | 37 | [git_status] 38 | format = '([\[$conflicted$deleted$renamed$modified$staged$untracked\]]($style))' 39 | conflicted = '!' 40 | 41 | [package] 42 | disabled = true 43 | 44 | [gcloud] 45 | disabled = true 46 | 47 | [aws] 48 | disabled = true 49 | 50 | [dotnet] 51 | disabled = true 52 | 53 | [lua] 54 | disabled = true 55 | 56 | [docker_context] 57 | disabled = true 58 | -------------------------------------------------------------------------------- /gitui/.config/gitui/key_bindings.ron: -------------------------------------------------------------------------------- 1 | // Note: 2 | // If the default key layout is lower case, 3 | // and you want to use `Shift + q` to trigger the exit event, 4 | // the setting should like this `exit: Some(( code: Char('Q'), modifiers: "SHIFT")),` 5 | // The Char should be upper case, and the modifier should be set to "SHIFT". 6 | // 7 | // Note: 8 | // find `KeysList` type in src/keys/key_list.rs for all possible keys. 9 | // every key not overwritten via the config file will use the default specified there 10 | ( 11 | open_help: Some(( code: F(1), modifiers: "")), 12 | 13 | move_left: Some(( code: Char('h'), modifiers: "")), 14 | move_right: Some(( code: Char('l'), modifiers: "")), 15 | move_up: Some(( code: Char('k'), modifiers: "")), 16 | move_down: Some(( code: Char('j'), modifiers: "")), 17 | 18 | popup_up: Some(( code: Char('p'), modifiers: "CONTROL")), 19 | popup_down: Some(( code: Char('n'), modifiers: "CONTROL")), 20 | page_up: Some(( code: Char('b'), modifiers: "CONTROL")), 21 | page_down: Some(( code: Char('f'), modifiers: "CONTROL")), 22 | home: Some(( code: Char('g'), modifiers: "")), 23 | end: Some(( code: Char('G'), modifiers: "SHIFT")), 24 | shift_up: Some(( code: Char('K'), modifiers: "SHIFT")), 25 | shift_down: Some(( code: Char('J'), modifiers: "SHIFT")), 26 | 27 | edit_file: Some(( code: Char('I'), modifiers: "SHIFT")), 28 | 29 | // status_reset_item: Some(( code: Char('U'), modifiers: "SHIFT")), 30 | status_reset_item: Some(( code: Char('u'), modifiers: "")), 31 | 32 | // diff_reset_lines: Some(( code: Char('u'), modifiers: "")), 33 | diff_stage_lines: Some(( code: Char('s'), modifiers: "")), 34 | 35 | stashing_save: Some(( code: Char('w'), modifiers: "")), 36 | stashing_toggle_index: Some(( code: Char('m'), modifiers: "")), 37 | 38 | stash_open: Some(( code: Char('l'), modifiers: "")), 39 | 40 | abort_merge: Some(( code: Char('M'), modifiers: "SHIFT")), 41 | ) 42 | -------------------------------------------------------------------------------- /kitty/.config/kitty.conf: -------------------------------------------------------------------------------- 1 | font_family Input Regular 2 | font_size 14.0 3 | 4 | # # ref: https://github.com/yamatsum/nvim-nonicons#kitty 5 | # symbol_map U+f101-U+f208 nonicon 6 | 7 | cursor_shape block 8 | cursor_stop_blinking_after 5.0 9 | 10 | scrollback_lines 10000 11 | scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER 12 | scrollback_pager_history_size 0 13 | 14 | url_color #0087bd 15 | url_style curly 16 | copy_on_select yes 17 | sync_to_monitor yes 18 | initial_window_width 1280 19 | initial_window_height 700 20 | 21 | tab_bar_edge top 22 | tab_bar_margin_width 0 23 | tab_bar_min_tabs 1 24 | tab_bar_style fade 25 | tab_switch_strategy previous 26 | 27 | shell . 28 | editor nvim 29 | close_on_child_death no 30 | allow_remote_control no 31 | clipboard_control write-clipboard write-primary 32 | term xterm-256color 33 | 34 | macos_titlebar_color system 35 | macos_option_as_alt yes 36 | macos_window_resizable yes 37 | macos_show_window_title_in all 38 | 39 | enabled_layouts stack, tall 40 | # enabled_layouts tall 41 | 42 | map cmd+t launch --cwd=current --type=tab 43 | map cmd+shift+t set_tab_title 44 | map cmd+d launch --cwd=current --location=vsplit 45 | map cmd+shift+d launch --cwd=current --location=hsplit 46 | map cmd+[ previous_window 47 | map cmd+] next_window 48 | map cmd+shift+[ previous_tab 49 | map cmd+shift+] next_tab 50 | map cmd+shift+n goto_layout stack 51 | map cmd+shift+p goto_layout tall 52 | map cmd+shift+i next_layout 53 | map cmd+shift+k move_window up 54 | map cmd+shift+h move_window left 55 | map cmd+shift+l move_window right 56 | map cmd+shift+j move_window down 57 | map kitty_mod+cmd+shift+n move_tab_forward 58 | map kitty_mod+cmd+shift+p move_tab_backward 59 | map cmd+1 goto_tab 1 60 | map cmd+2 goto_tab 2 61 | map cmd+3 goto_tab 3 62 | map cmd+4 goto_tab 4 63 | map cmd+5 goto_tab 5 64 | map cmd+equal change_font_size all +2.0 65 | map cmd+plus change_font_size all +2.0 66 | map cmd+minus change_font_size all -2.0 67 | map cmd+0 change_font_size all 0 68 | # map cmd+k combine : clear_terminal scroll active : send_text normal,application \x0c 69 | map kitty_mod+h resize_window narrower 70 | map kitty_mod+l resize_window wider 71 | map kitty_mod+k resize_window taller 72 | map kitty_mod+j resize_window shorter 3 73 | 74 | include ${USER}.conf 75 | # include base16-classic-light-256.conf 76 | include moonfly.conf 77 | -------------------------------------------------------------------------------- /kitty/.config/moonfly.conf: -------------------------------------------------------------------------------- 1 | background #080808 2 | foreground #b2b2b2 3 | cursor #9e9e9e 4 | color0 #373c40 5 | color1 #ff5454 6 | color2 #8cc85f 7 | color3 #e3c78a 8 | color4 #80a0ff 9 | color5 #d183e8 10 | color6 #79dac8 11 | color7 #a1aab8 12 | color8 #7c8f8f 13 | color9 #ff5189 14 | color10 #36c692 15 | color11 #bfbf97 16 | color12 #78c2ff 17 | color13 #ae81ff 18 | color14 #85dc85 19 | color15 #e2637f 20 | selection_background #b2ceee 21 | selection_foreground #080808 22 | -------------------------------------------------------------------------------- /kitty/.config/taiga.conf: -------------------------------------------------------------------------------- 1 | font_size 14.0 2 | adjust_line_height 2 3 | cursor_blink_interval 1 4 | cursor #ff69b4 5 | cursor_text_color #eeeeee 6 | 7 | url_style double 8 | open_url_modifiers cmd 9 | inactive_text_alpha 0.75 10 | # hide_window_decorations titlebar-only 11 | tab_bar_style separator 12 | tab_separator " ┇ " 13 | dynamic_background_opacity yes 14 | 15 | window_border_width 2 16 | draw_minimal_borders no 17 | window_margin_width 0 18 | active_border_color #e5e5e5 19 | 20 | inactive_border_color #333333 21 | inactive_text_alpha 0.65 22 | 23 | macos_titlebar_color system 24 | macos_thicken_font 1 25 | 26 | map alt+c copy_to_clipboard 27 | map alt+v paste_from_clipboard 28 | -------------------------------------------------------------------------------- /lf/.config/lf/lfrc: -------------------------------------------------------------------------------- 1 | # interpreter for shell commands 2 | set shell sh 3 | 4 | # show border 5 | set drawbox 6 | 7 | # show hidden files 8 | set hidden false 9 | 10 | # use "a" as appending new directory 11 | cmd mkdir %{{ 12 | IFS=" " 13 | mkdir -p -- "$@" 14 | lf -remote "send $id select \"$@\"" 15 | }} 16 | map push :mkdir 17 | map a push :touch 18 | 19 | cmd touch %touch $1 && lf -remote "send $id load" && lf -remote "send $id select $1" 20 | cmd mkdir %mkdir -p $1 && lf -remote "send $id load" && lf -remote "send $id select $1" 21 | 22 | map trash 23 | 24 | # set '-eu' options for shell commands 25 | # These options are used to have safer shell commands. Option '-e' is used to 26 | # exit on error and option '-u' is used to give error for unset variables. 27 | # Option '-f' disables pathname expansion which can be useful when $f, $fs, and 28 | # $fx variables contain names with '*' or '?' characters. However, this option 29 | # is used selectively within individual commands as it can be limiting at 30 | # times. 31 | set shellopts '-eu' 32 | 33 | # set internal field separator (IFS) to "\n" for shell commands 34 | # This is useful to automatically split file names in $fs and $fx properly 35 | # since default file separator used in these variables (i.e. 'filesep' option) 36 | # is newline. You need to consider the values of these options and create your 37 | # commands accordingly. 38 | set ifs "\n" 39 | 40 | # leave some space at the top and the bottom of the screen 41 | set scrolloff 10 42 | 43 | # use enter for shell commands 44 | map shell 45 | 46 | # execute current file (must be executable) 47 | map x $$f 48 | map X !$f 49 | 50 | # dedicated keys for file opener actions 51 | map o &mimeopen $f 52 | map O $mimeopen --ask $f 53 | 54 | # define a custom 'open' command 55 | # This command is called when current file is not a directory. You may want to 56 | # use either file extensions and/or mime types here. Below uses an editor for 57 | # text files and a file opener for the rest. 58 | cmd open ${{ 59 | test -L $f && f=$(readlink -f $f) 60 | case $(file --mime-type $f -b) in 61 | text/*) $EDITOR $fx;; 62 | *) for f in $fx; do setsid $OPENER $f > /dev/null 2> /dev/null & done;; 63 | esac 64 | }} 65 | 66 | # define a custom 'rename' command without prompt for overwrite 67 | # cmd rename %[ -e $1 ] && printf "file exists" || mv $f $1 68 | # map r push :rename 69 | 70 | # make sure trash folder exists 71 | # %mkdir -p ~/.trash 72 | 73 | # move current file or selected files to trash folder 74 | # (also see 'man mv' for backup/overwrite options) 75 | cmd trash %set -f; mv $fx ~/.trash/ 76 | 77 | # define a custom 'delete' command 78 | cmd delete ${{ 79 | set -f 80 | printf "$fx\n" 81 | printf "delete?[y/n]" 82 | read ans 83 | [ $ans = "y" ] && rm -rf $fx 84 | }} 85 | 86 | # use '' key for either 'trash' or 'delete' command 87 | # map trash 88 | # map delete 89 | 90 | # extract the current file with the right command 91 | # (xkcd link: https://xkcd.com/1168/) 92 | cmd extract ${{ 93 | set -f 94 | case $f in 95 | *.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;; 96 | *.tar.gz|*.tgz) tar xzvf $f;; 97 | *.tar.xz|*.txz) tar xJvf $f;; 98 | *.zip) unzip $f;; 99 | *.rar) unrar x $f;; 100 | *.7z) 7z x $f;; 101 | esac 102 | }} 103 | 104 | # compress current file or selected files with tar and gunzip 105 | cmd tar ${{ 106 | set -f 107 | mkdir $1 108 | cp -r $fx $1 109 | tar czf $1.tar.gz $1 110 | rm -rf $1 111 | }} 112 | 113 | # compress current file or selected files with zip 114 | cmd zip ${{ 115 | set -f 116 | mkdir $1 117 | cp -r $fx $1 118 | zip -r $1.zip $1 119 | rm -rf $1 120 | }} 121 | -------------------------------------------------------------------------------- /local/.local/bin/clone: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | import re 5 | import os 6 | 7 | 8 | def main(): 9 | if len(sys.argv) == 1: 10 | sys.exit(0) 11 | elif len(sys.argv) == 2: 12 | clone(sys.argv[1]) 13 | 14 | 15 | def clone(url: str) -> None: 16 | host, org, repo = split_url(url) 17 | if host == "": 18 | print('no host') 19 | return None 20 | 21 | dir = get_dir() 22 | target = os.path.join(dir, host, org, repo) 23 | 24 | git_url = f"git@{host}:{org}/{repo}.git" 25 | cmd = f"git clone {git_url} {target}" 26 | print(cmd, flush=True) 27 | if os.path.exists(target): 28 | return 29 | run(cmd) 30 | 31 | 32 | def get_dir() -> str: 33 | directory = fetch("git config clone.directory") 34 | if directory == "": 35 | print( 36 | "Please set clone directory by 'git config --global clone.directory YOUR.PATH'" 37 | ) 38 | return "" 39 | 40 | if directory.startswith("$HOME"): 41 | directory = "~" + directory[len("$HOME") :] 42 | return os.path.expanduser(directory) 43 | 44 | 45 | def split_url(url: str) -> tuple[str, str, str]: 46 | # https://github.com/keaising/dotfile 47 | reg_ex = r"[a-zA-Z]+(@|://)(?P\w[\w\.\-]+)(:|/)(?P\w[\w\.\-\/]+)/(?P\w[\w\.\-]+)" 48 | if url.endswith("git"): 49 | # https://github.com/keaising/dotfile.git 50 | # git@github.com:keaising/dotfile.git 51 | reg_ex = r"[a-zA-Z]+(@|://)(?P\w[\w\.\-]+)(:|/)(?P\w[\w\.\-\/]+)/(?P\w[\w\.\-]+).git" 52 | result = re.match(reg_ex, url) 53 | if result is None: 54 | return "", "", "" 55 | return (result.group("host_name"), result.group("org"), result.group("repo")) 56 | 57 | 58 | def fetch(command: str) -> str: 59 | return os.popen(command).read().strip() 60 | 61 | 62 | def run(command: str) -> None: 63 | os.system(command) 64 | 65 | 66 | main() 67 | -------------------------------------------------------------------------------- /local/.local/bin/gl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import re 5 | import shutil 6 | import sys 7 | from platform import uname 8 | 9 | 10 | def main(): 11 | arg = "" 12 | if len(sys.argv) >= 2: 13 | arg = sys.argv[1] 14 | gitlab_open(arg) 15 | 16 | 17 | def gitlab_open(arg: str) -> None: 18 | if fetch("git rev-parse --is-inside-work-tree 2>/dev/null") != "true": 19 | print("not in git repo") 20 | sys.exit(0) 21 | 22 | host, org, repo = split_url(fetch("git config --get remote.origin.url")) 23 | if host == "": 24 | print("no host") 25 | return None 26 | 27 | url = f"https://{host}/{org}/{repo}" 28 | branch = fetch("git rev-parse --abbrev-ref HEAD 2>/dev/null") 29 | 30 | # merge link 31 | link_merge = f"{url}/-/merge_requests/new?merge_request[source_branch]={branch}" 32 | if branch == "master": 33 | link_merge = f"{link_merge}&merge_request[target_branch]=stage" 34 | 35 | for k, v in {"[": "%5B", "]": "%5D"}.items(): 36 | link_merge = link_merge.replace(k, v) 37 | 38 | # tree link 39 | link_tree = f"{url}/-/tree/{branch}" 40 | 41 | # commit id link 42 | commit_id = fetch("git rev-parse HEAD") 43 | link_commit_id = f"{url}/-/commit/{commit_id}" 44 | 45 | # pipeline link 46 | link_pipeline = f"{url}/-/pipelines" 47 | 48 | if host == "github.com": 49 | link_tree = f"{url}/tree/{branch}" 50 | link_commit_id = f"{url}/commit/{commit_id}" 51 | link_pipeline = f"{url}/actions" 52 | 53 | # concat url 54 | open_url = url 55 | match arg: 56 | case "-m": 57 | open_url = link_merge 58 | case "-p": 59 | open_url = link_pipeline 60 | case "-b": 61 | open_url = link_tree 62 | case "-c": 63 | open_url = link_commit_id 64 | case _: 65 | open_url = url 66 | 67 | # print and open 68 | # echo -e "\e]52;c;$(base64 <<< content)\a" 69 | match current_platform(): 70 | case "darwin": 71 | run(f"open '{open_url}'") 72 | case "wsl": 73 | # linux: run(f"echo '{open_url}' | xclip -selection clipboard -i") 74 | # wsl: run(f"echo '{open_url}' | clip.exe") 75 | # run(rf'''printf "\033]52;c;$(echo '{open_url}' | base64)\a"''') 76 | # print(open_url, flush=True) 77 | # You should install wslu manually first 78 | run(f"wslview '{open_url}'") 79 | case "linux": 80 | if shutil.which("xdg-open"): 81 | run(f"xdg-open '{open_url}' &> /dev/null 2>&1") 82 | else: 83 | print(open_url, flush=True) 84 | 85 | 86 | def split_url(url: str) -> tuple[str, str, str]: 87 | reg_ex = r"[a-zA-Z]+(@|://)(?P\w[\w\.\-]+)(:|/)(?P\w[\w\.\-\/]+)/(?P\w[\w\.\-]+)" 88 | if url.startswith("git"): 89 | reg_ex = r"[a-zA-Z]+(@|://)(?P\w[\w\.\-]+)(:|/)(?P\w[\w\.\-\/]+)/(?P\w[\w\.\-]+).git" 90 | result = re.match(reg_ex, url) 91 | if result is None: 92 | return "", "", "" 93 | return (result.group("host_name"), result.group("org"), result.group("repo")) 94 | 95 | 96 | def fetch(command: str) -> str: 97 | return os.popen(command).read().strip() 98 | 99 | 100 | def run(command: str) -> None: 101 | os.system(command) 102 | 103 | 104 | def current_platform() -> str: 105 | match sys.platform: 106 | case "darwin": 107 | return "darwin" 108 | case "linux": 109 | # WSL: 5.15.79.1-microsoft-standard-WSL2 110 | if "microsoft-standard" in uname().release: 111 | return "wsl" 112 | return "linux" 113 | return "unsupported" 114 | 115 | 116 | main() 117 | -------------------------------------------------------------------------------- /local/.local/bin/ins: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env fish 2 | 3 | function ins_nvim 4 | rm -rf ~/.local/bin/nvim 5 | sudo rm -f /usr/local/bin/nvim 6 | mkdir -p ~/.local/bin 7 | 8 | set -l WORKDIR "$(mktemp -d)" 9 | cd $WORKDIR 10 | 11 | set -l VERSION nightly 12 | [ $argv[1] ] && set -l VERSION $argv[1] 13 | 14 | set -l NVIM_FILE nvim-linux-x86_64 15 | [ (uname) != Linux ] && set -l NVIM_FILE nvim-macos-arm64 16 | wget https://github.com/neovim/neovim/releases/download/$VERSION/$NVIM_FILE.tar.gz 17 | tar -zxf $NVIM_FILE.tar.gz 18 | rm $NVIM_FILE.tar.gz 19 | mv $NVIM_FILE ~/.local/bin/nvim 20 | 21 | rm -r $WORKDIR 22 | 23 | sudo ln -s ~/.local/bin/nvim/bin/nvim /usr/local/bin/nvim 24 | nvim --version 25 | end 26 | 27 | function ins_gotools 28 | set -lx GOPROXY "https://goproxy.cn" 29 | set -lx GO111MODULE on 30 | 31 | go version 32 | echo $PWD 33 | # go env 34 | 35 | set -l REPOS \ 36 | golang.org/x/tools/gopls \ 37 | github.com/go-delve/delve/cmd/dlv \ 38 | github.com/haya14busa/goplay/cmd/goplay \ 39 | github.com/fatih/gomodifytags \ 40 | github.com/josharian/impl \ 41 | github.com/cweill/gotests/... \ 42 | honnef.co/go/tools/cmd/staticcheck \ 43 | github.com/golangci/golangci-lint/cmd/golangci-lint \ 44 | github.com/rinchsan/gosimports/cmd/gosimports \ 45 | github.com/segmentio/golines \ 46 | github.com/kisielk/errcheck \ 47 | golang.org/x/vuln/cmd/govulncheck 48 | 49 | for repo in $REPOS 50 | set -l run "go install $repo@latest" 51 | echo $run 52 | eval $run 53 | end 54 | 55 | end 56 | 57 | function main 58 | switch $argv[1] 59 | case nvim 60 | ins_nvim $argv[2..-1] 61 | case go gotools 62 | ins_gotools 63 | end 64 | end 65 | 66 | main $argv 67 | -------------------------------------------------------------------------------- /logo/airmail/airmail.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/airmail/airmail.icns -------------------------------------------------------------------------------- /logo/airmail/airmail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/airmail/airmail.png -------------------------------------------------------------------------------- /logo/auto.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # usage: ./auto.sh image.png 4 | # need `brew install imagemagick` first 5 | # source: https://stackoverflow.com/a/41147126 6 | 7 | sizes=(16 32 64 128 256 512) 8 | largfile='icon_512x512@2x.png' 9 | if [ ! -f "$largfile" ]; then 10 | convert -background none -resize 1024x1024 "$1" "$largfile" 11 | fi 12 | for s in "${sizes[@]}"; do 13 | # echo $s 14 | convert -background none -resize ${s}x${s} "$largfile" "icon_${s}x$s.png" 15 | done 16 | 17 | cp 'icon_32x32.png' 'icon_16x16@2x.png' 18 | mv 'icon_64x64.png' 'icon_32x32@2x.png' 19 | cp 'icon_256x256.png' 'icon_128x128@2x.png' 20 | cp 'icon_512x512.png' 'icon_256x256@2x.png' 21 | 22 | IN="$1" 23 | fileName=(${IN//./ }) 24 | folder=${fileName[0]} 25 | 26 | iconset="$folder.iconset" 27 | mkdir -p "$iconset" 28 | 29 | mv icon_*x*.png "$iconset" 30 | iconutil -c icns "$iconset" 31 | 32 | rm "$iconset"/icon_*x*.png 33 | 34 | mv "$folder.icns" "$iconset" 35 | mv "$1" "$iconset" 36 | 37 | mv "$iconset" "$folder" 38 | 39 | -------------------------------------------------------------------------------- /logo/big_duck/cyberduck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/big_duck/cyberduck.png -------------------------------------------------------------------------------- /logo/big_duck/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/big_duck/icon.icns -------------------------------------------------------------------------------- /logo/cat/cat.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/cat/cat.icns -------------------------------------------------------------------------------- /logo/cat/cat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/cat/cat.png -------------------------------------------------------------------------------- /logo/changjinglu/changjinglu.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/changjinglu/changjinglu.icns -------------------------------------------------------------------------------- /logo/changjinglu/changjinglu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/changjinglu/changjinglu.png -------------------------------------------------------------------------------- /logo/duck/duck.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/duck/duck.icns -------------------------------------------------------------------------------- /logo/duck/duck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/duck/duck.png -------------------------------------------------------------------------------- /logo/firefox/firefox.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/firefox/firefox.icns -------------------------------------------------------------------------------- /logo/firefox/firefox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/firefox/firefox.png -------------------------------------------------------------------------------- /logo/firefox/firefox2.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/firefox/firefox2.icns -------------------------------------------------------------------------------- /logo/firefox/firefox2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/firefox/firefox2.png -------------------------------------------------------------------------------- /logo/hep/hep.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/hep/hep.icns -------------------------------------------------------------------------------- /logo/hep/hep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/hep/hep.png -------------------------------------------------------------------------------- /logo/kitty/kitty-new.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/kitty/kitty-new.icns -------------------------------------------------------------------------------- /logo/kitty/kitty.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/kitty/kitty.icns -------------------------------------------------------------------------------- /logo/normal/cry-terminal.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/normal/cry-terminal.icns -------------------------------------------------------------------------------- /logo/normal/purple-vs.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/normal/purple-vs.icns -------------------------------------------------------------------------------- /logo/normal/red-vs.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/normal/red-vs.icns -------------------------------------------------------------------------------- /logo/normal/red-vs2.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/normal/red-vs2.icns -------------------------------------------------------------------------------- /logo/normal/steam.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/normal/steam.icns -------------------------------------------------------------------------------- /logo/normal/vim.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/normal/vim.icns -------------------------------------------------------------------------------- /logo/normal/vs.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/normal/vs.icns -------------------------------------------------------------------------------- /logo/panhai/panhai-origin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/panhai/panhai-origin.png -------------------------------------------------------------------------------- /logo/panhai/panhai.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/panhai/panhai.icns -------------------------------------------------------------------------------- /logo/panhai/panhai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/panhai/panhai.png -------------------------------------------------------------------------------- /logo/panhai/panhai2.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/panhai/panhai2.icns -------------------------------------------------------------------------------- /logo/panhai/panhai2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/panhai/panhai2.png -------------------------------------------------------------------------------- /logo/rubber-duck/rubber-duck.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/rubber-duck/rubber-duck.icns -------------------------------------------------------------------------------- /logo/rubber-duck/rubber-duck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/rubber-duck/rubber-duck.png -------------------------------------------------------------------------------- /logo/rubber-duck/rubber-duck.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /logo/wizard/wizard.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/wizard/wizard.icns -------------------------------------------------------------------------------- /logo/wizard/wizard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keaising/dotfile/b80dfe4c8299ff41ecf584bfc4ad49d71b259468/logo/wizard/wizard.png -------------------------------------------------------------------------------- /macOS/Code/Library/Application Support/Code/User/keybindings.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "key": "alt+s", 4 | "command": "workbench.action.files.save" 5 | }, 6 | { 7 | "key": "ctrl+s", 8 | "command": "-workbench.action.files.save" 9 | }, 10 | { 11 | "key": "alt+b", 12 | "command": "editor.action.revealDefinition", 13 | "when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor" 14 | }, 15 | { 16 | "key": "f12", 17 | "command": "-editor.action.revealDefinition", 18 | "when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor" 19 | }, 20 | { 21 | "key": "alt+[", 22 | "command": "workbench.action.navigateBack", 23 | "when": "canNavigateBack" 24 | }, 25 | { 26 | "key": "ctrl+alt+-", 27 | "command": "-workbench.action.navigateBack", 28 | "when": "canNavigateBack" 29 | }, 30 | { 31 | "key": "alt+]", 32 | "command": "workbench.action.navigateForward", 33 | "when": "canNavigateForward" 34 | }, 35 | { 36 | "key": "ctrl+shift+-", 37 | "command": "-workbench.action.navigateForward", 38 | "when": "canNavigateForward" 39 | }, 40 | { 41 | "key": "alt+]", 42 | "command": "workbench.action.navigateRight" 43 | }, 44 | { 45 | "key": "alt+l", 46 | "command": "workbench.action.nextEditor", 47 | "when": "vim.mode != Insert" 48 | }, 49 | { 50 | "key": "ctrl+pagedown", 51 | "command": "-workbench.action.nextEditor" 52 | }, 53 | { 54 | "key": "alt+h", 55 | "command": "workbench.action.previousEditor", 56 | "when": "vim.mode != Insert" 57 | }, 58 | { 59 | "key": "ctrl+pageup", 60 | "command": "-workbench.action.previousEditor" 61 | }, 62 | { 63 | "key": "alt+w", 64 | "command": "workbench.action.closeActiveEditor" 65 | }, 66 | { 67 | "key": "ctrl+w", 68 | "command": "-workbench.action.closeActiveEditor" 69 | }, 70 | { 71 | "key": "ctrl+k e", 72 | "command": "-workbench.files.action.focusOpenEditorsView", 73 | "when": "workbench.explorer.openEditorsView.active" 74 | }, 75 | { 76 | "key": "ctrl+h", 77 | "command": "workbench.action.focusSideBar" 78 | }, 79 | { 80 | "key": "ctrl+l", 81 | "command": "workbench.action.focusLastEditorGroup" 82 | }, 83 | { 84 | "key": "alt+h", 85 | "command": "cursorLeft", 86 | "when": "textInputFocus && vim.mode == Insert" 87 | }, 88 | { 89 | "key": "alt+j", 90 | "command": "cursorDown", 91 | "when": "textInputFocus && vim.mode == Insert" 92 | }, 93 | { 94 | "key": "alt+l", 95 | "command": "cursorRight", 96 | "when": "textInputFocus && vim.mode == Insert" 97 | }, 98 | { 99 | "key": "alt+k", 100 | "command": "cursorUp", 101 | "when": "textInputFocus && vim.mode == Insert" 102 | }, 103 | { 104 | "key": "alt+v", 105 | "command": "editor.action.clipboardPasteAction" 106 | }, 107 | { 108 | "key": "alt+c", 109 | "command": "-toggleSearchCaseSensitive", 110 | "when": "searchViewletFocus" 111 | }, 112 | { 113 | "key": "alt+c", 114 | "command": "-toggleFindCaseSensitive", 115 | "when": "editorFocus" 116 | }, 117 | { 118 | "key": "alt+c", 119 | "command": "-workbench.action.terminal.toggleFindCaseSensitive", 120 | "when": "terminalFindFocused && terminalHasBeenCreated || terminalFindFocused && terminalProcessSupported || terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported" 121 | }, 122 | { 123 | "key": "alt+c", 124 | "command": "-toggleSearchEditorCaseSensitive", 125 | "when": "inSearchEditor && searchInputBoxFocus" 126 | }, 127 | { 128 | "key": "alt+c", 129 | "command": "editor.action.clipboardCopyAction" 130 | }, 131 | { 132 | "key": "ctrl+j", 133 | "command": "-editor.action.joinLines", 134 | "when": "editorTextFocus && !editorReadonly" 135 | }, 136 | { 137 | "key": "ctrl+j", 138 | "command": "-extension.vim_ctrl+j", 139 | "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" 140 | }, 141 | { 142 | "key": "alt+m", 143 | "command": "workbench.action.focusPanel", 144 | "when": "editorFocus" 145 | }, 146 | { 147 | "key": "ctrl+k", 148 | "command": "workbench.action.focusActiveEditorGroup" 149 | }, 150 | { 151 | "key": "ctrl+k", 152 | "command": "-deleteAllRight", 153 | "when": "textInputFocus && !editorReadonly" 154 | }, 155 | { 156 | "key": "ctrl+k", 157 | "command": "-extension.vim_ctrl+k", 158 | "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" 159 | }, 160 | { 161 | "key": "alt+a", 162 | "command": "editor.action.selectAll" 163 | }, 164 | { 165 | "key": "cmd+a", 166 | "command": "-editor.action.selectAll" 167 | }, 168 | { 169 | "key": "alt+f", 170 | "command": "actions.find", 171 | "when": "editorFocus || editorIsOpen" 172 | }, 173 | { 174 | "key": "alt+m", 175 | "command": "workbench.action.closePanel", 176 | "when": "panelFocus" 177 | }, 178 | { 179 | "key": "alt+k", 180 | "command": "editor.action.rename", 181 | "when": "vim.mode == 'Normal' && editorHasRenameProvider && editorTextFocus && !editorReadonly" 182 | }, 183 | { 184 | "key": "alt+/", 185 | "command": "editor.action.addCommentLine", 186 | "when": "editorTextFocus && !editorReadonly" 187 | }, 188 | { 189 | "key": "cmd+k cmd+c", 190 | "command": "-editor.action.addCommentLine", 191 | "when": "editorTextFocus && !editorReadonly" 192 | }, 193 | { 194 | "key": "cmd+k cmd+u", 195 | "command": "-editor.action.removeCommentLine", 196 | "when": "editorTextFocus && !editorReadonly" 197 | }, 198 | { 199 | "key": "alt+/", 200 | "command": "editor.action.removeCommentLine" 201 | } 202 | ] -------------------------------------------------------------------------------- /macOS/brew/Brewfile: -------------------------------------------------------------------------------- 1 | tap "homebrew/bundle" 2 | brew "python@3.11" 3 | brew "ansible" 4 | brew "curl" 5 | brew "exa" 6 | brew "fd" 7 | brew "fish" 8 | brew "fzf" 9 | brew "git" 10 | brew "gitui" 11 | brew "go" 12 | brew "htop" 13 | brew "lf" 14 | brew "mtr" 15 | brew "n" 16 | brew "neofetch" 17 | brew "neovim" 18 | brew "orbstack" 19 | brew "pgformatter" 20 | brew "ripgrep" 21 | brew "starship" 22 | brew "stow" 23 | brew "tmux" 24 | brew "v2ray" 25 | brew "vim" 26 | brew "wget" 27 | cask "1password" 28 | cask "alacritty" 29 | cask "alt-tab" 30 | cask "barrier" 31 | cask "bilibili" 32 | cask "dbeaver-community" 33 | cask "google-chrome" 34 | cask "hiddenbar" 35 | cask "iina" 36 | cask "itsycal" 37 | cask "karabiner-elements" 38 | cask "linearmouse" 39 | cask "microsoft-auto-update" 40 | cask "microsoft-office" 41 | cask "microsoft-remote-desktop" 42 | cask "notion" 43 | cask "openvpn-connect" 44 | cask "rapidapi" 45 | cask "slack" 46 | cask "squirrel" 47 | cask "tailscale" 48 | cask "visual-studio-code" 49 | cask "wechat" 50 | cask "wechatwork" 51 | cask "zoom" 52 | cask "skype" 53 | -------------------------------------------------------------------------------- /macOS/hammerspoon/.hammerspoon/init.lua: -------------------------------------------------------------------------------- 1 | local function get_mbp_frame() 2 | return hs.screen.primaryScreen():frame() 3 | end 4 | 5 | local function get_ext_frame() 6 | local sf = hs.screen.primaryScreen():frame() 7 | if #hs.screen.allScreens() > 1 then 8 | sf = hs.screen.allScreens()[2]:frame() 9 | end 10 | return sf 11 | end 12 | 13 | hs.hotkey.bind("cmd", "1", function() 14 | local mbp = get_mbp_frame() 15 | hs.window.focusedWindow():setFrame(hs.geometry.new(mbp.x, mbp.y, mbp.w, mbp.h)) 16 | end) 17 | 18 | hs.hotkey.bind("cmd", "2", function() 19 | local ext = get_ext_frame() 20 | hs.window 21 | .focusedWindow() 22 | :setFrame(hs.geometry.new(ext.x, ext.y + ext.h / 22, ext.w * 2 / 3, ext.h * 10 / 11)) 23 | end) 24 | 25 | hs.hotkey.bind("cmd", "3", function() 26 | local ext = get_ext_frame() 27 | hs.window.focusedWindow():setFrame(hs.geometry.new(ext.x + ext.w * 2 / 3, ext.y, ext.w / 3, ext.h / 2)) 28 | end) 29 | 30 | hs.hotkey.bind("cmd", "4", function() 31 | local ext = get_ext_frame() 32 | hs.window.focusedWindow():setFrame(hs.geometry.new(ext.x + ext.w * 2 / 3, ext.y + ext.h / 2, ext.w / 3, ext.h / 2)) 33 | end) 34 | -------------------------------------------------------------------------------- /macOS/karabiner/.config/karabiner/.gitignore: -------------------------------------------------------------------------------- 1 | automatic_backups/ 2 | -------------------------------------------------------------------------------- /macOS/karabiner/.config/karabiner/assets/complex_modifications/Dota2.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "ALT <=> CMD in Dota2", 3 | "rules": [ 4 | { 5 | "description": "Swap option and command in Dota2", 6 | "manipulators": [ 7 | { 8 | "type": "basic", 9 | "from": { 10 | "key_code": "left_option", 11 | "modifiers": { 12 | "optional": [ 13 | "any" 14 | ] 15 | } 16 | }, 17 | "to": [ 18 | { 19 | "key_code": "left_command" 20 | } 21 | ], 22 | "conditions": [ 23 | { 24 | "type": "frontmost_application_if", 25 | "bundle_identifiers": [ 26 | "com.valvesoftware.dota2" 27 | ] 28 | } 29 | ] 30 | }, 31 | { 32 | "type": "basic", 33 | "from": { 34 | "key_code": "left_command", 35 | "modifiers": { 36 | "optional": [ 37 | "any" 38 | ] 39 | } 40 | }, 41 | "to": [ 42 | { 43 | "key_code": "left_option" 44 | } 45 | ], 46 | "conditions": [ 47 | { 48 | "type": "frontmost_application_if", 49 | "bundle_identifiers": [ 50 | "com.valvesoftware.dota2" 51 | ] 52 | } 53 | ] 54 | } 55 | ] 56 | } 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /macOS/karabiner/.config/karabiner/assets/complex_modifications/com.microsoft.VSCode.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "ALT <=> CMD in com.microsoft.VSCode", 3 | "rules": [ 4 | { 5 | "description": "Swap option and command in com.microsoft.VSCode", 6 | "manipulators": [ 7 | { 8 | "type": "basic", 9 | "from": { 10 | "key_code": "left_option", 11 | "modifiers": { 12 | "optional": [ 13 | "any" 14 | ] 15 | } 16 | }, 17 | "to": [ 18 | { 19 | "key_code": "left_command" 20 | } 21 | ], 22 | "conditions": [ 23 | { 24 | "type": "frontmost_application_if", 25 | "bundle_identifiers": [ 26 | "com.microsoft.VSCode" 27 | ] 28 | } 29 | ] 30 | }, 31 | { 32 | "type": "basic", 33 | "from": { 34 | "key_code": "left_command", 35 | "modifiers": { 36 | "optional": [ 37 | "any" 38 | ] 39 | } 40 | }, 41 | "to": [ 42 | { 43 | "key_code": "left_option" 44 | } 45 | ], 46 | "conditions": [ 47 | { 48 | "type": "frontmost_application_if", 49 | "bundle_identifiers": [ 50 | "com.microsoft.VSCode" 51 | ] 52 | } 53 | ] 54 | } 55 | ] 56 | } 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /macOS/karabiner/.config/karabiner/assets/complex_modifications/org.alacritty.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "ALT <=> CMD in org.alacritty", 3 | "rules": [ 4 | { 5 | "description": "Swap option and command in org.Alacritty", 6 | "manipulators": [ 7 | { 8 | "type": "basic", 9 | "from": { 10 | "key_code": "left_option", 11 | "modifiers": { 12 | "optional": [ 13 | "any" 14 | ] 15 | } 16 | }, 17 | "to": [ 18 | { 19 | "key_code": "left_command" 20 | } 21 | ], 22 | "conditions": [ 23 | { 24 | "type": "frontmost_application_if", 25 | "bundle_identifiers": [ 26 | "org.alacritty" 27 | ] 28 | } 29 | ] 30 | }, 31 | { 32 | "type": "basic", 33 | "from": { 34 | "key_code": "left_command", 35 | "modifiers": { 36 | "optional": [ 37 | "any" 38 | ] 39 | } 40 | }, 41 | "to": [ 42 | { 43 | "key_code": "left_option" 44 | } 45 | ], 46 | "conditions": [ 47 | { 48 | "type": "frontmost_application_if", 49 | "bundle_identifiers": [ 50 | "org.alacritty" 51 | ] 52 | } 53 | ] 54 | } 55 | ] 56 | } 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /nvim/.config/nvim/coc-settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "sumneko-lua.enableNvimLuaDev": true, 3 | "Lua": { 4 | "workspace": { 5 | "checkThirdParty": false, 6 | "library": ["${3rd}/luv/library"] 7 | }, 8 | "hint.enable": false 9 | }, 10 | "ruff": { 11 | "autoFixOnSave": true, 12 | "nativeServer": true 13 | }, 14 | "git": { 15 | "addGBlameToVirtualText": true 16 | }, 17 | "coc": { 18 | "preferences": { 19 | "colorSupport": true 20 | }, 21 | "source": { 22 | "emoji": { 23 | "filetypes": null, 24 | "triggerCharacters": ["/"] 25 | }, 26 | "word.priority": -1, 27 | "dictionary.priority": -1 28 | } 29 | }, 30 | "inlayHint": { 31 | "enable": false 32 | }, 33 | "diagnostic": { 34 | "enable": false, 35 | "errorSign": "", 36 | "warningSign": "", 37 | "infoSign": "", 38 | "hintSign": "" 39 | }, 40 | "snippets": { 41 | "ultisnips": { 42 | "directories": ["$HOME/.config/nvim/ultisnips"], 43 | "pythonPrompt": false 44 | } 45 | }, 46 | "languageserver": { 47 | "terraform": { 48 | "command": "terraform-ls", 49 | "args": ["serve"], 50 | "filetypes": ["terraform", "tf"], 51 | "initializationOptions": {}, 52 | "settings": {} 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /nvim/.config/nvim/ftplugin/go.vim: -------------------------------------------------------------------------------- 1 | " go 2 | nnoremap gj :GoAddTags json 3 | " nnoremap gt :GoTests 4 | nnoremap gl :silent !golines -w %:p 5 | 6 | nnoremap gg :call GormModify() 7 | vnoremap gg :call GormModify() 8 | 9 | function! GormModify() range 10 | execute a:firstline . "," . a:lastline . 'GoRemoveTags bson es2m' 11 | execute a:firstline . "," . a:lastline . 'GoAddTags json gorm db' 12 | silent! execute a:firstline . "," . a:lastline . 's/gorm:"\(.\{-}\)"/gorm:"column:\1;type:text"/g' 13 | endfunction 14 | 15 | nnoremap vv v(textobj-backtick-i) :!pg_format 16 | -------------------------------------------------------------------------------- /nvim/.config/nvim/init.lua: -------------------------------------------------------------------------------- 1 | local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" 2 | if not (vim.uv or vim.loop).fs_stat(lazypath) then 3 | local lazyrepo = "https://github.com/folke/lazy.nvim.git" 4 | local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) 5 | if vim.v.shell_error ~= 0 then 6 | vim.api.nvim_echo({ 7 | { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, 8 | { out, "WarningMsg" }, 9 | { "\nPress any key to exit..." }, 10 | }, true, {}) 11 | vim.fn.getchar() 12 | os.exit(1) 13 | end 14 | end 15 | vim.opt.rtp:prepend(lazypath) 16 | 17 | vim.cmd("source ~/.config/nvim/lua/vim-plugins.vim") 18 | vim.cmd("source ~/.config/nvim/lua/keymaps.vim") 19 | vim.cmd("source ~/.config/nvim/lua/options_prev.vim") 20 | 21 | require("lazy").setup({ 22 | spec = { { import = "plugins" } }, 23 | change_detection = { notify = false }, 24 | }) 25 | 26 | vim.cmd("source ~/.config/nvim/lua/options_post.vim") 27 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/keymaps.vim: -------------------------------------------------------------------------------- 1 | " cSpell:disable 2 | " Leader key 3 | map 4 | 5 | " save & quit in window 6 | inoremap :wa 7 | nnoremap :wa 8 | nnoremap :w 9 | nnoremap :qa 10 | nnoremap :q 11 | " save file with sudo 12 | cnoremap sudow w !sudo tee % >/dev/null 13 | 14 | " switch window 15 | noremap h 16 | noremap l 17 | noremap j 18 | noremap k 19 | 20 | " split window 21 | noremap vs :vsplit 22 | noremap hs :split 23 | 24 | " switch location 25 | noremap 26 | noremap 27 | 28 | " faster movement 29 | nnoremap 9 30 | nnoremap 9 31 | 32 | " move in insert mode 33 | inoremap 34 | inoremap 35 | inoremap 36 | inoremap 37 | inoremap b 38 | inoremap w 39 | inoremap e 40 | inoremap 41 | 42 | " Keep search pattern at the center of the screen. 43 | nnoremap n nzzzv 44 | nnoremap j gj 45 | nnoremap k gk 46 | nnoremap N Nzzzv 47 | nnoremap * *zz 48 | nnoremap # #zz 49 | nnoremap g* g*zz 50 | nnoremap % 51 | vnoremap % 52 | 53 | " come from https://github.com/ThePrimeagen/init.lua/blob/master/lua/theprimeagen/remap.lua 54 | nnoremap J mzJ`z 55 | vnoremap J :m '>+1gv=gv 56 | vnoremap K :m '<-2gv=gv 57 | 58 | " don't follow vim default behavior 59 | xnoremap p P 60 | 61 | nnoremap x :silent !chmod +x % 62 | 63 | " select all 64 | nnoremap ga ggVG 65 | 66 | " move to line start/end 67 | noremap H ^ 68 | noremap L $ 69 | 70 | " plus/minus 71 | noremap = 72 | noremap - 73 | 74 | " run macro q/w 75 | nnoremap @q 76 | nnoremap @w 77 | 78 | " mark 79 | nnoremap ' ` 80 | 81 | " toggle current block, all level 82 | nnoremap zo zA 83 | 84 | " disable 85 | nnoremap 86 | 87 | " search selected content in visual mode: https://blog.twofei.com/610/ 88 | vnoremap // y/" 89 | nnoremap / :noh 90 | 91 | " insert mode specials 92 | inoremap ;; := 93 | 94 | " resource configuration 95 | nnoremap la :Lazy 96 | 97 | " nnoremap sf :set filetype= 98 | " nnoremap st :set syntax= 99 | 100 | " buffer 101 | nnoremap :BufferLineCyclePrev 102 | nnoremap :BufferLineCycleNext 103 | nnoremap :BufferLineMovePrev 104 | nnoremap :BufferLineMoveNext 105 | nnoremap wh :BufferLineCloseLeft 106 | nnoremap wl :BufferLineCloseRight 107 | nnoremap wa :BufferLineCloseOthers 108 | nnoremap :BufferLinePick 109 | nnoremap :Bdelete 110 | 111 | " easy align 112 | " | Keystrokes | Description | 等价的命令 | 描述 | 113 | " | ---------- | ----------- | ------ | -- | 114 | " | 2 | Around 2nd whitespaces | :'<,'>EasyAlign2\ | 第二个空格分隔 | 115 | " | - | Around the last whitespaces | :'<,'>EasyAlign-\ | 最后一个空格分隔 | 116 | " | -2 | Around the 2nd to last whitespaces | :'<,'>EasyAlign-2\ | 倒数第二个空格分隔 | 117 | " | : | Around 1st colon (key: value) | :'<,'>EasyAlign: | 第一个 : 分隔 | 118 | " | : | Around 1st colon (key : value) | :'<,'>EasyAlign:>l1 | 同上, 分隔符右对齐 | 119 | " | = | Around 1st operators with = | :'<,'>EasyAlign= | 第一个 = 分隔 | 120 | " | 3= | Around 3rd operators with = | :'<,'>EasyAlign3= | 第三个 = 分隔 | 121 | " | *= | Around all operators with = | :'<,'>EasyAlign*= | 所有的 = 分隔 | 122 | " | **= | Left-right alternating around = | :'<,'>EasyAlign**= | = 先左->右对齐,然后交错对齐 | 123 | " | = | Right alignment around 1st = | :'<,'>EasyAlign!= | 第一个 = 前的右对齐, 其他不变 | 124 | " | **= | Right-left alternating around = | :'<,'>EasyAlign!**= | = 先右->左对齐,然后交错对齐 | 125 | " 126 | " tutorial: https://xu3352.github.io/linux/2018/10/18/vim-table-format-in-html-or-markdown 127 | " cheat sheet: https://devhints.io/vim-easyalign 128 | " Align by regex> :EasyAlign /[:;]+/ 129 | " Start interactive EasyAlign in visual mode (e.g. vipga) 130 | xnoremap ga (EasyAlign) 131 | " Align by regex 132 | " :'<,'>EasyAlign /regex/ 133 | vnoremap gs :EasyAlign 134 | " Start interactive EasyAlign for a motion/text object (e.g. gaip) 135 | " nnoremap ga (EasyAlign) 136 | 137 | " swap position for parameters 138 | nnoremap , :SidewaysLeft 139 | nnoremap . :SidewaysRight 140 | 141 | " vim-move 142 | let g:move_map_keys = 0 143 | nnoremap MoveCharLeft 144 | nnoremap MoveCharRight 145 | nnoremap MoveLineDown 146 | nnoremap MoveLineUp 147 | vnoremap MoveBlockLeft 148 | vnoremap MoveBlockRight 149 | vnoremap MoveBlockDown 150 | vnoremap MoveBlockUp 151 | 152 | " vim maximizer 153 | let g:maximizer_set_default_mapping = 0 154 | nnoremap :MaximizerToggle 155 | vnoremap :MaximizerTogglegv 156 | inoremap :MaximizerToggle 157 | 158 | nnoremap cc NERDCommenterToggle 159 | vnoremap cc NERDCommenterToggle 160 | nnoremap NERDCommenterToggle 161 | vnoremap NERDCommenterToggle 162 | 163 | " lsp 164 | nnoremap lr :LspStop:LspStart:LspRestart 165 | 166 | " xnoremap i` (textobj-backticks-backticks-ii) 167 | 168 | " kylechui/nvim-surround 169 | onoremap ir i[ 170 | onoremap ar a[ 171 | xnoremap ir i[ 172 | xnoremap ar a[ 173 | 174 | " AndrewRadev/sideways.vim 175 | omap aa SidewaysArgumentTextobjA 176 | xmap aa SidewaysArgumentTextobjA 177 | omap ia SidewaysArgumentTextobjI 178 | xmap ia SidewaysArgumentTextobjI 179 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/options_post.vim: -------------------------------------------------------------------------------- 1 | " cSpell:disable 2 | 3 | " set background=dark 4 | 5 | " let g:sonokai_style = 'shusia' 6 | " colorscheme sonokai 7 | " colorscheme kanagawa-lotus 8 | 9 | let g:gruvbox_material_current_word = "underline" 10 | let g:gruvbox_material_background = 'medium' 11 | let g:gruvbox_material_enable_bold = 1 12 | let g:gruvbox_material_diagnostic_text_highlight = 1 13 | colorscheme gruvbox-material 14 | 15 | set termguicolors 16 | set t_Co=256 " 允许256色 17 | let &t_8f = "\[38;2;%lu;%lu;%lum" 18 | let &t_8b = "\[48;2;%lu;%lu;%lum" 19 | 20 | highlight IndentBlanklineIndent1 guifg=#E06C75 gui=nocombine 21 | highlight IndentBlanklineIndent2 guifg=#E5C07B gui=nocombine 22 | highlight IndentBlanklineIndent3 guifg=#98C379 gui=nocombine 23 | highlight IndentBlanklineIndent4 guifg=#56B6C2 gui=nocombine 24 | highlight IndentBlanklineIndent5 guifg=#61AFEF gui=nocombine 25 | highlight IndentBlanklineIndent6 guifg=#C678DD gui=nocombine 26 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/options_prev.vim: -------------------------------------------------------------------------------- 1 | " cSpell:disable 2 | set autoindent 3 | set tabstop=4 " 按下 Tab 键时,Vim 显示的空格数 4 | set shiftwidth=4 5 | set softtabstop=0 " 关闭softtabstop 永远不要将空格和tabset cursorline 6 | set hidden 7 | set autowrite 8 | set winaltkeys=no " Windows 禁用 ALT 操作菜单(使得 ALT 可以用到 Vim里) 9 | set ttimeout " 功能键超时检测 50 毫秒 10 | set ttimeoutlen=50 11 | set updatetime=300 12 | set ruler " 显示光标位置 13 | set autoread " auto reload when file on disk changed 14 | set ignorecase " 智能搜索大小写判断,默认忽略大小写,除非搜索内容包含大写字母 15 | set smartcase " 16 | set incsearch " 查找输入时动态增量显示查找结果 17 | set showmatch " 显示匹配的括号 18 | set matchtime=2 " 显示括号匹配的时间 19 | set display=lastline " 显示最后一行 20 | set wildmenu " 允许下方显示目录 21 | set fdm=indent " 代码折叠默认使用缩进 22 | set backup " 允许备份 23 | set writebackup " 保存时备份 24 | set scrolloff=5 " 垂直滚动时,光标距离顶部/底部的位置(单位:行) 25 | set sidescrolloff=15 " 水平滚动时,光标距离行首或行尾的位置(单位:字符) 26 | set relativenumber 27 | set number 28 | set list " 设置显示制表符等隐藏字符 29 | set showcmd " 右下角显示命令 30 | set splitright " 水平切割窗口时,默认在右边显示新窗口 31 | set laststatus=2 " 总是显示状态栏 32 | set showtabline=2 " 总是显示标签栏 33 | set shortmess+=c " https://stackoverflow.com/a/25102964 34 | set whichwrap+=<,>,[,],h,l 35 | set iskeyword-=- 36 | set signcolumn=yes " 总是显示侧边栏(用于显示 mark/gitdiff/诊断信息) 37 | set colorcolumn=88 " 显示列宽 38 | set formatoptions+=B " 合并两行中文时,不在中间加空格 39 | set ffs=unix,dos,mac " 文件换行符,默认使用 unix 换行符 40 | set backupdir=~/.vim/tmp " 备份文件地址,统一管理 41 | set backupext=.bak " 备份文件扩展名 42 | set mouse= 43 | set noswapfile 44 | set noundofile 45 | set spo=camel 46 | set splitbelow 47 | set splitright 48 | set listchars=lead:⋅,tab:\▸\ ,trail:. " 设置分隔符可视 49 | set clipboard^=unnamed,unnamedplus " y/d/c copy to/from system clipboard 50 | set foldenable 51 | set foldlevelstart=99 52 | set foldlevel=99 " 默认打开所有缩进 53 | set foldmethod=expr 54 | set foldexpr=nvim_treesitter#foldexpr() 55 | 56 | " 恢复上次打开位置 57 | autocmd BufReadPost * 58 | \ if line("'\"") > 1 && line("'\"") <= line("$") | 59 | \ exe "normal! g`\"" | 60 | \ endif 61 | 62 | augroup filetypes 63 | autocmd! 64 | autocmd FileType fish setlocal expandtab 65 | autocmd FileType go setlocal tabstop=4 shiftwidth=4 noexpandtab 66 | autocmd FileType javascript setlocal tabstop=2 shiftwidth=2 expandtab 67 | autocmd FileType javascriptreact setlocal tabstop=2 shiftwidth=2 expandtab 68 | autocmd FileType json setlocal tabstop=2 shiftwidth=2 expandtab 69 | autocmd FileType lua setlocal foldmarker={,} foldmethod=marker expandtab 70 | autocmd FileType python setlocal tabstop=4 shiftwidth=4 expandtab 71 | autocmd FileType tmux setlocal foldmethod=marker 72 | autocmd FileType typescript setlocal tabstop=2 shiftwidth=2 expandtab 73 | autocmd FileType typescriptreact setlocal tabstop=2 shiftwidth=2 expandtab 74 | autocmd FileType zsh setlocal foldmethod=marker 75 | augroup END 76 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/blink.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "saghen/blink.cmp", 4 | dependencies = { "rafamadriz/friendly-snippets" }, 5 | version = "1.*", 6 | ---@module 'blink.cmp' 7 | ---@type blink.cmp.Config 8 | opts = { 9 | keymap = { 10 | [""] = { "hide" }, 11 | [""] = { "scroll_documentation_up" }, 12 | [""] = { "scroll_documentation_down" }, 13 | [""] = { "show_signature", "hide_signature", "fallback" }, 14 | [""] = { "select_prev", "fallback" }, 15 | [""] = { "select_next", "fallback" }, 16 | [""] = { "select_prev", "fallback" }, 17 | [""] = { "select_next", "fallback" }, 18 | [""] = { "select_and_accept", "fallback" }, 19 | [""] = { 20 | function(cmp) 21 | if cmp.snippet_active() then 22 | return cmp.accept() 23 | else 24 | return cmp.select_and_accept() 25 | end 26 | end, 27 | "snippet_forward", 28 | "fallback", 29 | }, 30 | [""] = { "snippet_backward", "fallback" }, 31 | }, 32 | completion = { 33 | documentation = { auto_show = true }, 34 | }, 35 | sources = { 36 | default = { "lsp", "path", "snippets", "buffer" }, 37 | providers = { 38 | path = { 39 | opts = { 40 | get_cwd = function(_) 41 | return vim.fn.getcwd() 42 | end, 43 | }, 44 | }, 45 | }, 46 | }, 47 | signature = { enabled = true }, 48 | fuzzy = { 49 | sorts = { 50 | "exact", 51 | "score", 52 | "sort_text", 53 | }, 54 | }, 55 | cmdline = { 56 | completion = { 57 | menu = { auto_show = true }, 58 | }, 59 | keymap = { 60 | [""] = { 61 | function(cmp) 62 | if cmp.snippet_active() then 63 | return cmp.accept() 64 | else 65 | return cmp.select_accept_and_enter() 66 | end 67 | end, 68 | "fallback", 69 | }, 70 | [""] = { "accept" }, 71 | }, 72 | }, 73 | }, 74 | opts_extend = { "sources.default" }, 75 | }, 76 | } 77 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/coc.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "neoclide/coc.nvim", 3 | branch = "release", 4 | event = "BufRead", 5 | enabled = false, 6 | config = function() 7 | vim.g.coc_global_extensions = { 8 | "coc-go", 9 | "coc-pyright", 10 | -- "coc-spell-checker", 11 | "coc-snippets", 12 | "coc-sumneko-lua", 13 | "coc-tsserver", 14 | "@yaegassy/coc-ruff", 15 | "@yaegassy/coc-tailwindcss3", 16 | } 17 | -- Some servers have issues with backup files, see #649 18 | vim.opt.backup = false 19 | vim.opt.writebackup = false 20 | 21 | -- Having longer updatetime (default is 4000 ms = 4s) leads to noticeable 22 | -- delays and poor user experience 23 | vim.opt.updatetime = 300 24 | 25 | local keyset = vim.keymap.set 26 | -- Autocomplete 27 | function _G.check_back_space() 28 | local col = vim.fn.col(".") - 1 29 | return col == 0 or vim.fn.getline("."):sub(col, col):match("%s") ~= nil 30 | end 31 | 32 | -- Use Tab for trigger completion with characters ahead and navigate 33 | -- NOTE: There's always a completion item selected by default, you may want to enable 34 | -- no select by setting `"suggest.noselect": true` in your configuration file 35 | 36 | -- NOTE: Use command ':verbose imap ' to make sure Tab is not mapped by 37 | -- other plugins before putting this into your config 38 | local opts = { silent = true, noremap = true, expr = true, replace_keycodes = false } 39 | keyset( 40 | "i", 41 | "", 42 | -- [[ coc#pum#visible() ? coc#pum#next(1) : v:lua.check_back_space() ? "" : coc#refresh() ]], 43 | -- [[ coc#pum#visible() ? coc#_select_confirm() : coc#expandableOrJumpable() ? "\=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\" : CheckBackspace() ? "\" : coc#refresh() ]], 44 | -- 有候选的时候选择下一个,否则往后跳 45 | [[ coc#pum#visible() ? coc#_select_confirm() : coc#expandableOrJumpable() ? "\=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\" : "\" ]], 46 | opts 47 | ) 48 | keyset("i", "", [[coc#pum#visible() ? coc#pum#prev(1) : "\"]], opts) 49 | -- Make to accept selected completion item or notify coc.nvim to format 50 | -- u breaks current undo, please make your own choice 51 | keyset("i", "", [[coc#pum#visible() ? coc#pum#confirm() : "\u\\=coc#on_enter()\"]], opts) 52 | -- Use to trigger snippets 53 | keyset("i", "", "(coc-snippets-expand-jump)") 54 | 55 | -- Highlight the symbol and its references on a CursorHold event(cursor is idle) 56 | vim.api.nvim_create_augroup("CocGroup", {}) 57 | vim.api.nvim_create_autocmd("CursorHold", { 58 | group = "CocGroup", 59 | command = "silent call CocActionAsync('highlight')", 60 | desc = "Highlight symbol under cursor on CursorHold", 61 | }) 62 | 63 | -- Update signature help on jump placeholder 64 | vim.api.nvim_create_autocmd("User", { 65 | group = "CocGroup", 66 | pattern = "CocJumpPlaceholder", 67 | command = "call CocActionAsync('showSignatureHelp')", 68 | desc = "Update signature help on jump placeholder", 69 | }) 70 | 71 | -- Apply codeAction to the selected region 72 | -- Example: `aap` for current paragraph 73 | local opts2 = { silent = true, nowait = true } 74 | -- keyset("n", "", "(coc-definition)", { silent = true }) 75 | keyset("n", "gy", "(coc-type-definition)", { silent = true }) 76 | keyset("n", "", "(coc-rename)", { silent = true }) 77 | keyset("n", "rn", "(coc-rename)", { silent = true }) 78 | end, 79 | } 80 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/color.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "sainnhe/gruvbox-material", 3 | "sainnhe/sonokai", 4 | "gruvbox-community/gruvbox", 5 | "jonathanfilip/vim-lucius", 6 | "Mofiqul/dracula.nvim", 7 | "rebelot/kanagawa.nvim", 8 | "ribru17/bamboo.nvim", 9 | "projekt0n/github-nvim-theme", 10 | } 11 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/conform.lua: -------------------------------------------------------------------------------- 1 | local biome = { 2 | "biome", 3 | "biome-check", 4 | -- "biome-organize-imports", 5 | } 6 | return { 7 | { 8 | -- := vim.bo.filetype 9 | "mfussenegger/nvim-lint", 10 | event = { "BufReadPre", "BufNewFile" }, 11 | config = function() 12 | local lint = require("lint") 13 | lint.linters_by_ft = { 14 | fish = { "fish" }, 15 | lua = { "selene" }, 16 | python = { "ruff" }, 17 | go = { "gofmt", "golines", "goimports" }, 18 | yaml = { "yamllint" }, 19 | } 20 | end, 21 | }, 22 | { 23 | "stevearc/conform.nvim", 24 | event = { "BufWritePre" }, 25 | cmd = { "ConformInfo" }, 26 | keys = { 27 | { 28 | "gm", 29 | function() 30 | require("conform").format({ async = true }) 31 | end, 32 | mode = "", 33 | desc = "Format buffer", 34 | }, 35 | }, 36 | ---@module "conform" 37 | ---@type conform.setupOpts 38 | opts = { 39 | formatters_by_ft = { 40 | lua = { "stylua" }, 41 | bash = { "shfmt" }, 42 | python = { "isort", "ruff_organize_imports", "ruff_format" }, 43 | go = { "gosimports", "gofmt", "golines" }, 44 | -- sql = { "pg_format" }, 45 | fish = { "fish_indent" }, 46 | css = biome, 47 | javascript = biome, 48 | javascriptreact = biome, 49 | json = biome, 50 | markdown = { "prettierd", "prettier", stop_after_first = true }, 51 | typescript = biome, 52 | typescriptreact = biome, 53 | }, 54 | default_format_opts = { 55 | lsp_format = "fallback", 56 | }, 57 | format_on_save = { 58 | timeout_ms = 500, 59 | lsp_fallback = true, 60 | }, 61 | formatters = { 62 | shfmt = { 63 | prepend_args = { "-i", "2" }, 64 | }, 65 | pg_format = { 66 | prepend_args = { "--keyword-case", "2", "--wrap-limit", "80" }, 67 | }, 68 | }, 69 | }, 70 | init = function() 71 | -- If you want the formatexpr, here is the place to set it 72 | vim.o.formatexpr = "v:lua.require'conform'.formatexpr()" 73 | end, 74 | }, 75 | } 76 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/fzf.lua: -------------------------------------------------------------------------------- 1 | local rg_opts = table.concat({ 2 | -- "--column", 3 | "--line-number", 4 | "--no-heading", 5 | "--color=always", 6 | "--smart-case", 7 | "--max-columns=4096", 8 | "-j1", 9 | "--hidden", 10 | "-g '!{.git,node_modules}/'", 11 | "--fixed-strings", 12 | "--sort path", 13 | -- "-e", 14 | }, " ") 15 | 16 | return { 17 | { 18 | "ibhagwan/fzf-lua", 19 | dependencies = { "nvim-tree/nvim-web-devicons" }, 20 | keys = { 21 | { 22 | "s", 23 | function() 24 | require("fzf-lua").files({ 25 | multiprocess = false, 26 | }) 27 | end, 28 | }, 29 | { 30 | "f", 31 | function() 32 | require("fzf-lua").live_grep({ 33 | multiprocess = false, 34 | rg_opts = rg_opts, 35 | multiline = 2, 36 | }) 37 | end, 38 | }, 39 | { 40 | "", 41 | function() 42 | require("fzf-lua").blines({ 43 | previewer = false, 44 | fzf_opts = { ["--no-sort"] = true }, 45 | }) 46 | end, 47 | }, 48 | { 49 | "", 50 | function() 51 | require("fzf-lua").resume() 52 | end, 53 | }, 54 | { 55 | "lo", 56 | function() 57 | require("fzf-lua").oldfiles() 58 | end, 59 | }, 60 | { 61 | "dd", 62 | function() 63 | require("fzf-lua").diagnostics_document({ 64 | multiline = 2, 65 | sort = 1, 66 | }) 67 | end, 68 | }, 69 | { 70 | "dw", 71 | function() 72 | require("fzf-lua").diagnostics_workspace({ 73 | multiline = 2, 74 | sort = 1, 75 | }) 76 | end, 77 | }, 78 | { 79 | "gw", 80 | function() 81 | require("fzf-lua").grep_cword({ 82 | fzf_opts = { ["--no-sort"] = true }, 83 | }) 84 | end, 85 | }, 86 | }, 87 | config = function() 88 | local fzf = require("fzf-lua") 89 | fzf.register_ui_select() 90 | fzf.setup({ 91 | "hide", 92 | winopts = { 93 | row = 1, 94 | height = 0.62, 95 | width = 1.0, 96 | preview = { 97 | border = "single", 98 | horizontal = "right:45%", 99 | wrap = true, 100 | }, 101 | border = "single", 102 | }, 103 | fzf_opts = { 104 | ["--cycle"] = true, 105 | ["--no-scrollbar"] = true, 106 | }, 107 | lsp = { 108 | jump1 = true, 109 | includeDeclaration = false, 110 | ignore_current_line = true, 111 | unique_line_items = true, 112 | code_actions = { previewer = "codeaction_native" }, 113 | }, 114 | }) 115 | end, 116 | }, 117 | } 118 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/gitsigns.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "lewis6991/gitsigns.nvim", 4 | config = function() 5 | require("gitsigns").setup({ 6 | attach_to_untracked = true, 7 | -- this blame info will cover my code, annoying! 8 | current_line_blame = true, -- Toggle with `:Gitsigns toggle_current_line_blame` 9 | current_line_blame_opts = { 10 | virt_text = true, 11 | virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align' 12 | delay = 300, 13 | ignore_whitespace = true, 14 | }, 15 | current_line_blame_formatter = "  , ", 16 | sign_priority = 0, 17 | status_formatter = nil, -- Use default 18 | max_file_length = 3000, 19 | }) 20 | end, 21 | }, 22 | { 23 | "ruifm/gitlinker.nvim", 24 | dependencies = { "nvim-lua/plenary.nvim" }, 25 | config = function() 26 | require("gitlinker").setup({ 27 | opts = { 28 | print_url = false, 29 | }, 30 | }) 31 | vim.api.nvim_set_keymap( 32 | "n", 33 | "gh", 34 | 'lua require"gitlinker".get_buf_range_url("n", {action_callback = require"gitlinker.actions".open_in_browser})', 35 | { silent = true } 36 | ) 37 | vim.api.nvim_set_keymap( 38 | "v", 39 | "gh", 40 | 'lua require"gitlinker".get_buf_range_url("v", {action_callback = require"gitlinker.actions".open_in_browser})', 41 | {} 42 | ) 43 | end, 44 | }, 45 | } 46 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/global.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "nvim-lua/popup.nvim", 3 | "nvim-lua/plenary.nvim", 4 | "nvim-tree/nvim-web-devicons", 5 | "RRethy/vim-illuminate", 6 | { 7 | "keaising/im-select.nvim", 8 | -- dir = "~/code/github.com/keaising/im-select.nvim", 9 | -- dev = true, 10 | config = function() 11 | require("im_select").setup({ 12 | set_previous_events = {}, 13 | set_default_events = { "VimEnter", "InsertLeave", "CmdlineLeave" }, 14 | keep_quiet_on_no_binary = true, 15 | }) 16 | end, 17 | }, 18 | { 19 | "kylechui/nvim-surround", 20 | version = "*", -- Use for stability; omit to use `main` branch for the latest features 21 | event = "VeryLazy", 22 | config = function() 23 | require("nvim-surround").setup({}) 24 | end, 25 | }, 26 | { 27 | "smjonas/inc-rename.nvim", 28 | config = function() 29 | require("inc_rename").setup({}) 30 | end, 31 | }, 32 | { 33 | "Mr-LLLLL/vim-interestingwords", 34 | branch = "fix-next-item", 35 | }, 36 | { 37 | "windwp/nvim-autopairs", 38 | config = function() 39 | require("nvim-autopairs").setup({ 40 | map_cr = true, 41 | check_ts = true, 42 | ts_config = { 43 | lua = { "string", "source" }, 44 | javascript = { "string", "template_string" }, 45 | java = false, 46 | }, 47 | disable_filetype = { "TelescopePrompt", "spectre_panel" }, 48 | fast_wrap = { 49 | map = "", 50 | chars = { "{", "[", "(", '"', "'" }, 51 | pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], "%s+", ""), 52 | offset = 0, -- Offset from pattern match 53 | end_key = "$", 54 | keys = "qwertyuiopzxcvbnmasdfghjkl", 55 | check_comma = true, 56 | highlight = "PmenuSel", 57 | highlight_grey = "LineNr", 58 | }, 59 | }) 60 | end, 61 | }, 62 | { 63 | "folke/flash.nvim", 64 | event = "VeryLazy", 65 | opts = { 66 | search = { 67 | multi_window = false, 68 | -- max_length = 2, 69 | }, 70 | jump = { 71 | nohlsearch = true, 72 | autojump = true, 73 | }, 74 | label = { 75 | uppercase = false, 76 | after = true, 77 | before = false, 78 | -- style = "overlay", 79 | current = true, 80 | }, 81 | modes = { 82 | char = { 83 | enabled = false, -- disable f/T/t/T 84 | }, 85 | }, 86 | }, 87 | keys = { 88 | { 89 | "s", 90 | mode = { "n", "o", "x" }, 91 | function() 92 | require("flash").jump() 93 | end, 94 | desc = "Flash", 95 | }, 96 | { 97 | "r", 98 | mode = "o", 99 | function() 100 | require("flash").remote() 101 | end, 102 | desc = "Remote Flash", 103 | }, 104 | { 105 | ";", 106 | mode = { "n" }, 107 | function() 108 | require("flash").jump({ continue = true }) 109 | end, 110 | desc = "Flash", 111 | }, 112 | }, 113 | }, 114 | } 115 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/mini.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "echasnovski/mini.ai", 4 | version = "*", 5 | config = function() 6 | require("mini.ai").setup({ 7 | n_lines = 1000, 8 | }) 9 | end, 10 | }, 11 | { 12 | "echasnovski/mini.splitjoin", 13 | config = function() 14 | require("mini.splitjoin").setup({ 15 | mappings = { 16 | toggle = ",", 17 | }, 18 | }) 19 | end, 20 | }, 21 | } 22 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/neotree.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "nvim-neo-tree/neo-tree.nvim", 4 | branch = "v3.x", 5 | priority = 1000, 6 | lazy = false, 7 | dependencies = { 8 | "nvim-lua/plenary.nvim", 9 | "nvim-tree/nvim-web-devicons", 10 | "MunifTanjim/nui.nvim", 11 | }, 12 | keys = { 13 | { "", "Neotree toggle", mode = "n", silent = true }, 14 | { "", "Neotree buffers", mode = "n", silent = true }, 15 | }, 16 | config = function() 17 | require("neo-tree").setup({ 18 | close_if_last_window = true, 19 | window = { 20 | mappings = { 21 | [""] = "none", 22 | ["o"] = "open", 23 | ["c"] = "close_node", 24 | [""] = "add_directory", 25 | }, 26 | }, 27 | filesystem = { 28 | filtered_items = { 29 | hide_dotfiles = false, 30 | hide_by_name = { 31 | "node_modules", 32 | }, 33 | never_show = { 34 | ".DS_Store", 35 | "thumbs.db", 36 | }, 37 | }, 38 | window = { 39 | mappings = { 40 | ["o"] = "open", 41 | [""] = "prev_git_modified", 42 | [""] = "next_git_modified", 43 | }, 44 | }, 45 | follow_current_file = { 46 | enabled = true, 47 | }, 48 | }, 49 | }) 50 | end, 51 | }, 52 | { 53 | "rmagatti/auto-session", 54 | dependencies = { "nvim-neo-tree/neo-tree.nvim" }, 55 | config = function() 56 | -- https://github.com/nvim-neo-tree/neo-tree.nvim/issues/357 57 | vim.api.nvim_create_autocmd({ "VimEnter" }, { 58 | callback = function() 59 | vim.defer_fn(function() 60 | vim.cmd("Neotree show") 61 | end, 10) 62 | end, 63 | }) 64 | 65 | -- fix https://github.com/neovim/neovim/issues/21856 66 | vim.api.nvim_create_autocmd({ "VimLeave" }, { 67 | callback = function() 68 | vim.fn.jobstart("", { detach = true }) 69 | end, 70 | }) 71 | 72 | require("auto-session").setup() 73 | end, 74 | }, 75 | { 76 | "hedyhli/outline.nvim", 77 | lazy = true, 78 | cmd = { "Outline", "OutlineOpen" }, 79 | keys = { 80 | { "o", "Outline", desc = "Toggle outline" }, 81 | }, 82 | config = function() 83 | require("outline").setup({ 84 | outline_window = { 85 | auto_jump = true, 86 | }, 87 | keymaps = { 88 | fold = "c", -- close 89 | unfold = "o", -- open 90 | }, 91 | outline_items = { 92 | show_symbol_lineno = true, 93 | }, 94 | symbols = { 95 | icon_fetcher = function() 96 | return "" 97 | end, 98 | }, 99 | }) 100 | end, 101 | }, 102 | } 103 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/treesitter.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "nvim-treesitter/nvim-treesitter", 3 | -- enabled = false, 4 | dependencies = { 5 | "nvim-treesitter/nvim-treesitter-textobjects", 6 | "nvim-treesitter/playground", 7 | }, 8 | config = function() 9 | require("nvim-treesitter.configs").setup({ 10 | playground = { 11 | enable = true, 12 | disable = {}, 13 | updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code 14 | persist_queries = false, -- Whether the query persists across vim sessions 15 | keybindings = { 16 | toggle_query_editor = "o", 17 | toggle_hl_groups = "i", 18 | toggle_injected_languages = "t", 19 | toggle_anonymous_nodes = "a", 20 | toggle_language_display = "I", 21 | focus_language = "f", 22 | unfocus_language = "F", 23 | update = "R", 24 | goto_node = "", 25 | show_help = "?", 26 | }, 27 | }, 28 | incremental_selection = { 29 | enable = true, 30 | keymaps = { 31 | node_incremental = "v", 32 | node_decremental = "V", 33 | }, 34 | }, 35 | textobjects = { 36 | select = { 37 | enable = true, 38 | -- Automatically jump forward to textobj, similar to targets.vim 39 | lookahead = true, 40 | keymaps = { 41 | ["af"] = "@function.outer", 42 | ["if"] = "@function.inner", 43 | ["ic"] = "@call_expression", 44 | ["ie"] = "@expression_list", 45 | ["ik"] = "@keyed_element", 46 | }, 47 | }, 48 | }, 49 | -- ensure_installed = "all", -- one of "all" or a list of languages 50 | ensure_installed = { 51 | -- "go", 52 | -- "gomod", 53 | "python", 54 | "query", 55 | "comment", -- highlight for "TODO", "FIXME" 56 | }, 57 | ignore_install = {}, -- List of parsers to ignore installing 58 | highlight = { 59 | enable = { "python", "lua", "go" }, 60 | -- enable = true, -- false will disable the whole extension 61 | disable = { "sql" }, -- list of language that will be disabled 62 | }, 63 | }) 64 | end, 65 | } 66 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/ui.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "famiu/bufdelete.nvim", 3 | { 4 | "akinsho/bufferline.nvim", 5 | event = "VeryLazy", 6 | config = function() 7 | require("bufferline").setup({ 8 | options = { 9 | numbers = "ordinal", 10 | indicator = { 11 | style = "underline", 12 | }, 13 | show_buffer_close_icons = false, 14 | show_close_icon = false, 15 | show_tab_indicators = false, 16 | show_buffer_icons = false, 17 | }, 18 | }) 19 | end, 20 | }, 21 | { 22 | "axkirillov/hbac.nvim", 23 | config = function() 24 | require("hbac").setup({ 25 | autoclose = true, 26 | threshold = 7, 27 | }) 28 | end, 29 | }, 30 | { 31 | "nvim-lualine/lualine.nvim", 32 | event = "VeryLazy", 33 | config = function() 34 | require("lualine").setup({ 35 | options = { 36 | -- theme = "jellybeans", 37 | theme = "gruvbox", 38 | component_separators = { 39 | left = " ", 40 | right = " ", 41 | }, 42 | section_separators = { 43 | left = " ", 44 | right = " ", 45 | }, 46 | }, 47 | sections = { 48 | lualine_c = { 49 | { 50 | "filename", 51 | path = 1, -- show relative path 52 | symbols = { 53 | modified = "[+]", -- Text to show when the file is modified. 54 | readonly = "[-]", -- Text to show when the file is non-modifiable or readonly. 55 | unnamed = "[Empty]", -- Text to sho for unnamed buffers. 56 | }, 57 | }, 58 | }, 59 | }, 60 | }) 61 | end, 62 | }, 63 | { 64 | "lukas-reineke/indent-blankline.nvim", 65 | main = "ibl", 66 | config = function() 67 | vim.opt.list = true 68 | vim.opt.listchars:append("tab:| ") 69 | vim.opt.listchars:append("trail:.") 70 | vim.opt.listchars:append("extends:>") 71 | vim.opt.listchars:append("precedes:<") 72 | vim.opt.listchars:append("lead: ") 73 | vim.opt.listchars:append("space: ") 74 | require("ibl").setup({ 75 | indent = { 76 | char = "▏", 77 | }, 78 | scope = { 79 | show_start = false, 80 | }, 81 | }) 82 | end, 83 | }, 84 | { 85 | "kevinhwang91/nvim-ufo", 86 | lazy = false, 87 | dependencies = "kevinhwang91/promise-async", 88 | config = function() 89 | vim.keymap.set("n", "zr", require("ufo").openAllFolds) 90 | vim.keymap.set("n", "zm", require("ufo").closeAllFolds) 91 | require("ufo").setup({}) 92 | end, 93 | }, 94 | { 95 | "mrjones2014/smart-splits.nvim", 96 | event = "VeryLazy", 97 | keys = { 98 | { 99 | "", 100 | function() 101 | require("smart-splits").resize_left() 102 | end, 103 | mode = "n", 104 | silent = true, 105 | }, 106 | { 107 | "", 108 | function() 109 | require("smart-splits").resize_down() 110 | end, 111 | mode = "n", 112 | silent = true, 113 | }, 114 | { 115 | "", 116 | function() 117 | require("smart-splits").resize_up() 118 | end, 119 | mode = "n", 120 | silent = true, 121 | }, 122 | { 123 | "", 124 | function() 125 | require("smart-splits").resize_right() 126 | end, 127 | mode = "n", 128 | silent = true, 129 | }, 130 | }, 131 | }, 132 | { 133 | "projekt0n/circles.nvim", 134 | dependencies = { 135 | "nvim-tree/nvim-web-devicons", 136 | }, 137 | config = function() 138 | require("circles").setup({ 139 | icons = { empty = "", filled = "", lsp_prefix = "" }, 140 | lsp = true, 141 | }) 142 | end, 143 | }, 144 | { 145 | "utilyre/sentiment.nvim", 146 | event = "VeryLazy", 147 | version = "*", 148 | opts = {}, 149 | }, 150 | } 151 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/vim-plugins.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "voldikss/vim-floaterm", 3 | { 4 | "junegunn/vim-easy-align", 5 | lazy = false, 6 | }, 7 | "kshenoy/vim-signature", -- 用于在侧边符号栏显示 marks (ma-mz 记录的位置) 8 | "tpope/vim-abolish", -- crs/crm/crc 9 | "preservim/nerdcommenter", 10 | "tpope/vim-repeat", 11 | "matze/vim-move", 12 | "szw/vim-maximizer", 13 | { 14 | "ojroques/vim-oscyank", 15 | tag = "v1.0.0", -- new version breaks, old version is good enough 16 | }, 17 | { 18 | "fatih/vim-go", 19 | ft = "go", 20 | event = "VeryLazy", 21 | }, 22 | -- https://github.com/buoto/gotests-vim/pull/10 23 | { 24 | "jakereps/gotests-vim", 25 | ft = "go", 26 | branch = "patch-1", 27 | event = "VeryLazy", 28 | }, 29 | "svban/YankAssassin.vim", 30 | "AndrewRadev/sideways.vim", 31 | "prisma/vim-prisma", 32 | } 33 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/vim-plugins.vim: -------------------------------------------------------------------------------- 1 | " cSpell:disable 2 | " The good old days in VIM 3 | 4 | " floaterm 5 | let g:floaterm_keymap_toggle = '' 6 | let g:floaterm_keymap_prev = '' 7 | let g:floaterm_keymap_next = '' 8 | let g:floaterm_width=0.85 9 | let g:floaterm_height=0.95 10 | 11 | " 'ruanyl/vim-gh-line' " invoke github/gitlab from vim 12 | " let g:gh_line_map_default = 0 13 | " let g:gh_line_blame_map_default = 1 14 | " let g:gh_line_map = 'gh' 15 | " let g:gh_line_blame_map = 'gb' 16 | " let g:gh_gitlab_domain = "git.curiostack.com" 17 | " let g:gh_use_canonical = 0 18 | 19 | " text object 20 | let g:vim_textobj_parameter_mapping = 'a' 21 | 22 | let g:UltiSnipsSnippetDirectories=[ "ultisnips" ] 23 | 24 | "let g:winresizer_start_key = '' 25 | 26 | let g:NERDDefaultAlign = 'left' 27 | let g:NERDSpaceDelims = 1 28 | let g:NERDAllowAnyVisualDelims = 0 29 | let g:NERDCreateDefaultMappings = 0 30 | 31 | " vim-repeat 32 | silent! call repeat#set("\MyWonderfulMap", v:count) 33 | 34 | 35 | " vim-go 36 | let g:go_auto_sameids = 0 37 | let g:go_fmt_autosave = 0 38 | let g:go_doc_keywordprg_enabled = 0 39 | let g:go_imports_mode = 'gopls' 40 | let g:go_gopls_gofumpt = v:true 41 | let g:go_def_mapping_enabled = 0 42 | let g:go_snippet_engine = "" 43 | " highlight 44 | let g:go_highlight_types = 1 45 | let g:go_highlight_fields = 1 46 | let g:go_highlight_functions = 1 47 | let g:go_highlight_function_calls = 1 48 | let g:go_highlight_extra_types = 1 49 | let g:go_highlight_operators = 1 50 | " msg 51 | let g:go_echo_command_info = 0 52 | 53 | 54 | " osc52 yank 55 | autocmd TextYankPost * 56 | \ if ( v:event.operator is 'y' || v:event.operator is 'c' || v:event.operator is 'd' ) 57 | \ && v:event.regname is '' | 58 | \ execute 'OSCYankReg "' | 59 | \ endif 60 | " autocmd TextYankPost * if v:event.operator is 'y' && v:event.regname is '+' | execute 'OSCYankReg +' | endif 61 | let g:oscyank_max_length = 100000000 62 | let g:oscyank_silent = v:true 63 | 64 | 65 | " kshenoy/vim-signature 66 | let g:SignatureMap = { 67 | \ 'GotoNextSpotAlpha' : "", 68 | \ 'GotoPrevSpotAlpha' : "", 69 | \ } 70 | 71 | " for coc 72 | function! CheckBackspace() abort 73 | let col = col('.') - 1 74 | return !col || getline('.')[col - 1] =~# '\s' 75 | endfunction 76 | -------------------------------------------------------------------------------- /nvim/.config/nvim/queries/go/textobjects.scm: -------------------------------------------------------------------------------- 1 | ; extends 2 | 3 | (literal_element) @parameter.inner 4 | 5 | (keyed_element) @parameter.inner 6 | 7 | (literal_element) @parameter.outer 8 | 9 | (keyed_element) @parameter.outer 10 | 11 | (literal_element) @keyed_element 12 | 13 | (return_statement 14 | (expression_list 15 | "," @_start . 16 | (_) @parameter.inner 17 | (#make-range! "parameter.outer" @_start @parameter.inner)) 18 | ) 19 | 20 | (return_statement 21 | (expression_list 22 | . (_) @parameter.inner 23 | . ","? @_end 24 | (#make-range! "parameter.outer" @parameter.inner @_end)) 25 | ) 26 | 27 | (if_statement 28 | condition: (_) @parameter.inner) 29 | 30 | (expression_list) @expression_list 31 | 32 | (call_expression) @call_expression 33 | -------------------------------------------------------------------------------- /nvim/.config/nvim/queries/typescript/textobjects.scm: -------------------------------------------------------------------------------- 1 | ;; extends 2 | 3 | (pair (property_identifier) @keyed_element) 4 | (pair (property_identifier) ":" (_) @keyed_element) 5 | -------------------------------------------------------------------------------- /nvim/.config/nvim/ultisnips/go.snippets: -------------------------------------------------------------------------------- 1 | snippet if "With Single Field" 2 | if err != nil { 3 | ${1} 4 | }${0} 5 | endsnippet 6 | 7 | snippet cc "context.TODO" i 8 | context.TODO(), 9 | endsnippet 10 | 11 | snippet ccc "ctx context.Context" i 12 | ctx context.Context 13 | endsnippet 14 | 15 | snippet logr "With Fields" i 16 | logrus.WithFields(f).Errorln("${1}", err)${0} 17 | endsnippet 18 | 19 | snippet logrr "With Fields" i 20 | logrus.WithFields(f).Errorln("${1}", err)${0} 21 | endsnippet 22 | 23 | snippet logf "logrus Fields" i 24 | f := logrus.Fields{"$1": $2} 25 | endsnippet 26 | 27 | snippet nowdate "now date" 28 | time.Now().Format("2006-01-02") ${0} 29 | endsnippet 30 | 31 | snippet now "now" 32 | time.Now().Unix()${0} 33 | endsnippet 34 | 35 | snippet spew "spew" i 36 | spew.Printf("${1}: %#+v\n", ${1})${0} 37 | endsnippet 38 | 39 | snippet yyyy "now date" 40 | "2006-01-02" ${0} 41 | endsnippet 42 | 43 | snippet predi "" 44 | func(${1:item} ${2:model}) bool { 45 | return ${3:true} 46 | } 47 | endsnippet 48 | 49 | snippet iter "" 50 | func(${1:item} ${2:T}, _ int) ${3:R} { 51 | return ${4:ret} 52 | } 53 | endsnippet 54 | 55 | snippet lofil "" 56 | lo.Filter(${1:slice}, func($2 ${3:T}, _ int) bool { 57 | return ${4:true} 58 | }) 59 | endsnippet 60 | 61 | snippet lomap "" 62 | lo.Map(${1:slice}, func(${2:item} ${3:T}, _ int) string { 63 | return ${4:ret} 64 | }) 65 | endsnippet 66 | 67 | snippet lofind "" 68 | lo.Find(${1:slice}, func(${2:item} ${3:model}) bool { 69 | return ${4:true} 70 | }) 71 | endsnippet 72 | 73 | snippet del "" 74 | "deleted": true, 75 | "deleted_by": c.DashboardUserEmail(), 76 | "deleted_at": time.Now().Unix(), 77 | endsnippet 78 | 79 | snippet upd "" 80 | "updated_by": c.DashboardUserEmail(), 81 | "updated_at": time.Now().Unix(), 82 | endsnippet 83 | 84 | snippet kv "key value" i 85 | "$1": $1$0 86 | endsnippet 87 | -------------------------------------------------------------------------------- /pg_format/.pg_format: -------------------------------------------------------------------------------- 1 | # Change the case of the reserved keyword. Default is unchanged: 0. 2 | # Values: 0=>unchanged, 1=>lowercase, 2=>uppercase, 3=>capitalize. 3 | function-case=2 4 | 5 | # Use tabs instead of space characters, when used spaces is set to 1 whatever is its value. 6 | tabs=0 7 | 8 | # Wrap queries at a certain length. 9 | wrap-limit=88 10 | -------------------------------------------------------------------------------- /selene/.config/selene/selene.toml: -------------------------------------------------------------------------------- 1 | std = "vim" 2 | -------------------------------------------------------------------------------- /selene/.config/selene/vim.toml: -------------------------------------------------------------------------------- 1 | [selene] 2 | base = "lua51" 3 | name = "vim" 4 | 5 | [vim] 6 | any = true 7 | 8 | [[describe.args]] 9 | type = "string" 10 | [[describe.args]] 11 | type = "function" 12 | 13 | [[it.args]] 14 | type = "string" 15 | [[it.args]] 16 | type = "function" 17 | 18 | [[before_each.args]] 19 | type = "function" 20 | [[after_each.args]] 21 | type = "function" 22 | 23 | [assert.is_not] 24 | any = true 25 | 26 | [assert.matches] 27 | any = true 28 | 29 | [assert.has_error] 30 | any = true 31 | 32 | [[assert.equals.args]] 33 | type = "any" 34 | [[assert.equals.args]] 35 | type = "any" 36 | [[assert.equals.args]] 37 | type = "any" 38 | required = false 39 | 40 | [[assert.same.args]] 41 | type = "any" 42 | [[assert.same.args]] 43 | type = "any" 44 | 45 | [[assert.truthy.args]] 46 | type = "any" 47 | 48 | [[assert.falsy.args]] 49 | type = "any" 50 | 51 | [[assert.spy.args]] 52 | type = "any" 53 | 54 | [[assert.stub.args]] 55 | type = "any" 56 | -------------------------------------------------------------------------------- /server/.bash_profile: -------------------------------------------------------------------------------- 1 | # path 2 | _enabled_paths=( 3 | "/usr/local/go/bin" 4 | "/usr/sbin" 5 | "/usr/local" 6 | "/usr/local/bin" 7 | "/usr/local/sbin" 8 | "$HOME/code/go/bin" 9 | ) 10 | 11 | for _enabled_path in ${_enabled_paths[@]}; do 12 | # only add to $PATH when path exist and path not in $PATH 13 | [[ ! :$PATH: == *":${_enabled_path}:"* ]] && 14 | PATH="$PATH:${_enabled_path}" 15 | done 16 | 17 | # alias 18 | alias .='cd .' 19 | alias ..='cd ..' 20 | alias ...='cd ../..' 21 | alias ....='cd ../../..' 22 | alias .....='cd ../../../..' 23 | alias i='sudo apt install' 24 | alias ll='ls -al' 25 | alias s='sudo systemctl' 26 | alias j='sudo journalctl' 27 | alias d='docker' 28 | alias dc='docker compose' 29 | alias ts='sudo tailscale' 30 | alias vi=vim 31 | 32 | # settings 33 | export VISUAL=vim 34 | export EDITOR=vim 35 | # go env 36 | export GOPROXY=https://goproxy.cn 37 | export GOPATH=$HOME/code/go 38 | 39 | # prompt 40 | PS1_PROMPT() { 41 | local e=$? 42 | (( e )) && printf "\033[0;31m $e> \033[0m\n" || printf "$ " 43 | return $e 44 | } 45 | PS1='\[\e[0m\]\u@\h:\w\[\e[0m\]' 46 | PS1="$PS1"'$(PS1_PROMPT)' 47 | 48 | # functions 49 | mc() { 50 | mkdir -p -- "$1" && cd -P -- "$1" 51 | } 52 | 53 | extract() { 54 | if [ -f $1 ]; then 55 | case $1 in 56 | *.tar.bz2) tar xjf $1 ;; 57 | *.tar.gz) tar xzf $1 ;; 58 | *.tar.xz) tar xf $1 ;; 59 | *.bz2) bunzip2 $1 ;; 60 | *.rar) unrar e $1 ;; 61 | *.gz) gunzip $1 ;; 62 | *.tar) tar xf $1 ;; 63 | *.tbz2) tar xjf $1 ;; 64 | *.tgz) tar xzf $1 ;; 65 | *.zip) unzip $1 ;; 66 | *.Z) uncompress $1 ;; 67 | *.7z) 7z x $1 ;; 68 | *) echo "'$1' cannot be extracted via extract()" ;; 69 | esac 70 | else 71 | echo "'$1' is not a valid file" 72 | fi 73 | } 74 | 75 | set_timezone() { 76 | sudo timedatectl set-timezone Asia/Shanghai 77 | } 78 | 79 | add_no_login_user() { 80 | sudo groupadd $1 81 | sudo useradd --system \ 82 | --gid $1 \ 83 | --create-home \ 84 | --home-dir /var/lib/$1 \ 85 | --shell /usr/sbin/nologin \ 86 | $1 87 | } 88 | 89 | add_user() { 90 | sudo groupadd $1 91 | sudo useradd \ 92 | --gid $1 93 | $1 94 | 95 | usermod -aG sudo $1 96 | } 97 | 98 | install_docker() { 99 | curl -fsSL https://get.docker.com -o get-docker.sh 100 | 101 | sudo sh get-docker.sh 102 | 103 | sudo groupadd docker 104 | sudo usermod -aG docker $USER 105 | 106 | newgrp docker 107 | docker info 108 | } 109 | 110 | install_tailscale() { 111 | curl -fsSL https://tailscale.com/install.sh | sh 112 | } 113 | -------------------------------------------------------------------------------- /server/.config/fish/config.fish: -------------------------------------------------------------------------------- 1 | set fish_prompt_pwd_dir_length 0 2 | set fish_greeting 3 | 4 | # ansible 5 | alias an='ansible' 6 | alias ap='ansible-playbook' 7 | 8 | # dir 9 | alias ..='cd ..' 10 | alias ...='cd ../..' 11 | alias ....='cd ../../..' 12 | alias .....='cd ../../../..' 13 | alias ll='exa -al --group-directories-first' 14 | alias vi=vim 15 | if type -q nvim 16 | alias vi=nvim 17 | end 18 | alias which=type 19 | 20 | # docker 21 | alias d='docker' 22 | alias dc='docker compose' 23 | alias dr='docker run --rm' 24 | alias dcup='docker compose up' 25 | alias dil='docker image ls' 26 | alias dcl='docker container ls -a' 27 | alias drm='docker rm' 28 | alias drmi='docker rmi' 29 | 30 | # git 31 | alias ga='git add .' 32 | alias gc='git commit -m' 33 | alias g='gitui' 34 | alias glp='gl -p' 35 | alias glm='gl -m' 36 | alias glb='gl -b' 37 | alias glc='gl -c' 38 | 39 | # tmux 40 | alias t='tmux' 41 | alias ta='tmux attach-session -t' 42 | alias tn='tmux new-session -s' 43 | alias tka='tmux kill-session -a' 44 | alias tk='tmux kill-seesion -t' 45 | alias tx='tmuxp' 46 | 47 | # go 48 | set -gx GOPATH $HOME/code/go 49 | set -gx GOPROXY https://goproxy.cn,direct 50 | 51 | # Added by n-install (see http://git.io/n-install-repo). 52 | set -Ux N_PREFIX "$HOME/code/n" 53 | 54 | # pyenv 55 | set -Ux PYENV_ROOT "$HOME/.pyenv" 56 | command -v pyenv >/dev/null && eval (pyenv init - | source) 57 | 58 | # misc 59 | set -Ux XDG_CONFIG_HOME "$HOME/.config" 60 | set -Ux XDG_CACHE_HOME "$HOME/.cache" 61 | set -Ux VISUAL vi 62 | set -Ux EDITOR vi 63 | set -Ux GIT_EDITOR vi 64 | set -Ux LANG "en_US.UTF-8" 65 | set -Ux LC_CTYPE "en_US.UTF-8" 66 | set -Ux LC_ALL "en_US.UTF-8" 67 | set -Ux GPG_TTY (tty) 68 | # for tmux in wezterm, kitty 69 | # set -x TERM "screen-256color" 70 | 71 | set -l _paths \ 72 | $HOME/.local/bin \ 73 | $HOME/code/go/bin \ 74 | $HOME/.local/share/nvim/mason/bin \ 75 | $HOME/code/gems/bin \ 76 | $GOPATH/bin \ 77 | $N_PREFIX/bin \ 78 | $HOME/.cargo/bin \ 79 | $PYENV_ROOT/bin \ 80 | /usr/bin \ 81 | /usr/sbin \ 82 | # for go on macOS 83 | /usr/local \ 84 | /usr/local/bin \ 85 | /usr/local/sbin \ 86 | # macOS JDK 87 | /usr/local/opt/openjdk/bin \ 88 | # CUDA: Ubuntu/Debian 89 | /usr/local/cuda/bin \ 90 | # CUDA: Arch 91 | /opt/cuda/bin \ 92 | # dotnet 93 | $HOME/.dotnet/tools 94 | 95 | for path in $_paths 96 | # only add to $PATH when path exist and path not in $PATH 97 | test -d "$path" && 98 | not contains $PATH "$path" && 99 | set -x PATH $PATH "$path" 100 | end 101 | 102 | function mc 103 | mkdir -p -- $argv[1] && cd -P -- $argv[1] 104 | end 105 | 106 | # os 107 | alias j='sudo journalctl' 108 | alias s='sudo systemctl' 109 | alias ts='sudo tailscale' 110 | type -q apt && alias i='sudo apt install' 111 | -------------------------------------------------------------------------------- /server/.config/init/init.vim: -------------------------------------------------------------------------------- 1 | set hlsearch 2 | set noswapfile 3 | set hidden 4 | set autowrite 5 | set clipboard=unnamed,unnamedplus " y/d/c copy to/from system clipboard 6 | set autoindent 7 | set winaltkeys=no " Windows 禁用 ALT 操作菜单(使得 ALT 可以用到 Vim里) 8 | set ruler " 显示光标位置 9 | set autoread " auto reload when file on disk changed 10 | set ignorecase " 智能搜索大小写判断,默认忽略大小写,除非搜索内容包含大写字母 11 | set smartcase 12 | set hlsearch " 高亮搜索内容 13 | set incsearch " 查找输入时动态增量显示查找结果 14 | set showmatch " 显示匹配的括号 15 | set display=lastline " 显示最后一行 16 | set wildmenu " 允许下方显示目录 17 | set formatoptions+=B " 合并两行中文时,不在中间加空格 18 | set ffs=unix,dos,mac " 文件换行符,默认使用 unix 换行符 19 | set foldenable " 允许代码折叠 20 | set fdm=indent " 代码折叠默认使用缩进 21 | set foldlevel=99 " 默认打开所有缩进 22 | set tabstop=4 " tab size 23 | set shiftwidth=4 24 | set laststatus=2 " 总是显示状态栏 25 | set number " 总是显示行号 26 | set relativenumber 27 | set signcolumn=yes " 总是显示侧边栏(用于显示 mark/gitdiff/诊断信息) 28 | set colorcolumn=88 " 显示列宽 29 | set showtabline=2 " 总是显示标签栏 30 | set listchars=tab:\|\ ,trail:.,extends:>,precedes:< " 设置分隔符可视 31 | set list " 设置显示制表符等隐藏字符 32 | set showcmd " 右下角显示命令 33 | set splitright " 水平切割窗口时,默认在右边显示新窗口 34 | set background=dark " 设置黑色背景 35 | set fileencoding=utf-8 " 文件默认编码 36 | set t_Co=256 " 允许256色 37 | let &t_8f = "\[38;2;%lu;%lu;%lum" 38 | let &t_8b = "\[48;2;%lu;%lu;%lum" 39 | set termguicolors 40 | set paste 41 | 42 | " different cursor shape in normal/insert mode 43 | let &t_SI = "\e[6 q" 44 | let &t_EI = "\e[2 q" 45 | 46 | 47 | syntax enable 48 | syntax on 49 | 50 | 51 | " support Alt 52 | function! Terminal_MetaMode(mode) 53 | set ttimeout 54 | if $TMUX != '' 55 | set ttimeoutlen=30 56 | elseif &ttimeoutlen > 80 || &ttimeoutlen <= 0 57 | set ttimeoutlen=80 58 | endif 59 | if has('nvim') || has('gui_running') 60 | return 61 | endif 62 | function! s:metacode(mode, key) 63 | if a:mode == 0 64 | exec "set =\e".a:key 65 | else 66 | exec "set =\e]{0}".a:key."~" 67 | endif 68 | endfunc 69 | for i in range(10) 70 | call s:metacode(a:mode, nr2char(char2nr('0') + i)) 71 | endfor 72 | for i in range(26) 73 | call s:metacode(a:mode, nr2char(char2nr('a') + i)) 74 | call s:metacode(a:mode, nr2char(char2nr('A') + i)) 75 | endfor 76 | if a:mode != 0 77 | for c in [',', '.', '/', ';', '[', ']', '{', '}'] 78 | call s:metacode(a:mode, c) 79 | endfor 80 | for c in ['?', ':', '-', '_'] 81 | call s:metacode(a:mode, c) 82 | endfor 83 | else 84 | for c in [',', '.', '/', ';', '{', '}'] 85 | call s:metacode(a:mode, c) 86 | endfor 87 | for c in ['?', ':', '-', '_'] 88 | call s:metacode(a:mode, c) 89 | endfor 90 | endif 91 | endfunc 92 | call Terminal_MetaMode(0) 93 | 94 | 95 | map 96 | 97 | inoremap :w 98 | nnoremap :w 99 | nnoremap :qa 100 | nnoremap q 101 | nnoremap :q 102 | 103 | " faster movement 104 | nnoremap 9 105 | nnoremap 9 106 | 107 | " Keep search pattern at the center of the screen. 108 | nnoremap n nzz 109 | nnoremap j gj 110 | nnoremap k gk 111 | nnoremap N Nzz 112 | nnoremap * *zz 113 | nnoremap # #zz 114 | nnoremap g* g*zz 115 | nnoremap % 116 | vnoremap % 117 | 118 | " move to line start/end 119 | noremap H ^ 120 | noremap L $ 121 | " mark 122 | nnoremap ' ` 123 | 124 | " search selected content in visual mode: https://blog.twofei.com/610/ 125 | vnoremap // y/" 126 | nnoremap // :noh 127 | 128 | " save file with sudo 129 | cnoremap sudow w !sudo tee % >/dev/null 130 | 131 | nnoremap nn :set nu! set rnu! set signcolumn=no 132 | 133 | colorscheme slate 134 | -------------------------------------------------------------------------------- /server/.local/bin/clone: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | import re 5 | import os 6 | 7 | 8 | def main(): 9 | if len(sys.argv) == 1: 10 | sys.exit(0) 11 | elif len(sys.argv) == 2: 12 | clone(sys.argv[1]) 13 | 14 | 15 | def clone(url: str) -> None: 16 | host, org, repo = split_url(url) 17 | if host == "": 18 | print('no host') 19 | return None 20 | 21 | dir = get_dir() 22 | target = os.path.join(dir, host, org, repo) 23 | 24 | git_url = f"git@{host}:{org}/{repo}.git" 25 | cmd = f"git clone {git_url} {target}" 26 | print(cmd, flush=True) 27 | if os.path.exists(target): 28 | return 29 | run(cmd) 30 | 31 | 32 | def get_dir() -> str: 33 | return os.path.expanduser("~/code") 34 | 35 | 36 | def split_url(url: str) -> tuple[str, str, str]: 37 | # https://github.com/keaising/dotfile 38 | reg_ex = r"[a-zA-Z]+(@|://)(?P\w[\w\.\-]+)(:|/)(?P\w[\w\.\-\/]+)/(?P\w[\w\.\-]+)" 39 | if url.endswith("git"): 40 | # https://github.com/keaising/dotfile.git 41 | # git@github.com:keaising/dotfile.git 42 | reg_ex = r"[a-zA-Z]+(@|://)(?P\w[\w\.\-]+)(:|/)(?P\w[\w\.\-\/]+)/(?P\w[\w\.\-]+).git" 43 | result = re.match(reg_ex, url) 44 | if result is None: 45 | return "", "", "" 46 | return (result.group("host_name"), result.group("org"), result.group("repo")) 47 | 48 | 49 | def fetch(command: str) -> str: 50 | return os.popen(command).read().strip() 51 | 52 | 53 | def run(command: str) -> None: 54 | os.system(command) 55 | 56 | 57 | main() 58 | -------------------------------------------------------------------------------- /server/.tmux.conf: -------------------------------------------------------------------------------- 1 | # normal --- {{{ 2 | set -g @scroll-speed-num-lines-per-scroll 3 3 | set -g mouse on 4 | # set-option -g status-position top 5 | 6 | # scroll back buffer n lines 7 | set -g history-limit 100000 8 | set -g display-time 4000 9 | # for os x 10 | set -g set-clipboard on 11 | 12 | setw -g mode-keys vi 13 | 14 | set -g base-index 1 15 | setw -g pane-base-index 1 16 | 17 | # focus events enabled for terminals that support them 18 | set -g focus-events on 19 | # super useful when using "grouped sessions" and multi-monitor setup 20 | setw -g aggressive-resize on 21 | 22 | # --- }}} 23 | 24 | 25 | # style ---{{{ 26 | # change focous color 27 | # set -g window-style 'fg=colour247,bg=colour236' 28 | # set -g window-active-style 'fg=colour251,bg=black' 29 | 30 | # terminal settings 31 | # https://github.com/microsoft/WSL/issues/5931#issuecomment-1296783606 32 | set -sg escape-time 1 33 | # cursor blink in vim 34 | set -ga terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q' 35 | 36 | # for osc52, "screen-256color" must match with $TERM from shell 37 | # Never upgrade to version 3.3a! osc52 will be broken. 38 | set -ga terminal-overrides ",*256col*:Tc" 39 | set -g default-terminal "screen-256color" 40 | set -as terminal-features ',screen-256color:clipboard' 41 | 42 | # --- }}} 43 | 44 | 45 | # key binding --- {{{ 46 | set -g prefix C-a 47 | bind C-a send-prefix 48 | unbind C-b 49 | unbind , 50 | unbind Right 51 | 52 | # reload config 53 | bind R source-file ~/.tmux.conf 54 | 55 | # kill 56 | bind x kill-pane 57 | bind X kill-window 58 | bind K confirm kill-session 59 | # bind K confirm kill-server 60 | # you should not use shortcut to kill server 61 | 62 | # window switch 63 | #| n => next window 64 | #| p => previous window 65 | #| { => move current pane to previous position 66 | #| } => move current pane to next position 67 | bind -r n next-window 68 | bind -r p previous-window 69 | bind Left previous-window 70 | bind Right next-window 71 | 72 | bind \{ swap-window -t -1\; select-window -t -1 73 | bind \} swap-window -t +1\; select-window -t +1 74 | bind , swap-window -t -1\; select-window -t -1 75 | bind . swap-window -t +1\; select-window -t +1 76 | 77 | # session 78 | bind Down switch-client -n 79 | bind Up switch-client -p 80 | bind Enter switch-client -l 81 | bind C-r command-prompt "rename-session %%" 82 | 83 | # layout 84 | bind ] next-layout 85 | bind [ previous-layout 86 | bind ! select-layout main-vertical # shift + 1 87 | bind @ select-layout main-horizontal # shift + 2 88 | bind \# select-layout even-vertical # shift + 3 89 | bind $ select-layout even-horizontal # shift + 4 90 | bind % select-layout tiled # shift + 5 91 | 92 | # window rename 93 | bind-key c new-window #\; rename-window "#{b:pane_current_path}" 94 | bind-key r command-prompt "rename-window %%" 95 | 96 | bind-key Space rename-window "#{b:pane_current_path}" 97 | 98 | 99 | # window-pane switch 100 | bind b break-pane -s : 101 | bind t command-prompt -p "join pane from:" "join-pane -h -s '%%'" 102 | bind y command-prompt -p "join pane from:" "join-pane -v -s '%%'" 103 | # bind-key s command-prompt -p "send pane to:" "join-pane -h -t '%%'" 104 | 105 | ### C-o: rotate all panes 106 | 107 | # pane split 108 | bind | split-window -h -c "#{pane_current_path}" 109 | bind \\ split-window -h -c "#{pane_current_path}" 110 | bind - split-window -v -c "#{pane_current_path}" 111 | unbind '"' 112 | unbind % 113 | 114 | # pane resizing 115 | bind -r C-k resize-pane -U 5 116 | bind -r C-j resize-pane -D 5 117 | bind -r C-h resize-pane -L 5 118 | bind -r C-l resize-pane -R 5 119 | 120 | # pane switching 121 | bind k select-pane -U 122 | bind j select-pane -D 123 | bind h select-pane -L 124 | bind l select-pane -R 125 | 126 | # pane swap 127 | bind H swap-pane -U 128 | bind L swap-pane -D 129 | 130 | 131 | bind -n S-M-Left { 132 | copy-mode 133 | send -X clear-selection 134 | send -X start-of-line 135 | send -X cursor-left 136 | send -X begin-selection 137 | send -X start-of-line 138 | send -X stop-selection 139 | } 140 | 141 | bind -n S-M-Up { 142 | copy-mode 143 | send -X clear-selection 144 | send -X cursor-up 145 | send -X start-of-line 146 | send -X start-of-line 147 | send -X cursor-left 148 | send -X begin-selection 149 | send -X search-backward "(Δ )|(Ε )|(✘ )" 150 | send -X start-of-line 151 | send -X start-of-line 152 | send -X stop-selection 153 | } 154 | 155 | bind -n S-M-Right { 156 | copy-mode 157 | send -X clear-selection 158 | send -X cursor-down 159 | send -X start-of-line 160 | send -X begin-selection 161 | send -X end-of-line 162 | send -X stop-selection 163 | } 164 | 165 | bind -n S-M-Down { 166 | copy-mode 167 | send -X clear-selection 168 | send -X end-of-line 169 | send -X end-of-line 170 | send -X search-forward "(Δ )|(Ε )|(✘ )" 171 | send -X start-of-line 172 | send -X start-of-line 173 | send -X begin-selection 174 | send -X search-forward "(Δ )|(Ε )|(✘ )" 175 | send -X cursor-up 176 | send -X start-of-line 177 | send -X start-of-line 178 | send -X cursor-left 179 | send -X stop-selection 180 | } 181 | 182 | # --- }}} 183 | -------------------------------------------------------------------------------- /server/.vimrc: -------------------------------------------------------------------------------- 1 | set hlsearch 2 | set noswapfile 3 | set hidden 4 | set autowrite 5 | set clipboard=unnamed,unnamedplus " y/d/c copy to/from system clipboard 6 | set autoindent 7 | set winaltkeys=no " Windows 禁用 ALT 操作菜单(使得 ALT 可以用到 Vim里) 8 | set ruler " 显示光标位置 9 | set autoread " auto reload when file on disk changed 10 | set ignorecase " 智能搜索大小写判断,默认忽略大小写,除非搜索内容包含大写字母 11 | set smartcase 12 | set hlsearch " 高亮搜索内容 13 | set incsearch " 查找输入时动态增量显示查找结果 14 | set showmatch " 显示匹配的括号 15 | set display=lastline " 显示最后一行 16 | set wildmenu " 允许下方显示目录 17 | set formatoptions+=B " 合并两行中文时,不在中间加空格 18 | set ffs=unix,dos,mac " 文件换行符,默认使用 unix 换行符 19 | set foldenable " 允许代码折叠 20 | set fdm=indent " 代码折叠默认使用缩进 21 | set foldlevel=99 " 默认打开所有缩进 22 | set tabstop=4 " tab size 23 | set shiftwidth=4 24 | set laststatus=2 " 总是显示状态栏 25 | set number " 总是显示行号 26 | set relativenumber 27 | set signcolumn=yes " 总是显示侧边栏(用于显示 mark/gitdiff/诊断信息) 28 | set colorcolumn=88 " 显示列宽 29 | set showtabline=2 " 总是显示标签栏 30 | set listchars=tab:\|\ ,trail:.,extends:>,precedes:< " 设置分隔符可视 31 | set list " 设置显示制表符等隐藏字符 32 | set showcmd " 右下角显示命令 33 | set splitright " 水平切割窗口时,默认在右边显示新窗口 34 | set background=dark " 设置黑色背景 35 | set fileencoding=utf-8 " 文件默认编码 36 | set t_Co=256 " 允许256色 37 | let &t_8f = "\[38;2;%lu;%lu;%lum" 38 | let &t_8b = "\[48;2;%lu;%lu;%lum" 39 | set termguicolors 40 | set paste 41 | 42 | " different cursor shape in normal/insert mode 43 | let &t_SI = "\e[6 q" 44 | let &t_EI = "\e[2 q" 45 | 46 | 47 | syntax enable 48 | syntax on 49 | 50 | 51 | " support Alt 52 | function! Terminal_MetaMode(mode) 53 | set ttimeout 54 | if $TMUX != '' 55 | set ttimeoutlen=30 56 | elseif &ttimeoutlen > 80 || &ttimeoutlen <= 0 57 | set ttimeoutlen=80 58 | endif 59 | if has('nvim') || has('gui_running') 60 | return 61 | endif 62 | function! s:metacode(mode, key) 63 | if a:mode == 0 64 | exec "set =\e".a:key 65 | else 66 | exec "set =\e]{0}".a:key."~" 67 | endif 68 | endfunc 69 | for i in range(10) 70 | call s:metacode(a:mode, nr2char(char2nr('0') + i)) 71 | endfor 72 | for i in range(26) 73 | call s:metacode(a:mode, nr2char(char2nr('a') + i)) 74 | call s:metacode(a:mode, nr2char(char2nr('A') + i)) 75 | endfor 76 | if a:mode != 0 77 | for c in [',', '.', '/', ';', '[', ']', '{', '}'] 78 | call s:metacode(a:mode, c) 79 | endfor 80 | for c in ['?', ':', '-', '_'] 81 | call s:metacode(a:mode, c) 82 | endfor 83 | else 84 | for c in [',', '.', '/', ';', '{', '}'] 85 | call s:metacode(a:mode, c) 86 | endfor 87 | for c in ['?', ':', '-', '_'] 88 | call s:metacode(a:mode, c) 89 | endfor 90 | endif 91 | endfunc 92 | call Terminal_MetaMode(0) 93 | 94 | 95 | map 96 | 97 | inoremap :w 98 | nnoremap :w 99 | nnoremap :qa 100 | nnoremap q 101 | nnoremap :q 102 | 103 | " faster movement 104 | nnoremap 9 105 | nnoremap 9 106 | 107 | " Keep search pattern at the center of the screen. 108 | nnoremap n nzz 109 | nnoremap j gj 110 | nnoremap k gk 111 | nnoremap N Nzz 112 | nnoremap * *zz 113 | nnoremap # #zz 114 | nnoremap g* g*zz 115 | nnoremap % 116 | vnoremap % 117 | 118 | " move to line start/end 119 | noremap H ^ 120 | noremap L $ 121 | " mark 122 | nnoremap ' ` 123 | 124 | " search selected content in visual mode: https://blog.twofei.com/610/ 125 | vnoremap // y/" 126 | nnoremap // :noh 127 | 128 | " save file with sudo 129 | cnoremap sudow w !sudo tee % >/dev/null 130 | 131 | nnoremap nn :set nu! set rnu! set signcolumn=no 132 | 133 | colorscheme slate 134 | -------------------------------------------------------------------------------- /sqlite3/.sqliterc: -------------------------------------------------------------------------------- 1 | .mode table 2 | .header on 3 | -------------------------------------------------------------------------------- /stow/.stowrc: -------------------------------------------------------------------------------- 1 | # target folder 2 | --target=~ 3 | 4 | # verbose 5 | -v 6 | 7 | # only create links for files rather than folders, 8 | # because some config comes from both confidential and unconfidential repo. 9 | --no-folding 10 | -------------------------------------------------------------------------------- /stylua.toml: -------------------------------------------------------------------------------- 1 | indent_type = "Spaces" 2 | indent_width = 4 3 | column_width = 120 4 | -------------------------------------------------------------------------------- /tmux/.local/bin/tmux-new-window: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | prefix=( 4 | "$(pwd)" 5 | ) 6 | 7 | suffix=( 8 | "$HOME/.config" 9 | "$HOME/.local" 10 | "$HOME/Downloads" 11 | ) 12 | 13 | search=$(fd --type d \ 14 | --max-depth 3 \ 15 | --hidden \ 16 | --exclude "bin" \ 17 | --exclude "go" \ 18 | --exclude "include" \ 19 | --exclude "lib" \ 20 | --exclude "n" \ 21 | --exclude "share" \ 22 | --follow \ 23 | . \ 24 | "$HOME/code") 25 | 26 | lines=$( 27 | #1 28 | for p in "${prefix[@]}"; do 29 | # only use it when path exist 30 | [[ -d "${p}" ]] && printf '%s\n' "$p" 31 | done 32 | 33 | #2 append fd results 34 | printf '%s' "$search" 35 | 36 | #3 37 | for p in "${suffix[@]}"; do 38 | # only use it when path exist 39 | [[ -d "${p}" ]] && printf '%s\n' "$p" 40 | done 41 | ) 42 | 43 | selected="$(printf '%s\n' "$(echo "${lines}" | fzf)")" 44 | 45 | [[ ${#selected} != 0 ]] || exit 0 46 | 47 | selected_name=$(basename "$selected" | tr . _) 48 | 49 | tmux new-window -c "$selected" -n "$selected_name" -b 50 | -------------------------------------------------------------------------------- /tmux/.local/bin/tmux-sessionizer: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [[ $# -eq 1 ]]; then 4 | selected=$1 5 | else 6 | selected=$(find ~/code -mindepth 3 -maxdepth 3 -type d | fzf) 7 | fi 8 | 9 | if [[ -z $selected ]]; then 10 | exit 0 11 | fi 12 | 13 | selected_name=$(basename "$selected" | tr . _) 14 | tmux_running=$(pgrep tmux) 15 | 16 | if [[ -z $TMUX ]] && [[ -z $tmux_running ]]; then 17 | tmux new-session -s $selected_name -c $selected 18 | exit 0 19 | fi 20 | 21 | if ! tmux has-session -t=$selected_name 2>/dev/null; then 22 | tmux new-session -ds $selected_name -c $selected 23 | fi 24 | 25 | tmux switch-client -t $selected_name 26 | --------------------------------------------------------------------------------