commit 9ed00ff30c26cd7b131efc83bc67c7e51883b42c Author: Philomena Date: Mon Jul 22 22:14:21 2024 +0200 feat: initial commit of Ela's Arch config. :) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..68124bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,16 @@ +#pacman/.config/pacmanfile/pacmanfile-extra.txt +zsh/.zsh.d/extra.zsh + +# Neovim creates additional files which need to be ignored +nvim/.config/nvim/* +!nvim/.config/nvim/init.lua +!nvim/.config/nvim/lua + +# gopass creates additional files which need to be ignored +gopass/.config/gopass/* +!gopass/.config/gopass/config + +# Vifm creates additional files which need to be ignored +vifm/.config/vifm/* +!vifm/.config/vifm/vifmrc +!vifm/.config/vifm/colors diff --git a/.luarc.json b/.luarc.json new file mode 100644 index 0000000..3d57300 --- /dev/null +++ b/.luarc.json @@ -0,0 +1 @@ +{ "diagnostics": { "globals": ["vim"] } } diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/README.md b/README.md new file mode 100644 index 0000000..81abe13 --- /dev/null +++ b/README.md @@ -0,0 +1,95 @@ +# Archlinux Config + +Ela's Archlinux Configfiles + +## Features and Usage + +### Terminal + +This setup uses a powerful combination of [Alacritty](https://github.com/jwilm/alacritty), [tmux](https://github.com/tmux/tmux) and [zsh](https://www.zsh.org/) with a minimalistic prompt. + +### Commands + +- `pacu`: Update and upgrade the whole system (using `Brewfile` on macOS and `pacmanfile` on Arch Linux) +- `depu`: Update and upgrade the dependencies for the current project +- `mkcd`: Create a directory and enter it +- `fcd`: cd into a directory using fuzzy search +- `fe`: Edit a directory or file using fuzzy search +- `fco`: Checkout Git branches or tags using fuzzy search +- `fkill`: Kill any process with fuzzy search +- `fshow`: Git commit browser with fuzzy search + +### Text Editor + +Text editing is based on [Neovim](https://neovim.io/), configured to be an "IDE". + +- `e`: Start Neovim with all plugins +- `ide`: Start Neovim with all plugins in an IDE like window layout + +#### Navigation + +- `gd`: Go to definition of symbol under cursor +- `gi`: Go to implementations of symbol under cursor +- `gr`: Go to references of symbol under cursor +- ``: Fuzzy search files in workspace +- `/`: Fuzzy search in all files in workspace +- `j`: Open visual file explorer + +#### Git + +- `gg`: Git status +- `gd`: Git diff +- `gb`: Git blame +- `gs`: Git stage current hunk +- `gu`: Git unstage current hunk +- `gc`: Git commit +- `gm`: Git three-way merge + +#### Diagnostics and Refactoring + +- `K`: Show signature of symbol under cursor +- `[d`: Go to previous diagnostic issue +- `d]`: Go to next diagnostic issue +- `e`: Show diagnostics details +- `s`: Open workspace diagnostics +- `k`: Open symbols outline of file +- `r`: Rename current symbol +- `a`: Display code actions + +#### Testing + +- `tn`: Run nearest test to cursor +- `tf`: Run all tests in file +- `ta`: Run all tests +- `tu`: Toggle extended testing UI + +#### Debugging + +- `db`: Toggle breakpoint on current line +- `dB`: Set condition for breakpoint +- `dd`: Start debugger or continue to next breakpoint +- `dn`: Step over +- `di`: Step into +- `do`: Step out +- `dK`: Show evaluation of symbol under cursor +- `du`: Toggle extended debugging UI + +#### Add Languages and Tools + +To extend the editor with new languages and tools, simply add them to [`tools.lua`](./nvim/.config/nvim/lua/config/tools.lua). + +## Installation + +1. Clone this repo to `~/dotfiles` by running `git clone https://git.pew.io/phil/elas-arch-config.git ~/dotfiles` +2. Change the name and email address in `git/.config/git/config` +3. Arch Linux only: Change `pacmanfile/.config/pacmanfile/pacmanfile.txt` to your liking or add `pacmanfile-extra.txt` to the same directory for independent packages per machine + +4. Run `~/dotfiles/install.sh` + + **WARNING: This may install and/or remove software and change your configs!** + +5. Either import an existing PGP key pair by using `gpg --import my-key.asc` and `gpg --import my-key-pub.asc`, or create a new one by following the [GitHub guide](https://help.github.com/en/articles/generating-a-new-gpg-key). You need to use the same name and email address as an ID that you have configured in `git/.gitconfig` to correctly sign your Git commits. +6. Either import an existing SSH key pair by copying it to `~/.ssh/id_rsa` and `~/.ssh/id_rsa.pub` or create a new one by following the [GitHub guide](https://help.github.com/en/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent). + + +## Forked from https://github.com/cloudlena/dotfiles \ No newline at end of file diff --git a/alacritty/.config/alacritty/alacritty.yml b/alacritty/.config/alacritty/alacritty.yml new file mode 100644 index 0000000..23cf1ef --- /dev/null +++ b/alacritty/.config/alacritty/alacritty.yml @@ -0,0 +1,39 @@ +window: + padding: + x: 5 + y: 5 + decorations: none + startup_mode: Maximized + +font: + normal: + family: FiraCode Nerd Font + size: 12 + +# The Tokyo Night color scheme +# Copied from https://github.com/folke/tokyonight.nvim/blob/main/extras/alacritty_tokyonight_night.yml +colors: + primary: + background: "#1a1b26" + foreground: "#c0caf5" + normal: + black: "#15161E" + red: "#f7768e" + green: "#9ece6a" + yellow: "#e0af68" + blue: "#7aa2f7" + magenta: "#bb9af7" + cyan: "#7dcfff" + white: "#a9b1d6" + bright: + black: "#414868" + red: "#f7768e" + green: "#9ece6a" + yellow: "#e0af68" + blue: "#7aa2f7" + magenta: "#bb9af7" + cyan: "#7dcfff" + white: "#c0caf5" + indexed_colors: + - { index: 16, color: "#ff9e64" } + - { index: 17, color: "#db4b4b" } diff --git a/brave/.config/brave-flags.conf b/brave/.config/brave-flags.conf new file mode 100644 index 0000000..da26db9 --- /dev/null +++ b/brave/.config/brave-flags.conf @@ -0,0 +1 @@ +--ozone-platform-hint=auto diff --git a/git/.config/git/config b/git/.config/git/config new file mode 100644 index 0000000..8b19b1b --- /dev/null +++ b/git/.config/git/config @@ -0,0 +1,27 @@ +[user] + name = Raphaela Seeger + email = 0abcdef+elatella@users.noreply.github.com +[github] + user = elatella +[core] + pager = diff-so-fancy | less --tabs=4 -RFX +[pull] + ff = only +[commit] + gpgsign = true +[diff] + tool = nvimdiff +[difftool] + prompt = false +[merge] + tool = nvimdiff +[mergetool] + prompt = false +[pull] + ff = only + +; diff-so-fancy config +[core] + pager = diff-so-fancy | less --tabs=4 -RFX +[interactive] + diffFilter = diff-so-fancy --patch diff --git a/git/.config/git/ignore b/git/.config/git/ignore new file mode 100644 index 0000000..f31b3e2 --- /dev/null +++ b/git/.config/git/ignore @@ -0,0 +1,2 @@ +.DS_Store +*.swp diff --git a/gopass/.config/gopass/config b/gopass/.config/gopass/config new file mode 100644 index 0000000..a3ea754 --- /dev/null +++ b/gopass/.config/gopass/config @@ -0,0 +1,5 @@ +[core] + notifications = false + showsafecontent = true +[mounts] + path = ~/.password-store diff --git a/hyprland/.config/hypr/hyprland.conf b/hyprland/.config/hypr/hyprland.conf new file mode 100644 index 0000000..2331b68 --- /dev/null +++ b/hyprland/.config/hypr/hyprland.conf @@ -0,0 +1,120 @@ +### Variables + +$mainMod = SUPER +$colorActive = rgb(bb9af7) +$wallpaper = ~/.config/wallpapers/taylor-bw.jpg +$lockCmd = swaylock --daemonize --image $wallpaper +$sleepCmd = systemctl suspend +$launcherCmd = wofi --show drun --no-actions --insensitive --prompt 'Run' + +general { + border_size = 2 + gaps_in = 0 + gaps_out = 0 + col.active_border = $colorActive + col.group_border_active = $colorActive + cursor_inactive_timeout = 8 +} + +input { + kb_options = caps:escape,compose:ralt + touchpad { + natural_scroll = yes + } +} + +gestures { + workspace_swipe = yes + workspace_swipe_min_speed_to_force = 5 +} + +misc { + disable_hyprland_logo = true + disable_splash_rendering = true +} + +### Dwindle + +dwindle { + # Put new splits on the right/bottom + force_split = 2 + no_gaps_when_only = true +} + +### Monitors + +# Scale built in monitor correctly +monitor = eDP-1, preferred, auto, 1.5 + +# Run helper programs +exec-once = workstyle &> /tmp/workstyle.log +exec-once = waybar +exec-once = mako +exec-once = gammastep +exec-once = swaybg --mode fill --image $wallpaper +exec-once = wl-paste --type text --watch clipman store +exec-once = swayidle -w timeout 900 '$lockCmd' timeout 1200 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' timeout 1800 '$sleepCmd' before-sleep 'playerctl pause' before-sleep '$lockCmd' lock '$lockCmd' + +### Binds + +# Window manager +bind = $mainMod, Tab, focusurgentorlast +bind = $mainMod, Q, killactive, +bind = $mainMod, F, fullscreen + +# Shortcuts +bind = $mainMod, Space, exec, $launcherCmd +bind = $mainMod, Return, exec, alacritty +bind = $mainMod, W, exec, brave +bind = $mainMod, V, exec, clipman pick --tool wofi +bind = SUPER_CTRL, Q, exec, $lockCmd + +# Media keys +bind = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ +bind = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- +bind = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle +bind = , XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle +bind = , XF86MonBrightnessDown, exec, brightnessctl set 5%- +bind = , XF86MonBrightnessUp, exec, brightnessctl set +5% +bind = , XF86AudioPlay, exec, playerctl play-pause +bind = , XF86AudioNext, exec, playerctl next +bind = , XF86AudioPrev, exec, playerctl previous +bind = , XF86Search, exec, $launcherCmd + +# Screenshots +bind = , Print ,exec, grim "${HOME}/Downloads/screenshot-$(date +'%F-%H-%M-%S').png" +bind = $mainMod, Print , exec, grim -g "$(slurp)" "${HOME}/Downloads/screenshot-$(date +'%F-%H-%M-%S').png" + +# Move window focus +bind = $mainMod, H, movefocus, l +bind = $mainMod, J, movefocus, d +bind = $mainMod, K, movefocus, u +bind = $mainMod, L, movefocus, r + +# Switch workspaces +bind = $mainMod, 1, workspace, 1 +bind = $mainMod, 2, workspace, 2 +bind = $mainMod, 3, workspace, 3 +bind = $mainMod, 4, workspace, 4 +bind = $mainMod, 5, workspace, 5 +bind = $mainMod, 6, workspace, 6 +bind = $mainMod, 7, workspace, 7 +bind = $mainMod, 8, workspace, 8 +bind = $mainMod, 9, workspace, 9 +bind = $mainMod, 0, togglespecialworkspace + +# Move active window to workspace +bind = $mainMod SHIFT, 1, movetoworkspace, 1 +bind = $mainMod SHIFT, 2, movetoworkspace, 2 +bind = $mainMod SHIFT, 3, movetoworkspace, 3 +bind = $mainMod SHIFT, 4, movetoworkspace, 4 +bind = $mainMod SHIFT, 5, movetoworkspace, 5 +bind = $mainMod SHIFT, 6, movetoworkspace, 6 +bind = $mainMod SHIFT, 7, movetoworkspace, 7 +bind = $mainMod SHIFT, 8, movetoworkspace, 8 +bind = $mainMod SHIFT, 9, movetoworkspace, 9 +bind = $mainMod SHIFT, 0, movetoworkspace, special + +# Move/resize windows with mouse +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..95fb589 --- /dev/null +++ b/install.sh @@ -0,0 +1,91 @@ +#!/bin/sh + +CONFIGFILES_REPOSITORY="https://git.pew.io/phil/elas-arch-config.git" +CONFIGFILES_DIRECTORY="~/dotfiles" + +# This script installs these dotfiles. + +set -e -u + +printf '\e[1mInstalling dotfiles\e[0m\n' + +case "$(uname)" in + +'Linux') + if [ ! -x "$(command -v pacman)" ]; then + printf '\e[1mArch Linux is the only distro currently supported for automated setup\e[0m\n' + exit 1 + fi + + # Install Git if not installed + if [ ! -x "$(command -v git)" ]; then + printf '\e[1mInstalling Git\e[0m\n' + sudo pacman -S --noconfirm --needed git + fi + + # git clone these dotfiles if not done yet + if [ ! -d "$CONFIGFILES_DIRECTORY" ]; then + printf '\e[1mCloning dotfiles repo\e[0m\n' + git clone "$CONFIGFILES_REPOSITORY" "$CONFIGFILES_DIRECTORY" + fi + + # Install Stow if not installed + sudo pacman -S --noconfirm --needed stow + + + # Stow subdirectories of dotfiles + printf '\e[1mLinking dotfiles to your home directory\e[0m\n' + for dir in "$CONFIGFILES_DIRECTORY"/*/; do + stow --dir "$CONFIGFILES_DIRECTORY" --target "$HOME" "$(basename "${dir}")" + done + + # Install Paru if not installed + if [ ! -x "$(command -v paru)" ]; then + printf '\e[1mInstalling Paru\e[0m\n' + git clone https://aur.archlinux.org/paru-bin.git /tmp/paru + (cd /tmp/paru && makepkg -si) + fi + + # Set colors for pacman + sudo sed -i 's/#Color/Color/' /etc/pacman.conf + printf "\n\nILoveCandy\n" | sudo tee -a /etc/pacman.conf >/dev/null + # sudo sed -i 's/#Color/Color/' /etc/pacman.conf + + # Install Pacmanfile if not installed + if [ ! -x "$(command -v pacmanfile)" ]; then + printf '\e[1mInstalling Pacmanfile\e[0m\n' + paru -S --noconfirm --needed pacmanfile + fi + + # Install packages using Pacmanfile + printf '\e[1mInstalling desired packages using Pacmanfile\e[0m\n' + pacmanfile sync --noconfirm + + # Change npm folder + if [ -x "$(command -v npm)" ]; then + npm set prefix="$HOME/.local" + fi + ;; + +# Default +*) + printf '\e[1mOS not supported for automated setup. Please install manually.\e[0m\n' + exit 1 + ;; +esac + +# Install prezto +if [ ! -d ~/.zprezto ]; then + git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto" +fi + +# Use zsh +if [ -x "$(command -v zsh)" ] && [ "$SHELL" != "$(command -v zsh)" ]; then + chsh -s "$(command -v zsh)" +fi + +# Run full system upgrade +. "$CONFIGFILES_DIRECTORY/zsh/.zsh.d/functions.zsh" +EDITOR=nvim pacu + +printf '\e[1mYour config is successfully installed. Please reboot to finalize.\e[0m\n' diff --git a/mako/.config/mako/config b/mako/.config/mako/config new file mode 100644 index 0000000..f1577cb --- /dev/null +++ b/mako/.config/mako/config @@ -0,0 +1,7 @@ +font=Fira Mono 9 +background-color=#1a1b26 +text-color=#c0caf5 +width=350 +border-color=#bb9af7 +default-timeout=8000 +group-by=app-name,summary diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua new file mode 100644 index 0000000..ec8bd43 --- /dev/null +++ b/nvim/.config/nvim/init.lua @@ -0,0 +1,18 @@ +-- Install Lazy if not installed yet +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "--single-branch", + "https://github.com/folke/lazy.nvim.git", + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) + +require("config.options") +require("config.autocmds") + +require("lazy").setup("plugins", { defaults = { version = "*" } }) diff --git a/nvim/.config/nvim/lua/config/autocmds.lua b/nvim/.config/nvim/lua/config/autocmds.lua new file mode 100644 index 0000000..69d2a2d --- /dev/null +++ b/nvim/.config/nvim/lua/config/autocmds.lua @@ -0,0 +1,16 @@ +-- Strip trailing whitespaces on save +local clean_whitespace_group = vim.api.nvim_create_augroup("CleanWhitespace", { clear = true }) +vim.api.nvim_create_autocmd("BufWritePre", { + group = clean_whitespace_group, + command = "%s/\\s\\+$//e", +}) + +-- Enable spell checking for certain file types +local enable_spell_check_group = vim.api.nvim_create_augroup("EnableSpellCheck", { clear = true }) +vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, { + group = enable_spell_check_group, + pattern = { "*.txt", "*.md", "*.tex" }, + callback = function() + vim.opt_local.spell = true + end, +}) diff --git a/nvim/.config/nvim/lua/config/options.lua b/nvim/.config/nvim/lua/config/options.lua new file mode 100644 index 0000000..369e72a --- /dev/null +++ b/nvim/.config/nvim/lua/config/options.lua @@ -0,0 +1,19 @@ +vim.g.mapleader = " " -- Set leader key +vim.g.maplocalleader = " " -- Set local leader key +vim.o.completeopt = "menuone,noselect" -- Have a better completion experience +vim.opt.breakindent = true -- Keep indentation for line breaks +vim.opt.clipboard = "unnamedplus" -- Use system clipboard +vim.opt.ignorecase = true -- Ignore case +vim.opt.inccommand = "split" -- Preview for find-replace command +vim.opt.laststatus = 3 -- Global status line +vim.opt.number = true -- Show line numbers +vim.opt.relativenumber = true -- Relative line numbers +vim.opt.shortmess = "I" -- Disable welcome screen +vim.opt.smartcase = true -- Do not ignore case with capitals +vim.opt.spelllang = "en_us" -- Set default spell language +vim.opt.splitbelow = true -- Put new windows below current +vim.opt.splitright = true -- Put new windows right of current +vim.opt.termguicolors = true -- True color support +vim.opt.tabstop = 4 -- Set tab width to 4 spaces + +vim.keymap.set({ "n", "v" }, "", "", { silent = true }) -- Reserve space for keymaps diff --git a/nvim/.config/nvim/lua/config/tools.lua b/nvim/.config/nvim/lua/config/tools.lua new file mode 100644 index 0000000..c1e3d24 --- /dev/null +++ b/nvim/.config/nvim/lua/config/tools.lua @@ -0,0 +1,35 @@ +return { + lsp = { + "bashls", + "cssls", + "dockerls", + "eslint", + "golangci_lint_ls", + "gopls", + "graphql", + "jsonls", + "pyright", + "rust_analyzer", + "lua_ls", + "svelte", + "terraformls", + "tsserver", + "yamlls", + }, + linter = { + "flake8", + "hadolint", + }, + formatter = { + "black", + "goimports", + "prettierd", + "shfmt", + "stylua", + }, + dap = { + "delve", + "node-debug2", + "python", + }, +} diff --git a/nvim/.config/nvim/lua/plugins/code_outline.lua b/nvim/.config/nvim/lua/plugins/code_outline.lua new file mode 100644 index 0000000..59e65c2 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/code_outline.lua @@ -0,0 +1,11 @@ +return { + { + "simrat39/symbols-outline.nvim", + cmd = { "SymbolsOutline" }, + keys = { + { "k", "SymbolsOutline", desc = "Toggle code outline" }, + }, + config = true, + }, + "liuchengxu/vista.vim", +} diff --git a/nvim/.config/nvim/lua/plugins/colorscheme.lua b/nvim/.config/nvim/lua/plugins/colorscheme.lua new file mode 100644 index 0000000..42f91dc --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/colorscheme.lua @@ -0,0 +1,13 @@ +return { + { + "folke/tokyonight.nvim", + lazy = false, + priority = 1000, + config = function() + require("tokyonight").setup({ + style = "night", + }) + vim.api.nvim_command("colorscheme tokyonight") + end, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/completion.lua b/nvim/.config/nvim/lua/plugins/completion.lua new file mode 100644 index 0000000..e8d7e1b --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/completion.lua @@ -0,0 +1,38 @@ +return { + { + "hrsh7th/nvim-cmp", + event = "InsertEnter", + dependencies = { + "hrsh7th/cmp-nvim-lua", + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-path", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-vsnip", + "hrsh7th/vim-vsnip", + "onsails/lspkind-nvim", + }, + config = function() + local cmp = require("cmp") + + local sources = { + { name = "nvim_lua" }, + { name = "nvim_lsp" }, + { name = "path" }, + { name = "buffer" }, + } + + cmp.setup({ + snippet = { + expand = function(args) + vim.fn["vsnip#anonymous"](args.body) + end, + }, + mapping = cmp.mapping.preset.insert({ + [""] = cmp.mapping.confirm({ select = true }), + }), + sources = sources, + formatting = { format = require("lspkind").cmp_format() }, + }) + end, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/convenience.lua b/nvim/.config/nvim/lua/plugins/convenience.lua new file mode 100644 index 0000000..b85fd47 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/convenience.lua @@ -0,0 +1,19 @@ +return { + -- Automatically set indent settings + { "tpope/vim-sleuth", event = "VeryLazy" }, + + -- Edit surrounds + { "kylechui/nvim-surround", event = "VeryLazy", config = true }, + + -- Allow to repeat plugin commands + { "tpope/vim-repeat", event = "VeryLazy" }, + + -- Autoclose pairs + { "windwp/nvim-autopairs", event = "InsertEnter", config = true }, + + -- Toggle comments + { "numToStr/Comment.nvim", keys = { "gc", { "gc", mode = "v" } }, config = true }, + + -- Highlight color definitions + { "NvChad/nvim-colorizer.lua", event = "VeryLazy", config = true }, +} diff --git a/nvim/.config/nvim/lua/plugins/debugging.lua b/nvim/.config/nvim/lua/plugins/debugging.lua new file mode 100644 index 0000000..940d79e --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/debugging.lua @@ -0,0 +1,49 @@ +return { + { + "mfussenegger/nvim-dap", + dependencies = { + { "theHamsta/nvim-dap-virtual-text", config = true }, + { + "rcarriga/nvim-dap-ui", + config = function() + local dapui = require("dapui") + + dapui.setup() + + vim.keymap.set("n", "du", dapui.toggle, { desc = "Toggle debugging UI" }) + vim.keymap.set("n", "dK", function() + dapui.eval(nil, { enter = true }) + end, { desc = "Debug symbol under cursor" }) + end, + }, + }, + cmd = { "DapToggleBreakpoint" }, + keys = { + { + "db", + function() + require("dap").toggle_breakpoint() + end, + desc = "Toggle breakpoint", + }, + { + "dB", + function() + require("dap").set_breakpoint(vim.fn.input("Breakpoint condition: ")) + end, + desc = "Set breakpoint condition", + }, + }, + config = function() + local dap = require("dap") + + vim.fn.sign_define("DapBreakpoint", { text = "󰌖", texthl = "", linehl = "", numhl = "" }) + vim.fn.sign_define("DapBreakpointCondition", { text = "󰌕", texthl = "", linehl = "", numhl = "" }) + + vim.keymap.set("n", "dd", dap.continue, { desc = "Start/continue debugging" }) + vim.keymap.set("n", "dn", dap.step_over, { desc = "Step over" }) + vim.keymap.set("n", "di", dap.step_into, { desc = "Step into" }) + vim.keymap.set("n", "do", dap.step_out, { desc = "Step out" }) + end, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/diagnostics.lua b/nvim/.config/nvim/lua/plugins/diagnostics.lua new file mode 100644 index 0000000..dbc0483 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/diagnostics.lua @@ -0,0 +1,10 @@ +return { + { + "folke/trouble.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + keys = { + { "s", "TroubleToggle workspace_diagnostics", desc = "Toggle diagnostics" }, + }, + config = true, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/diff_directories.lua b/nvim/.config/nvim/lua/plugins/diff_directories.lua new file mode 100644 index 0000000..284da3a --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/diff_directories.lua @@ -0,0 +1,10 @@ +return { + { + "will133/vim-dirdiff", + cmd = { "DirDiff" }, + config = function() + vim.g.DirDiffExcludes = + ".DS_Store,.git,.terraform,.gradle,bin,build,coverage,dist,node_modules,target,vendor" + end, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/file_tree.lua b/nvim/.config/nvim/lua/plugins/file_tree.lua new file mode 100644 index 0000000..1fb313e --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/file_tree.lua @@ -0,0 +1,25 @@ +return { + { + "nvim-tree/nvim-tree.lua", + dependencies = { "nvim-tree/nvim-web-devicons" }, + keys = { + { + "j", + "NvimTreeFindFileToggle", + desc = "Toggle file tree", + }, + }, + opts = { + filters = { + custom = { "^.DS_Store$", "^.git$" }, + }, + renderer = { + icons = { + show = { + git = false, + }, + }, + }, + }, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/focused_writing.lua b/nvim/.config/nvim/lua/plugins/focused_writing.lua new file mode 100644 index 0000000..2b35587 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/focused_writing.lua @@ -0,0 +1,17 @@ +return { + { + "folke/zen-mode.nvim", + cmd = { "ZenMode" }, + opts = { + window = { + backdrop = 1, + options = { + signcolumn = "no", + number = false, + relativenumber = false, + }, + }, + }, + }, + { "folke/twilight.nvim", config = true, lazy = true }, +} diff --git a/nvim/.config/nvim/lua/plugins/fuzzy_finding.lua b/nvim/.config/nvim/lua/plugins/fuzzy_finding.lua new file mode 100644 index 0000000..6c3e939 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/fuzzy_finding.lua @@ -0,0 +1,34 @@ +return { + { + "nvim-telescope/telescope.nvim", + dependencies = { + "nvim-lua/plenary.nvim", + { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, + "nvim-telescope/telescope-ui-select.nvim", + }, + cmd = { "Telescope" }, + keys = { + { + "", + "Telescope find_files find_command=fd,--type=file,--type=symlink,--hidden,--no-ignore,--exclude=.DS_Store,--exclude=.git,--exclude=.terraform,--exclude=.gradle,--exclude=.svelte-kit,--exclude=bin,--exclude=build,--exclude=coverage,--exclude=dist,--exclude=node_modules,--exclude=target,--exclude=vendor,--exclude=venv,--exclude=__pycache__", + desc = "Find files", + }, + { "/", "Telescope live_grep", desc = "Live grep" }, + }, + config = function() + local telescope = require("telescope") + + telescope.setup({ + defaults = { + mappings = { + i = { + [""] = require("telescope.actions").close, + }, + }, + }, + }) + telescope.load_extension("fzf") + telescope.load_extension("ui-select") + end, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/git.lua b/nvim/.config/nvim/lua/plugins/git.lua new file mode 100644 index 0000000..a42a36d --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/git.lua @@ -0,0 +1,61 @@ +return { + { + "tpope/vim-fugitive", + cmd = { "Git", "Gread", "Gdiff", "Gvdiffsplit" }, + keys = { + { + "gg", + ":Git", + desc = "Git status", + }, + { + "gc", + ":Git commit", + desc = "Git commit", + }, + { + "gm", + ":Git mergetool | Gvdiffsplit!", + desc = "Git three-way merge", + }, + }, + }, + { + "lewis6991/gitsigns.nvim", + dependencies = { "nvim-lua/plenary.nvim" }, + event = "VeryLazy", + keys = { + { + "ga", + ":Gitsigns stage_hunk", + desc = "Git add hunk", + }, + { + "gu", + ":Gitsigns undo_stage_hunk", + desc = "Git unstage hunk", + }, + { + "gA", + ":Gitsigns stage_buffer", + desc = "Git add file", + }, + { + "gU", + ":Gitsigns reset_buffer", + desc = "Git reset file", + }, + { + "gd", + ":Gitsigns diffthis", + desc = "Git diff", + }, + { + "gb", + ":Gitsigns blame_line", + desc = "Git blame", + }, + }, + config = true, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/lsp.lua b/nvim/.config/nvim/lua/plugins/lsp.lua new file mode 100644 index 0000000..643fa04 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/lsp.lua @@ -0,0 +1,95 @@ +local formatting_group = vim.api.nvim_create_augroup("LspFormatting", { clear = false }) + +return { + { + "neovim/nvim-lspconfig", + dependencies = { "williamboman/mason-lspconfig.nvim" }, + event = "VeryLazy", + config = function() + -- Set correct icons in sign column + local signs = { + Error = "󰅚 ", + Warn = "󰀪 ", + Hint = "󰌶 ", + Info = "󰋽 ", + } + for type, icon in pairs(signs) do + local hl = "DiagnosticSign" .. type + vim.fn.sign_define(hl, { text = icon, texthl = hl }) + end + + -- Set up keymaps + vim.keymap.set("n", "e", vim.diagnostic.open_float, { desc = "Show diagnostics of current line" }) + vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, { desc = "Move to previous diagnostic" }) + vim.keymap.set("n", "]d", vim.diagnostic.goto_next, { desc = "Move to next diagnostic" }) + + -- Add additional capabilities supported by nvim-cmp + local capabilities = require("cmp_nvim_lsp").default_capabilities() + + -- Use an on_attach function to only map the following keys + -- after the language server attaches to the current buffer + local on_attach = function(client, bufnr) + local telescope_builtin = require("telescope.builtin") + + local function buf_opts(desc) + return { noremap = true, silent = true, buffer = bufnr, desc = desc } + end + + vim.keymap.set("n", "K", vim.lsp.buf.hover, buf_opts("Show signature of current symbol")) + vim.keymap.set("n", "gd", telescope_builtin.lsp_definitions, buf_opts("Go to definiton")) + vim.keymap.set("n", "gi", telescope_builtin.lsp_implementations, buf_opts("Go to implementation")) + vim.keymap.set("n", "gr", telescope_builtin.lsp_references, buf_opts("Go to reference")) + vim.keymap.set("n", "r", vim.lsp.buf.rename, buf_opts("Rename current symbol")) + vim.keymap.set("n", "a", vim.lsp.buf.code_action, buf_opts("Run code action")) + vim.keymap.set("n", "f", function() + vim.lsp.buf.format({ async = true }) + end, buf_opts("Format current file")) + + -- Format on save + if client.supports_method("textDocument/formatting") then + vim.api.nvim_clear_autocmds({ group = formatting_group, buffer = bufnr }) + vim.api.nvim_create_autocmd("BufWritePre", { + group = formatting_group, + buffer = bufnr, + callback = function() + vim.lsp.buf.format() + end, + }) + end + end + + require("mason-lspconfig").setup_handlers({ + function(server_name) + require("lspconfig")[server_name].setup({ + on_attach = on_attach, + capabilities = capabilities, + }) + end, + }) + end, + }, + { + "jose-elias-alvarez/null-ls.nvim", + dependencies = { "nvim-lua/plenary.nvim" }, + event = "VeryLazy", + config = function() + local null_ls = require("null-ls") + null_ls.setup({ + -- Sources can be configured in config/tools.lua + -- Format on save + on_attach = function(client, bufnr) + if client.supports_method("textDocument/formatting") then + vim.api.nvim_clear_autocmds({ group = formatting_group, buffer = bufnr }) + vim.api.nvim_create_autocmd("BufWritePre", { + group = formatting_group, + buffer = bufnr, + callback = function() + vim.lsp.buf.format({ timeout_ms = 5000 }) + end, + }) + end + end, + }) + end, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/status_line.lua b/nvim/.config/nvim/lua/plugins/status_line.lua new file mode 100644 index 0000000..ad5f0c6 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/status_line.lua @@ -0,0 +1,33 @@ +return { + { + "nvim-lualine/lualine.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + local function get_words() + if vim.bo.filetype == "md" or vim.bo.filetype == "txt" or vim.bo.filetype == "markdown" then + if vim.fn.wordcount().visual_words == 1 then + return tostring(vim.fn.wordcount().visual_words) .. " word" + elseif not (vim.fn.wordcount().visual_words == nil) then + return tostring(vim.fn.wordcount().visual_words) .. " words" + else + return tostring(vim.fn.wordcount().words) .. " words" + end + else + return "" + end + end + + require("lualine").setup({ + sections = { + lualine_a = {}, + lualine_x = { "filetype" }, + lualine_z = { get_words }, + }, + extensions = { "nvim-tree" }, + options = { + theme = "tokyonight", + }, + }) + end, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/testing.lua b/nvim/.config/nvim/lua/plugins/testing.lua new file mode 100644 index 0000000..5713084 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/testing.lua @@ -0,0 +1,66 @@ +return { + { + "nvim-neotest/neotest", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-treesitter/nvim-treesitter", + "nvim-neotest/neotest-vim-test", + "vim-test/vim-test", + "nvim-neotest/neotest-go", + "haydenmeade/neotest-jest", + "nvim-neotest/neotest-python", + }, + keys = { + { + "tn", + function() + require("neotest").run.run() + end, + desc = "Run nearest test", + }, + { + "tf", + function() + require("neotest").run.run(vim.fn.expand("%")) + require("neotest").summary.open() + end, + desc = "Run all tests in file", + }, + { + "ta", + function() + require("neotest").run.run(vim.fn.getcwd()) + require("neotest").summary.open() + end, + desc = "Run all tests in suite", + }, + }, + config = function() + local neotest = require("neotest") + + neotest.setup({ + icons = { + failed = "󰅚", + passed = "󰗡", + running = "󰐍", + unknown = "󰘥", + }, + adapters = { + require("neotest-go"), + require("neotest-jest"), + require("neotest-python"), + require("neotest-vim-test")({ + ignore_filetypes = { + "go", + "python", + }, + }), + }, + }) + + vim.keymap.set("n", "tu", function() + neotest.summary.toggle() + end, { desc = "Toggle testing UI" }) + end, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/tools.lua b/nvim/.config/nvim/lua/plugins/tools.lua new file mode 100644 index 0000000..4e2a6eb --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/tools.lua @@ -0,0 +1,50 @@ +local tools = require("config.tools") + +return { + { + "williamboman/mason.nvim", + build = ":MasonUpdate", + config = true, + }, + { + "williamboman/mason-lspconfig.nvim", + dependencies = { "williamboman/mason.nvim" }, + event = "VeryLazy", + opts = { + ensure_installed = tools.lsp, + }, + }, + { + "jay-babu/mason-null-ls.nvim", + dependencies = { "williamboman/mason.nvim" }, + event = { "BufReadPre", "BufNewFile" }, + config = function() + local mason_null_ls = require("mason-null-ls") + + local null_ls_tools = tools.linter + for _, f in pairs(tools.formatter) do + table.insert(null_ls_tools, f) + end + + mason_null_ls.setup({ + ensure_installed = null_ls_tools, + handlers = {}, + }) + end, + }, + { + "jay-babu/mason-nvim-dap.nvim", + dependencies = { "williamboman/mason.nvim" }, + event = { "BufReadPre", "BufNewFile" }, + opts = { + ensure_installed = tools.dap, + handlers = {}, + }, + }, + { + "RubixDev/mason-update-all", + dependencies = { "williamboman/mason.nvim" }, + cmd = { "MasonUpdateAll" }, + config = true, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/treesitter.lua b/nvim/.config/nvim/lua/plugins/treesitter.lua new file mode 100644 index 0000000..a3e503c --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/treesitter.lua @@ -0,0 +1,42 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + build = function() + pcall(require("nvim-treesitter.install").update({ with_sync = true })) + end, + config = function() + require("nvim-treesitter.configs").setup({ + ensure_installed = "all", + highlight = { enable = true }, + }) + end, + }, + { + "nvim-treesitter/nvim-treesitter-textobjects", + dependencies = { + "nvim-treesitter/nvim-treesitter", + }, + event = "VeryLazy", + config = function() + require("nvim-treesitter.configs").setup({ + textobjects = { + select = { + enable = true, + keymaps = { + ["af"] = "@function.outer", + ["if"] = "@function.inner", + ["ac"] = "@class.outer", + ["ic"] = "@class.inner", + }, + }, + }, + }) + end, + }, + { + "nvim-treesitter/nvim-treesitter-context", + dependencies = { "nvim-treesitter/nvim-treesitter" }, + event = "VeryLazy", + config = true, + }, +} diff --git a/pacman/.config/pacmanfile/pacmanfile-core.txt b/pacman/.config/pacmanfile/pacmanfile-core.txt new file mode 100644 index 0000000..e67f2d3 --- /dev/null +++ b/pacman/.config/pacmanfile/pacmanfile-core.txt @@ -0,0 +1,7 @@ +# These packages are crucial for this repo config to function. Think hard before removing them. +base +base-devel +curl +git +neovim +zsh diff --git a/pacman/.config/pacmanfile/pacmanfile-desktop.txt b/pacman/.config/pacmanfile/pacmanfile-desktop.txt new file mode 100644 index 0000000..837c22d --- /dev/null +++ b/pacman/.config/pacmanfile/pacmanfile-desktop.txt @@ -0,0 +1,23 @@ +# GUI stuff and things +alacritty +clipman +gimp +inkscape +mako +pipewire +pipewire-pulse +qemu-desktop +signal-desktop +sway +swaybg +swayidle +swaylock +waybar +wireplumber +wl-clipboard +wofi +workstyle-git +xdg-desktop-portal-wlr +xorg-xwayland +zathura +zathura-pdf-mupdf \ No newline at end of file diff --git a/pacman/.config/pacmanfile/pacmanfile-extra.txt b/pacman/.config/pacmanfile/pacmanfile-extra.txt new file mode 100644 index 0000000..b0fc341 --- /dev/null +++ b/pacman/.config/pacmanfile/pacmanfile-extra.txt @@ -0,0 +1 @@ +# put extra packages in here. diff --git a/pacman/.config/pacmanfile/pacmanfile.txt b/pacman/.config/pacmanfile/pacmanfile.txt new file mode 100644 index 0000000..72faa45 --- /dev/null +++ b/pacman/.config/pacmanfile/pacmanfile.txt @@ -0,0 +1,96 @@ +aardvark-dns +apparmor +auto-cpufreq +autotiling-rs +aws-cli-v2 +bind +bluez +bluez-utils +brave-bin +brightnessctl +browserpass +chafa +diff-so-fancy +efibootmgr +fd +fuse-overlayfs +fwupd +fx +fzf +gammastep +github-cli +gnupg +go +golangci-lint-bin +gopass +grim +gron +htop +hugo +imv +informant +intel-ucode +jpegoptim +jq +kanshi +kubectl +kubectx +libnotify +linux +linux-firmware +lolcat +lostfiles +man-db +mpv +nancy-bin +ncdu +networkmanager +nftables +nmap +nodejs +noto-fonts-cjk +noto-fonts-emoji +npm +openssh +optipng +otf-fira-mono +pacman-contrib +pacmanfile +paru-bin +playerctl +podman +prettier +protobuf +pwgen +python-poetry +python-pynvim +reflector +ripgrep +rust +sbctl +shellcheck +shfmt +slurp +speedtest-cli +stylua +svgo +task +termshark +terraform +tflint-bin +thermald +timew +tldr +tmate +tmux +tree +ttf-firacode-nerd +udisks2 +unzip +vifm +wf-recorder +wget +whois +yq +zip +zoxide diff --git a/stylua.toml b/stylua.toml new file mode 100644 index 0000000..394e884 --- /dev/null +++ b/stylua.toml @@ -0,0 +1 @@ +indent_type = "Spaces" diff --git a/sway/.config/sway/config b/sway/.config/sway/config new file mode 100644 index 0000000..df85561 --- /dev/null +++ b/sway/.config/sway/config @@ -0,0 +1,193 @@ +### Variables + +# Set logo key as main modifier +set $mod Mod4 + +# Colors +set $foreground #c0caf5 +set $highlight #bb9af7 +set $wallpaper ~/.config/wallpapers/taylor-bw.jpg +set $lock_cmd swaylock --daemonize --image $wallpaper +set $sleep_cmd systemctl suspend +set $launcher_cmd wofi --show drun --no-actions --insensitive --prompt 'Run' | xargs swaymsg exec -- + +# Set color for focused window +client.focused $highlight $highlight $foreground + +### Outputs + +# Set wallpaper +output * bg $wallpaper fill + +### Idle + +# Lock the screen after 300 seconds of inactivity, then turn off +# all displays after another 300 seconds, and turn the screens back on when +# resumed. It will also lock the screen before the computer goes to sleep. +exec swayidle -w \ + timeout 900 '$lock_cmd' \ + timeout 1200 'swaymsg "output * dpms off"' \ + resume 'swaymsg "output * dpms on"' \ + timeout 1800 '$sleep_cmd' \ + before-sleep 'playerctl pause' \ + before-sleep '$lock_cmd' \ + lock '$lock_cmd' + +# Inhibit idle if a window is in fullscreen +for_window [shell=".*"] inhibit_idle fullscreen + +# Prevent Brave from inhibiting shortcuts +for_window [app_id="^brave-.*-.*$"] shortcuts_inhibitor disable + +### Status Bar + +bar { + swaybar_command waybar +} + +### Windows + +# Hide window title bars and borders +default_border pixel +hide_edge_borders smart + +### Inputs + +# Mouse +# Hide mouse cursor when not used +seat * hide_cursor 8000 + +# Touchpad +input type:touchpad { + tap enabled + natural_scroll enabled +} + +# Keyboard +input type:keyboard { + # Map caps lock to escape and use right alt as compose key to create umlauts + # To actually create them, type the following keys in a sequence: + # ralt + " + u --> ü + xkb_options caps:escape,compose:ralt +} + +### Key bindings + +# App launcher +bindsym $mod+space exec $launcher_cmd + +# Launch terminal +bindsym $mod+Return exec $TERMINAL + +# Launch browser +bindsym $mod+w exec $BROWSER + +# Take screenshots +bindsym Print exec grim "${HOME}/Downloads/screenshot-$(date +'%F-%H-%M-%S').png" +bindsym Print+$mod exec grim -g "$(slurp)" "${HOME}/Downloads/screenshot-$(date +'%F-%H-%M-%S').png" + +# Lock screen +bindsym $mod+ctrl+q exec loginctl lock-session + +# Media control +bindsym --locked XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ +bindsym --locked XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- +bindsym --locked XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle +bindsym --locked XF86AudioMicMute exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle +bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%- +bindsym --locked XF86MonBrightnessUp exec brightnessctl set +5% +bindsym --locked XF86AudioPlay exec playerctl play-pause +bindsym --locked XF86AudioNext exec playerctl next +bindsym --locked XF86AudioPrev exec playerctl previous +bindsym XF86Search exec $launcher_cmd + +# Kill focused window +bindsym $mod+q kill + +# Reload the configuration file +bindsym $mod+Shift+c reload + +# Move focus around +bindsym $mod+h focus left +bindsym $mod+j focus down +bindsym $mod+k focus up +bindsym $mod+l focus right + +# Move the focused window with the same, but add Shift +bindsym $mod+Shift+h move left +bindsym $mod+Shift+j move down +bindsym $mod+Shift+k move up +bindsym $mod+Shift+l move right + +# Switch to workspace +bindsym $mod+1 workspace number 1 +bindsym $mod+2 workspace number 2 +bindsym $mod+3 workspace number 3 +bindsym $mod+4 workspace number 4 +bindsym $mod+5 workspace number 5 +bindsym $mod+6 workspace number 6 +bindsym $mod+7 workspace number 7 +bindsym $mod+8 workspace number 8 +bindsym $mod+9 workspace number 9 +bindsym $mod+0 workspace number 10 +bindsym $mod+tab workspace back_and_forth + +# Move focused container to workspace +bindsym $mod+Shift+1 move container to workspace number 1; workspace number 1 +bindsym $mod+Shift+2 move container to workspace number 2; workspace number 2 +bindsym $mod+Shift+3 move container to workspace number 3; workspace number 3 +bindsym $mod+Shift+4 move container to workspace number 4; workspace number 4 +bindsym $mod+Shift+5 move container to workspace number 5; workspace number 5 +bindsym $mod+Shift+6 move container to workspace number 6; workspace number 6 +bindsym $mod+Shift+7 move container to workspace number 7; workspace number 7 +bindsym $mod+Shift+8 move container to workspace number 8; workspace number 8 +bindsym $mod+Shift+9 move container to workspace number 9; workspace number 9 +bindsym $mod+Shift+0 move container to workspace number 10 + +# Splitting direction +bindsym $mod+b split toggle + +# Make current focus fullscreen +bindsym $mod+f fullscreen + +# Resizing containers +bindsym $mod+r mode 'resize' +mode 'resize' { + # Resizing keys + bindsym h resize shrink width 10px + bindsym j resize grow height 10px + bindsym k resize shrink height 10px + bindsym l resize grow width 10px + + # Return to default mode + bindsym Escape mode 'default' +} + +### Gesture bindings + +# Swipe back and forth between workspaces +bindgesture swipe:3:left workspace prev_on_output +bindgesture swipe:3:right workspace next_on_output + +### Processes + +# Desktop notifications +exec mako + +# Automatically manage outputs +exec kanshi + +# Adjust color temperature to reduce eye strain +exec gammastep + +# Autotiling +exec autotiling-rs + +# Waybar Icons +exec_always --no-startup-id workstyle &> /tmp/workstyle.log + +# Clipboard manager +exec wl-paste --type text --watch clipman store +bindsym $mod+v exec clipman pick --tool wofi + +include /etc/sway/config.d/* diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf new file mode 100644 index 0000000..77eb320 --- /dev/null +++ b/tmux/.config/tmux/tmux.conf @@ -0,0 +1,40 @@ +# Set correct terminal +set-option -g default-terminal "tmux-256color" +set-option -as terminal-overrides ',alacritty:RGB' + +# Open new windows from home directory +bind c new-window -c "${HOME}" + +# Open new splits from current directory +bind '"' split-window -v -c '#{pane_current_path}' +bind % split-window -h -c '#{pane_current_path}' + +# Switch panes like vim +set-window-option -g mode-keys vi +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R + +# Set escape time to 10 for esc to work properly in Vim +set-option -sg escape-time 10 + +# Set focus-events to enable Neovim autoread +set-option -g focus-events on + +# Color scheme +set-option -g status-style 'fg=#414868' +set-option -g window-status-current-style 'fg=#1a1b26,bg=#414868,bold' +set-option -g mode-style 'fg=#7aa2f7,bg=#3b4261' +set-option -g message-style 'fg=#7aa2f7,bg=#3b4261' +set-option -g pane-border-style 'fg=#3b4261' +set-option -g pane-active-border-style 'fg=#3b4261' +set-option -g message-command-style 'fg=#7aa2f7,bg=#3b4261' + +# Unclutter status bar +set-option -g status-right '' +set-option -g status-left '' +set-window-option -g window-status-format " #I: #W " +set-window-option -g window-status-current-format " #I: #W " + + diff --git a/vifm/.config/vifm/colors/quantum-black.vifm b/vifm/.config/vifm/colors/quantum-black.vifm new file mode 100644 index 0000000..cdf4011 --- /dev/null +++ b/vifm/.config/vifm/colors/quantum-black.vifm @@ -0,0 +1,10 @@ +highlight clear + +highlight Win cterm=none ctermfg=default ctermbg=none + +highlight TopLine cterm=none ctermfg=default ctermbg=black +highlight StatusLine cterm=bold ctermfg=default ctermbg=black +highlight Border cterm=none ctermfg=default ctermbg=black + +highlight Selected cterm=bold ctermfg=magenta ctermbg=default +highlight CurrLine cterm=bold ctermfg=236 ctermbg=magenta diff --git a/vifm/.config/vifm/colors/tokyonight.vifm b/vifm/.config/vifm/colors/tokyonight.vifm new file mode 100644 index 0000000..cdf4011 --- /dev/null +++ b/vifm/.config/vifm/colors/tokyonight.vifm @@ -0,0 +1,10 @@ +highlight clear + +highlight Win cterm=none ctermfg=default ctermbg=none + +highlight TopLine cterm=none ctermfg=default ctermbg=black +highlight StatusLine cterm=bold ctermfg=default ctermbg=black +highlight Border cterm=none ctermfg=default ctermbg=black + +highlight Selected cterm=bold ctermfg=magenta ctermbg=default +highlight CurrLine cterm=bold ctermfg=236 ctermbg=magenta diff --git a/vifm/.config/vifm/vifmrc b/vifm/.config/vifm/vifmrc new file mode 100644 index 0000000..603c472 --- /dev/null +++ b/vifm/.config/vifm/vifmrc @@ -0,0 +1,20 @@ +" Use Neovim +set vicmd=nvim + +" Show hidden files +set dotfiles + +" File preview +view +fileviewer *.png,*.jpg,*.jpeg,*.webp,*.svg chafa %c +fileviewer *.pdf pdftotext %c - +fileviewer *.zip unzip -l %c +fileviewer *.tar,*.tar.gz tar tf %c + +" Open files +filetype *.png,*.jpg,*.jpeg,*.webp,*.svg imv %c & +filetype *.mp3,*.mp4,*.mov,*.wav mpv --quiet %c & +filetype *.pdf zathura %c & + +" Set color scheme +colorscheme tokyonight diff --git a/wallpapers/.config/wallpapers/taylor-1989.jpg b/wallpapers/.config/wallpapers/taylor-1989.jpg new file mode 100644 index 0000000..ac1593d Binary files /dev/null and b/wallpapers/.config/wallpapers/taylor-1989.jpg differ diff --git a/wallpapers/.config/wallpapers/taylor-bw.jpg b/wallpapers/.config/wallpapers/taylor-bw.jpg new file mode 100644 index 0000000..455169a Binary files /dev/null and b/wallpapers/.config/wallpapers/taylor-bw.jpg differ diff --git a/wallpapers/.config/wallpapers/taylor-midnights.jpg b/wallpapers/.config/wallpapers/taylor-midnights.jpg new file mode 100644 index 0000000..72133ac Binary files /dev/null and b/wallpapers/.config/wallpapers/taylor-midnights.jpg differ diff --git a/wallpapers/.config/wallpapers/taylor1.jpg b/wallpapers/.config/wallpapers/taylor1.jpg new file mode 100644 index 0000000..c8e445d Binary files /dev/null and b/wallpapers/.config/wallpapers/taylor1.jpg differ diff --git a/waybar/.config/waybar/config.jsonc b/waybar/.config/waybar/config.jsonc new file mode 100644 index 0000000..c3ed8df --- /dev/null +++ b/waybar/.config/waybar/config.jsonc @@ -0,0 +1,69 @@ +{ + "modules-left": ["sway/workspaces", "sway/mode"], + "modules-center": ["custom/tasks"], + "modules-right": [ + "custom/updates", + "custom/containers", + "wireplumber", + "bluetooth", + "network", + "battery", + "clock" + ], + "battery": { + "states": { + "warning": 20, + "critical": 10 + }, + "format": "{icon}", + "format-icons": { + "default": ["󰁺", "󰁻", "󰁼", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"], + "charging": ["󰢜", "󰂆", "󰂇", "󰂈", "󰢝", "󰂉", "󰢞", "󰂊", "󰂋", "󰂅"], + "critical": ["󱃍"] + }, + "tooltip-format": "Battery at {capacity}%" + }, + "clock": { + "format": "{:%a %d %b %H:%M}", + "tooltip-format": "{:%B %Y}\n\n{calendar}" + }, + "network": { + "format-ethernet": "󰈀", + "format-wifi": "{icon}", + "format-linked": "󰈀", + "format-disconnected": "󰖪", + "format-icons": ["󰤯", "󰤟", "󰤢", "󰤥", "󰤨"], + "tooltip-format-wifi": "{essid} at {signalStrength}%" + }, + "wireplumber": { + "format": "{icon}", + "format-muted": "󰸈", + "format-icons": ["󰕿", "󰖀", "󰕾"], + "tooltip-format": "Volume at {volume}%" + }, + "bluetooth": { + "format": "", + "format-on": "󰂯", + "format-connected": "󰂱", + "tooltip-format-on": "Bluetooth {status}", + "tooltip-format-connected": "Connected to {device_alias}" + }, + "custom/tasks": { + "exec": "~/.config/waybar/scripts/tasks.sh", + "exec-if": "which task", + "interval": 60 + }, + "custom/updates": { + "format": "󰣇 {}", + "exec": "~/.config/waybar/scripts/updates-arch-combined.sh", + "interval": 7200, + "on-click": "alacritty --command paru -Syu --noconfirm", + "signal": 8 + }, + "custom/containers": { + "exec": "~/.config/waybar/scripts/containers.sh", + "exec-if": "which podman", + "interval": 60, + "return-type": "json" + } +} diff --git a/waybar/.config/waybar/scripts/containers.sh b/waybar/.config/waybar/scripts/containers.sh new file mode 100755 index 0000000..6feba73 --- /dev/null +++ b/waybar/.config/waybar/scripts/containers.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +set -u + +if [ ! -x "$(command -v podman)" ]; then + exit 1 +fi + +running_container_count=$(podman ps --noheading | wc -l) + +if [ "$running_container_count" -eq 0 ]; then + echo '' + exit 0 +fi + +suffix="" +if [ "$running_container_count" -gt 1 ]; then + suffix="s" +fi + +echo "{\"text\": \"󰡨\", \"tooltip\": \"${running_container_count} container${suffix} running\"}" diff --git a/waybar/.config/waybar/scripts/tasks.sh b/waybar/.config/waybar/scripts/tasks.sh new file mode 100755 index 0000000..5fde618 --- /dev/null +++ b/waybar/.config/waybar/scripts/tasks.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +set -u + +if [ ! -x "$(command -v task)" ]; then + exit 1 +fi + +active_task=$(task rc.verbose=nothing rc.report.activedesc.filter=+ACTIVE rc.report.activedesc.columns:description rc.report.activedesc.sort:urgency- rc.report.activedesc.columns:description activedesc limit:1 | head -n 1) +if [ -n "$active_task" ]; then + echo "󰐌 $active_task" + exit 0 +fi + +ready_task=$(task rc.verbose=nothing rc.report.readydesc.filter=+READY rc.report.readydesc.columns:description rc.report.readydesc.sort:urgency- rc.report.readydesc.columns:description readydesc limit:1 | head -n 1) +if [ -z "$ready_task" ]; then + echo "" + exit 0 +fi + +echo "󰳟 $ready_task" diff --git a/waybar/.config/waybar/scripts/updates-arch-combined.sh b/waybar/.config/waybar/scripts/updates-arch-combined.sh new file mode 100755 index 0000000..0bcdb8a --- /dev/null +++ b/waybar/.config/waybar/scripts/updates-arch-combined.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +if ! update_count_pacman=$(checkupdates | wc -l); then + update_count_pacman=0 +fi + +if ! update_count_aur=$(paru -Qum 2>/dev/null | wc -l); then + update_count_aur=0 +fi + +update_count=$((update_count_pacman + update_count_aur)) + +if [ "$update_count" -gt 0 ]; then + echo "$update_count" +else + echo '' +fi diff --git a/waybar/.config/waybar/style.css b/waybar/.config/waybar/style.css new file mode 100644 index 0000000..cd67060 --- /dev/null +++ b/waybar/.config/waybar/style.css @@ -0,0 +1,65 @@ +/* General */ +* { + border-radius: 0; + font-family: "FiraCode Nerd Font"; + font-size: 13px; + color: #c0caf5; +} + +window#waybar { + background-color: #1a1b26; +} + +tooltip { + background-color: #15161e; +} + +/* Workspaces */ +#workspaces button { + margin: 4px; + padding: 0 8px; + border-radius: 9999px; +} + +#workspaces button:hover { + border-color: transparent; + box-shadow: none; + background: #414868; +} + +#workspaces button.focused, +#workspaces button.active { + padding: 0 13px; + background: #2f334d; +} + +/* Modules */ +#clock, +#network, +#wireplumber, +#bluetooth, +#battery, +#custom-updates, +#custom-tasks, +#custom-containers, +#mode { + margin: 4px; + padding: 0 13px; + border-radius: 9999px; + background-color: #2f334d; +} + +#network { + padding: 0 15px 0 11px; +} + +#mode, +#custom-updates { + color: #bb9af7; + font-weight: bold; +} + +#battery.critical { + color: #f7768e; + font-weight: bold; +} diff --git a/wofi/.config/wofi/style.css b/wofi/.config/wofi/style.css new file mode 100644 index 0000000..3a0f987 --- /dev/null +++ b/wofi/.config/wofi/style.css @@ -0,0 +1,22 @@ +#window { + font-family: "Fira Mono"; + background-color: #1a1b26; + color: #c0caf5; +} + +#input { + border-radius: 0; + border-color: transparent; + padding: 5px; + background-color: #1a1b26; + color: #c0caf5; +} + +#entry { + padding: 5px; +} + +#entry:selected { + outline: none; + background-color: #bb9af7; +} diff --git a/workstyle/.config/workstyle/config.toml b/workstyle/.config/workstyle/config.toml new file mode 100644 index 0000000..480ee11 --- /dev/null +++ b/workstyle/.config/workstyle/config.toml @@ -0,0 +1,55 @@ +# Config for workstyle +# +# Format: +# "pattern" = "icon" +# +# The pattern will be used to match against the application name, class_id or WM_CLASS. +# The icon will be used to represent that application. +# +# Note if multiple patterns are present in the same application name, +# precedence is given in order of apparition in this file. + +# Apps +"alacritty" = "" +"blender" = "󰂫" +"calendar" = "󰃭" +"gimp" = "󱇤" +"imv" = "󰥶" +"inkscape" = "󰕙" +"kde connect" = "󰄜" +"krita" = "󰃣" +"libreoffice calc" = "󱀭" +"libreoffice impress" = "󱀵" +"libreoffice writer" = "󱀾" +"libreoffice" = "󱀲" +"mail" = "󰇰" +"mpv" = "󰐋" +"pinentry" = "󰌆" +"qemu" = "󰹑" +"signal" = "󰻞" +"slack" = "󰒱" +"spotify" = "󰓇" +"steam" = "󰓓" +"thunderbird" = "󰇰" +"zathura" = "󰈦" + +# Websites +"discord" = "󰙯" +"feeds" = "" +"github" = "󰊤" +"gitlab" = "󰮠" +"linkedin" = "󰌻" +"mastodon" = "󰫑" +"pinterest" = "󰐇" +"reddit" = "󰑍" +"twitter" = "󰕄" +"youtube" = "󰗃" + +# Browsers +"brave" = "󰊯" +"chromium" = "󰊯" +"firefox" = "󰈹" + +[other] +fallback_icon = "󰘔" +deduplicate_icons = true diff --git a/zsh/.zpreztorc b/zsh/.zpreztorc new file mode 100644 index 0000000..1db8e83 --- /dev/null +++ b/zsh/.zpreztorc @@ -0,0 +1,32 @@ +# vim: ft=zsh + +fpath=(${HOME}/.zsh.d/themes $fpath) + +# Load Prezto modules +# The order matters. +zstyle ':prezto:load' pmodule \ + 'environment' \ + 'utility' \ + 'git' \ + 'completion' \ + 'syntax-highlighting' \ + 'history-substring-search' \ + 'prompt' \ + 'history' \ + 'autosuggestions' \ + 'editor' + +# Enable color output +zstyle ':prezto:*:*' color 'yes' + +# Enable advanced syntax highlighting for commands +zstyle ':prezto:module:syntax-highlighting' highlighters \ + 'main' \ + 'brackets' + +# Set the prompt theme to load +# Setting it to 'random' loads a random theme. +zstyle ':prezto:module:prompt' theme 'elatella' + +# Use vi keybindings +zstyle ':prezto:module:editor' key-bindings 'vi' diff --git a/zsh/.zsh.d/aliases.zsh b/zsh/.zsh.d/aliases.zsh new file mode 100644 index 0000000..3c6bbb5 --- /dev/null +++ b/zsh/.zsh.d/aliases.zsh @@ -0,0 +1,4 @@ +# Easier navigation +alias ..='cd ..' +alias ...='cd ../..' +alias ....='cd ../../..' diff --git a/zsh/.zsh.d/functions.zsh b/zsh/.zsh.d/functions.zsh new file mode 100644 index 0000000..35c4783 --- /dev/null +++ b/zsh/.zsh.d/functions.zsh @@ -0,0 +1,227 @@ +# Create a directory and enter it +mkcd() { + mkdir --parents "$@" && cd "$_" || exit +} + +# cd into directory using fuzzy search +fcd() { + local dir + dir=$(fd --type d --follow | fzf --preview 'tree -l -L 1 {}' +m) && + cd "$dir" +} + +# Edit a directory or a file using fuzzy search +fe() { + local target fzf_cmd + fzf_cmd='fd --follow --hidden --no-ignore \ + --exclude .git \ + --exclude vendor \ + --exclude node_modules \ + --exclude .terraform \ + --exclude target \ + --exclude bin \ + --exclude build \ + --exclude dist \ + --exclude coverage \ + --exclude .DS_Store' + target=$(eval $fzf_cmd | fzf +m) && + if [ -d "$target" ]; then + cd "$target" && "$EDITOR" + fi + if [ -f "$target" ]; then + "$EDITOR" "$target" + fi +} + +# Checkout Git branches or tags using fuzzy search +fco() { + local tags branches target + tags=$( + git tag | awk '{print "\x1b[31;1mtag\x1b[m\t" $1}' + ) || return + branches=$( + git branch --all | grep -v HEAD | + sed "s/.* //" | sed "s#remotes/[^/]*/##" | + sort -u | awk '{print "\x1b[34;1mbranch\x1b[m\t" $1}' + ) || return + target=$( + ( + echo "$tags" + echo "$branches" + ) | + fzf-tmux -l30 -- --no-hscroll --ansi +m -d "\t" -n 2 + ) || return + git checkout "$(echo "$target" | awk '{print $2}')" +} + +# Kill any process with fuzzy search +fkill() { + local pid + if [ "$UID" != "0" ]; then + pid=$(ps -f -u $UID | sed 1d | fzf -m | awk '{print $2}') + else + pid=$(ps -ef | sed 1d | fzf -m | awk '{print $2}') + fi + + if [ "x$pid" != "x" ]; then + echo "$pid" | xargs kill "-${1:-9}" + fi +} + +# Git commit browser with fuzzy search +fshow() { + git log --graph --color=always \ + --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" | + fzf --ansi --no-sort --reverse --tiebreak=index --bind=ctrl-s:toggle-sort \ + --bind "ctrl-m:execute: + (grep -o '[a-f0-9]\{7\}' | head -1 | + xargs -I % sh -c 'git show --color=always % | less -R') << 'FZF-EOF' + {} +FZF-EOF" +} + +# Open tmux and Vim in an IDE like layout +ide() { + if [ -n "$1" ]; then + cd "$1" || exit + fi + + if [ -z "${TMUX}" ]; then + tmux new-session -A -s ide + fi + + tmux split-window -vb -p 90 + tmux select-pane -t 0 + + tmux send-keys 'nvim -c NvimTreeOpen' C-m +} + +# Update project dependencies +depu() { + # Git submodules + if [ -e .gitmodules ]; then + printf "Updating Git submodules for %s...\n\n" "${PWD##*/}" + git submodule update --init --remote --rebase --recursive + fi + + # npm + if [ -e package-lock.json ]; then + printf "Updating npm dependencies for %s...\n\n" "${PWD##*/}" + npm update + npm outdated + fi + + # Go + if [ -e go.mod ]; then + printf "Updating Go dependencies for %s...\n\n" "${PWD##*/}" + go get -t -u ./... + go mod tidy + fi + + # Rust + if [ -e Cargo.toml ]; then + printf "Updating Cargo dependencies for %s...\n\n" "${PWD##*/}" + cargo update + fi + + # Python + if [ -e poetry.lock ]; then + printf "Updating Python dependencies for %s...\n\n" "${PWD##*/}" + poetry update + poetry show --outdated + fi + + # Terraform + if [ -e .terraform.lock.hcl ]; then + printf "Updating Terraform dependencies for %s...\n\n" "${PWD##*/}" + terraform init -upgrade + fi +} + +# System update +pacu() { + processes=() + + # Dotfiles repo + printf '\e[1mUpdating dotfiles repo\e[0m\n' + (cd "${HOME}/dotfiles" && git pull) + + case "$(uname)" in + + 'Linux') + # On Linux, use the respective package manager + if [ -x "$(command -v paru)" ]; then + printf '\e[1mUpdating Paru packages\e[0m\n' + paru -Syu --noconfirm + orphans=$(paru -Qtdq) || orphans='' + if [ -n "${orphans}" ]; then + printf '\e[1mRemoving orphan packages\e[0m\n' + paru -Rns $orphans --noconfirm + fi + paru -Sc --noconfirm + paru --clean --noconfirm + elif [ -x "$(command -v pacman)" ]; then + printf '\e[1mUpdating pacman packages\e[0m\n' + sudo pacman -Syu --noconfirm + orphans=$(sudo pacman -Qtdq) || orphans='' + if [ -n "${orphans}" ]; then + printf '\e[1mRemoving orphan packages\e[0m\n' + sudo pacman -Rns $orphans --noconfirm + fi + sudo pacman -Sc --noconfirm + fi + if [ -x "$(command -v pacmanfile)" ]; then + printf '\e[1mSyncing packages with pacmanfile\e[0m\n' + pacmanfile sync + fi + if [ -x "$(command -v pacdiff)" ]; then + printf '\e[1mChecking for Pacman maintenance issues\e[0m\n' + sudo DIFFPROG="${EDITOR} -d" pacdiff + fi + + # Update status bar indicator for pending updates + pkill -SIGRTMIN+8 waybar + + # Update firmwares + if [ -x "$(command -v fwupdmgr)" ]; then + printf '\e[1mUpdating firmwares\e[0m\n' + fwupdmgr refresh + fwupdmgr update + fi + ;; + esac + + # zprezto + if type zprezto-update 2>/dev/null | grep -q function; then + printf '\e[1mUpdating zprezto\e[0m\n' + zprezto-update & + processes+=("$!") + fi + + # npm + if [ -x "$(command -v npm)" ]; then + printf '\e[1mUpdating globally installed npm packages\e[0m\n' + npm update -g + fi + + # Yarn + if [ -x "$(command -v yarn)" ]; then + printf '\e[1mUpdating globally installed Yarn packages\e[0m\n' + (yarn global upgrade >/dev/null) & + processes+=("$!") + fi + + # Neovim + if [ -x "$(command -v nvim)" ]; then + printf '\e[1mUpdating Neovim plugins\e[0m\n' + nvim --headless -c 'Lazy! sync' -c 'qa' + nvim --headless -c 'autocmd User MasonUpdateAllComplete quitall' -c 'MasonUpdateAll' + fi + + # Wait for all processes to finish + for p in ${processes[*]}; do + wait "$p" + done + + printf '\n\e[1mSystem update finished\e[0m\n' +} diff --git a/zsh/.zsh.d/themes/prompt_elatella_setup b/zsh/.zsh.d/themes/prompt_elatella_setup new file mode 100644 index 0000000..ab9518c --- /dev/null +++ b/zsh/.zsh.d/themes/prompt_elatella_setup @@ -0,0 +1,49 @@ +# vim: ft=zsh + +function prompt_elatella_precmd { + if (( $+functions[git-info] )); then + git-info + fi +} + +function prompt_elatella_setup { + setopt LOCAL_OPTIONS + unsetopt XTRACE KSH_ARRAYS + prompt_opts=(cr percent sp subst) + + # Load required functions + autoload -Uz add-zsh-hook + + # Add hook for calling git-info before each command + add-zsh-hook precmd prompt_elatella_precmd + + # Tell prezto we can manage this prompt + zstyle ':prezto:module:prompt' managed 'yes' + + # Set git-info parameters + zstyle ':prezto:module:git:info' verbose 'yes' + zstyle ':prezto:module:git:info:branch' format '%b' + zstyle ':prezto:module:git:info:position' format '%p' + zstyle ':prezto:module:git:info:commit' format '%.7c' + zstyle ':prezto:module:git:info:action' format '%F{yellow}[%s]%f' + zstyle ':prezto:module:git:info:deleted' format '%F{yellow}●%f' + zstyle ':prezto:module:git:info:modified' format '%F{yellow}●%f' + zstyle ':prezto:module:git:info:untracked' format '%F{yellow}●%f' + zstyle ':prezto:module:git:info:renamed' format '%F{green}●%f' + zstyle ':prezto:module:git:info:added' format '%F{green}●%f' + zstyle ':prezto:module:git:info:ahead' format '%F{yellow} ⬆%f' + zstyle ':prezto:module:git:info:behind' format '%F{yellow} ⬇%f' + zstyle ':prezto:module:git:info:stashed' format '%F{yellow} ★%f' + zstyle ':prezto:module:git:info:keys' format \ + 'prompt' ' %F{cyan}[$(coalesce "%b" "%p" "%c")%f${(e)git_info[status]}%F{cyan}]%f%s' \ + 'status' '$(coalesce "%a" "%r")$(coalesce "%d" "%m" "%u")%A%B%S' \ + + # Define prompts + PROMPT='%F{magenta}%c%f${(e)git_info[prompt]} ' +} + +function prompt_elatella_help { + echo 'This prompt is as minimalist as possible and cannot be customized.' +} + +prompt_elatella_setup "$@" diff --git a/zsh/.zshenv b/zsh/.zshenv new file mode 100644 index 0000000..ffff56b --- /dev/null +++ b/zsh/.zshenv @@ -0,0 +1,27 @@ +# Amend PATH +path+=("${HOME}/.local/bin") +path+=("${HOME}/.node_modules/bin") +path+=("${HOME}/.cargo/bin") +path+=("${HOME}/go/bin") +export PATH + +# Prefer US English and use UTF-8 +export LC_ALL='en_US.UTF-8' +export LANG='en_US.UTF-8' + +# Set default programs +export TERMINAL='alacritty' +export BROWSER='brave' +export PAGER='less' +export EDITOR='nvim' +export VISUAL="${EDITOR}" + +# Set correct TTY for GPG +# https://www.gnupg.org/documentation/manuals/gnupg/Invoking-GPG_002dAGENT.html +export GPG_TTY="$(tty)" + +# Set environment variables for Firefox on Wayland +if [[ -n "${WAYLAND_DISPLAY}" ]]; then + export MOZ_ENABLE_WAYLAND=1 + export XDG_CURRENT_DESKTOP=sway +fi diff --git a/zsh/.zshrc b/zsh/.zshrc new file mode 100644 index 0000000..629bbcb --- /dev/null +++ b/zsh/.zshrc @@ -0,0 +1,20 @@ +# Source Prezto +if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then + source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" +fi + +# Load the shell dotfiles +# extra.zsh can be used for settings you don’t want to commit. +for file in ~/.zsh.d/*.zsh; do + source "$file" +done + +# History navigation commands +bindkey '^P' history-beginning-search-backward +bindkey '^N' history-beginning-search-forward + +# Start tmux for every terminal session +[[ -z "$TMUX" && $(tty) != /dev/tty[0-9] ]] && { tmux || exec tmux new-session && exit } + +# Initiate zoxide +eval "$(zoxide init zsh)"