├── .github └── workflows │ └── docker-image.yml ├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── cover-dark.png ├── cover-light.png ├── kitty ├── kitty.conf ├── latte.conf ├── mocha.conf ├── neighboring_window.py ├── relative_resize.py └── split_window.py ├── nvim ├── .gitignore ├── .neoconf.json ├── init.lua ├── lazyvim.json ├── lua │ ├── config │ │ ├── autocmds.lua │ │ ├── keymaps.lua │ │ ├── lazy.lua │ │ └── options.lua │ └── plugins │ │ ├── code.lua │ │ ├── colorscheme.lua │ │ ├── editor.lua │ │ ├── format.lua │ │ ├── lsp.lua │ │ ├── treesitter.lua │ │ ├── ui.lua │ │ └── utils.lua └── stylua.toml ├── scripts └── install-software.sh ├── yazi ├── flavors │ ├── catppuccin-latte.yazi │ │ ├── LICENSE │ │ ├── LICENSE-tmtheme │ │ ├── README.md │ │ ├── flavor.toml │ │ └── tmtheme.xml │ └── catppuccin-mocha.yazi │ │ ├── LICENSE │ │ ├── LICENSE-tmtheme │ │ ├── README.md │ │ ├── flavor.toml │ │ └── tmtheme.xml ├── fzf-scope.sh ├── init.lua ├── keymap.toml ├── package.toml ├── plugins │ ├── git.yazi │ │ ├── LICENSE │ │ ├── README.md │ │ └── main.lua │ ├── no-status.yazi │ │ ├── LICENSE │ │ ├── README.md │ │ └── main.lua │ └── smart-enter.yazi │ │ ├── LICENSE │ │ ├── README.md │ │ └── main.lua ├── theme.toml └── yazi.toml └── zsh ├── zimrc ├── zsh ├── alias.zsh ├── environment.zsh ├── functions.zsh ├── keybinds.zsh ├── plugins.zsh ├── software │ ├── fzf.zsh │ ├── kitty.zsh │ └── zoxide.zsh └── theme.zsh └── zshrc /.github/workflows/docker-image.yml: -------------------------------------------------------------------------------- 1 | name: Docker Image CI 2 | 3 | on: 4 | push: 5 | branches: [ "main" ] 6 | 7 | jobs: 8 | 9 | build: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v4 14 | - name: Build the Docker image 15 | run: | 16 | docker build . --file Dockerfile --tag ch4xer/dev:${{ github.sha }} 17 | docker tag ch4xer/dev:${{ github.sha }} ch4xer/dev:latest 18 | 19 | - name: Login to Docker Hub 20 | uses: docker/login-action@v1 21 | with: 22 | username: ${{secrets.DOCKER_HUB_USERNAME}} 23 | password: ${{secrets.DOCKER_HUB_ACCESS_TOKEN}} 24 | 25 | - name: Push Docker image to Docker Hub 26 | run: | 27 | docker push ch4xer/dev:latest 28 | docker push ch4xer/dev:${{ github.sha }} 29 | 30 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .luarc.json 2 | zsh/zsh/software/* 3 | zsh/zsh/plugins/* 4 | lazy-lock.json 5 | !.gitkeep 6 | !zoxide.zsh 7 | !fzf.zsh 8 | !kitty.zsh 9 | *.zwc 10 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM archlinux:latest 2 | 3 | RUN sed -i 's/^# *\(en_US.UTF-8 UTF-8\)/\1/' /etc/locale.gen 4 | RUN locale-gen 5 | COPY . /root/dev 6 | WORKDIR /root/dev 7 | # RUN sed -i 's/^Server =.*archlinux.org$/Server = https:\/\/mirrors.tuna.tsinghua.edu.cn\/archlinux\/\$repo\/os\/\$arch/' /etc/pacman.d/mirrorlist 8 | RUN pacman -Sy && pacman -S --needed --noconfirm sudo 9 | RUN echo 'o' | bash ./scripts/install-software.sh 10 | RUN nvim --headless "+Lazy! sync" +qa 11 | WORKDIR /root 12 | RUN rm -r /root/dev 13 | 14 | CMD [ "/bin/zsh" ] 15 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Development Toolkit 📡 2 | 3 | A simple, comprehensive and user-friendly development toolkit to boost up your productivity 🚀. 4 | 5 | ![Screenshot-dark](cover-dark.png) 6 | 7 | ![Screenshot-light](cover-light.png) 8 | 9 | - terminal emulator: [kitty](https://github.com/kovidgoyal/kitty) 10 | - shell: [zsh](https://www.zsh.org/) 11 | - editor: [neovim](https://github.com/neovim/neovim) 12 | - terminal filemanager: [yazi](https://github.com/sxyazi/yazi) 13 | 14 | ## Try 15 | 16 | ```bash 17 | docker run -it --rm --name dev ch4xer/dev:latest /bin/zsh 18 | ``` 19 | 20 | ## Install 21 | 22 | ```bash 23 | git clone https://github.com/ch3n9w/dev 24 | cd dev 25 | # install dependency software and install configuration 26 | ./scripts/install-software.sh 27 | ``` 28 | 29 | Alternatively (if you dont want to install all of them), you can copy the configuration directory you like to `XDG_CONFIG_HOME` (commonly `~/.config`), for example: 30 | 31 | ``` 32 | nvim -> ~/.config/nvim 33 | kitty -> ~/.config/kitty 34 | yazi -> ~/.config/yazi 35 | zsh/zsh -> ~/.config/zsh 36 | zsh/zshrc -> ~/.zshrc 37 | zsh/zimrc -> ~/.zimrc 38 | ``` 39 | 40 | ## Noteable Info 41 | 42 | - Kitty 43 | - use `Ctrl` and `Shift` as modifier key for all shortcuts 44 | - use JetbrainMono Nerd Font and LXGW WenKai as font 45 | - Zsh 46 | - you can add software settings in `zsh/zsh/software` 47 | - disable vim mode. 48 | - Neovim 49 | - Based on LazyVim, with some simplifications to make it more tiny and user-friendly 50 | 51 | ## Theme 52 | 53 | The default theme of the toolkit is dark, if you want to change to light theme: 54 | 55 | - modify `kitty/kitty.conf`, replace `include mocha.conf` with `include latte.conf` 56 | - modify `nvim/lua/plugins/colorscheme.lua`, replace `flavour = "mocha"` with `flavour = "latte"`. 57 | 58 | ## Critical Keymap 59 | 60 | Please check the configuration file for the complete key mapping. Here we only record some of the more frequently used ones. 61 | 62 | | Software | Key | Effect | 63 | | :----------: | :------------: | :-----------------------------------: | 64 | | zsh | C-r | call filemanager | 65 | | zsh | C-Backspace | delete word backward | 66 | | yazi | gh | go to home (~) | 67 | | yazi | gn | go to ~/Downloads | 68 | | yazi | H/L | go to previous/next visited directory | 69 | | yazi | a | create file/dir | 70 | | yazi | r | rename file or directory | 71 | | yazi | . | show hidden file | 72 | | yazi | y | copy | 73 | | yazi | d | cut | 74 | | yazi | p | paste | 75 | | yazi | Delete | move file to trashcan | 76 | | yazi | f | search and jump with fzf | 77 | | yazi | z | jump with zoxide | 78 | | kitty | C-t | new tab | 79 | | kitty | C-CR | new window | 80 | | kitty | C-w | delete window | 81 | | kitty | C-n | new terminal window | 82 | | kitty | C-S-h/j/k/l | move window | 83 | | kitty | C-PgUp/PgDn | goto other tab | 84 | | kitty | C-S-PgUp/PgDn | move tab | 85 | | kitty | C-=/- | adjust font size | 86 | | kitty/neovim | C-h/j/k/l | focus other window | 87 | | neovim | q | quit window/neovim | 88 | | neovim | H/L | go to the begin/end of line | 89 | | neovim | ; | enter commandline mode | 90 | | neovim | 2-LeftMouse/CR | toggle fold | 91 | | neovim | sw | search word | 92 | | neovim | sd | search diagnostics | 93 | | neovim | se | File Explorer | 94 | | neovim | ss | Symbols | 95 | | neovim | sb | search buffers | 96 | | neovim | Tab/S-Tab | Next/Prev buffer | 97 | | neovim | ga | (lsp) code action | 98 | | neovim | ge | (lsp) show diagnostics in line | 99 | | neovim | gn | (lsp) rename symbol | 100 | | neovim | gd | (lsp) go to definition | 101 | | neovim | C-/ | comment line | 102 | -------------------------------------------------------------------------------- /cover-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ch4xer/dev/29334c336e9958c39b6b7569c4e36ac286561c98/cover-dark.png -------------------------------------------------------------------------------- /cover-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ch4xer/dev/29334c336e9958c39b6b7569c4e36ac286561c98/cover-light.png -------------------------------------------------------------------------------- /kitty/kitty.conf: -------------------------------------------------------------------------------- 1 | include mocha.conf 2 | 3 | font_family JetBrainsMono NF 4 | bold_font JetBrainsMono NF 5 | italic_font JetBrainsMono NF 6 | bold_italic_font JetBrainsMono NF 7 | symbol_map U+4E00–U+9FFF,U+3400-U+4DBF LXGW WenKai Medium 8 | font_size 20.0 9 | 10 | url_style curly 11 | 12 | default_pointer_shape arrow 13 | pointer_shape_when_dragging beam 14 | 15 | allow_remote_control yes 16 | forward_remote_control yes 17 | listen_on unix:@mykitty 18 | 19 | clipboard_control write-clipboard write-primary read-clipboard read-primary 20 | 21 | enabled_layouts grid,stack 22 | tab_bar_edge top 23 | tab_bar_style powerline 24 | tab_powerline_style slanted 25 | tab_title_template "{' ' + title[title.rfind(' ')+1:] if (title.startswith('nvim ')) else title[title.rfind('/')+1:]}" 26 | 27 | clear_all_shortcuts yes 28 | map ctrl+v paste_from_clipboard 29 | map ctrl+equal change_font_size all +2.0 30 | map ctrl+minus change_font_size all -2.0 31 | 32 | map ctrl+n new_os_window_with_cwd 33 | 34 | map ctrl+enter new_window_with_cwd 35 | map ctrl+w close_window 36 | map ctrl+h neighboring_window left 37 | map ctrl+l neighboring_window right 38 | map ctrl+k neighboring_window up 39 | map ctrl+j neighboring_window down 40 | # Unset the mapping to pass the keys to neovim 41 | map --when-focus-on var:IS_NVIM ctrl+j 42 | map --when-focus-on var:IS_NVIM ctrl+k 43 | map --when-focus-on var:IS_NVIM ctrl+h 44 | map --when-focus-on var:IS_NVIM ctrl+l 45 | 46 | map ctrl+shift+h move_window left 47 | map ctrl+shift+l move_window right 48 | map ctrl+shift+k move_window up 49 | map ctrl+shift+j move_window down 50 | map ctrl+shift+down kitten relative_resize.py down 3 51 | map ctrl+shift+up kitten relative_resize.py up 3 52 | map ctrl+shift+left kitten relative_resize.py left 3 53 | map ctrl+shift+right kitten relative_resize.py right 3 54 | 55 | map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay nvim 56 | map f11 toggle_layout stack 57 | 58 | map ctrl+t new_tab_with_cwd 59 | map ctrl+shift+t set_tab_title 60 | map ctrl+page_up previous_tab 61 | map ctrl+page_down next_tab 62 | map ctrl+shift+page_up move_tab_backward 63 | map ctrl+shift+page_down move_tab_forward 64 | 65 | copy_on_select yes 66 | 67 | focus_follows_mouse yes 68 | mouse_map left click ungrabbed mouse_handle_click selection link prompt 69 | mouse_map left doublepress ungrabbed mouse_selection word 70 | mouse_map left triplepress ungrabbed mouse_selection line 71 | mouse_map middle release ungrabbed paste_from_selection 72 | 73 | resize_debounce_time 0.1 74 | initial_window_width 1000 75 | initial_window_height 800 76 | remember_window_size no 77 | 78 | confirm_os_window_close 0 79 | open_url_with default 80 | paste_actions quote-urls-at-prompt 81 | 82 | enable_audio_bell no 83 | -------------------------------------------------------------------------------- /kitty/latte.conf: -------------------------------------------------------------------------------- 1 | # vim:ft=kitty 2 | 3 | ## name: Catppuccin Kitty Latte 4 | ## author: Catppuccin Org 5 | ## license: MIT 6 | ## upstream: https://github.com/catppuccin/kitty/blob/main/themes/latte.conf 7 | ## blurb: Soothing pastel theme for the high-spirited! 8 | 9 | 10 | 11 | # The basic colors 12 | foreground #4c4f69 13 | background #eff1f5 14 | selection_foreground #eff1f5 15 | selection_background #dc8a78 16 | 17 | # Cursor colors 18 | cursor #dc8a78 19 | cursor_text_color #eff1f5 20 | 21 | # URL underline color when hovering with mouse 22 | url_color #dc8a78 23 | 24 | # Kitty window border colors 25 | active_border_color #7287fd 26 | inactive_border_color #9ca0b0 27 | bell_border_color #df8e1d 28 | 29 | # OS Window titlebar colors 30 | wayland_titlebar_color system 31 | macos_titlebar_color system 32 | 33 | # Tab bar colors 34 | active_tab_foreground #eff1f5 35 | active_tab_background #8839ef 36 | inactive_tab_foreground #4c4f69 37 | inactive_tab_background #9ca0b0 38 | tab_bar_background #bcc0cc 39 | 40 | # Colors for marks (marked text in the terminal) 41 | mark1_foreground #eff1f5 42 | mark1_background #7287fd 43 | mark2_foreground #eff1f5 44 | mark2_background #8839ef 45 | mark3_foreground #eff1f5 46 | mark3_background #209fb5 47 | 48 | # The 16 terminal colors 49 | 50 | # black 51 | color0 #5c5f77 52 | color8 #6c6f85 53 | 54 | # red 55 | color1 #d20f39 56 | color9 #d20f39 57 | 58 | # green 59 | color2 #40a02b 60 | color10 #40a02b 61 | 62 | # yellow 63 | color3 #df8e1d 64 | color11 #df8e1d 65 | 66 | # blue 67 | color4 #1e66f5 68 | color12 #1e66f5 69 | 70 | # magenta 71 | color5 #ea76cb 72 | color13 #ea76cb 73 | 74 | # cyan 75 | color6 #179299 76 | color14 #179299 77 | 78 | # white 79 | color7 #acb0be 80 | color15 #bcc0cc 81 | -------------------------------------------------------------------------------- /kitty/mocha.conf: -------------------------------------------------------------------------------- 1 | # vim:ft=kitty 2 | 3 | ## name: Catppuccin Kitty Mocha 4 | ## author: Catppuccin Org 5 | ## license: MIT 6 | ## upstream: https://github.com/catppuccin/kitty/blob/main/themes/mocha.conf 7 | ## blurb: Soothing pastel theme for the high-spirited! 8 | 9 | 10 | 11 | # The basic colors 12 | foreground #cdd6f4 13 | background #1e1e2e 14 | selection_foreground #1e1e2e 15 | selection_background #f5e0dc 16 | 17 | # Cursor colors 18 | cursor #f5e0dc 19 | cursor_text_color #1e1e2e 20 | 21 | # URL underline color when hovering with mouse 22 | url_color #f5e0dc 23 | 24 | # Kitty window border colors 25 | active_border_color #b4befe 26 | inactive_border_color #6c7086 27 | bell_border_color #f9e2af 28 | 29 | # OS Window titlebar colors 30 | wayland_titlebar_color system 31 | macos_titlebar_color system 32 | 33 | # Tab bar colors 34 | active_tab_foreground #11111b 35 | active_tab_background #b4befe 36 | inactive_tab_foreground #cdd6f4 37 | inactive_tab_background #181825 38 | tab_bar_background #11111b 39 | 40 | # Colors for marks (marked text in the terminal) 41 | mark1_foreground #1e1e2e 42 | mark1_background #b4befe 43 | mark2_foreground #1e1e2e 44 | mark2_background #cba6f7 45 | mark3_foreground #1e1e2e 46 | mark3_background #74c7ec 47 | 48 | # The 16 terminal colors 49 | 50 | # black 51 | color0 #45475a 52 | color8 #585b70 53 | 54 | # red 55 | color1 #f38ba8 56 | color9 #f38ba8 57 | 58 | # green 59 | color2 #a6e3a1 60 | color10 #a6e3a1 61 | 62 | # yellow 63 | color3 #f9e2af 64 | color11 #f9e2af 65 | 66 | # blue 67 | color4 #89b4fa 68 | color12 #89b4fa 69 | 70 | # magenta 71 | color5 #f5c2e7 72 | color13 #f5c2e7 73 | 74 | # cyan 75 | color6 #94e2d5 76 | color14 #94e2d5 77 | 78 | # white 79 | color7 #bac2de 80 | color15 #a6adc8 81 | -------------------------------------------------------------------------------- /kitty/neighboring_window.py: -------------------------------------------------------------------------------- 1 | from kitty.key_encoding import KeyEvent, parse_shortcut 2 | from kittens.tui.handler import result_handler 3 | 4 | 5 | def main(): 6 | pass 7 | 8 | 9 | def encode_key_mapping(window, key_mapping): 10 | mods, key = parse_shortcut(key_mapping) 11 | event = KeyEvent( 12 | mods=mods, 13 | key=key, 14 | shift=bool(mods & 1), 15 | alt=bool(mods & 2), 16 | ctrl=bool(mods & 4), 17 | super=bool(mods & 8), 18 | hyper=bool(mods & 16), 19 | meta=bool(mods & 32), 20 | ).as_window_system_event() 21 | 22 | return window.encoded_key(event) 23 | 24 | 25 | @result_handler(no_ui=True) 26 | def handle_result(args, result, target_window_id, boss): 27 | window = boss.window_id_map.get(target_window_id) 28 | 29 | cmd = window.child.foreground_cmdline[0] 30 | if cmd == 'tmux': 31 | keymap = args[2] 32 | encoded = encode_key_mapping(window, keymap) 33 | window.write_to_child(encoded) 34 | else: 35 | boss.active_tab.neighboring_window(args[1]) 36 | -------------------------------------------------------------------------------- /kitty/relative_resize.py: -------------------------------------------------------------------------------- 1 | # Based on MIT licensed code at https://github.com/chancez/dotfiles/blob/badc69d3895a6a942285amount26b8c372a55d77533eamount/kitty/.config/kitty/relative_resize.py 2 | from kittens.tui.handler import result_handler 3 | from kitty.key_encoding import KeyEvent, parse_shortcut 4 | 5 | 6 | def encode_key_mapping(window, key_mapping): 7 | mods, key = parse_shortcut(key_mapping) 8 | event = KeyEvent( 9 | mods=mods, 10 | key=key, 11 | shift=bool(mods & 1), 12 | alt=bool(mods & 2), 13 | ctrl=bool(mods & 4), 14 | super=bool(mods & 8), 15 | hyper=bool(mods & 16), 16 | meta=bool(mods & 32), 17 | ).as_window_system_event() 18 | 19 | return window.encoded_key(event) 20 | 21 | 22 | def main(args): 23 | pass 24 | 25 | 26 | def relative_resize_window(direction, amount, target_window_id, boss): 27 | window = boss.window_id_map.get(target_window_id) 28 | if window is None: 29 | return 30 | 31 | neighbors = boss.active_tab.current_layout.neighbors_for_window( 32 | window, boss.active_tab.windows 33 | ) 34 | current_window_id = boss.active_tab.active_window 35 | 36 | left_neighbors = neighbors.get('left') 37 | right_neighbors = neighbors.get('right') 38 | top_neighbors = neighbors.get('top') 39 | bottom_neighbors = neighbors.get('bottom') 40 | 41 | # has a neighbor on both sides 42 | if direction == 'left' and (left_neighbors and right_neighbors): 43 | boss.active_tab.resize_window('narrower', amount) 44 | # only has left neighbor 45 | elif direction == 'left' and left_neighbors: 46 | boss.active_tab.resize_window('wider', amount) 47 | # only has right neighbor 48 | elif direction == 'left' and right_neighbors: 49 | boss.active_tab.resize_window('narrower', amount) 50 | 51 | # has a neighbor on both sides 52 | elif direction == 'right' and (left_neighbors and right_neighbors): 53 | boss.active_tab.resize_window('wider', amount) 54 | # only has left neighbor 55 | elif direction == 'right' and left_neighbors: 56 | boss.active_tab.resize_window('narrower', amount) 57 | # only has right neighbor 58 | elif direction == 'right' and right_neighbors: 59 | boss.active_tab.resize_window('wider', amount) 60 | 61 | # has a neighbor above and below 62 | elif direction == 'up' and (top_neighbors and bottom_neighbors): 63 | boss.active_tab.resize_window('shorter', amount) 64 | # only has top neighbor 65 | elif direction == 'up' and top_neighbors: 66 | boss.active_tab.resize_window('taller', amount) 67 | # only has bottom neighbor 68 | elif direction == 'up' and bottom_neighbors: 69 | boss.active_tab.resize_window('shorter', amount) 70 | 71 | # has a neighbor above and below 72 | elif direction == 'down' and (top_neighbors and bottom_neighbors): 73 | boss.active_tab.resize_window('taller', amount) 74 | # only has top neighbor 75 | elif direction == 'down' and top_neighbors: 76 | boss.active_tab.resize_window('shorter', amount) 77 | # only has bottom neighbor 78 | elif direction == 'down' and bottom_neighbors: 79 | boss.active_tab.resize_window('taller', amount) 80 | 81 | 82 | @result_handler(no_ui=True) 83 | def handle_result(args, result, target_window_id, boss): 84 | direction = args[1] 85 | amount = int(args[2]) 86 | window = boss.window_id_map.get(target_window_id) 87 | 88 | cmd = window.child.foreground_cmdline[0] 89 | if cmd == 'tmux': 90 | keymap = args[3] 91 | encoded = encode_key_mapping(window, keymap) 92 | window.write_to_child(encoded) 93 | else: 94 | relative_resize_window(direction, amount, target_window_id, boss) 95 | -------------------------------------------------------------------------------- /kitty/split_window.py: -------------------------------------------------------------------------------- 1 | from kittens.tui.handler import result_handler 2 | from kitty.key_encoding import KeyEvent, parse_shortcut 3 | 4 | 5 | def main(args): 6 | pass 7 | 8 | 9 | def encode_key_mapping(window, key_mapping): 10 | mods, key = parse_shortcut(key_mapping) 11 | event = KeyEvent( 12 | mods=mods, 13 | key=key, 14 | shift=bool(mods & 1), 15 | alt=bool(mods & 2), 16 | ctrl=bool(mods & 4), 17 | super=bool(mods & 8), 18 | hyper=bool(mods & 16), 19 | meta=bool(mods & 32), 20 | ).as_window_system_event() 21 | 22 | return window.encoded_key(event) 23 | 24 | 25 | def split_window(boss, direction): 26 | if direction == 'up' or direction == 'down': 27 | boss.launch('--cwd=current', '--location=hsplit') 28 | else: 29 | boss.launch('--cwd=current', '--location=vsplit') 30 | 31 | if direction == 'up' or direction == 'left': 32 | boss.active_tab.move_window(direction) 33 | 34 | 35 | @result_handler(no_ui=True) 36 | def handle_result(args, result, target_window_id, boss): 37 | window = boss.window_id_map.get(target_window_id) 38 | 39 | if window is None: 40 | return 41 | 42 | direction = args[1] 43 | cmd = window.child.foreground_cmdline[0] 44 | if cmd == 'tmux': 45 | keymap = args[2] 46 | encoded = encode_key_mapping(window, keymap) 47 | window.write_to_child(encoded) 48 | else: 49 | split_window(boss, direction) -------------------------------------------------------------------------------- /nvim/.gitignore: -------------------------------------------------------------------------------- 1 | tt.* 2 | .tests 3 | doc/tags 4 | debug 5 | .repro 6 | foo.* 7 | *.log 8 | data 9 | -------------------------------------------------------------------------------- /nvim/.neoconf.json: -------------------------------------------------------------------------------- 1 | { 2 | "neodev": { 3 | "library": { 4 | "enabled": true, 5 | "plugins": true 6 | } 7 | }, 8 | "neoconf": { 9 | "plugins": { 10 | "lua_ls": { 11 | "enabled": true 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /nvim/init.lua: -------------------------------------------------------------------------------- 1 | -- bootstrap lazy.nvim, LazyVim and your plugins 2 | require("config.lazy") 3 | -------------------------------------------------------------------------------- /nvim/lazyvim.json: -------------------------------------------------------------------------------- 1 | { 2 | "extras": [ 3 | "lazyvim.plugins.extras.ai.copilot", 4 | "lazyvim.plugins.extras.dap.core", 5 | "lazyvim.plugins.extras.lang.clangd", 6 | "lazyvim.plugins.extras.lang.go", 7 | "lazyvim.plugins.extras.lang.java", 8 | "lazyvim.plugins.extras.lang.python", 9 | "lazyvim.plugins.extras.lang.rust", 10 | "lazyvim.plugins.extras.test.core", 11 | "lazyvim.plugins.extras.util.mini-hipatterns" 12 | ], 13 | "install_version": 8, 14 | "news": { 15 | "NEWS.md": "10960" 16 | }, 17 | "version": 8 18 | } -------------------------------------------------------------------------------- /nvim/lua/config/autocmds.lua: -------------------------------------------------------------------------------- 1 | -- Autocmds are automatically loaded on the VeryLazy event 2 | -- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua 3 | -- 4 | -- Add any additional autocmds here 5 | -- with `vim.api.nvim_create_autocmd` 6 | -- 7 | -- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults) 8 | -- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell") 9 | 10 | vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell") 11 | 12 | vim.api.nvim_create_autocmd({ "InsertLeave", "TextChanged" }, { 13 | pattern = { "*" }, 14 | command = "silent! wa", 15 | }) 16 | 17 | vim.api.nvim_create_autocmd({ "InsertLeave" }, { 18 | callback = function() 19 | if vim.g.hasfcitx5 == 1 then 20 | os.execute("fcitx5-remote -c") 21 | end 22 | end, 23 | }) 24 | 25 | vim.api.nvim_create_autocmd({ "BufWinLeave" }, { 26 | pattern = "*.*", 27 | command = "silent! mkview", 28 | }) 29 | 30 | vim.api.nvim_create_autocmd({ "BufRead" }, { 31 | pattern = "*.*", 32 | command = "silent! loadview", 33 | }) 34 | 35 | vim.api.nvim_create_autocmd("FileType", { 36 | pattern = { "yml", "yaml", "json", "html", "css", "javascript", "typescript", "sh", "sql", "vue", "markdown", "lua" }, 37 | callback = function() 38 | vim.opt_local.shiftwidth = 2 39 | vim.opt_local.tabstop = 2 40 | vim.opt_local.softtabstop = 2 41 | end, 42 | }) 43 | 44 | vim.api.nvim_create_autocmd("BufEnter", { 45 | callback = function(ctx) 46 | local root = vim.fs.root(ctx.buf, { ".git", ".svn", "Makefile", "mvnw", "package.json", "go.mod", "Cargo.toml" }) 47 | if root and root ~= "." and root ~= vim.fn.getcwd() then 48 | vim.cmd.cd(root) 49 | end 50 | end, 51 | }) 52 | -------------------------------------------------------------------------------- /nvim/lua/config/keymaps.lua: -------------------------------------------------------------------------------- 1 | local map = vim.keymap.set 2 | 3 | -- better up/down 4 | map({ "n", "x" }, "j", "v:count == 0 ? 'gj' : 'j'", { desc = "Down", expr = true, silent = true }) 5 | map({ "n", "x" }, "k", "v:count == 0 ? 'gk' : 'k'", { desc = "Up", expr = true, silent = true }) 6 | 7 | map("n", "s", "", { desc = "disable s" }) 8 | map({ "n", "v" }, "L", "g_", { desc = "go to end of line" }) 9 | map({ "n", "v" }, "H", "^", { desc = "go to begin of line" }) 10 | map("n", "", "", { desc = "fix conflict caused by mapping" }) 11 | 12 | -- Add undo break-points 13 | map("i", ",", ",u") 14 | map("i", ".", ".u") 15 | map("i", ";", ";u") 16 | 17 | -- use :bw to really close the buffer 18 | map("n", "", "bnext", { desc = "Next buffer" }) 19 | map("n", "", "bprevious", { desc = "Prev buffer" }) 20 | map({ "i", "t" }, "", "", { desc = "delete word forward" }) 21 | map("n", "", "ciw", { desc = "delete word and edit in normal mode" }) 22 | map("v", "", "c", { desc = "delete and edit in visual mode" }) 23 | 24 | map("x", "i", "I", { desc = "column insert" }) 25 | map("x", "a", "A", { desc = "column append" }) 26 | 27 | map({ "n", "v" }, ";", ":", { nowait = true, desc = "enter commandline" }) 28 | 29 | -- better indenting 30 | map("v", "<", "", ">gv") 32 | 33 | local function is_file_window(win) 34 | local buf = vim.api.nvim_win_get_buf(win) 35 | if not vim.api.nvim_buf_is_valid(buf) then 36 | return false 37 | end 38 | local buftype = vim.api.nvim_get_option_value("buftype", { buf = buf }) 39 | return buftype == "" 40 | end 41 | 42 | local function count_file_windows() 43 | local count = 0 44 | for _, win in ipairs(vim.api.nvim_list_wins()) do 45 | if is_file_window(win) then 46 | count = count + 1 47 | end 48 | end 49 | return count 50 | end 51 | 52 | local function is_current_window_file() 53 | local win = vim.api.nvim_get_current_win() 54 | return is_file_window(win) 55 | end 56 | 57 | local function smart_quit() 58 | if count_file_windows() == 1 and is_current_window_file() then 59 | vim.cmd("qall!") 60 | else 61 | vim.cmd("q!") 62 | end 63 | end 64 | 65 | map("n", "q", smart_quit, { desc = "smart quit window" }) 66 | map("n", "Q", "q", { desc = "macro record" }) 67 | 68 | map("n", "yw", "yiw", { desc = "copy the word where cursor locates" }) 69 | map("n", "", "", { desc = "start visual mode blockwise" }) 70 | 71 | map("n", "", "za", { desc = "toggle fold" }) 72 | map("n", "<2-LeftMouse>", "za", { desc = "toggle fold" }) 73 | map( 74 | "n", 75 | "", 76 | ":let temp=&so:let &so=0:let &so=temp", 77 | { noremap = true, silent = true, desc = "click without scrolloff" } 78 | ) 79 | 80 | map("n", "", "gcc", { desc = "Comment", remap = true }) 81 | map("n", "", "gcc", { desc = "Comment", remap = true }) 82 | map("v", "", "gc", { desc = "Comment", remap = true }) 83 | map("v", "", "gc", { desc = "Comment", remap = true }) 84 | 85 | map({ "i", "n", "s" }, "", function() 86 | vim.cmd("noh") 87 | LazyVim.cmp.actions.snippet_stop() 88 | vim.cmd("stopinsert") 89 | end, { expr = true, desc = "Escape and Clear hlsearch" }) 90 | 91 | if vim.g.neovide then 92 | map({ "n", "o", "x", "i", "c" }, "", "+", { desc = "paste from system clipboard, this is for neovim gui" }) 93 | 94 | function LaunchKittyInCurrentPath() 95 | local current_dir_path = vim.fn.getcwd() 96 | local cmd = { "kitty", "--working-directory", current_dir_path } 97 | vim.fn.jobstart(cmd, { 98 | detach = true, 99 | }) 100 | end 101 | 102 | map("n", "", LaunchKittyInCurrentPath, { desc = "launch kitty with cwd, this is for neovim gui" }) 103 | end 104 | -------------------------------------------------------------------------------- /nvim/lua/config/lazy.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 | require("lazy").setup({ 18 | spec = { 19 | -- add LazyVim and import its plugins 20 | { "LazyVim/LazyVim", import = "lazyvim.plugins" }, 21 | -- import/override with your plugins 22 | { import = "plugins" }, 23 | }, 24 | defaults = { 25 | -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. 26 | -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default. 27 | lazy = true, 28 | -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, 29 | -- have outdated releases, which may break your Neovim install. 30 | version = false, -- always use the latest git commit 31 | -- version = "*", -- try installing the latest stable version for plugins that support semver 32 | }, 33 | install = { colorscheme = { "tokyonight", "habamax" } }, 34 | checker = { 35 | enabled = true, -- check for plugin updates periodically 36 | notify = false, -- notify on update 37 | }, -- automatically check for plugin updates 38 | performance = { 39 | rtp = { 40 | -- disable some rtp plugins 41 | disabled_plugins = { 42 | "gzip", 43 | -- "matchit", 44 | -- "matchparen", 45 | -- "netrwPlugin", 46 | "tarPlugin", 47 | "tohtml", 48 | "tutor", 49 | "zipPlugin", 50 | }, 51 | }, 52 | }, 53 | }) 54 | -------------------------------------------------------------------------------- /nvim/lua/config/options.lua: -------------------------------------------------------------------------------- 1 | -- Options are automatically loaded before lazy.nvim startup 2 | -- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua 3 | -- Add any additional options here 4 | 5 | vim.g.snacks_animate = false 6 | vim.g.ai_cmp = false 7 | 8 | local opt = vim.opt 9 | 10 | opt.swapfile = false 11 | opt.title = true 12 | opt.titlestring = 'nvim %{expand("%:p:h:t")}' 13 | 14 | opt.relativenumber = false 15 | opt.signcolumn = "number" 16 | opt.statuscolumn = "" 17 | 18 | opt.tabstop = 4 19 | opt.shiftwidth = 4 20 | opt.linebreak = false 21 | opt.listchars = "tab: ,trail:-,nbsp:+" 22 | 23 | -- visual selection mode 24 | opt.sel = "inclusive" 25 | 26 | opt.wrap = true 27 | 28 | opt.clipboard = "unnamedplus" 29 | if os.getenv("SSH_TTY") ~= nil then 30 | vim.g.clipboard = { 31 | name = "OSC 52", 32 | copy = { 33 | ["+"] = require("vim.ui.clipboard.osc52").copy("+"), 34 | ["*"] = require("vim.ui.clipboard.osc52").copy("*"), 35 | }, 36 | paste = { 37 | ["+"] = require("vim.ui.clipboard.osc52").paste("+"), 38 | ["*"] = require("vim.ui.clipboard.osc52").paste("*"), 39 | }, 40 | } 41 | end 42 | opt.conceallevel = 0 43 | 44 | if vim.fn.executable("fcitx5-remote") == 1 then 45 | vim.g.hasfcitx5 = 1 46 | else 47 | vim.g.hasfcitx5 = 0 48 | end 49 | -------------------------------------------------------------------------------- /nvim/lua/plugins/code.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "kylechui/nvim-surround", 4 | event = "VeryLazy", 5 | config = function() 6 | require("nvim-surround").setup({ 7 | keymaps = { 8 | visual = "s", 9 | normal = "ys", 10 | delete = "ds", 11 | change = "cs", 12 | }, 13 | surrounds = { 14 | ["("] = false, 15 | ["["] = false, 16 | }, 17 | -- remove leading and trailing whitespace 18 | aliases = { 19 | ["("] = ")", 20 | ["["] = "]", 21 | }, 22 | }) 23 | end, 24 | }, 25 | { 26 | "Saghen/blink.cmp", 27 | event = "InsertEnter", 28 | opts = { 29 | completion = { 30 | menu = { 31 | min_width = 5, 32 | draw = { 33 | padding = 1, 34 | gap = 0, 35 | columns = { { "kind_icon" }, { "label", "kind", gap = 1 } }, 36 | }, 37 | }, 38 | }, 39 | keymap = { 40 | preset = "super-tab", 41 | [""] = { "accept", "fallback" }, 42 | [""] = { 43 | "accept", 44 | function() 45 | if require("copilot.suggestion").is_visible() then 46 | LazyVim.create_undo() 47 | require("copilot.suggestion").accept() 48 | return true 49 | end 50 | end, 51 | "snippet_forward", 52 | "fallback", 53 | }, 54 | [""] = { 55 | "hide", 56 | "snippet_backward", 57 | "fallback", 58 | }, 59 | }, 60 | enabled = function() 61 | if vim.g.hasfcitx5 == 1 then 62 | return vim.trim(vim.fn.system("fcitx5-remote --check")) == "1" 63 | end 64 | return true 65 | end, 66 | }, 67 | }, 68 | { 69 | "olimorris/codecompanion.nvim", 70 | event = "BufRead", 71 | dependencies = { 72 | "nvim-lua/plenary.nvim", 73 | "nvim-treesitter/nvim-treesitter", 74 | "MeanderingProgrammer/render-markdown.nvim", 75 | { 76 | "zbirenbaum/copilot.lua", 77 | opts = { 78 | copilot_model = "gpt-4o-copilot", 79 | }, 80 | }, 81 | { 82 | "nvim-mini/mini.diff", 83 | config = function() 84 | local diff = require("mini.diff") 85 | diff.setup({ 86 | -- Disabled by default 87 | source = diff.gen_source.none(), 88 | mappings = { 89 | apply = "", 90 | }, 91 | }) 92 | end, 93 | }, 94 | }, 95 | config = function() 96 | require("codecompanion").setup({ 97 | -- opts = { 98 | -- language = "Chinese", 99 | -- }, 100 | strategies = { 101 | chat = { 102 | adapter = "copilot", 103 | }, 104 | inline = { 105 | adapter = "copilot", 106 | }, 107 | }, 108 | display = { 109 | chat = { 110 | -- Options to customize the UI of the chat buffer 111 | window = { 112 | layout = "float", -- float|vertical|horizontal|buffer 113 | width = 0.8, 114 | }, 115 | }, 116 | }, 117 | }) 118 | end, 119 | keys = { 120 | { "", mode = "n", "CodeCompanionChat Toggle", desc = "CodeCompanion" }, 121 | }, 122 | }, 123 | { 124 | "abecodes/tabout.nvim", 125 | event = "InsertEnter", 126 | config = true, 127 | dependencies = { 128 | "nvim-treesitter/nvim-treesitter", 129 | "Saghen/blink.cmp", 130 | }, 131 | }, 132 | { 133 | "nvim-mini/mini.ai", 134 | enabled = false, 135 | }, 136 | { 137 | "folke/ts-comments.nvim", 138 | enabled = false, 139 | }, 140 | } 141 | -------------------------------------------------------------------------------- /nvim/lua/plugins/colorscheme.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "LazyVim/LazyVim", 4 | opts = { 5 | defaults = { 6 | keymaps = false, 7 | }, 8 | colorscheme = "catppuccin", 9 | icons = { 10 | diagnostics = { 11 | Error = " ", 12 | Warn = " ", 13 | Hint = " ", 14 | Info = " ", 15 | }, 16 | }, 17 | }, 18 | }, 19 | { 20 | "catppuccin/nvim", 21 | name = "catppuccin", 22 | priority = 1000, 23 | lazy = false, 24 | opts = { 25 | term_colors = true, 26 | flavour = "mocha", 27 | transparent_background = false, 28 | styles = { 29 | comments = { "italic" }, 30 | conditionals = { "italic" }, 31 | functions = { "italic" }, 32 | properties = { "italic" }, 33 | }, 34 | custom_highlights = function(colors) 35 | return { 36 | Folded = { 37 | fg = colors.lavender, 38 | bg = colors.none, 39 | }, 40 | } 41 | end, 42 | }, 43 | config = function(_, opts) 44 | require("catppuccin").setup(opts) 45 | vim.cmd.colorscheme("catppuccin") 46 | end, 47 | }, 48 | } 49 | -------------------------------------------------------------------------------- /nvim/lua/plugins/editor.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "folke/flash.nvim", 4 | opts = { 5 | labels = "abcdefghijklmnopqrstuvwxyz0123456789", 6 | label = { 7 | rainbow = { 8 | enabled = true, 9 | -- number between 1 and 9 10 | shade = 5, 11 | }, 12 | uppercase = false, 13 | distance = true, 14 | }, 15 | modes = { 16 | -- options used when flash is activated through 17 | -- a regular search with `/` or `?` 18 | search = { 19 | enabled = true, -- enable flash for search 20 | }, 21 | -- options used when flash is activated through 22 | -- `f`, `F`, `t`, `T`, `;` and `,` motions 23 | char = { 24 | enabled = false, 25 | }, 26 | -- options used for treesitter selections 27 | -- `require("flash").treesitter()` 28 | treesitter = { 29 | enabled = false, 30 | labels = "abcdefghijklmnopqrstuvwxyz0123456789", 31 | label = { before = true, after = true, style = "inline" }, 32 | jump = { pos = "range" }, 33 | highlight = { 34 | backdrop = false, 35 | matches = false, 36 | }, 37 | }, 38 | }, 39 | -- options for the floating window that shows the prompt, 40 | -- for regular jumps 41 | prompt = { 42 | enabled = false, 43 | }, 44 | jump = { 45 | pos = "end", 46 | autojump = false, 47 | }, 48 | }, 49 | keys = false, 50 | }, 51 | { 52 | "folke/snacks.nvim", 53 | opts = { 54 | picker = { 55 | sources = { 56 | explorer = { 57 | auto_close = true, 58 | layout = { preset = "default", layout = { backdrop = false, min_width = 10 }, preview = false }, 59 | win = { 60 | list = { 61 | keys = { 62 | [""] = "explorer_up", 63 | ["a"] = "explorer_add", 64 | ["d"] = "explorer_del", 65 | ["r"] = "explorer_rename", 66 | ["y"] = { "explorer_yank", mode = { "n", "x" } }, 67 | ["p"] = "explorer_paste", 68 | ["."] = "toggle_ignored", 69 | ["s"] = "edit_split", 70 | ["v"] = "edit_vsplit", 71 | }, 72 | }, 73 | }, 74 | }, 75 | }, 76 | }, 77 | }, 78 | -- stylua: ignore 79 | keys = function() 80 | return { 81 | { "sd", function() Snacks.picker.diagnostics() end, desc = "Diagnostics", nowait = true }, 82 | { "sw", function() Snacks.picker.grep() end, desc = "Grep", nowait = true }, 83 | { "sf", function() Snacks.explorer() end, desc = "File Explorer", nowait = true }, 84 | { "ss", function() Snacks.picker.lsp_symbols() end, desc = "Symbols", nowait = true }, 85 | { "sb", function() Snacks.picker.buffers() end, desc = "Buffers", nowait = true }, 86 | } 87 | end, 88 | }, 89 | { 90 | "MeanderingProgrammer/render-markdown.nvim", 91 | ft = { "markdown", "codecompanion" }, 92 | opts = { 93 | file_types = { "markdown", "codecompanion" }, 94 | heading = { 95 | width = "block", 96 | }, 97 | code = { 98 | border = "thin", 99 | above = "━", 100 | below = "━", 101 | style = "normal", 102 | width = "block", 103 | }, 104 | }, 105 | }, 106 | { 107 | "folke/todo-comments.nvim", 108 | optional = true, 109 | -- stylua: ignore 110 | keys = function() 111 | return { 112 | { "st", function() Snacks.picker.todo_comments() end, desc = "Todo", nowait = true }, 113 | } 114 | end 115 | , 116 | }, 117 | { 118 | "folke/which-key.nvim", 119 | event = "VeryLazy", 120 | opts = function(_, opts) 121 | opts.spec = {} 122 | end, 123 | }, 124 | { 125 | "lewis6991/gitsigns.nvim", 126 | opts = function(_, opts) 127 | opts.on_attach = function() end 128 | return opts 129 | end, 130 | }, 131 | { 132 | "stevearc/oil.nvim", 133 | opts = {}, 134 | dependencies = { { "nvim-mini/mini.icons", opts = {} } }, 135 | cmd = "Oil", 136 | }, 137 | { 138 | "MagicDuck/grug-far.nvim", 139 | enabled = false, 140 | }, 141 | } 142 | -------------------------------------------------------------------------------- /nvim/lua/plugins/format.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "stevearc/conform.nvim", 4 | dependencies = { "mason.nvim" }, 5 | cmd = "ConformInfo", 6 | opts = { 7 | default_format_opts = { 8 | async = true, 9 | quiet = true, 10 | }, 11 | formatters_by_ft = { 12 | lua = { "stylua" }, 13 | sh = { "shfmt" }, 14 | javascript = { "prettierd" }, 15 | markdown = { "prettierd" }, 16 | }, 17 | }, 18 | }, 19 | } 20 | -------------------------------------------------------------------------------- /nvim/lua/plugins/lsp.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "neovim/nvim-lspconfig", 4 | opts = { inlay_hints = { enabled = false } }, 5 | -- stylua: ignore 6 | keys = { 7 | { "gn", vim.lsp.buf.rename, desc = "rename symbol" }, 8 | { "gh", vim.lsp.buf.hover, desc = "show documentation" }, 9 | { "ge", vim.diagnostic.open_float, desc = "show diagnostic" }, 10 | { "gd", vim.lsp.buf.definition, desc = "go to definition" }, 11 | { "gr", vim.lsp.buf.references, desc = "go to references" }, 12 | { "ga", vim.lsp.buf.code_action, desc = "Code Action" }, 13 | { "gi", vim.lsp.buf.implementation, desc = "Implementation" }, 14 | }, 15 | }, 16 | } 17 | -------------------------------------------------------------------------------- /nvim/lua/plugins/treesitter.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "nvim-treesitter/nvim-treesitter", 4 | keys = false, 5 | opts = { 6 | incremental_selection = { 7 | enable = false, 8 | }, 9 | textobjects = { 10 | move = { 11 | enable = false, 12 | }, 13 | select = { 14 | enable = true, 15 | lookahead = true, 16 | keymaps = { 17 | ["p"] = "@parameter.outer", 18 | }, 19 | include_surrounding_whitespace = true, 20 | }, 21 | }, 22 | }, 23 | }, 24 | } 25 | -------------------------------------------------------------------------------- /nvim/lua/plugins/ui.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { "akinsho/bufferline.nvim", enabled = false }, 3 | { 4 | "b0o/incline.nvim", 5 | event = "BufReadPre", 6 | enabled = true, 7 | config = function() 8 | local colors 9 | if vim.o.background == "light" then 10 | colors = require("catppuccin.palettes").get_palette("latte") 11 | else 12 | colors = require("catppuccin.palettes").get_palette("mocha") 13 | end 14 | require("incline").setup({ 15 | hide = { 16 | cursorline = true, 17 | focused_win = true, 18 | }, 19 | highlight = { 20 | groups = { 21 | InclineNormal = { guibg = colors.surface1, guifg = colors.text }, 22 | InclineNormalNC = { guibg = colors.crust, guifg = colors.text }, 23 | }, 24 | }, 25 | window = { margin = { vertical = 0, horizontal = 0 } }, 26 | render = function(props) 27 | local filename = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(props.buf), ":t") 28 | local icon, color = require("nvim-web-devicons").get_icon_color(filename) 29 | return { { icon, guifg = color }, { " " }, { filename } } 30 | end, 31 | }) 32 | end, 33 | }, 34 | { 35 | "folke/noice.nvim", 36 | event = "VeryLazy", 37 | opts = { 38 | lsp = { 39 | hover = { 40 | enabled = false, 41 | }, 42 | signature = { 43 | enabled = false, 44 | }, 45 | }, 46 | cmdline = { 47 | view = "cmdline", 48 | }, 49 | messages = { 50 | view = "mini", 51 | view_error = "mini", 52 | view_warn = "mini", 53 | }, 54 | notify = { 55 | enabled = false, 56 | }, 57 | routes = { 58 | { 59 | filter = { 60 | event = "msg_show", 61 | any = { 62 | { find = "Agent service not initialized" }, 63 | { find = "Not authenticated: NotSignedIn" }, 64 | { find = "Client networksocket disconnected" }, 65 | { find = "written" }, 66 | { find = "api.github.com" }, 67 | }, 68 | }, 69 | opts = { skip = true }, 70 | }, 71 | }, 72 | presets = { 73 | command_palette = false, 74 | }, 75 | }, 76 | keys = false, 77 | }, 78 | { 79 | "nvim-lualine/lualine.nvim", 80 | event = "VeryLazy", 81 | opts = { 82 | sections = { 83 | lualine_a = { 84 | { 85 | "mode", 86 | icons_enabled = true, 87 | fmt = function(str) 88 | local indicator = str:sub(1, 1) 89 | if indicator == "N" then 90 | return "" 91 | end 92 | if indicator == "I" then 93 | return "" 94 | end 95 | if indicator == "V" then 96 | return "" 97 | end 98 | if indicator == "T" then 99 | return "" 100 | end 101 | return "" 102 | -- return str:sub(1, 3) 103 | end, 104 | }, 105 | }, 106 | lualine_b = { 107 | -- "filename", 108 | { 109 | "buffers", 110 | section_separators = { left = "", right = "" }, 111 | component_separators = { left = "", right = "" }, 112 | hide_filename_extension = true, 113 | show_modified_status = false, 114 | use_mode_colors = true, 115 | symbols = { 116 | alternate_file = "", -- Text to show to identify the alternate file 117 | }, 118 | }, 119 | }, 120 | lualine_c = { "diagnostics" }, 121 | lualine_x = { "diff", { "branch", icon = "" } }, 122 | lualine_y = { 123 | { 124 | "progress", 125 | fmt = function(str) 126 | local str1 = str:gsub(" ", "") 127 | return " " .. str1 128 | end, 129 | }, 130 | }, 131 | lualine_z = {}, 132 | }, 133 | }, 134 | config = function(_, opts) 135 | if vim.g.trouble_lualine and LazyVim.has("trouble.nvim") then 136 | local trouble = require("trouble") 137 | local symbols = trouble.statusline({ 138 | mode = "symbols", 139 | groups = {}, 140 | title = false, 141 | filter = { range = true }, 142 | format = "{kind_icon}{symbol.name:Normal}", 143 | hl_group = "lualine_c_normal", 144 | }) 145 | table.insert(opts.sections.lualine_c, { 146 | symbols and symbols.get, 147 | cond = function() 148 | return vim.b.trouble_lualine ~= false and symbols.has() 149 | end, 150 | }) 151 | end 152 | require("lualine").setup(opts) 153 | end, 154 | }, 155 | { 156 | "folke/snacks.nvim", 157 | opts = { 158 | dashboard = { 159 | width = 30, 160 | preset = { 161 | pick = function(cmd, opts) 162 | return LazyVim.pick(cmd, opts)() 163 | end, 164 | header = [[ 165 | ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ 166 | ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ 167 | ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ 168 | ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ 169 | ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ 170 | ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ 171 | ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ 172 | ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ 173 | ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ 174 | ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ 175 | ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ]], 176 | keys = { 177 | { icon = " ", title = "Projects", section = "projects", indent = 2, padding = 2 }, 178 | { icon = " ", key = "q", desc = "Quit", action = ":qa" }, 179 | }, 180 | }, 181 | }, 182 | }, 183 | }, 184 | } 185 | -------------------------------------------------------------------------------- /nvim/lua/plugins/utils.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "mrjones2014/smart-splits.nvim", 4 | build = "./kitty/install-kittens.bash", 5 | lazy = false, 6 | -- stylua: ignore 7 | keys = { 8 | { "", function() require("smart-splits").move_cursor_left() end, desc = "focus leftside window", }, 9 | { "", function() require("smart-splits").move_cursor_down() end, desc = "focus downside window", }, 10 | { "", function() require("smart-splits").move_cursor_up() end, desc = "focus upside window", }, 11 | { "", function() require("smart-splits").move_cursor_right() end, desc = "focus rightside window", }, 12 | }, 13 | }, 14 | { 15 | -- ufo can prevent blocking nvim with treesitter fold method 16 | -- which is weird when switching to a buffer with large file 17 | "kevinhwang91/nvim-ufo", 18 | lazy = false, 19 | dependencies = { "kevinhwang91/promise-async" }, 20 | config = function() 21 | local handler = function(virtText, lnum, endLnum, width, truncate) 22 | local newVirtText = {} 23 | local suffix = ("  %d "):format(endLnum - lnum) 24 | local sufWidth = vim.fn.strdisplaywidth(suffix) 25 | local targetWidth = width - sufWidth 26 | local curWidth = 0 27 | for _, chunk in ipairs(virtText) do 28 | local chunkText = chunk[1] 29 | local chunkWidth = vim.fn.strdisplaywidth(chunkText) 30 | if targetWidth > curWidth + chunkWidth then 31 | table.insert(newVirtText, chunk) 32 | else 33 | chunkText = truncate(chunkText, targetWidth - curWidth) 34 | local hlGroup = chunk[2] 35 | table.insert(newVirtText, { chunkText, hlGroup }) 36 | chunkWidth = vim.fn.strdisplaywidth(chunkText) 37 | -- str width returned from truncate() may less than 2nd argument, need padding 38 | if curWidth + chunkWidth < targetWidth then 39 | suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth) 40 | end 41 | break 42 | end 43 | curWidth = curWidth + chunkWidth 44 | end 45 | table.insert(newVirtText, { suffix, "MoreMsg" }) 46 | return newVirtText 47 | end 48 | require("ufo").setup({ 49 | provider_selector = function() 50 | return { "treesitter", "indent" } 51 | end, 52 | fold_virt_text_handler = handler, 53 | }) 54 | end, 55 | }, 56 | { 57 | "folke/persistence.nvim", 58 | enabled = false, 59 | }, 60 | } 61 | -------------------------------------------------------------------------------- /nvim/stylua.toml: -------------------------------------------------------------------------------- 1 | indent_type = "Spaces" 2 | indent_width = 2 3 | column_width = 120 -------------------------------------------------------------------------------- /scripts/install-software.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # set -ex 4 | 5 | if [ $(uname -s) = "Linux" ]; then 6 | if ! sudo -v &>/dev/null; then 7 | echo "Failed to execute sudo. Make sure you have sudo privileges." 8 | exit 1 9 | fi 10 | fi 11 | 12 | if [ "$(cat /etc/lsb-release | grep DISTRIB_ID | cut -d '=' -f 2)" = "Ubuntu" ]; then 13 | echo "Detect Ubuntu, installing packages with apt..." 14 | sudo apt update 15 | sudo apt install -y git kitty zsh rsync htop bat fzf python3 unzip fd-find lsd wget ripgrep clang nodejs npm golang python3-pip python3-venv zoxide rust-all 16 | wget https://github.com/neovim/neovim-releases/releases/download/stable/nvim-linux-x86_64.appimage 17 | mkdir -p ~/.local/bin/ 18 | mv nvim-linux-x86_64.appimage ~/.local/bin/nvim 19 | chmod +x ~/.local/bin/nvim 20 | sudo ln -s -f /usr/bin/batcat /usr/bin/bat 21 | sudo ln -s -f /usr/bin/fdfind /usr/bin/fd 22 | sudo ln -s -f /usr/bin/python3 /usr/bin/python 23 | # install yazi 24 | cargo install --locked yazi-fm yazi-cli 25 | 26 | touch ~/.zshenv 27 | echo "skip_global_compinit=1" >>~/.zshenv 28 | fi 29 | 30 | if [ -f /etc/arch-release ]; then 31 | echo "Detect Arch based system, installing packages with pacman..." 32 | sudo pacman -Sy 33 | sudo pacman -S --needed --noconfirm kitty git zsh rsync htop bat python fzf unzip zoxide lsd fd wget ripgrep neovim clang nodejs npm go yazi ffmpegthumbnailer ffmpeg p7zip jq poppler imagemagick 34 | fi 35 | 36 | # git submodule init 37 | # git submodule update 38 | git submodule update --init --recursive 39 | 40 | BASEDIR=~/.config 41 | read -p "Do you want to overwrite or backup the configuration file? (o/b): " response 42 | 43 | if [ "$response" == "o" ]; then 44 | echo "Overwriting the configuration file..." 45 | yes | rm -r $BASEDIR/zsh 46 | yes | rm -r $BASEDIR/yazi 47 | yes | rm -r $BASEDIR/nvim 48 | yes | rm -r $BASEDIR/kitty 49 | elif [ "$response" == "b" ]; then 50 | echo "Backup the configuration file..." 51 | mv $BASEDIR/zsh $BASEDIR/zsh_bak || echo "$BASEDIR/zsh not found. Skip." 52 | mv ~/.zshrc ~/.zshrc_bak || echo "~/.zshrc not found. Skip." 53 | mv ~/.zimrc ~/.zimrc_bak || echo "~/.zimrc not found. Skip." 54 | mv $BASEDIR/yazi $BASEDIR/yazi_bak || echo "$BASEDIR/yazi not found. Skip." 55 | mv $BASEDIR/nvim $BASEDIR/nvim_bak || echo "$BASEDIR/nvim not found. Skip." 56 | mv $BASEDIR/kitty $BASEDIR/kitty_bak || echo "$BASEDIR/kitty not found. Skip." 57 | else 58 | echo "Invalid response. Please enter 'o' or 'b'." 59 | exit 1 60 | fi 61 | 62 | cp -r ./zsh/zsh $BASEDIR/zsh/ 63 | cp ./zsh/zshrc ~/.zshrc 64 | cp ./zsh/zimrc ~/.zimrc 65 | cp -r ./yazi $BASEDIR/ 66 | cp -r ./nvim $BASEDIR/ 67 | cp -r ./kitty $BASEDIR/ 68 | 69 | zsh -i -c "zimfw install" 70 | zsh -i -c "nvim --headless '+Lazy! sync' +qa" 71 | -------------------------------------------------------------------------------- /yazi/flavors/catppuccin-latte.yazi/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 yazi-rs 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 | -------------------------------------------------------------------------------- /yazi/flavors/catppuccin-latte.yazi/LICENSE-tmtheme: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Catppuccin 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 | -------------------------------------------------------------------------------- /yazi/flavors/catppuccin-latte.yazi/README.md: -------------------------------------------------------------------------------- 1 |
2 | Yazi logo 3 |
4 | 5 |

6 | Catppuccin Latte Flavor for Yazi 7 |

8 | 9 | ## 👀 Preview 10 | 11 | 12 | 13 | ## 🎨 Installation 14 | 15 | ```sh 16 | ya pkg add yazi-rs/flavors:catppuccin-latte 17 | ``` 18 | 19 | ## ⚙️ Usage 20 | 21 | Set the content of your `theme.toml` to enable it as your _light_ flavor: 22 | 23 | ```toml 24 | [flavor] 25 | light = "catppuccin-latte" 26 | ``` 27 | 28 | Make sure your `theme.toml` doesn't contain anything other than `[flavor]`, unless you want to override certain styles of this flavor. 29 | 30 | See the [Yazi flavor documentation](https://yazi-rs.github.io/docs/flavors/overview) for more details. 31 | 32 | ## 📜 License 33 | 34 | The flavor is MIT-licensed, and the included tmTheme is also MIT-licensed. 35 | 36 | Check the [LICENSE](LICENSE) and [LICENSE-tmtheme](LICENSE-tmtheme) file for more details. 37 | -------------------------------------------------------------------------------- /yazi/flavors/catppuccin-latte.yazi/flavor.toml: -------------------------------------------------------------------------------- 1 | # vim:fileencoding=utf-8:foldmethod=marker 2 | 3 | # : Manager {{{ 4 | 5 | [mgr] 6 | cwd = { fg = "#179299" } 7 | 8 | # Hovered 9 | hovered = { reversed = true } 10 | preview_hovered = { underline = true } 11 | 12 | # Find 13 | find_keyword = { fg = "#df8e1d", bold = true, italic = true, underline = true } 14 | find_position = { fg = "#ea76cb", bg = "reset", bold = true, italic = true } 15 | 16 | # Marker 17 | marker_copied = { fg = "#40a02b", bg = "#40a02b" } 18 | marker_cut = { fg = "#d20f39", bg = "#d20f39" } 19 | marker_marked = { fg = "#179299", bg = "#179299" } 20 | marker_selected = { fg = "#df8e1d", bg = "#df8e1d" } 21 | 22 | # Tab 23 | tab_active = { reversed = true } 24 | tab_inactive = {} 25 | tab_width = 1 26 | 27 | # Count 28 | count_copied = { fg = "#eff1f5", bg = "#40a02b" } 29 | count_cut = { fg = "#eff1f5", bg = "#d20f39" } 30 | count_selected = { fg = "#eff1f5", bg = "#df8e1d" } 31 | 32 | # Border 33 | border_symbol = "│" 34 | border_style = { fg = "#8c8fa1" } 35 | 36 | # : }}} 37 | 38 | 39 | # : Tabs {{{ 40 | 41 | [tabs] 42 | active = { fg = "#eff1f5", bg = "#1e66f5", bold = true } 43 | inactive = { fg = "#1e66f5", bg = "#ccd0da" } 44 | 45 | # : }}} 46 | 47 | 48 | # : Mode {{{ 49 | 50 | [mode] 51 | 52 | normal_main = { fg = "#eff1f5", bg = "#1e66f5", bold = true } 53 | normal_alt = { fg = "#1e66f5", bg = "#ccd0da" } 54 | 55 | # Select mode 56 | select_main = { fg = "#eff1f5", bg = "#179299", bold = true } 57 | select_alt = { fg = "#179299", bg = "#ccd0da" } 58 | 59 | # Unset mode 60 | unset_main = { fg = "#eff1f5", bg = "#dd7878", bold = true } 61 | unset_alt = { fg = "#dd7878", bg = "#ccd0da" } 62 | 63 | # : }}} 64 | 65 | 66 | # : Status bar {{{ 67 | 68 | [status] 69 | # Permissions 70 | perm_sep = { fg = "#8c8fa1" } 71 | perm_type = { fg = "#1e66f5" } 72 | perm_read = { fg = "#df8e1d" } 73 | perm_write = { fg = "#d20f39" } 74 | perm_exec = { fg = "#40a02b" } 75 | 76 | # Progress 77 | progress_label = { fg = "#ffffff", bold = true } 78 | progress_normal = { fg = "#1e66f5", bg = "#bcc0cc" } 79 | progress_error = { fg = "#d20f39", bg = "#bcc0cc" } 80 | 81 | # : }}} 82 | 83 | 84 | # : Pick {{{ 85 | 86 | [pick] 87 | border = { fg = "#1e66f5" } 88 | active = { fg = "#ea76cb", bold = true } 89 | inactive = {} 90 | 91 | # : }}} 92 | 93 | 94 | # : Input {{{ 95 | 96 | [input] 97 | border = { fg = "#1e66f5" } 98 | title = {} 99 | value = {} 100 | selected = { reversed = true } 101 | 102 | # : }}} 103 | 104 | 105 | # : Completion {{{ 106 | 107 | [cmp] 108 | border = { fg = "#1e66f5" } 109 | 110 | # : }}} 111 | 112 | 113 | # : Tasks {{{ 114 | 115 | [tasks] 116 | border = { fg = "#1e66f5" } 117 | title = {} 118 | hovered = { fg = "#ea76cb", underline = true } 119 | 120 | # : }}} 121 | 122 | 123 | # : Which {{{ 124 | 125 | [which] 126 | mask = { bg = "#ccd0da" } 127 | cand = { fg = "#179299" } 128 | rest = { fg = "#7c7f93" } 129 | desc = { fg = "#ea76cb" } 130 | separator = "  " 131 | separator_style = { fg = "#acb0be" } 132 | 133 | # : }}} 134 | 135 | 136 | # : Help {{{ 137 | 138 | [help] 139 | on = { fg = "#179299" } 140 | run = { fg = "#ea76cb" } 141 | hovered = { reversed = true, bold = true } 142 | footer = { fg = "#ccd0da", bg = "#4c4f69" } 143 | 144 | # : }}} 145 | 146 | 147 | # : Notify {{{ 148 | 149 | [notify] 150 | title_info = { fg = "#40a02b" } 151 | title_warn = { fg = "#df8e1d" } 152 | title_error = { fg = "#d20f39" } 153 | 154 | # : }}} 155 | 156 | 157 | # : File-specific styles {{{ 158 | 159 | [filetype] 160 | 161 | rules = [ 162 | # Images 163 | { mime = "image/*", fg = "#179299" }, 164 | 165 | # Media 166 | { mime = "{audio,video}/*", fg = "#df8e1d" }, 167 | 168 | # Archives 169 | { mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", fg = "#ea76cb" }, 170 | 171 | # Documents 172 | { mime = "application/{pdf,doc,rtf}", fg = "#40a02b" }, 173 | 174 | # Fallback 175 | { name = "*", fg = "#4c4f69" }, 176 | { name = "*/", fg = "#1e66f5" } 177 | ] 178 | 179 | # : }}} 180 | -------------------------------------------------------------------------------- /yazi/flavors/catppuccin-latte.yazi/tmtheme.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Catppuccin Latte 7 | semanticClass 8 | theme.light.catppuccin-latte 9 | uuid 10 | 96a262cd-4b2f-49f5-9125-8dd0077cbfe1 11 | author 12 | Catppuccin Org 13 | colorSpaceName 14 | sRGB 15 | settings 16 | 17 | 18 | settings 19 | 20 | background 21 | #eff1f5 22 | foreground 23 | #4c4f69 24 | caret 25 | #dc8a78 26 | lineHighlight 27 | #ccd0da 28 | misspelling 29 | #d20f39 30 | accent 31 | #8839ef 32 | selection 33 | #7c7f934d 34 | activeGuide 35 | #bcc0cc 36 | findHighlight 37 | #a9daf0 38 | gutterForeground 39 | #8c8fa1 40 | 41 | 42 | 43 | name 44 | Basic text & variable names (incl. leading punctuation) 45 | scope 46 | text, source, variable.other.readwrite, punctuation.definition.variable 47 | settings 48 | 49 | foreground 50 | #4c4f69 51 | 52 | 53 | 54 | name 55 | Parentheses, Brackets, Braces 56 | scope 57 | punctuation 58 | settings 59 | 60 | foreground 61 | #7c7f93 62 | fontStyle 63 | 64 | 65 | 66 | 67 | name 68 | Comments 69 | scope 70 | comment, punctuation.definition.comment 71 | settings 72 | 73 | foreground 74 | #9ca0b0 75 | fontStyle 76 | italic 77 | 78 | 79 | 80 | scope 81 | string, punctuation.definition.string 82 | settings 83 | 84 | foreground 85 | #40a02b 86 | 87 | 88 | 89 | scope 90 | constant.character.escape 91 | settings 92 | 93 | foreground 94 | #ea76cb 95 | 96 | 97 | 98 | name 99 | Booleans, constants, numbers 100 | scope 101 | constant.numeric, variable.other.constant, entity.name.constant, constant.language.boolean, constant.language.false, constant.language.true, keyword.other.unit.user-defined, keyword.other.unit.suffix.floating-point 102 | settings 103 | 104 | foreground 105 | #fe640b 106 | 107 | 108 | 109 | scope 110 | keyword, keyword.operator.word, keyword.operator.new, variable.language.super, support.type.primitive, storage.type, storage.modifier, punctuation.definition.keyword 111 | settings 112 | 113 | foreground 114 | #8839ef 115 | fontStyle 116 | 117 | 118 | 119 | 120 | scope 121 | entity.name.tag.documentation 122 | settings 123 | 124 | foreground 125 | #8839ef 126 | 127 | 128 | 129 | name 130 | Punctuation 131 | scope 132 | keyword.operator, punctuation.accessor, punctuation.definition.generic, meta.function.closure punctuation.section.parameters, punctuation.definition.tag, punctuation.separator.key-value 133 | settings 134 | 135 | foreground 136 | #179299 137 | 138 | 139 | 140 | scope 141 | entity.name.function, meta.function-call.method, support.function, support.function.misc, variable.function 142 | settings 143 | 144 | foreground 145 | #1e66f5 146 | fontStyle 147 | italic 148 | 149 | 150 | 151 | name 152 | Classes 153 | scope 154 | entity.name.class, entity.other.inherited-class, support.class, meta.function-call.constructor, entity.name.struct 155 | settings 156 | 157 | foreground 158 | #df8e1d 159 | fontStyle 160 | italic 161 | 162 | 163 | 164 | name 165 | Enum 166 | scope 167 | entity.name.enum 168 | settings 169 | 170 | foreground 171 | #df8e1d 172 | fontStyle 173 | italic 174 | 175 | 176 | 177 | name 178 | Enum member 179 | scope 180 | meta.enum variable.other.readwrite, variable.other.enummember 181 | settings 182 | 183 | foreground 184 | #179299 185 | 186 | 187 | 188 | name 189 | Object properties 190 | scope 191 | meta.property.object 192 | settings 193 | 194 | foreground 195 | #179299 196 | 197 | 198 | 199 | name 200 | Types 201 | scope 202 | meta.type, meta.type-alias, support.type, entity.name.type 203 | settings 204 | 205 | foreground 206 | #df8e1d 207 | fontStyle 208 | italic 209 | 210 | 211 | 212 | name 213 | Decorators 214 | scope 215 | meta.annotation variable.function, meta.annotation variable.annotation.function, meta.annotation punctuation.definition.annotation, meta.decorator, punctuation.decorator 216 | settings 217 | 218 | foreground 219 | #fe640b 220 | 221 | 222 | 223 | scope 224 | variable.parameter, meta.function.parameters 225 | settings 226 | 227 | foreground 228 | #e64553 229 | fontStyle 230 | italic 231 | 232 | 233 | 234 | name 235 | Built-ins 236 | scope 237 | constant.language, support.function.builtin 238 | settings 239 | 240 | foreground 241 | #d20f39 242 | 243 | 244 | 245 | scope 246 | entity.other.attribute-name.documentation 247 | settings 248 | 249 | foreground 250 | #d20f39 251 | 252 | 253 | 254 | name 255 | Preprocessor directives 256 | scope 257 | keyword.control.directive, punctuation.definition.directive 258 | settings 259 | 260 | foreground 261 | #df8e1d 262 | 263 | 264 | 265 | name 266 | Type parameters 267 | scope 268 | punctuation.definition.typeparameters 269 | settings 270 | 271 | foreground 272 | #04a5e5 273 | 274 | 275 | 276 | name 277 | Namespaces 278 | scope 279 | entity.name.namespace 280 | settings 281 | 282 | foreground 283 | #df8e1d 284 | 285 | 286 | 287 | name 288 | Property names (left hand assignments in json/yaml/css) 289 | scope 290 | support.type.property-name.css 291 | settings 292 | 293 | foreground 294 | #1e66f5 295 | fontStyle 296 | 297 | 298 | 299 | 300 | name 301 | This/Self keyword 302 | scope 303 | variable.language.this, variable.language.this punctuation.definition.variable 304 | settings 305 | 306 | foreground 307 | #d20f39 308 | 309 | 310 | 311 | name 312 | Object properties 313 | scope 314 | variable.object.property 315 | settings 316 | 317 | foreground 318 | #4c4f69 319 | 320 | 321 | 322 | name 323 | String template interpolation 324 | scope 325 | string.template variable, string variable 326 | settings 327 | 328 | foreground 329 | #4c4f69 330 | 331 | 332 | 333 | name 334 | `new` as bold 335 | scope 336 | keyword.operator.new 337 | settings 338 | 339 | fontStyle 340 | bold 341 | 342 | 343 | 344 | name 345 | C++ extern keyword 346 | scope 347 | storage.modifier.specifier.extern.cpp 348 | settings 349 | 350 | foreground 351 | #8839ef 352 | 353 | 354 | 355 | name 356 | C++ scope resolution 357 | scope 358 | entity.name.scope-resolution.template.call.cpp, entity.name.scope-resolution.parameter.cpp, entity.name.scope-resolution.cpp, entity.name.scope-resolution.function.definition.cpp 359 | settings 360 | 361 | foreground 362 | #df8e1d 363 | 364 | 365 | 366 | name 367 | C++ doc keywords 368 | scope 369 | storage.type.class.doxygen 370 | settings 371 | 372 | fontStyle 373 | 374 | 375 | 376 | 377 | name 378 | C++ operators 379 | scope 380 | storage.modifier.reference.cpp 381 | settings 382 | 383 | foreground 384 | #179299 385 | 386 | 387 | 388 | name 389 | C# Interpolated Strings 390 | scope 391 | meta.interpolation.cs 392 | settings 393 | 394 | foreground 395 | #4c4f69 396 | 397 | 398 | 399 | name 400 | C# xml-style docs 401 | scope 402 | comment.block.documentation.cs 403 | settings 404 | 405 | foreground 406 | #4c4f69 407 | 408 | 409 | 410 | name 411 | Classes, reflecting the className color in JSX 412 | scope 413 | source.css entity.other.attribute-name.class.css, entity.other.attribute-name.parent-selector.css punctuation.definition.entity.css 414 | settings 415 | 416 | foreground 417 | #df8e1d 418 | 419 | 420 | 421 | name 422 | Operators 423 | scope 424 | punctuation.separator.operator.css 425 | settings 426 | 427 | foreground 428 | #179299 429 | 430 | 431 | 432 | name 433 | Pseudo classes 434 | scope 435 | source.css entity.other.attribute-name.pseudo-class 436 | settings 437 | 438 | foreground 439 | #179299 440 | 441 | 442 | 443 | scope 444 | source.css constant.other.unicode-range 445 | settings 446 | 447 | foreground 448 | #fe640b 449 | 450 | 451 | 452 | scope 453 | source.css variable.parameter.url 454 | settings 455 | 456 | foreground 457 | #40a02b 458 | fontStyle 459 | 460 | 461 | 462 | 463 | name 464 | CSS vendored property names 465 | scope 466 | support.type.vendored.property-name 467 | settings 468 | 469 | foreground 470 | #04a5e5 471 | 472 | 473 | 474 | name 475 | Less/SCSS right-hand variables (@/$-prefixed) 476 | scope 477 | source.css meta.property-value variable, source.css meta.property-value variable.other.less, source.css meta.property-value variable.other.less punctuation.definition.variable.less, meta.definition.variable.scss 478 | settings 479 | 480 | foreground 481 | #e64553 482 | 483 | 484 | 485 | name 486 | CSS variables (--prefixed) 487 | scope 488 | source.css meta.property-list variable, meta.property-list variable.other.less, meta.property-list variable.other.less punctuation.definition.variable.less 489 | settings 490 | 491 | foreground 492 | #1e66f5 493 | 494 | 495 | 496 | name 497 | CSS Percentage values, styled the same as numbers 498 | scope 499 | keyword.other.unit.percentage.css 500 | settings 501 | 502 | foreground 503 | #fe640b 504 | 505 | 506 | 507 | name 508 | CSS Attribute selectors, styled the same as strings 509 | scope 510 | source.css meta.attribute-selector 511 | settings 512 | 513 | foreground 514 | #40a02b 515 | 516 | 517 | 518 | name 519 | JSON/YAML keys, other left-hand assignments 520 | scope 521 | keyword.other.definition.ini, punctuation.support.type.property-name.json, support.type.property-name.json, punctuation.support.type.property-name.toml, support.type.property-name.toml, entity.name.tag.yaml, punctuation.support.type.property-name.yaml, support.type.property-name.yaml 522 | settings 523 | 524 | foreground 525 | #1e66f5 526 | fontStyle 527 | 528 | 529 | 530 | 531 | name 532 | JSON/YAML constants 533 | scope 534 | constant.language.json, constant.language.yaml 535 | settings 536 | 537 | foreground 538 | #fe640b 539 | 540 | 541 | 542 | name 543 | YAML anchors 544 | scope 545 | entity.name.type.anchor.yaml, variable.other.alias.yaml 546 | settings 547 | 548 | foreground 549 | #df8e1d 550 | fontStyle 551 | 552 | 553 | 554 | 555 | name 556 | TOML tables / ini groups 557 | scope 558 | support.type.property-name.table, entity.name.section.group-title.ini 559 | settings 560 | 561 | foreground 562 | #df8e1d 563 | 564 | 565 | 566 | name 567 | TOML dates 568 | scope 569 | constant.other.time.datetime.offset.toml 570 | settings 571 | 572 | foreground 573 | #ea76cb 574 | 575 | 576 | 577 | name 578 | YAML anchor puctuation 579 | scope 580 | punctuation.definition.anchor.yaml, punctuation.definition.alias.yaml 581 | settings 582 | 583 | foreground 584 | #ea76cb 585 | 586 | 587 | 588 | name 589 | YAML triple dashes 590 | scope 591 | entity.other.document.begin.yaml 592 | settings 593 | 594 | foreground 595 | #ea76cb 596 | 597 | 598 | 599 | name 600 | Markup Diff 601 | scope 602 | markup.changed.diff 603 | settings 604 | 605 | foreground 606 | #fe640b 607 | 608 | 609 | 610 | name 611 | Diff 612 | scope 613 | meta.diff.header.from-file, meta.diff.header.to-file, punctuation.definition.from-file.diff, punctuation.definition.to-file.diff 614 | settings 615 | 616 | foreground 617 | #1e66f5 618 | 619 | 620 | 621 | name 622 | Diff Inserted 623 | scope 624 | markup.inserted.diff 625 | settings 626 | 627 | foreground 628 | #40a02b 629 | 630 | 631 | 632 | name 633 | Diff Deleted 634 | scope 635 | markup.deleted.diff 636 | settings 637 | 638 | foreground 639 | #d20f39 640 | 641 | 642 | 643 | name 644 | dotenv left-hand side assignments 645 | scope 646 | variable.other.env 647 | settings 648 | 649 | foreground 650 | #1e66f5 651 | 652 | 653 | 654 | name 655 | dotenv reference to existing env variable 656 | scope 657 | string.quoted variable.other.env 658 | settings 659 | 660 | foreground 661 | #4c4f69 662 | 663 | 664 | 665 | name 666 | GDScript functions 667 | scope 668 | support.function.builtin.gdscript 669 | settings 670 | 671 | foreground 672 | #1e66f5 673 | 674 | 675 | 676 | name 677 | GDScript constants 678 | scope 679 | constant.language.gdscript 680 | settings 681 | 682 | foreground 683 | #fe640b 684 | 685 | 686 | 687 | name 688 | Comment keywords 689 | scope 690 | comment meta.annotation.go 691 | settings 692 | 693 | foreground 694 | #e64553 695 | 696 | 697 | 698 | name 699 | go:embed, go:build, etc. 700 | scope 701 | comment meta.annotation.parameters.go 702 | settings 703 | 704 | foreground 705 | #fe640b 706 | 707 | 708 | 709 | name 710 | Go constants (nil, true, false) 711 | scope 712 | constant.language.go 713 | settings 714 | 715 | foreground 716 | #fe640b 717 | 718 | 719 | 720 | name 721 | GraphQL variables 722 | scope 723 | variable.graphql 724 | settings 725 | 726 | foreground 727 | #4c4f69 728 | 729 | 730 | 731 | name 732 | GraphQL aliases 733 | scope 734 | string.unquoted.alias.graphql 735 | settings 736 | 737 | foreground 738 | #dd7878 739 | 740 | 741 | 742 | name 743 | GraphQL enum members 744 | scope 745 | constant.character.enum.graphql 746 | settings 747 | 748 | foreground 749 | #179299 750 | 751 | 752 | 753 | name 754 | GraphQL field in types 755 | scope 756 | meta.objectvalues.graphql constant.object.key.graphql string.unquoted.graphql 757 | settings 758 | 759 | foreground 760 | #dd7878 761 | 762 | 763 | 764 | name 765 | HTML/XML DOCTYPE as keyword 766 | scope 767 | keyword.other.doctype, meta.tag.sgml.doctype punctuation.definition.tag, meta.tag.metadata.doctype entity.name.tag, meta.tag.metadata.doctype punctuation.definition.tag 768 | settings 769 | 770 | foreground 771 | #8839ef 772 | 773 | 774 | 775 | name 776 | HTML/XML-like <tags/> 777 | scope 778 | entity.name.tag 779 | settings 780 | 781 | foreground 782 | #1e66f5 783 | fontStyle 784 | 785 | 786 | 787 | 788 | name 789 | Special characters like &amp; 790 | scope 791 | text.html constant.character.entity, text.html constant.character.entity punctuation, constant.character.entity.xml, constant.character.entity.xml punctuation, constant.character.entity.js.jsx, constant.charactger.entity.js.jsx punctuation, constant.character.entity.tsx, constant.character.entity.tsx punctuation 792 | settings 793 | 794 | foreground 795 | #d20f39 796 | 797 | 798 | 799 | name 800 | HTML/XML tag attribute values 801 | scope 802 | entity.other.attribute-name 803 | settings 804 | 805 | foreground 806 | #df8e1d 807 | 808 | 809 | 810 | name 811 | Components 812 | scope 813 | support.class.component, support.class.component.jsx, support.class.component.tsx, support.class.component.vue 814 | settings 815 | 816 | foreground 817 | #ea76cb 818 | fontStyle 819 | 820 | 821 | 822 | 823 | name 824 | Annotations 825 | scope 826 | punctuation.definition.annotation, storage.type.annotation 827 | settings 828 | 829 | foreground 830 | #fe640b 831 | 832 | 833 | 834 | name 835 | Java enums 836 | scope 837 | constant.other.enum.java 838 | settings 839 | 840 | foreground 841 | #179299 842 | 843 | 844 | 845 | name 846 | Java imports 847 | scope 848 | storage.modifier.import.java 849 | settings 850 | 851 | foreground 852 | #4c4f69 853 | 854 | 855 | 856 | name 857 | Javadoc 858 | scope 859 | comment.block.javadoc.java keyword.other.documentation.javadoc.java 860 | settings 861 | 862 | fontStyle 863 | 864 | 865 | 866 | 867 | name 868 | Exported Variable 869 | scope 870 | meta.export variable.other.readwrite.js 871 | settings 872 | 873 | foreground 874 | #e64553 875 | 876 | 877 | 878 | name 879 | JS/TS constants & properties 880 | scope 881 | variable.other.constant.js, variable.other.constant.ts, variable.other.property.js, variable.other.property.ts 882 | settings 883 | 884 | foreground 885 | #4c4f69 886 | 887 | 888 | 889 | name 890 | JSDoc; these are mainly params, so styled as such 891 | scope 892 | variable.other.jsdoc, comment.block.documentation variable.other 893 | settings 894 | 895 | foreground 896 | #e64553 897 | fontStyle 898 | 899 | 900 | 901 | 902 | name 903 | JSDoc keywords 904 | scope 905 | storage.type.class.jsdoc 906 | settings 907 | 908 | fontStyle 909 | 910 | 911 | 912 | 913 | scope 914 | support.type.object.console.js 915 | settings 916 | 917 | foreground 918 | #4c4f69 919 | 920 | 921 | 922 | name 923 | Node constants as keywords (module, etc.) 924 | scope 925 | support.constant.node, support.type.object.module.js 926 | settings 927 | 928 | foreground 929 | #8839ef 930 | 931 | 932 | 933 | name 934 | implements as keyword 935 | scope 936 | storage.modifier.implements 937 | settings 938 | 939 | foreground 940 | #8839ef 941 | 942 | 943 | 944 | name 945 | Builtin types 946 | scope 947 | constant.language.null.js, constant.language.null.ts, constant.language.undefined.js, constant.language.undefined.ts, support.type.builtin.ts 948 | settings 949 | 950 | foreground 951 | #8839ef 952 | 953 | 954 | 955 | scope 956 | variable.parameter.generic 957 | settings 958 | 959 | foreground 960 | #df8e1d 961 | 962 | 963 | 964 | name 965 | Arrow functions 966 | scope 967 | keyword.declaration.function.arrow.js, storage.type.function.arrow.ts 968 | settings 969 | 970 | foreground 971 | #179299 972 | 973 | 974 | 975 | name 976 | Decorator punctuations (decorators inherit from blue functions, instead of styleguide peach) 977 | scope 978 | punctuation.decorator.ts 979 | settings 980 | 981 | foreground 982 | #1e66f5 983 | fontStyle 984 | italic 985 | 986 | 987 | 988 | name 989 | Extra JS/TS keywords 990 | scope 991 | keyword.operator.expression.in.js, keyword.operator.expression.in.ts, keyword.operator.expression.infer.ts, keyword.operator.expression.instanceof.js, keyword.operator.expression.instanceof.ts, keyword.operator.expression.is, keyword.operator.expression.keyof.ts, keyword.operator.expression.of.js, keyword.operator.expression.of.ts, keyword.operator.expression.typeof.ts 992 | settings 993 | 994 | foreground 995 | #8839ef 996 | 997 | 998 | 999 | name 1000 | Julia macros 1001 | scope 1002 | support.function.macro.julia 1003 | settings 1004 | 1005 | foreground 1006 | #179299 1007 | fontStyle 1008 | italic 1009 | 1010 | 1011 | 1012 | name 1013 | Julia language constants (true, false) 1014 | scope 1015 | constant.language.julia 1016 | settings 1017 | 1018 | foreground 1019 | #fe640b 1020 | 1021 | 1022 | 1023 | name 1024 | Julia other constants (these seem to be arguments inside arrays) 1025 | scope 1026 | constant.other.symbol.julia 1027 | settings 1028 | 1029 | foreground 1030 | #e64553 1031 | 1032 | 1033 | 1034 | name 1035 | LaTeX preamble 1036 | scope 1037 | text.tex keyword.control.preamble 1038 | settings 1039 | 1040 | foreground 1041 | #179299 1042 | 1043 | 1044 | 1045 | name 1046 | LaTeX be functions 1047 | scope 1048 | text.tex support.function.be 1049 | settings 1050 | 1051 | foreground 1052 | #04a5e5 1053 | 1054 | 1055 | 1056 | name 1057 | LaTeX math 1058 | scope 1059 | constant.other.general.math.tex 1060 | settings 1061 | 1062 | foreground 1063 | #dd7878 1064 | 1065 | 1066 | 1067 | name 1068 | Lua docstring keywords 1069 | scope 1070 | comment.line.double-dash.documentation.lua storage.type.annotation.lua 1071 | settings 1072 | 1073 | foreground 1074 | #8839ef 1075 | fontStyle 1076 | 1077 | 1078 | 1079 | 1080 | name 1081 | Lua docstring variables 1082 | scope 1083 | comment.line.double-dash.documentation.lua entity.name.variable.lua, comment.line.double-dash.documentation.lua variable.lua 1084 | settings 1085 | 1086 | foreground 1087 | #4c4f69 1088 | 1089 | 1090 | 1091 | scope 1092 | heading.1.markdown punctuation.definition.heading.markdown, heading.1.markdown, markup.heading.atx.1.mdx, markup.heading.atx.1.mdx punctuation.definition.heading.mdx, markup.heading.setext.1.markdown, markup.heading.heading-0.asciidoc 1093 | settings 1094 | 1095 | foreground 1096 | #d20f39 1097 | 1098 | 1099 | 1100 | scope 1101 | heading.2.markdown punctuation.definition.heading.markdown, heading.2.markdown, markup.heading.atx.2.mdx, markup.heading.atx.2.mdx punctuation.definition.heading.mdx, markup.heading.setext.2.markdown, markup.heading.heading-1.asciidoc 1102 | settings 1103 | 1104 | foreground 1105 | #fe640b 1106 | 1107 | 1108 | 1109 | scope 1110 | heading.3.markdown punctuation.definition.heading.markdown, heading.3.markdown, markup.heading.atx.3.mdx, markup.heading.atx.3.mdx punctuation.definition.heading.mdx, markup.heading.heading-2.asciidoc 1111 | settings 1112 | 1113 | foreground 1114 | #df8e1d 1115 | 1116 | 1117 | 1118 | scope 1119 | heading.4.markdown punctuation.definition.heading.markdown, heading.4.markdown, markup.heading.atx.4.mdx, markup.heading.atx.4.mdx punctuation.definition.heading.mdx, markup.heading.heading-3.asciidoc 1120 | settings 1121 | 1122 | foreground 1123 | #40a02b 1124 | 1125 | 1126 | 1127 | scope 1128 | heading.5.markdown punctuation.definition.heading.markdown, heading.5.markdown, markup.heading.atx.5.mdx, markup.heading.atx.5.mdx punctuation.definition.heading.mdx, markup.heading.heading-4.asciidoc 1129 | settings 1130 | 1131 | foreground 1132 | #1e66f5 1133 | 1134 | 1135 | 1136 | scope 1137 | heading.6.markdown punctuation.definition.heading.markdown, heading.6.markdown, markup.heading.atx.6.mdx, markup.heading.atx.6.mdx punctuation.definition.heading.mdx, markup.heading.heading-5.asciidoc 1138 | settings 1139 | 1140 | foreground 1141 | #8839ef 1142 | 1143 | 1144 | 1145 | scope 1146 | markup.bold 1147 | settings 1148 | 1149 | foreground 1150 | #d20f39 1151 | fontStyle 1152 | bold 1153 | 1154 | 1155 | 1156 | scope 1157 | markup.italic 1158 | settings 1159 | 1160 | foreground 1161 | #d20f39 1162 | fontStyle 1163 | italic 1164 | 1165 | 1166 | 1167 | scope 1168 | markup.strikethrough 1169 | settings 1170 | 1171 | foreground 1172 | #6c6f85 1173 | fontStyle 1174 | strikethrough 1175 | 1176 | 1177 | 1178 | name 1179 | Markdown auto links 1180 | scope 1181 | punctuation.definition.link, markup.underline.link 1182 | settings 1183 | 1184 | foreground 1185 | #1e66f5 1186 | 1187 | 1188 | 1189 | name 1190 | Markdown links 1191 | scope 1192 | text.html.markdown punctuation.definition.link.title, string.other.link.title.markdown, markup.link, punctuation.definition.constant.markdown, constant.other.reference.link.markdown, markup.substitution.attribute-reference 1193 | settings 1194 | 1195 | foreground 1196 | #7287fd 1197 | 1198 | 1199 | 1200 | name 1201 | Markdown code spans 1202 | scope 1203 | punctuation.definition.raw.markdown, markup.inline.raw.string.markdown, markup.raw.block.markdown 1204 | settings 1205 | 1206 | foreground 1207 | #40a02b 1208 | 1209 | 1210 | 1211 | name 1212 | Markdown triple backtick language identifier 1213 | scope 1214 | fenced_code.block.language 1215 | settings 1216 | 1217 | foreground 1218 | #04a5e5 1219 | 1220 | 1221 | 1222 | name 1223 | Markdown triple backticks 1224 | scope 1225 | markup.fenced_code.block punctuation.definition, markup.raw support.asciidoc 1226 | settings 1227 | 1228 | foreground 1229 | #7c7f93 1230 | 1231 | 1232 | 1233 | name 1234 | Markdown quotes 1235 | scope 1236 | markup.quote, punctuation.definition.quote.begin 1237 | settings 1238 | 1239 | foreground 1240 | #ea76cb 1241 | 1242 | 1243 | 1244 | name 1245 | Markdown separators 1246 | scope 1247 | meta.separator.markdown 1248 | settings 1249 | 1250 | foreground 1251 | #179299 1252 | 1253 | 1254 | 1255 | name 1256 | Markdown list bullets 1257 | scope 1258 | punctuation.definition.list.begin.markdown, markup.list.bullet 1259 | settings 1260 | 1261 | foreground 1262 | #179299 1263 | 1264 | 1265 | 1266 | name 1267 | Nix attribute names 1268 | scope 1269 | entity.other.attribute-name.multipart.nix, entity.other.attribute-name.single.nix 1270 | settings 1271 | 1272 | foreground 1273 | #1e66f5 1274 | 1275 | 1276 | 1277 | name 1278 | Nix parameter names 1279 | scope 1280 | variable.parameter.name.nix 1281 | settings 1282 | 1283 | foreground 1284 | #4c4f69 1285 | fontStyle 1286 | 1287 | 1288 | 1289 | 1290 | name 1291 | Nix interpolated parameter names 1292 | scope 1293 | meta.embedded variable.parameter.name.nix 1294 | settings 1295 | 1296 | foreground 1297 | #7287fd 1298 | fontStyle 1299 | 1300 | 1301 | 1302 | 1303 | name 1304 | Nix paths 1305 | scope 1306 | string.unquoted.path.nix 1307 | settings 1308 | 1309 | foreground 1310 | #ea76cb 1311 | fontStyle 1312 | 1313 | 1314 | 1315 | 1316 | name 1317 | PHP Attributes 1318 | scope 1319 | support.attribute.builtin, meta.attribute.php 1320 | settings 1321 | 1322 | foreground 1323 | #df8e1d 1324 | 1325 | 1326 | 1327 | name 1328 | PHP Parameters (needed for the leading dollar sign) 1329 | scope 1330 | meta.function.parameters.php punctuation.definition.variable.php 1331 | settings 1332 | 1333 | foreground 1334 | #e64553 1335 | 1336 | 1337 | 1338 | name 1339 | PHP Constants (null, __FILE__, etc.) 1340 | scope 1341 | constant.language.php 1342 | settings 1343 | 1344 | foreground 1345 | #8839ef 1346 | 1347 | 1348 | 1349 | name 1350 | PHP functions 1351 | scope 1352 | text.html.php support.function 1353 | settings 1354 | 1355 | foreground 1356 | #04a5e5 1357 | 1358 | 1359 | 1360 | name 1361 | PHPdoc keywords 1362 | scope 1363 | keyword.other.phpdoc.php 1364 | settings 1365 | 1366 | fontStyle 1367 | 1368 | 1369 | 1370 | 1371 | name 1372 | Python argument functions reset to text, otherwise they inherit blue from function-call 1373 | scope 1374 | support.variable.magic.python, meta.function-call.arguments.python 1375 | settings 1376 | 1377 | foreground 1378 | #4c4f69 1379 | 1380 | 1381 | 1382 | name 1383 | Python double underscore functions 1384 | scope 1385 | support.function.magic.python 1386 | settings 1387 | 1388 | foreground 1389 | #04a5e5 1390 | fontStyle 1391 | italic 1392 | 1393 | 1394 | 1395 | name 1396 | Python `self` keyword 1397 | scope 1398 | variable.parameter.function.language.special.self.python, variable.language.special.self.python 1399 | settings 1400 | 1401 | foreground 1402 | #d20f39 1403 | fontStyle 1404 | italic 1405 | 1406 | 1407 | 1408 | name 1409 | python keyword flow/logical (for ... in) 1410 | scope 1411 | keyword.control.flow.python, keyword.operator.logical.python 1412 | settings 1413 | 1414 | foreground 1415 | #8839ef 1416 | 1417 | 1418 | 1419 | name 1420 | python storage type 1421 | scope 1422 | storage.type.function.python 1423 | settings 1424 | 1425 | foreground 1426 | #8839ef 1427 | 1428 | 1429 | 1430 | name 1431 | python function support 1432 | scope 1433 | support.token.decorator.python, meta.function.decorator.identifier.python 1434 | settings 1435 | 1436 | foreground 1437 | #04a5e5 1438 | 1439 | 1440 | 1441 | name 1442 | python function calls 1443 | scope 1444 | meta.function-call.python 1445 | settings 1446 | 1447 | foreground 1448 | #1e66f5 1449 | 1450 | 1451 | 1452 | name 1453 | python function decorators 1454 | scope 1455 | entity.name.function.decorator.python, punctuation.definition.decorator.python 1456 | settings 1457 | 1458 | foreground 1459 | #fe640b 1460 | fontStyle 1461 | italic 1462 | 1463 | 1464 | 1465 | name 1466 | python placeholder reset to normal string 1467 | scope 1468 | constant.character.format.placeholder.other.python 1469 | settings 1470 | 1471 | foreground 1472 | #ea76cb 1473 | 1474 | 1475 | 1476 | name 1477 | Python exception & builtins such as exit() 1478 | scope 1479 | support.type.exception.python, support.function.builtin.python 1480 | settings 1481 | 1482 | foreground 1483 | #fe640b 1484 | 1485 | 1486 | 1487 | name 1488 | entity.name.type 1489 | scope 1490 | support.type.python 1491 | settings 1492 | 1493 | foreground 1494 | #fe640b 1495 | 1496 | 1497 | 1498 | name 1499 | python constants (True/False) 1500 | scope 1501 | constant.language.python 1502 | settings 1503 | 1504 | foreground 1505 | #8839ef 1506 | 1507 | 1508 | 1509 | name 1510 | Arguments accessed later in the function body 1511 | scope 1512 | meta.indexed-name.python, meta.item-access.python 1513 | settings 1514 | 1515 | foreground 1516 | #e64553 1517 | fontStyle 1518 | italic 1519 | 1520 | 1521 | 1522 | name 1523 | Python f-strings/binary/unicode storage types 1524 | scope 1525 | storage.type.string.python 1526 | settings 1527 | 1528 | foreground 1529 | #40a02b 1530 | fontStyle 1531 | italic 1532 | 1533 | 1534 | 1535 | name 1536 | Python type hints 1537 | scope 1538 | meta.function.parameters.python 1539 | settings 1540 | 1541 | fontStyle 1542 | 1543 | 1544 | 1545 | 1546 | name 1547 | Regex string begin/end in JS/TS 1548 | scope 1549 | string.regexp punctuation.definition.string.begin, string.regexp punctuation.definition.string.end 1550 | settings 1551 | 1552 | foreground 1553 | #ea76cb 1554 | 1555 | 1556 | 1557 | name 1558 | Regex anchors (^, $) 1559 | scope 1560 | keyword.control.anchor.regexp 1561 | settings 1562 | 1563 | foreground 1564 | #8839ef 1565 | 1566 | 1567 | 1568 | name 1569 | Regex regular string match 1570 | scope 1571 | string.regexp.ts 1572 | settings 1573 | 1574 | foreground 1575 | #4c4f69 1576 | 1577 | 1578 | 1579 | name 1580 | Regex group parenthesis & backreference (\1, \2, \3, ...) 1581 | scope 1582 | punctuation.definition.group.regexp, keyword.other.back-reference.regexp 1583 | settings 1584 | 1585 | foreground 1586 | #40a02b 1587 | 1588 | 1589 | 1590 | name 1591 | Regex character class [] 1592 | scope 1593 | punctuation.definition.character-class.regexp 1594 | settings 1595 | 1596 | foreground 1597 | #df8e1d 1598 | 1599 | 1600 | 1601 | name 1602 | Regex character classes (\d, \w, \s) 1603 | scope 1604 | constant.other.character-class.regexp 1605 | settings 1606 | 1607 | foreground 1608 | #ea76cb 1609 | 1610 | 1611 | 1612 | name 1613 | Regex range 1614 | scope 1615 | constant.other.character-class.range.regexp 1616 | settings 1617 | 1618 | foreground 1619 | #dc8a78 1620 | 1621 | 1622 | 1623 | name 1624 | Regex quantifier 1625 | scope 1626 | keyword.operator.quantifier.regexp 1627 | settings 1628 | 1629 | foreground 1630 | #179299 1631 | 1632 | 1633 | 1634 | name 1635 | Regex constant/numeric 1636 | scope 1637 | constant.character.numeric.regexp 1638 | settings 1639 | 1640 | foreground 1641 | #fe640b 1642 | 1643 | 1644 | 1645 | name 1646 | Regex lookaheads, negative lookaheads, lookbehinds, negative lookbehinds 1647 | scope 1648 | punctuation.definition.group.no-capture.regexp, meta.assertion.look-ahead.regexp, meta.assertion.negative-look-ahead.regexp 1649 | settings 1650 | 1651 | foreground 1652 | #1e66f5 1653 | 1654 | 1655 | 1656 | name 1657 | Rust attribute 1658 | scope 1659 | meta.annotation.rust, meta.annotation.rust punctuation, meta.attribute.rust, punctuation.definition.attribute.rust 1660 | settings 1661 | 1662 | foreground 1663 | #df8e1d 1664 | fontStyle 1665 | italic 1666 | 1667 | 1668 | 1669 | name 1670 | Rust attribute strings 1671 | scope 1672 | meta.attribute.rust string.quoted.double.rust, meta.attribute.rust string.quoted.single.char.rust 1673 | settings 1674 | 1675 | fontStyle 1676 | 1677 | 1678 | 1679 | 1680 | name 1681 | Rust keyword 1682 | scope 1683 | entity.name.function.macro.rules.rust, storage.type.module.rust, storage.modifier.rust, storage.type.struct.rust, storage.type.enum.rust, storage.type.trait.rust, storage.type.union.rust, storage.type.impl.rust, storage.type.rust, storage.type.function.rust, storage.type.type.rust 1684 | settings 1685 | 1686 | foreground 1687 | #8839ef 1688 | fontStyle 1689 | 1690 | 1691 | 1692 | 1693 | name 1694 | Rust u/i32, u/i64, etc. 1695 | scope 1696 | entity.name.type.numeric.rust 1697 | settings 1698 | 1699 | foreground 1700 | #8839ef 1701 | fontStyle 1702 | 1703 | 1704 | 1705 | 1706 | name 1707 | Rust generic 1708 | scope 1709 | meta.generic.rust 1710 | settings 1711 | 1712 | foreground 1713 | #fe640b 1714 | 1715 | 1716 | 1717 | name 1718 | Rust impl 1719 | scope 1720 | entity.name.impl.rust 1721 | settings 1722 | 1723 | foreground 1724 | #df8e1d 1725 | fontStyle 1726 | italic 1727 | 1728 | 1729 | 1730 | name 1731 | Rust module 1732 | scope 1733 | entity.name.module.rust 1734 | settings 1735 | 1736 | foreground 1737 | #fe640b 1738 | 1739 | 1740 | 1741 | name 1742 | Rust trait 1743 | scope 1744 | entity.name.trait.rust 1745 | settings 1746 | 1747 | foreground 1748 | #df8e1d 1749 | fontStyle 1750 | italic 1751 | 1752 | 1753 | 1754 | name 1755 | Rust struct 1756 | scope 1757 | storage.type.source.rust 1758 | settings 1759 | 1760 | foreground 1761 | #df8e1d 1762 | 1763 | 1764 | 1765 | name 1766 | Rust union 1767 | scope 1768 | entity.name.union.rust 1769 | settings 1770 | 1771 | foreground 1772 | #df8e1d 1773 | 1774 | 1775 | 1776 | name 1777 | Rust enum member 1778 | scope 1779 | meta.enum.rust storage.type.source.rust 1780 | settings 1781 | 1782 | foreground 1783 | #179299 1784 | 1785 | 1786 | 1787 | name 1788 | Rust macro 1789 | scope 1790 | support.macro.rust, meta.macro.rust support.function.rust, entity.name.function.macro.rust 1791 | settings 1792 | 1793 | foreground 1794 | #1e66f5 1795 | fontStyle 1796 | italic 1797 | 1798 | 1799 | 1800 | name 1801 | Rust lifetime 1802 | scope 1803 | storage.modifier.lifetime.rust, entity.name.type.lifetime 1804 | settings 1805 | 1806 | foreground 1807 | #1e66f5 1808 | fontStyle 1809 | italic 1810 | 1811 | 1812 | 1813 | name 1814 | Rust string formatting 1815 | scope 1816 | string.quoted.double.rust constant.other.placeholder.rust 1817 | settings 1818 | 1819 | foreground 1820 | #ea76cb 1821 | 1822 | 1823 | 1824 | name 1825 | Rust return type generic 1826 | scope 1827 | meta.function.return-type.rust meta.generic.rust storage.type.rust 1828 | settings 1829 | 1830 | foreground 1831 | #4c4f69 1832 | 1833 | 1834 | 1835 | name 1836 | Rust functions 1837 | scope 1838 | meta.function.call.rust 1839 | settings 1840 | 1841 | foreground 1842 | #1e66f5 1843 | 1844 | 1845 | 1846 | name 1847 | Rust angle brackets 1848 | scope 1849 | punctuation.brackets.angle.rust 1850 | settings 1851 | 1852 | foreground 1853 | #04a5e5 1854 | 1855 | 1856 | 1857 | name 1858 | Rust constants 1859 | scope 1860 | constant.other.caps.rust 1861 | settings 1862 | 1863 | foreground 1864 | #fe640b 1865 | 1866 | 1867 | 1868 | name 1869 | Rust function parameters 1870 | scope 1871 | meta.function.definition.rust variable.other.rust 1872 | settings 1873 | 1874 | foreground 1875 | #e64553 1876 | 1877 | 1878 | 1879 | name 1880 | Rust closure variables 1881 | scope 1882 | meta.function.call.rust variable.other.rust 1883 | settings 1884 | 1885 | foreground 1886 | #4c4f69 1887 | 1888 | 1889 | 1890 | name 1891 | Rust self 1892 | scope 1893 | variable.language.self.rust 1894 | settings 1895 | 1896 | foreground 1897 | #d20f39 1898 | 1899 | 1900 | 1901 | name 1902 | Rust metavariable names 1903 | scope 1904 | variable.other.metavariable.name.rust, meta.macro.metavariable.rust keyword.operator.macro.dollar.rust 1905 | settings 1906 | 1907 | foreground 1908 | #ea76cb 1909 | 1910 | 1911 | 1912 | name 1913 | Shell shebang 1914 | scope 1915 | comment.line.shebang, comment.line.shebang punctuation.definition.comment, comment.line.shebang, punctuation.definition.comment.shebang.shell, meta.shebang.shell 1916 | settings 1917 | 1918 | foreground 1919 | #ea76cb 1920 | fontStyle 1921 | italic 1922 | 1923 | 1924 | 1925 | name 1926 | Shell shebang command 1927 | scope 1928 | comment.line.shebang constant.language 1929 | settings 1930 | 1931 | foreground 1932 | #179299 1933 | fontStyle 1934 | italic 1935 | 1936 | 1937 | 1938 | name 1939 | Shell interpolated command 1940 | scope 1941 | meta.function-call.arguments.shell punctuation.definition.variable.shell, meta.function-call.arguments.shell punctuation.section.interpolation, meta.function-call.arguments.shell punctuation.definition.variable.shell, meta.function-call.arguments.shell punctuation.section.interpolation 1942 | settings 1943 | 1944 | foreground 1945 | #d20f39 1946 | 1947 | 1948 | 1949 | name 1950 | Shell interpolated command variable 1951 | scope 1952 | meta.string meta.interpolation.parameter.shell variable.other.readwrite 1953 | settings 1954 | 1955 | foreground 1956 | #fe640b 1957 | fontStyle 1958 | italic 1959 | 1960 | 1961 | 1962 | scope 1963 | source.shell punctuation.section.interpolation, punctuation.definition.evaluation.backticks.shell 1964 | settings 1965 | 1966 | foreground 1967 | #179299 1968 | 1969 | 1970 | 1971 | name 1972 | Shell EOF 1973 | scope 1974 | entity.name.tag.heredoc.shell 1975 | settings 1976 | 1977 | foreground 1978 | #8839ef 1979 | 1980 | 1981 | 1982 | name 1983 | Shell quoted variable 1984 | scope 1985 | string.quoted.double.shell variable.other.normal.shell 1986 | settings 1987 | 1988 | foreground 1989 | #4c4f69 1990 | 1991 | 1992 | 1993 | name 1994 | JSON Keys 1995 | scope 1996 | source.json meta.mapping.key string 1997 | settings 1998 | 1999 | foreground 2000 | #1e66f5 2001 | 2002 | 2003 | 2004 | name 2005 | JSON key surrounding quotes 2006 | scope 2007 | source.json meta.mapping.key punctuation.definition.string.begin, source.json meta.mapping.key punctuation.definition.string.end 2008 | settings 2009 | 2010 | foreground 2011 | #7c7f93 2012 | 2013 | 2014 | 2015 | scope 2016 | markup.heading.synopsis.man, markup.heading.title.man, markup.heading.other.man, markup.heading.env.man 2017 | settings 2018 | 2019 | foreground 2020 | #8839ef 2021 | 2022 | 2023 | 2024 | scope 2025 | markup.heading.commands.man 2026 | settings 2027 | 2028 | foreground 2029 | #1e66f5 2030 | 2031 | 2032 | 2033 | scope 2034 | markup.heading.env.man 2035 | settings 2036 | 2037 | foreground 2038 | #ea76cb 2039 | 2040 | 2041 | 2042 | name 2043 | Man page options 2044 | scope 2045 | entity.name 2046 | settings 2047 | 2048 | foreground 2049 | #179299 2050 | 2051 | 2052 | 2053 | scope 2054 | markup.heading.1.markdown 2055 | settings 2056 | 2057 | foreground 2058 | #d20f39 2059 | 2060 | 2061 | 2062 | scope 2063 | markup.heading.2.markdown 2064 | settings 2065 | 2066 | foreground 2067 | #fe640b 2068 | 2069 | 2070 | 2071 | scope 2072 | markup.heading.markdown 2073 | settings 2074 | 2075 | foreground 2076 | #df8e1d 2077 | 2078 | 2079 | 2080 | 2081 | -------------------------------------------------------------------------------- /yazi/flavors/catppuccin-mocha.yazi/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 yazi-rs 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 | -------------------------------------------------------------------------------- /yazi/flavors/catppuccin-mocha.yazi/LICENSE-tmtheme: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Catppuccin 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 | -------------------------------------------------------------------------------- /yazi/flavors/catppuccin-mocha.yazi/README.md: -------------------------------------------------------------------------------- 1 |
2 | Yazi logo 3 |
4 | 5 |

6 | Catppuccin Mocha Flavor for Yazi 7 |

8 | 9 | ## 👀 Preview 10 | 11 | 12 | 13 | ## 🎨 Installation 14 | 15 | ```sh 16 | ya pkg add yazi-rs/flavors:catppuccin-mocha 17 | ``` 18 | 19 | ## ⚙️ Usage 20 | 21 | Set the content of your `theme.toml` to enable it as your _dark_ flavor: 22 | 23 | ```toml 24 | [flavor] 25 | dark = "catppuccin-mocha" 26 | ``` 27 | 28 | Make sure your `theme.toml` doesn't contain anything other than `[flavor]`, unless you want to override certain styles of this flavor. 29 | 30 | See the [Yazi flavor documentation](https://yazi-rs.github.io/docs/flavors/overview) for more details. 31 | 32 | ## 📜 License 33 | 34 | The flavor is MIT-licensed, and the included tmTheme is also MIT-licensed. 35 | 36 | Check the [LICENSE](LICENSE) and [LICENSE-tmtheme](LICENSE-tmtheme) file for more details. 37 | -------------------------------------------------------------------------------- /yazi/flavors/catppuccin-mocha.yazi/flavor.toml: -------------------------------------------------------------------------------- 1 | # vim:fileencoding=utf-8:foldmethod=marker 2 | 3 | # : Manager {{{ 4 | 5 | [mgr] 6 | cwd = { fg = "#94e2d5" } 7 | 8 | # Hovered 9 | hovered = { reversed = true } 10 | preview_hovered = { underline = true } 11 | 12 | # Find 13 | find_keyword = { fg = "#f9e2af", bold = true, italic = true, underline = true } 14 | find_position = { fg = "#f5c2e7", bg = "reset", bold = true, italic = true } 15 | 16 | # Marker 17 | marker_copied = { fg = "#a6e3a1", bg = "#a6e3a1" } 18 | marker_cut = { fg = "#f38ba8", bg = "#f38ba8" } 19 | marker_marked = { fg = "#94e2d5", bg = "#94e2d5" } 20 | marker_selected = { fg = "#f9e2af", bg = "#f9e2af" } 21 | 22 | # Count 23 | count_copied = { fg = "#1e1e2e", bg = "#a6e3a1" } 24 | count_cut = { fg = "#1e1e2e", bg = "#f38ba8" } 25 | count_selected = { fg = "#1e1e2e", bg = "#f9e2af" } 26 | 27 | # Border 28 | border_symbol = "│" 29 | border_style = { fg = "#7f849c" } 30 | 31 | # : }}} 32 | 33 | 34 | # : Tabs {{{ 35 | 36 | [tabs] 37 | active = { fg = "#1e1e2e", bg = "#89b4fa", bold = true } 38 | inactive = { fg = "#89b4fa", bg = "#313244" } 39 | 40 | # : }}} 41 | 42 | 43 | # : Mode {{{ 44 | 45 | [mode] 46 | 47 | normal_main = { fg = "#1e1e2e", bg = "#89b4fa", bold = true } 48 | normal_alt = { fg = "#89b4fa", bg = "#313244" } 49 | 50 | # Select mode 51 | select_main = { fg = "#1e1e2e", bg = "#94e2d5", bold = true } 52 | select_alt = { fg = "#94e2d5", bg = "#313244" } 53 | 54 | # Unset mode 55 | unset_main = { fg = "#1e1e2e", bg = "#f2cdcd", bold = true } 56 | unset_alt = { fg = "#f2cdcd", bg = "#313244" } 57 | 58 | # : }}} 59 | 60 | 61 | # : Status bar {{{ 62 | 63 | [status] 64 | # Permissions 65 | perm_sep = { fg = "#7f849c" } 66 | perm_type = { fg = "#89b4fa" } 67 | perm_read = { fg = "#f9e2af" } 68 | perm_write = { fg = "#f38ba8" } 69 | perm_exec = { fg = "#a6e3a1" } 70 | 71 | # Progress 72 | progress_label = { fg = "#ffffff", bold = true } 73 | progress_normal = { fg = "#89b4fa", bg = "#45475a" } 74 | progress_error = { fg = "#89b4fa", bg = "#f38ba8" } 75 | 76 | # : }}} 77 | 78 | 79 | # : Pick {{{ 80 | 81 | [pick] 82 | border = { fg = "#89b4fa" } 83 | active = { fg = "#f5c2e7", bold = true } 84 | inactive = {} 85 | 86 | # : }}} 87 | 88 | 89 | # : Input {{{ 90 | 91 | [input] 92 | border = { fg = "#89b4fa" } 93 | title = {} 94 | value = {} 95 | selected = { reversed = true } 96 | 97 | # : }}} 98 | 99 | 100 | # : Completion {{{ 101 | 102 | [cmp] 103 | border = { fg = "#89b4fa" } 104 | 105 | # : }}} 106 | 107 | 108 | # : Tasks {{{ 109 | 110 | [tasks] 111 | border = { fg = "#89b4fa" } 112 | title = {} 113 | hovered = { fg = "#f5c2e7", bold = true } 114 | 115 | # : }}} 116 | 117 | 118 | # : Which {{{ 119 | 120 | [which] 121 | mask = { bg = "#313244" } 122 | cand = { fg = "#94e2d5" } 123 | rest = { fg = "#9399b2" } 124 | desc = { fg = "#f5c2e7" } 125 | separator = "  " 126 | separator_style = { fg = "#585b70" } 127 | 128 | # : }}} 129 | 130 | 131 | # : Help {{{ 132 | 133 | [help] 134 | on = { fg = "#94e2d5" } 135 | run = { fg = "#f5c2e7" } 136 | hovered = { reversed = true, bold = true } 137 | footer = { fg = "#313244", bg = "#cdd6f4" } 138 | 139 | # : }}} 140 | 141 | 142 | # : Spotter {{{ 143 | 144 | [spot] 145 | border = { fg = "#89b4fa" } 146 | title = { fg = "#89b4fa" } 147 | tbl_col = { fg = "#94e2d5" } 148 | tbl_cell = { fg = "#f5c2e7", bg = "#45475a" } 149 | 150 | # : }}} 151 | 152 | 153 | # : Notification {{{ 154 | 155 | [notify] 156 | title_info = { fg = "#a6e3a1" } 157 | title_warn = { fg = "#f9e2af" } 158 | title_error = { fg = "#f38ba8" } 159 | 160 | # : }}} 161 | 162 | 163 | # : File-specific styles {{{ 164 | 165 | [filetype] 166 | 167 | rules = [ 168 | # Images 169 | { mime = "image/*", fg = "#94e2d5" }, 170 | 171 | # Media 172 | { mime = "{audio,video}/*", fg = "#f9e2af" }, 173 | 174 | # Archives 175 | { mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", fg = "#f5c2e7" }, 176 | 177 | # Documents 178 | { mime = "application/{pdf,doc,rtf}", fg = "#a6e3a1" }, 179 | 180 | # Fallback 181 | { url = "*", fg = "#cdd6f4" }, 182 | { url = "*/", fg = "#89b4fa" }, 183 | 184 | # TODO: remove 185 | { name = "*", fg = "#cdd6f4" }, 186 | { name = "*/", fg = "#89b4fa" } 187 | ] 188 | 189 | # : }}} 190 | -------------------------------------------------------------------------------- /yazi/fzf-scope.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # if $1 contains ':', split it into $file 4 | if [[ $1 == *:* ]]; then 5 | obj=$(echo $1 | cut -d':' -f1) 6 | else 7 | obj=$1 8 | fi 9 | 10 | if [ -d "$obj" ]; then 11 | tree -ahpCL 3 -I .git -I __pycache__ $obj 12 | else 13 | case "$obj" in 14 | *.zip) zipinfo "$obj" ;; 15 | *.7z) 7z l "$obj" ;; 16 | *) bat --color=always --italic-text=always --style=numbers,changes,header --line-range :500 "$obj" ;; 17 | esac 18 | fi 19 | -------------------------------------------------------------------------------- /yazi/init.lua: -------------------------------------------------------------------------------- 1 | require("session"):setup({ 2 | sync_yanked = true, 3 | }) 4 | 5 | require("no-status"):setup() 6 | require("git"):setup() 7 | -------------------------------------------------------------------------------- /yazi/keymap.toml: -------------------------------------------------------------------------------- 1 | # A TOML linter such as https://taplo.tamasfe.dev/ can use this schema to validate your config. 2 | # If you encounter any issues, please make an issue at https://github.com/yazi-rs/schemas. 3 | "$schema" = "https://yazi-rs.github.io/schemas/keymap.json" 4 | 5 | [mgr] 6 | 7 | keymap = [ 8 | { on = "", run = "escape", desc = "Exit visual mode, clear selected, or cancel search" }, 9 | { on = "q", run = "quit", desc = "Exit the process" }, 10 | { on = "", run = "close", desc = "Close the current tab, or quit if it is last tab" }, 11 | { on = "", run = "suspend", desc = "Suspend the process" }, 12 | 13 | # Hopping 14 | { on = "k", run = "arrow -1", desc = "Move cursor up" }, 15 | { on = "j", run = "arrow 1", desc = "Move cursor down" }, 16 | 17 | { on = "", run = "arrow -1", desc = "Move cursor up" }, 18 | { on = "", run = "arrow 1", desc = "Move cursor down" }, 19 | 20 | { on = "", run = "arrow -50%", desc = "Move cursor up half page" }, 21 | { on = "", run = "arrow 50%", desc = "Move cursor down half page" }, 22 | 23 | { on = "", run = "arrow -100%", desc = "Move cursor up one page" }, 24 | { on = "", run = "arrow 100%", desc = "Move cursor down one page" }, 25 | 26 | { on = [ "g", "g" ], run = "arrow top", desc = "Move cursor to the top" }, 27 | { on = "G", run = "arrow bot", desc = "Move cursor to the bottom" }, 28 | 29 | # Navigation 30 | { on = "h", run = "leave", desc = "Go back to the parent directory" }, 31 | { on = "", run = "leave", desc = "Go back to the parent directory" }, 32 | { on = "l", run = "plugin smart-enter", desc = "Enter the child directory, or open the file" }, 33 | { on = "", run = "plugin smart-enter", desc = "Enter the child directory, or open the file" }, 34 | { on = "", run = "leave", desc = "Go back to the parent directory" }, 35 | { on = "", run = "plugin smart-enter", desc = "Enter the child directory, or open the file" }, 36 | 37 | { on = "H", run = "back", desc = "Go back to the previous directory" }, 38 | { on = "L", run = "forward", desc = "Go forward to the next directory" }, 39 | 40 | # Selection 41 | { on = "", run = [ "toggle --state=none", "arrow 1" ], desc = "Toggle the current selection state" }, 42 | { on = "v", run = "visual_mode", desc = "Enter visual mode (selection mode)" }, 43 | { on = "", run = "toggle_all --state=true", desc = "Select all files" }, 44 | 45 | # Operation 46 | { on = "y", run = [ '''shell 'for path in "$@"; do echo "file://$path"; done | wl-copy -t text/uri-list' --confirm''', "yank" ] }, 47 | { on = "d", run = "yank --cut", desc = "Yank selected files (cut)" }, 48 | { on = "p", run = "paste", desc = "Paste yanked files" }, 49 | { on = "D", run = "remove --force", desc = "" }, 50 | { on = "", run = "remove --force", desc = "Trash selected files" }, 51 | { on = "a", run = "create", desc = "Create a file (ends with / for directories)" }, 52 | { on = "r", run = "rename --cursor=before_ext", desc = "Rename selected file(s)" }, 53 | { on = ";", run = "shell --interactive", desc = "Run a shell command" }, 54 | { on = ".", run = "hidden toggle", desc = "Toggle the visibility of hidden files" }, 55 | { on = "f", run = "plugin fzf", desc = "Jump to a directory or reveal a file using fzf" }, 56 | { on = "z", run = "plugin zoxide", desc = "Jump to a directory using zoxide" }, 57 | 58 | { on = [ "c", "n" ], run = "copy filename", desc = "Copy the filename" }, 59 | 60 | # Find 61 | { on = "/", run = "find --smart", desc = "Find next file" }, 62 | { on = "n", run = "find_arrow", desc = "Go to the next found" }, 63 | { on = "N", run = "find_arrow --previous", desc = "Go to the previous found" }, 64 | 65 | # Goto 66 | { on = [ "g", "h" ], run = "cd ~", desc = "Go to the home directory" }, 67 | { on = [ "g", "n" ], run = "cd ~/Downloads", desc = "Go to the downloads directory" }, 68 | { on = [ "g", "d" ], run = "cd ~/Documents", desc = "Go to the documents directory" }, 69 | { on = [ "g", "p" ], run = "cd ~/Projects", desc = "Go to the projects directory" }, 70 | 71 | # Linemode 72 | { on = [ "m", "s" ], run = "linemode size", desc = "mode: size" }, 73 | { on = [ "m", "p" ], run = "linemode permissions", desc = "mode: permissions" }, 74 | { on = [ "m", "c" ], run = "linemode ctime", desc = "mode: ctime" }, 75 | { on = [ "m", "m" ], run = "linemode mtime", desc = "mode: mtime" }, 76 | { on = [ "m", "o" ], run = "linemode owner", desc = "mode: owner" }, 77 | { on = [ "m", "n" ], run = "linemode none", desc = "mode: none" }, 78 | ] 79 | 80 | [select] 81 | 82 | keymap = [ 83 | { on = "", run = "close", desc = "Cancel selection" }, 84 | { on = "", run = "close --submit", desc = "Submit the selection" }, 85 | 86 | { on = "k", run = "arrow -1", desc = "Move cursor up" }, 87 | { on = "j", run = "arrow 1", desc = "Move cursor down" }, 88 | 89 | { on = "", run = "arrow -1", desc = "Move cursor up" }, 90 | { on = "", run = "arrow 1", desc = "Move cursor down" }, 91 | ] 92 | 93 | [input] 94 | 95 | keymap = [ 96 | { on = "", run = "close --submit", desc = "Submit input" }, 97 | { on = "", run = "close", desc = "Cancel input" }, 98 | 99 | { on = "", run = "move -1", desc = "Move back a character" }, 100 | { on = "", run = "move 1", desc = "Move forward a character" }, 101 | 102 | # Delete 103 | { on = "", run = "backspace", desc = "Delete the character before the cursor" }, 104 | { on = "", run = "kill backward", desc = "Kill backwards to the start of the current word" }, 105 | ] 106 | 107 | 108 | [confirm] 109 | keymap = [ 110 | { on = "", run = "close", desc = "Cancel the confirm" }, 111 | { on = "", run = "close --submit", desc = "Submit the confirm" }, 112 | 113 | { on = "n", run = "close", desc = "Cancel the confirm" }, 114 | { on = "y", run = "close --submit", desc = "Submit the confirm" }, 115 | 116 | { on = "k", run = "arrow -1", desc = "Move cursor up" }, 117 | { on = "j", run = "arrow 1", desc = "Move cursor down" }, 118 | 119 | { on = "", run = "arrow -1", desc = "Move cursor up" }, 120 | { on = "", run = "arrow 1", desc = "Move cursor down" }, 121 | ] 122 | -------------------------------------------------------------------------------- /yazi/package.toml: -------------------------------------------------------------------------------- 1 | [[plugin.deps]] 2 | use = "yazi-rs/plugins:smart-enter" 3 | rev = "de53d90" 4 | hash = "56fdabc96fc1f4d53c96eb884b02a5be" 5 | 6 | [[plugin.deps]] 7 | use = "yazi-rs/plugins:no-status" 8 | rev = "de53d90" 9 | hash = "3e023d31f29201efdac2a6ae35fedb78" 10 | 11 | [[plugin.deps]] 12 | use = "yazi-rs/plugins:git" 13 | rev = "de53d90" 14 | hash = "63b6c222bf2103b3023389dde5e2ecfe" 15 | 16 | [[flavor.deps]] 17 | use = "yazi-rs/flavors:catppuccin-latte" 18 | rev = "d3fd3a5" 19 | hash = "a4d508772dc7b20d739a2f9a1d2d396f" 20 | 21 | [[flavor.deps]] 22 | use = "yazi-rs/flavors:catppuccin-mocha" 23 | rev = "4296a38" 24 | hash = "deff42490f77b222e9d3a84dc16a76c5" 25 | -------------------------------------------------------------------------------- /yazi/plugins/git.yazi/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 yazi-rs 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 | -------------------------------------------------------------------------------- /yazi/plugins/git.yazi/README.md: -------------------------------------------------------------------------------- 1 | # git.yazi 2 | 3 | Show the status of Git file changes as linemode in the file list. 4 | 5 | https://github.com/user-attachments/assets/34976be9-a871-4ffe-9d5a-c4cdd0bf4576 6 | 7 | ## Installation 8 | 9 | ```sh 10 | ya pkg add yazi-rs/plugins:git 11 | ``` 12 | 13 | ## Setup 14 | 15 | Add the following to your `~/.config/yazi/init.lua`: 16 | 17 | ```lua 18 | require("git"):setup() 19 | ``` 20 | 21 | And register it as fetchers in your `~/.config/yazi/yazi.toml`: 22 | 23 | ```toml 24 | [[plugin.prepend_fetchers]] 25 | id = "git" 26 | name = "*" 27 | run = "git" 28 | 29 | [[plugin.prepend_fetchers]] 30 | id = "git" 31 | name = "*/" 32 | run = "git" 33 | ``` 34 | 35 | ## Advanced 36 | 37 | > [!NOTE] 38 | > The following configuration must be put before `require("git"):setup()` 39 | 40 | You can customize the [Style](https://yazi-rs.github.io/docs/plugins/layout#style) of the status sign with: 41 | 42 | - `th.git.modified` 43 | - `th.git.added` 44 | - `th.git.untracked` 45 | - `th.git.ignored` 46 | - `th.git.deleted` 47 | - `th.git.updated` 48 | 49 | For example: 50 | 51 | ```lua 52 | -- ~/.config/yazi/init.lua 53 | th.git = th.git or {} 54 | th.git.modified = ui.Style():fg("blue") 55 | th.git.deleted = ui.Style():fg("red"):bold() 56 | ``` 57 | 58 | You can also customize the text of the status sign with: 59 | 60 | - `th.git.modified_sign` 61 | - `th.git.added_sign` 62 | - `th.git.untracked_sign` 63 | - `th.git.ignored_sign` 64 | - `th.git.deleted_sign` 65 | - `th.git.updated_sign` 66 | 67 | For example: 68 | 69 | ```lua 70 | -- ~/.config/yazi/init.lua 71 | th.git = th.git or {} 72 | th.git.modified_sign = "M" 73 | th.git.deleted_sign = "D" 74 | ``` 75 | 76 | ## License 77 | 78 | This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file. 79 | -------------------------------------------------------------------------------- /yazi/plugins/git.yazi/main.lua: -------------------------------------------------------------------------------- 1 | --- @since 25.5.31 2 | 3 | local WINDOWS = ya.target_family() == "windows" 4 | 5 | -- The code of supported git status, 6 | -- also used to determine which status to show for directories when they contain different statuses 7 | -- see `bubble_up` 8 | ---@enum CODES 9 | local CODES = { 10 | excluded = 100, -- ignored directory 11 | ignored = 6, -- ignored file 12 | untracked = 5, 13 | modified = 4, 14 | added = 3, 15 | deleted = 2, 16 | updated = 1, 17 | unknown = 0, 18 | } 19 | 20 | local PATTERNS = { 21 | { "!$", CODES.ignored }, 22 | { "?$", CODES.untracked }, 23 | { "[MT]", CODES.modified }, 24 | { "[AC]", CODES.added }, 25 | { "D", CODES.deleted }, 26 | { "U", CODES.updated }, 27 | { "[AD][AD]", CODES.updated }, 28 | } 29 | 30 | ---@param line string 31 | ---@return CODES, string 32 | local function match(line) 33 | local signs = line:sub(1, 2) 34 | for _, p in ipairs(PATTERNS) do 35 | local path, pattern, code = nil, p[1], p[2] 36 | if signs:find(pattern) then 37 | path = line:sub(4, 4) == '"' and line:sub(5, -2) or line:sub(4) 38 | path = WINDOWS and path:gsub("/", "\\") or path 39 | end 40 | if not path then 41 | elseif path:find("[/\\]$") then 42 | -- Mark the ignored directory as `excluded`, so we can process it further within `propagate_down` 43 | return code == CODES.ignored and CODES.excluded or code, path:sub(1, -2) 44 | else 45 | return code, path 46 | end 47 | ---@diagnostic disable-next-line: missing-return 48 | end 49 | end 50 | 51 | ---@param cwd Url 52 | ---@return string? 53 | local function root(cwd) 54 | local is_worktree = function(url) 55 | local file, head = io.open(tostring(url)), nil 56 | if file then 57 | head = file:read(8) 58 | file:close() 59 | end 60 | return head == "gitdir: " 61 | end 62 | 63 | repeat 64 | local next = cwd:join(".git") 65 | local cha = fs.cha(next) 66 | if cha and (cha.is_dir or is_worktree(next)) then 67 | return tostring(cwd) 68 | end 69 | cwd = cwd.parent 70 | until not cwd 71 | end 72 | 73 | ---@param changed Changes 74 | ---@return Changes 75 | local function bubble_up(changed) 76 | local new, empty = {}, Url("") 77 | for path, code in pairs(changed) do 78 | if code ~= CODES.ignored then 79 | local url = Url(path).parent 80 | while url and url ~= empty do 81 | local s = tostring(url) 82 | new[s] = (new[s] or CODES.unknown) > code and new[s] or code 83 | url = url.parent 84 | end 85 | end 86 | end 87 | return new 88 | end 89 | 90 | ---@param excluded string[] 91 | ---@param cwd Url 92 | ---@param repo Url 93 | ---@return Changes 94 | local function propagate_down(excluded, cwd, repo) 95 | local new, rel = {}, cwd:strip_prefix(repo) 96 | for _, path in ipairs(excluded) do 97 | if rel:starts_with(path) then 98 | -- If `cwd` is a subdirectory of an excluded directory, also mark it as `excluded` 99 | new[tostring(cwd)] = CODES.excluded 100 | elseif cwd == repo:join(path).parent then 101 | -- If `path` is a direct subdirectory of `cwd`, mark it as `ignored` 102 | new[path] = CODES.ignored 103 | else 104 | -- Skipping, we only care about `cwd` itself and its direct subdirectories for maximum performance 105 | end 106 | end 107 | return new 108 | end 109 | 110 | ---@param cwd string 111 | ---@param repo string 112 | ---@param changed Changes 113 | local add = ya.sync(function(st, cwd, repo, changed) 114 | ---@cast st State 115 | 116 | st.dirs[cwd] = repo 117 | st.repos[repo] = st.repos[repo] or {} 118 | for path, code in pairs(changed) do 119 | if code == CODES.unknown then 120 | st.repos[repo][path] = nil 121 | elseif code == CODES.excluded then 122 | -- Mark the directory with a special value `excluded` so that it can be distinguished during UI rendering 123 | st.dirs[path] = CODES.excluded 124 | else 125 | st.repos[repo][path] = code 126 | end 127 | end 128 | -- TODO: remove this 129 | if ui.render then 130 | ui.render() 131 | else 132 | ya.render() 133 | end 134 | end) 135 | 136 | ---@param cwd string 137 | local remove = ya.sync(function(st, cwd) 138 | ---@cast st State 139 | 140 | local repo = st.dirs[cwd] 141 | if not repo then 142 | return 143 | end 144 | 145 | -- TODO: remove this 146 | if ui.render then 147 | ui.render() 148 | else 149 | ya.render() 150 | end 151 | st.dirs[cwd] = nil 152 | if not st.repos[repo] then 153 | return 154 | end 155 | 156 | for _, r in pairs(st.dirs) do 157 | if r == repo then 158 | return 159 | end 160 | end 161 | st.repos[repo] = nil 162 | end) 163 | 164 | ---@param st State 165 | ---@param opts Options 166 | local function setup(st, opts) 167 | st.dirs = {} 168 | st.repos = {} 169 | 170 | opts = opts or {} 171 | opts.order = opts.order or 1500 172 | 173 | local t = th.git or {} 174 | local styles = { 175 | [CODES.ignored] = t.ignored and ui.Style(t.ignored) or ui.Style():fg("darkgray"), 176 | [CODES.untracked] = t.untracked and ui.Style(t.untracked) or ui.Style():fg("magenta"), 177 | [CODES.modified] = t.modified and ui.Style(t.modified) or ui.Style():fg("yellow"), 178 | [CODES.added] = t.added and ui.Style(t.added) or ui.Style():fg("green"), 179 | [CODES.deleted] = t.deleted and ui.Style(t.deleted) or ui.Style():fg("red"), 180 | [CODES.updated] = t.updated and ui.Style(t.updated) or ui.Style():fg("yellow"), 181 | } 182 | local signs = { 183 | [CODES.ignored] = t.ignored_sign or "", 184 | [CODES.untracked] = t.untracked_sign or "?", 185 | [CODES.modified] = t.modified_sign or "", 186 | [CODES.added] = t.added_sign or "", 187 | [CODES.deleted] = t.deleted_sign or "", 188 | [CODES.updated] = t.updated_sign or "", 189 | } 190 | 191 | Linemode:children_add(function(self) 192 | local url = self._file.url 193 | local repo = st.dirs[tostring(url.base)] 194 | local code 195 | if repo then 196 | code = repo == CODES.excluded and CODES.ignored or st.repos[repo][tostring(url):sub(#repo + 2)] 197 | end 198 | 199 | if not code or signs[code] == "" then 200 | return "" 201 | elseif self._file.is_hovered then 202 | return ui.Line { " ", signs[code] } 203 | else 204 | return ui.Line { " ", ui.Span(signs[code]):style(styles[code]) } 205 | end 206 | end, opts.order) 207 | end 208 | 209 | ---@type UnstableFetcher 210 | local function fetch(_, job) 211 | local cwd = job.files[1].url.base 212 | local repo = root(cwd) 213 | if not repo then 214 | remove(tostring(cwd)) 215 | return true 216 | end 217 | 218 | local paths = {} 219 | for _, file in ipairs(job.files) do 220 | paths[#paths + 1] = tostring(file.url) 221 | end 222 | 223 | -- stylua: ignore 224 | local output, err = Command("git") 225 | :cwd(tostring(cwd)) 226 | :arg({ "--no-optional-locks", "-c", "core.quotePath=", "status", "--porcelain", "-unormal", "--no-renames", "--ignored=matching" }) 227 | :arg(paths) 228 | :stdout(Command.PIPED) 229 | :output() 230 | if not output then 231 | return true, Err("Cannot spawn `git` command, error: %s", err) 232 | end 233 | 234 | local changed, excluded = {}, {} 235 | for line in output.stdout:gmatch("[^\r\n]+") do 236 | local code, path = match(line) 237 | if code == CODES.excluded then 238 | excluded[#excluded + 1] = path 239 | else 240 | changed[path] = code 241 | end 242 | end 243 | 244 | if job.files[1].cha.is_dir then 245 | ya.dict_merge(changed, bubble_up(changed)) 246 | end 247 | ya.dict_merge(changed, propagate_down(excluded, cwd, Url(repo))) 248 | 249 | -- Reset the status of any files that don't appear in the output of `git status` to `unknown`, 250 | -- so that cleaning up outdated statuses from `st.repos` 251 | for _, path in ipairs(paths) do 252 | local s = path:sub(#repo + 2) 253 | changed[s] = changed[s] or CODES.unknown 254 | end 255 | 256 | add(tostring(cwd), repo, changed) 257 | 258 | return false 259 | end 260 | 261 | return { setup = setup, fetch = fetch } 262 | -------------------------------------------------------------------------------- /yazi/plugins/no-status.yazi/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 yazi-rs 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 | -------------------------------------------------------------------------------- /yazi/plugins/no-status.yazi/README.md: -------------------------------------------------------------------------------- 1 | # no-status.yazi 2 | 3 | Remove the status bar. 4 | 5 | ![no-status-bar](https://github.com/user-attachments/assets/336bf813-2427-4338-827f-9ebc83d45d99) 6 | 7 | ## Installation 8 | 9 | ```sh 10 | ya pkg add yazi-rs/plugins:no-status 11 | ``` 12 | 13 | ## Usage 14 | 15 | Add this to your `init.lua` to enable the plugin: 16 | 17 | ```lua 18 | require("no-status"):setup() 19 | ``` 20 | 21 | ## License 22 | 23 | This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file. 24 | -------------------------------------------------------------------------------- /yazi/plugins/no-status.yazi/main.lua: -------------------------------------------------------------------------------- 1 | --- @since 25.2.7 2 | 3 | local function setup() 4 | local old_layout = Tab.layout 5 | 6 | Status.redraw = function() return {} end 7 | Tab.layout = function(self, ...) 8 | self._area = ui.Rect { x = self._area.x, y = self._area.y, w = self._area.w, h = self._area.h + 1 } 9 | return old_layout(self, ...) 10 | end 11 | end 12 | 13 | return { setup = setup } 14 | -------------------------------------------------------------------------------- /yazi/plugins/smart-enter.yazi/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 yazi-rs 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 | -------------------------------------------------------------------------------- /yazi/plugins/smart-enter.yazi/README.md: -------------------------------------------------------------------------------- 1 | # smart-enter.yazi 2 | 3 | [`Open`][open] files or [`enter`][enter] directories all in one key! 4 | 5 | ## Installation 6 | 7 | ```sh 8 | ya pkg add yazi-rs/plugins:smart-enter 9 | ``` 10 | 11 | ## Usage 12 | 13 | Bind your l key to the plugin, in your `~/.config/yazi/keymap.toml`: 14 | 15 | ```toml 16 | [[mgr.prepend_keymap]] 17 | on = "l" 18 | run = "plugin smart-enter" 19 | desc = "Enter the child directory, or open the file" 20 | ``` 21 | 22 | ## Advanced 23 | 24 | By default, `--hovered` is passed to the [`open`][open] command, make the behavior consistent with [`enter`][enter] avoiding accidental triggers, 25 | which means both will only target the currently hovered file. 26 | 27 | If you still want `open` to target multiple selected files, add this to your `~/.config/yazi/init.lua`: 28 | 29 | ```lua 30 | require("smart-enter"):setup { 31 | open_multi = true, 32 | } 33 | ``` 34 | 35 | ## License 36 | 37 | This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file. 38 | 39 | [open]: https://yazi-rs.github.io/docs/configuration/keymap/#mgr.open 40 | [enter]: https://yazi-rs.github.io/docs/configuration/keymap/#mgr.enter 41 | -------------------------------------------------------------------------------- /yazi/plugins/smart-enter.yazi/main.lua: -------------------------------------------------------------------------------- 1 | --- @since 25.5.31 2 | --- @sync entry 3 | 4 | local function setup(self, opts) self.open_multi = opts.open_multi end 5 | 6 | local function entry(self) 7 | local h = cx.active.current.hovered 8 | ya.emit(h and h.cha.is_dir and "enter" or "open", { hovered = not self.open_multi }) 9 | end 10 | 11 | return { entry = entry, setup = setup } 12 | -------------------------------------------------------------------------------- /yazi/theme.toml: -------------------------------------------------------------------------------- 1 | [flavor] 2 | light = "catppuccin-latte" 3 | dark = "catppuccin-mocha" 4 | 5 | [icon] 6 | 7 | prepend_conds = [ 8 | { if = "link", text = "" }, # Normal files (not directories or symlinks) 9 | { if = "dir", text = "" }, # Directories 10 | ] 11 | -------------------------------------------------------------------------------- /yazi/yazi.toml: -------------------------------------------------------------------------------- 1 | # A TOML linter such as https://taplo.tamasfe.dev/ can use this schema to validate your config. 2 | # If you encounter any issues, please make an issue at https://github.com/yazi-rs/schemas. 3 | "$schema" = "https://yazi-rs.github.io/schemas/yazi.json" 4 | 5 | [mgr] 6 | ratio = [ 0, 5, 5 ] 7 | sort_by = "alphabetical" 8 | sort_sensitive = false 9 | sort_reverse = false 10 | sort_dir_first = true 11 | sort_translit = false 12 | linemode = "size" 13 | show_hidden = false 14 | show_symlink = true 15 | scrolloff = 5 16 | mouse_events = [ "click", "scroll" ] 17 | title_format = "Yazi: {cwd}" 18 | 19 | [preview] 20 | wrap = "no" 21 | tab_size = 2 22 | max_width = 600 23 | max_height = 900 24 | cache_dir = "" 25 | image_delay = 30 26 | image_filter = "triangle" 27 | image_quality = 75 28 | sixel_fraction = 15 29 | ueberzug_scale = 1 30 | ueberzug_offset = [ 0, 0, 0, 0 ] 31 | 32 | [opener] 33 | edit = [ 34 | { run = '${EDITOR:-vi} "$@"', desc = "$EDITOR", block = true, for = "unix" }, 35 | ] 36 | open = [ 37 | { run = 'xdg-open "$1"', desc = "Open", for = "linux" }, 38 | ] 39 | reveal = [ 40 | { run = 'xdg-open "$(dirname "$1")"', desc = "Reveal", for = "linux" }, 41 | ] 42 | extract = [ 43 | { run = 'ya pub extract --list "$@"', desc = "Extract here", for = "unix" }, 44 | ] 45 | play = [ 46 | { run = 'mpv --force-window "$@"', orphan = true, for = "unix" }, 47 | ] 48 | 49 | [open] 50 | rules = [ 51 | # Folder 52 | { name = "*/", use = [ "edit", "open", "reveal" ] }, 53 | # Text 54 | { mime = "text/*", use = [ "edit", "reveal" ] }, 55 | # Image 56 | { mime = "image/*", use = [ "open", "reveal" ] }, 57 | # Media 58 | { mime = "{audio,video}/*", use = [ "play", "reveal" ] }, 59 | # Archive 60 | { mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", use = [ "extract", "reveal" ] }, 61 | # JSON 62 | { mime = "application/{json,x-ndjson}", use = [ "edit", "reveal" ] }, 63 | { mime = "*/javascript", use = [ "edit", "reveal" ] }, 64 | # Empty file 65 | { mime = "inode/empty", use = [ "edit", "reveal" ] }, 66 | # Fallback 67 | { name = "*", use = [ "open", "reveal" ] }, 68 | ] 69 | 70 | 71 | [plugin] 72 | 73 | fetchers = [ 74 | # Mimetype 75 | { id = "mime", name = "*", run = "mime", if = "!mime", prio = "high" }, 76 | ] 77 | preloaders = [ 78 | # Image 79 | { mime = "image/{avif,hei?,jxl,svg+xml}", run = "magick" }, 80 | { mime = "image/*", run = "image" }, 81 | # Video 82 | { mime = "video/*", run = "video" }, 83 | # PDF 84 | { mime = "application/pdf", run = "pdf" }, 85 | # Font 86 | { mime = "font/*", run = "font" }, 87 | { mime = "application/vnd.ms-opentype", run = "font" }, 88 | ] 89 | previewers = [ 90 | { name = "*/", run = "folder", sync = true }, 91 | # Code 92 | { mime = "text/*", run = "code" }, 93 | { mime = "*/{xml,javascript,x-wine-extension-ini}", run = "code" }, 94 | # JSON 95 | { mime = "application/{json,x-ndjson}", run = "json" }, 96 | # Image 97 | { mime = "image/{avif,hei?,jxl,svg+xml}", run = "magick" }, 98 | { mime = "image/*", run = "image" }, 99 | # Video 100 | { mime = "video/*", run = "video" }, 101 | # PDF 102 | { mime = "application/pdf", run = "pdf" }, 103 | # Archive 104 | { mime = "application/{,g}zip", run = "archive" }, 105 | { mime = "application/x-{tar,bzip*,7z-compressed,xz,rar,iso9660-image}", run = "archive" }, 106 | # Font 107 | { mime = "font/*", run = "font" }, 108 | { mime = "application/vnd.ms-opentype", run = "font" }, 109 | # Empty file 110 | { mime = "inode/x-empty", run = "empty" }, 111 | # Fallback 112 | { name = "*", run = "file" }, 113 | ] 114 | 115 | [input] 116 | cursor_blink = false 117 | 118 | # cd 119 | cd_title = "Change directory:" 120 | cd_origin = "top-center" 121 | cd_offset = [ 0, 2, 50, 3 ] 122 | 123 | # create 124 | create_title = ["Create:", "Create:"] 125 | create_origin = "top-center" 126 | create_offset = [ 0, 2, 50, 3 ] 127 | 128 | # rename 129 | rename_title = "Rename:" 130 | rename_origin = "hovered" 131 | rename_offset = [ 0, 1, 50, 3 ] 132 | 133 | # filter 134 | filter_title = "Filter:" 135 | filter_origin = "top-center" 136 | filter_offset = [ 0, 2, 50, 3 ] 137 | 138 | # find 139 | find_title = [ "Find next:", "Find previous:" ] 140 | find_origin = "top-center" 141 | find_offset = [ 0, 2, 50, 3 ] 142 | 143 | # search 144 | search_title = "Search via {n}:" 145 | search_origin = "top-center" 146 | search_offset = [ 0, 2, 50, 3 ] 147 | 148 | # shell 149 | shell_title = [ "Shell:", "Shell (block):" ] 150 | shell_origin = "top-center" 151 | shell_offset = [ 0, 2, 50, 3 ] 152 | 153 | [confirm] 154 | # trash 155 | trash_title = "Trash {n} selected file{s}?" 156 | trash_origin = "center" 157 | trash_offset = [ 0, 0, 70, 20 ] 158 | 159 | # delete 160 | delete_title = "Permanently delete {n} selected file{s}?" 161 | delete_origin = "center" 162 | delete_offset = [ 0, 0, 70, 20 ] 163 | 164 | # overwrite 165 | overwrite_title = "Overwrite file?" 166 | overwrite_content = "Will overwrite the following file:" 167 | overwrite_origin = "center" 168 | overwrite_offset = [ 0, 0, 50, 15 ] 169 | 170 | # quit 171 | quit_title = "Quit?" 172 | quit_content = "The following task is still running, are you sure you want to quit?" 173 | quit_origin = "center" 174 | quit_offset = [ 0, 0, 50, 15 ] 175 | 176 | [select] 177 | open_title = "Open with:" 178 | open_origin = "hovered" 179 | open_offset = [ 0, 1, 50, 7 ] 180 | 181 | [[plugin.prepend_fetchers]] 182 | id = "git" 183 | name = "*" 184 | run = "git" 185 | 186 | [[plugin.prepend_fetchers]] 187 | id = "git" 188 | name = "*/" 189 | run = "git" 190 | -------------------------------------------------------------------------------- /zsh/zimrc: -------------------------------------------------------------------------------- 1 | zmodule environment 2 | zmodule archive 3 | zmodule ssh 4 | zmodule utility 5 | 6 | zmodule zsh-users/zsh-completions --fpath src 7 | zmodule completion 8 | 9 | zmodule romkatv/powerlevel10k 10 | zmodule zsh-users/zsh-syntax-highlighting 11 | zmodule zsh-users/zsh-autosuggestions 12 | zmodule zsh-users/zsh-history-substring-search 13 | zmodule MichaelAquilina/zsh-autoswitch-virtualenv -n autoswitch_virtualenv 14 | 15 | -------------------------------------------------------------------------------- /zsh/zsh/alias.zsh: -------------------------------------------------------------------------------- 1 | # zim module: archive 2 | alias x="unarchive" 3 | alias z="archive" 4 | 5 | alias c="clear" 6 | alias checklog="journalctl -xefu" 7 | alias vi="nvim" 8 | 9 | alias cat="bat --style=plain --paging=never" 10 | alias top="htop" 11 | alias cp="rsync -az --info=progress2" 12 | -------------------------------------------------------------------------------- /zsh/zsh/environment.zsh: -------------------------------------------------------------------------------- 1 | export COLORTERM=truecolor 2 | export XDG_CONFIG_HOME=$HOME/.config 3 | export XDG_DATA_HOME=$HOME/.local/share 4 | export PATH=$PATH:/usr/lib:$HOME/.local/bin 5 | 6 | export LC_ALL="en_US.UTF-8" 7 | export EDITOR=/usr/bin/nvim 8 | export VISUAL=/usr/bin/nvim 9 | 10 | # This will make only alphanumeric characters count as words. 11 | # better experience for ctrl+left/right 12 | export WORDCHARS='' 13 | export LS_COLORS='no=00;37:fi=00:di=00;34:ln=04;36:pi=40;33:so=01;35:bd=40;33;01:' 14 | -------------------------------------------------------------------------------- /zsh/zsh/functions.zsh: -------------------------------------------------------------------------------- 1 | redraw-prompt() { 2 | local f 3 | for f in chpwd "${chpwd_functions[@]}" precmd "${precmd_functions[@]}"; do 4 | [[ "${+functions[$f]}" == 0 ]] || "$f" &>/dev/null || true 5 | done 6 | p10k display -r 7 | } 8 | 9 | yy() { 10 | local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd 11 | yazi "$@" --cwd-file="$tmp" < /dev/tty 12 | if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then 13 | builtin cd -- "$cwd" 14 | redraw-prompt 15 | zoxide add "$cwd" 16 | fi 17 | rm -f -- "$tmp" 18 | } 19 | 20 | filemanager_gui() { 21 | xdg-open $(pwd) 22 | } 23 | 24 | man() { 25 | local width=$(tput cols) 26 | [ $width -gt $MANWIDTH ] && width=$MANWIDTH 27 | env MANWIDTH=$width \ 28 | man "$@" 29 | } 30 | 31 | empty() { 32 | # empty widget for ESC keybinding 33 | } 34 | 35 | zle -N yy 36 | zle -N filemanager_gui 37 | zle -N empty 38 | -------------------------------------------------------------------------------- /zsh/zsh/keybinds.zsh: -------------------------------------------------------------------------------- 1 | # keybindings must be provided after plugin source 2 | # disable vim mode 3 | bindkey -v 4 | bindkey -M viins '^[' empty 5 | bindkey '^R' yy 6 | bindkey '^E' filemanager_gui 7 | bindkey "^[[1;5C" forward-word 8 | bindkey "^[[1;5D" backward-word 9 | bindkey '^[[A' history-substring-search-up 10 | bindkey '^[[B' history-substring-search-down 11 | bindkey '^[[Z' reverse-menu-complete 12 | bindkey "^H" backward-kill-word 13 | -------------------------------------------------------------------------------- /zsh/zsh/plugins.zsh: -------------------------------------------------------------------------------- 1 | # show powerlevel10k prompt first 2 | if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then 3 | source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" 4 | fi 5 | 6 | export ZIM_HOME=$HOME/.cache/zim 7 | # Download zimfw plugin manager if missing. 8 | if [[ ! -e ${ZIM_HOME}/zimfw.zsh ]]; then 9 | curl -fsSL --create-dirs -o ${ZIM_HOME}/zimfw.zsh \ 10 | https://github.com/zimfw/zimfw/releases/latest/download/zimfw.zsh 11 | fi 12 | 13 | # Install missing modules, and update ${ZIM_HOME}/init.zsh if missing or outdated. 14 | if [[ ! ${ZIM_HOME}/init.zsh -nt ${ZDOTDIR:-${HOME}}/.zimrc ]]; then 15 | source ${ZIM_HOME}/zimfw.zsh init -q 16 | fi 17 | 18 | source ${ZIM_HOME}/init.zsh 19 | 20 | # fix case error 21 | zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' 22 | # set completion color 23 | zstyle ':completion:*:default' list-colors '=(#b)(-*)(-- *)===34' '=(#b)(-- *)=34' 24 | # zstyle ':completion:*' list-colors '=*=34' 25 | zstyle ':completiom:*' list-colors 'di=1:fi=96:*.m=31:*.py=32:*.txt=36:*.out=35' 26 | zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} 27 | zstyle ':completion:*' menu select 28 | 29 | HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND=bg=#d33682,fg=#002b36 30 | 31 | HISTORY_SUBSTRING_SEARCH_PREFIXED=1 32 | setopt HIST_FIND_NO_DUPS 33 | 34 | # let zsh-autosuggestions work 35 | export SAVEHIST=100000 36 | export HISTSIZE=100000 37 | export HISTFILESIZE=100000 38 | export HISTFILE=$HOME/.zsh_history 39 | # share history in different terminal 40 | setopt SHARE_HISTORY 41 | setopt EXTENDED_HISTORY 42 | -------------------------------------------------------------------------------- /zsh/zsh/software/fzf.zsh: -------------------------------------------------------------------------------- 1 | export FZF_DEFAULT_COMMAND='fd --follow --exclude={node_modules,build,__pycache__}' 2 | export FZF_DEFAULT_OPTS="--height=100% --layout=reverse --preview='~/.config/yazi/fzf-scope.sh {}'" 3 | -------------------------------------------------------------------------------- /zsh/zsh/software/kitty.zsh: -------------------------------------------------------------------------------- 1 | export TERM=xterm-kitty 2 | alias s="kitten ssh" 3 | alias diff="kitten diff" 4 | -------------------------------------------------------------------------------- /zsh/zsh/software/zoxide.zsh: -------------------------------------------------------------------------------- 1 | # https://github.com/ajeetdsouza/zoxide/issues/403 2 | eval "$(zoxide init zsh --cmd cd)" 3 | -------------------------------------------------------------------------------- /zsh/zshrc: -------------------------------------------------------------------------------- 1 | export XDG_CONFIG_HOME=~/.config 2 | source $XDG_CONFIG_HOME/zsh/environment.zsh 3 | source $XDG_CONFIG_HOME/zsh/plugins.zsh 4 | source $XDG_CONFIG_HOME/zsh/functions.zsh 5 | source $XDG_CONFIG_HOME/zsh/alias.zsh 6 | source $XDG_CONFIG_HOME/zsh/keybinds.zsh 7 | source $XDG_CONFIG_HOME/zsh/theme.zsh 8 | 9 | # load software configuration 10 | setopt nullglob 11 | for conf in "$XDG_CONFIG_HOME/zsh/software/"*.zsh; do 12 | source "${conf}" 13 | done 14 | unset conf 15 | unsetopt nullglob 16 | --------------------------------------------------------------------------------