diff options
| author | EuAndreh <eu@euandre.org> | 2022-11-06 17:39:00 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2022-11-06 17:39:00 -0300 |
| commit | 3597562165838c7ce462effa5c7eaa48cb436346 (patch) | |
| tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 | |
| parent | ranger.conf: Move to tilde (diff) | |
| download | dotfiles-3597562165838c7ce462effa5c7eaa48cb436346.tar.gz dotfiles-3597562165838c7ce462effa5c7eaa48cb436346.tar.xz | |
m
Diffstat (limited to '')
114 files changed, 0 insertions, 7194 deletions
diff --git a/.gitignore b/.gitignore deleted file mode 100644 index baec669b..00000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/aux/workflow/assert-todos.sh -/public/ @@ -1 +0,0 @@ -TD_USE_BUILTIN_HOOKS='git' diff --git a/COPYING b/COPYING deleted file mode 100644 index be3f7b28..00000000 --- a/COPYING +++ /dev/null @@ -1,661 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are 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. - - 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. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - 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 Affero 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. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - 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 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 work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero 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 Affero 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 Affero 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 Affero 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. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero 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 Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <https://www.gnu.org/licenses/>. - -Also add information on how to contact you by electronic and paper mail. - - If your software can interact with users remotely through a computer -network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different -solutions will be better for different programs; see section 13 for the -specific requirements. - - 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 AGPL, see -<https://www.gnu.org/licenses/>. diff --git a/Makefile b/Makefile deleted file mode 100644 index cbce89b6..00000000 --- a/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -check: - sh aux/assert-shellcheck.sh - sh aux/assert-todos.sh - sh aux/assert-nixfmt.sh - -dev-check: check - -clean: - rm -rf public/ - -public: - sh aux/workflow/public.sh dotfiles dotfiles public-inbox - -.PHONY: clean check dev-check diff --git a/README.md b/README.md deleted file mode 100644 index 0e5e8e38..00000000 --- a/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# dotfiles - EuAndreh's personal repository - -## Paperkey - -Paperkey generated using: -```shell -cat <<EOF -# Paper key -gpg --export-secret-keys EuAndreh | paperkey > paperkey-content.txt - -# QR codes of paper key -gpg --export-secret-keys EuAndreh | paperkey | qrencode -o out.png -S -v 16 -montage *.png -tile 1x2 -geometry +0+0 concatenate-out.png -rm out* -EOF -``` - -To recover from a paperkey: - -```shell -paperkey --pubring <(wget -O- https://euandre.org/public-key.txt | gpg --dearmor) --secrets paperkey-content.txt | gpg --batch --import -``` diff --git a/TODOs.md b/TODOs.md deleted file mode 100644 index 8431ef6e..00000000 --- a/TODOs.md +++ /dev/null @@ -1,41 +0,0 @@ -# Tasks - -## TODO Revisit `README.md` {#td-6982acd2-9949-1293-10cb-85ce623bf627} -- TODO in 2022-03-25 - ---- - -Also look at `description` and `long-description`. - -## TODO Make `src/bin/print` more robust {#td-e2b2e9d5-b8c9-9ce3-a0c1-699963325d4e} -- TODO in 2022-03-25 - -## TODO Make code examples use monospaced font for manpage generated HTML {#task-83505972-2c0c-3569-5cb5-017daa628afd} -- TODO in 2021-06-13 - -## DONE Support tags in tasks? {#task-18eb3dfe-c667-4d18-967c-d406a28e94be} -- DONE in 2021-02-20 - - Done in - [`250117393a0503f66bb5a10cd0199f8748d32cda`](http://euandreh.xyz/dotfiles.git/commit/?id=250117393a0503f66bb5a10cd0199f8748d32cda) -- TODO in 2021-02-19 - -# Bugs - -# Improvements - -# Questions - -# Resources - -# Scratch -http://r-36.net/scm/zs/file/README.md.html -guix command on 'doas guix' -bkp gpg key -keepass better recovery -move mailing list emails out of INBOX -notmuch backup tags -Downloads folder being included on backup: does pruning help with this? -rsync.net pricing for borg: should it be $18GB a year? -backup cron -revisit cron/ now that borg backs up everything diff --git a/aux/assert-nixfmt.sh b/aux/assert-nixfmt.sh deleted file mode 100755 index 19bd0a2a..00000000 --- a/aux/assert-nixfmt.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -set -eux - -# shellcheck disable=2016 -find . -type f -name '*.nix' -print0 | xargs -0 -I{} sh -c ' - nixfmt < "$1" | diff - "$1" || { - echo "The file \"$1\" is unformatted. To fix it, run:" - echo " nixfmt $1" - exit 1 - } -' _ {} \; diff --git a/aux/assert-shellcheck.sh b/aux/assert-shellcheck.sh deleted file mode 100755 index cc01f3af..00000000 --- a/aux/assert-shellcheck.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -set -eux - -git ls-files | \ - xargs awk 'FNR==1 && /^#!\/bin\/sh$/ { print FILENAME }' | \ - xargs shellcheck diff --git a/aux/assert-todos.sh b/aux/assert-todos.sh deleted file mode 100755 index 5827e340..00000000 --- a/aux/assert-todos.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh -set -eu - -EXCLUDE='(sh/templates/|aux/assert-todos.sh|scripts/pastebin.sh|scripts/post.sh|scripts/task)' -if git grep FIXME | grep -Ev "$EXCLUDE"; then - echo "Found dangling FIXME markers on the project." - echo "You should write them down properly on TODOs.org." - exit 1 -fi - -awk -F'{#' ' -BEGIN { - exitstatus = 0 - h2flag = 0 - h2status = "" - prevline = "" - idx = 0 - delete ids[0] -} -h2flag == 1 { - split($0, l, " ") - timelinestatus = l[2] - if (h2status != timelinestatus) { - print "h2/timeline status mismatch for line " NR-1 - print prevline - print $0 - exitstatus = 1 - } - h2status = "" - h2flag = 0 -} - -/^## (TODO|DOING|WAITING|MEETING|INACTIVE|NEXT|CANCELLED|DONE)/ { - if (match($0, / \{#.*?\}$/) == 0) { - print "Missing ID for line " NR ":\n" $0 - exitstatus = 1 - } - id_with_prefix = substr($2, 0, length($2) - 1) - match(id_with_prefix, /^\w+-/) - id = substr(id_with_prefix, RLENGTH + 1) - if (id in arr) { - print "Duplicate ID: " id - exitstatus = 1 - } else { - arr[id] = 1 - } - - split($0, l, " ") - h2status = l[2] - h2flag = 1 - prevline = $0 -} - - -/^# Scratch$/ { - exit exitstatus -} -' TODOs.md diff --git a/aux/ci/ci-build.sh b/aux/ci/ci-build.sh deleted file mode 100755 index b6769a9d..00000000 --- a/aux/ci/ci-build.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -set -eux - -PACKAGE="$1" -LOGS_DIR="$2" -read -r _ SHA _ # oldrev newrev refname -FILENAME="$(date -Is)-$SHA.log" -LOGFILE="$LOGS_DIR/$FILENAME" - -{ - echo "Starting CI job at: $(date -Is)" - - finish() { - STATUS="$?" - printf "\n\n>>> exit status was %s\n" "$STATUS" - echo "Finishing CI job at: $(date -Is)" - cd - - NOTE=$(cat <<EOF -See CI logs with: - git notes --ref=refs/notes/ci-logs show $SHA - git notes --ref=refs/notes/ci-data show $SHA -EOF -) - git notes --ref=refs/notes/ci-data add -f -m "$STATUS $FILENAME" - git notes --ref=refs/notes/ci-logs add -f -F "$LOGFILE" - git notes append -m "$NOTE" - - cd - - sh aux/ci/report.sh "$PACKAGE" - rsync -a public/ "/srv/http/$PACKAGE/" --delete - - printf "\n>>>\n>>> CI logs added as Git note.\n>>>\n>>> Run status was %s" "$STATUS" - } - trap finish EXIT - - unset GIT_DIR - REMOTE="$PWD" - cd "$(mktemp -d)" - git clone "$REMOTE" . - git config --global user.email git@euandre.org - git config --global user.name 'EuAndreh CI' - git fetch origin refs/notes/*:refs/notes/* - git annex get ||: - - if [ -f aux/guix/with-container.sh ]; then - RUNNER='./aux/guix/with-container.sh' - else - RUNNER='sh -c' - fi - - $RUNNER 'make clean public dev-check' -} 2>&1 | tee "$LOGFILE" diff --git a/aux/ci/git-post-receive.sh b/aux/ci/git-post-receive.sh deleted file mode 100755 index ee8075f3..00000000 --- a/aux/ci/git-post-receive.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -set -eu - -for n in $(seq 0 $((GIT_PUSH_OPTION_COUNT - 1))); do - opt="$(eval "echo \$GIT_PUSH_OPTION_$n")" - if [ "$opt" = skip-ci ] || [ "$opt" = ci-skip ]; then - printf "\n'%s' option detected, not running ci-build.sh\n\n" "$opt" - exit 0 - fi -done - -PACKAGE="$(basename "$PWD" | cut -d. -f1)" # remove .git suffix -LOGS_DIR="/opt/ci/$PACKAGE/logs" -"/opt/ci/$PACKAGE/ci-build.sh" "$PACKAGE" "$LOGS_DIR" diff --git a/aux/ci/git-pre-push.sh b/aux/ci/git-pre-push.sh deleted file mode 100755 index e73b9b85..00000000 --- a/aux/ci/git-pre-push.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -set -eux - -TLD="$(cat aux/tld.txt)" - -PACKAGE="$(basename "$PWD")" -LOGS_DIR="/opt/ci/$PACKAGE/logs" -REMOTE_GIT_DIR="/srv/git/$PACKAGE.git" - -DESCRIPTION="$(mktemp)" -if [ -f description ] -then - cp description "$DESCRIPTION" -else - git config euandreh.description > "$DESCRIPTION" -fi - -scp "$DESCRIPTION" "$TLD:$REMOTE_GIT_DIR/description" -ssh "$TLD" mkdir -p "$LOGS_DIR" -scp aux/ci/ci-build.sh "$TLD:$(dirname "$LOGS_DIR")/ci-build.sh" -scp aux/ci/git-post-receive.sh "$TLD:$REMOTE_GIT_DIR/hooks/post-receive" diff --git a/aux/ci/report.sh b/aux/ci/report.sh deleted file mode 100755 index 65d33356..00000000 --- a/aux/ci/report.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/sh -set -eu - -PROJECT_UC="$1" - -PASS='โ
' -FAIL='โ' - -mkdir -p public/ci-logs public/ci-data - -OUT="$(mktemp)" -chmod 644 "$OUT" - -git fetch origin refs/notes/*:refs/notes/* ||: - -for c in $(git notes list | cut -d\ -f2); do - DATA="$(git notes --ref=refs/notes/ci-data show "$c")" - FILENAME="$(echo "$DATA" | cut -d\ -f2)" - echo "$DATA" > "public/ci-data/$FILENAME" - git notes --ref=refs/notes/ci-logs show "$c" > "public/ci-logs/$FILENAME" -done - -cat <<EOF >> "$OUT" -<!DOCTYPE html> -<html lang="en"> - <head> - <meta charset="UTF-8" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - <link rel="icon" type="image/svg+xml" href="favicon.svg" /> - - <style> - pre { - display: inline; - } - </style> - </head> - <body> - <h1> - CI logs for $PROJECT_UC - </h1> - <ul> -EOF - -for f in $(find public/ci-data/ -type f | LANG=C.UTF-8 sort -r); do - DATA="$(cat "$f")" - STATUS="$(echo "$DATA" | cut -d\ -f1)" - FILENAME="$(echo "$DATA" | cut -d\ -f2)" - - if [ "$STATUS" = 0 ]; then - STATUS_MARKER="$PASS" - else - STATUS_MARKER="$FAIL" - fi - - cat <<EOF >> "$OUT" - <li> - <a href="ci-logs/$FILENAME"> - $STATUS_MARKER <pre>$FILENAME</pre> - </a> - </li> -EOF -done - -cat <<EOF >> "$OUT" - </ul> - </body> -</html> -EOF - -mv "$OUT" public/ci.html diff --git a/aux/guix/manifest.scm b/aux/guix/manifest.scm deleted file mode 100644 index e8c1cd1a..00000000 --- a/aux/guix/manifest.scm +++ /dev/null @@ -1,18 +0,0 @@ -(specifications->manifest - (map symbol->string - '(bash - coreutils - findutils - diffutils - grep - sed - git - tar - gzip - gawk - make - perl - shellcheck - pandoc - clang - nixfmt))) diff --git a/aux/guix/pinned-channels.scm b/aux/guix/pinned-channels.scm deleted file mode 100644 index 504406f8..00000000 --- a/aux/guix/pinned-channels.scm +++ /dev/null @@ -1,11 +0,0 @@ -(cons* - (channel - (name 'xyz-euandreh) - (url "git://euandreh.xyz/package-repository") - (branch "main") - (introduction - (make-channel-introduction - "d749e053e6db365069cb9b2ef47a78b06f9e7361" - (openpgp-fingerprint - "5BDA E9B8 B2F6 C6BC BB0D 6CE5 81F9 0EC3 CD35 6060")))) - %default-channels) diff --git a/aux/guix/with-container.sh b/aux/guix/with-container.sh deleted file mode 100755 index b521c825..00000000 --- a/aux/guix/with-container.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -set -eux - -if [ -z "${1:-}" ]; then - guix time-machine --fallback -C aux/guix/pinned-channels.scm -- \ - environment --fallback -m aux/guix/manifest.scm -elif [ "$1" = '-p' ]; then - guix time-machine --fallback -C aux/guix/pinned-channels.scm -- \ - environment --fallback -m aux/guix/manifest.scm --pure -C -else - guix time-machine --fallback -C aux/guix/pinned-channels.scm -- \ - environment --fallback -m aux/guix/manifest.scm --pure -C -- sh -c "$@" -fi diff --git a/aux/tld.txt b/aux/tld.txt deleted file mode 100644 index 0cb8b8b0..00000000 --- a/aux/tld.txt +++ /dev/null @@ -1 +0,0 @@ -euandreh.xyz diff --git a/aux/workflow/TODOs.sh b/aux/workflow/TODOs.sh deleted file mode 100755 index 80059ee4..00000000 --- a/aux/workflow/TODOs.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -set -eu - -mkdir -p public - -PROJECT_UC="$1" -PROJECT="$2" -MAILING_LIST="$3" -TLD="$(cat aux/tld.txt)" - -TODOS_REGEX='s/^## (TODO|DOING|WAITING|MEETING|INACTIVE|NEXT|CANCELLED|DONE) (.*) \{#(.*?)\}$/## <a href="#\3"><span class="\1">\1<\/span> \2<\/a>\n<span class="header-anchor" id="\3">#\3<\/span>\n/' - -TAGS_REGEX='s/tag:([\w-]+)/<span class="tag">\1<\/span>/g' - -sed -e "s:@PROJECT_UC@:$PROJECT_UC:g" \ - -e "s:@PROJECT@:$PROJECT:g" \ - -e "s:@MAILING_LIST@:$MAILING_LIST:g" \ - -e "s:@TLD@:$TLD:g" \ - < aux/workflow/preamble.md | \ - printf \ - '%s\n\n%s' \ - "$(cat -)" \ - "$(perl -pe "$TODOS_REGEX" TODOs.md | perl -pe "$TAGS_REGEX")" | \ - pandoc \ - --toc \ - --highlight-style pygments \ - --toc-depth=2 \ - -s \ - --metadata title="$PROJECT_UC - TODOs" \ - --metadata lang=en \ - -r commonmark \ - -w html \ - -H aux/workflow/favicon.html \ - -H aux/workflow/style.css \ - > public/TODOs.html diff --git a/aux/workflow/assert-changelog.sh b/aux/workflow/assert-changelog.sh deleted file mode 100755 index 8e81f1f4..00000000 --- a/aux/workflow/assert-changelog.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -set -eu - -PROJECT="$1" - -for VVERSION in $(git tag); do - VERSION="${VVERSION#v}" - DATE="$(git log -1 --format=%cd --date=short "$VVERSION")" - CHANGELOG_ENTRY="# [$VERSION](https://git.euandreh.xyz/$PROJECT/commit/?id=$VVERSION) - $DATE" - if ! grep -qF "$CHANGELOG_ENTRY" CHANGELOG.md; then - echo "Missing '$CHANGELOG_ENTRY' entry from CHANGELOG.md" >&2 - exit 1 - fi -done diff --git a/aux/workflow/assert-readme.sh b/aux/workflow/assert-readme.sh deleted file mode 100755 index cef75dd9..00000000 --- a/aux/workflow/assert-readme.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh -set -eu - -mkdir -p public - -PROJECT="$1" -MAILING_LIST="$2" -TLD="$(cat aux/tld.txt)" - -EXPECTED="$(mktemp)" -cat <<EOF >> "$EXPECTED" - -For running the extra development-only checks, run: - -\`\`\`shell -$ make dev-check -\`\`\` - -and for generating the documentation HTML and website, run: - -\`\`\`shell -$ make public -\`\`\` - - -## Links - -- [home page](https://$TLD/$PROJECT/) -- [source code](https://git.euandreh.xyz/$PROJECT/) -- [bug tracking](https://$TLD/$PROJECT/TODOs.html) -- [mailing list](https://lists.sr.ht/~euandreh/$MAILING_LIST?search=%5B$PROJECT%5D) -- [CI logs](https://$TLD/$PROJECT/ci.html) -- [CHANGELOG](https://$TLD/$PROJECT/CHANGELOG.html) -EOF - -RELEASES_LIST="$(mktemp)" -for version in $(git tag | perl -e 'print reverse <>'); do - echo "- version [$version](https://git.euandreh.xyz/$PROJECT/snapshot/$PROJECT-$version.tar.gz) ([sig](https://git.euandreh.xyz/$PROJECT/snapshot/$PROJECT-$version.tar.gz.asc)), released in $(git log -1 --format=%cd --date=short "$version")" >> "$RELEASES_LIST" -done - -if [ -s "$RELEASES_LIST" ]; then - printf '\n\n## Releases\n\n' >> "$EXPECTED" - cat "$RELEASES_LIST" >> "$EXPECTED" -fi - -cat <<EOF >> "$EXPECTED" - - -## License - -The code is licensed under [GNU Affero General Public License v3.0 or later][AGPL-3.0-or-later] (AGPL-3.0-or-later). - -[AGPL-3.0-or-later]: https://www.gnu.org/licenses/agpl-3.0.en.html -EOF - -if ! tail -n "$(wc -l < "$EXPECTED")" README.md | diff - "$EXPECTED"; then - echo 'Missing metadata at the end of README.md file' - exit 1 -fi diff --git a/aux/workflow/commonmark.sh b/aux/workflow/commonmark.sh deleted file mode 100755 index 6016f51b..00000000 --- a/aux/workflow/commonmark.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -set -eu - -mkdir -p public - -PROJECT_UC="$1" -F="$2" -OUT="${3:-${F%.*}.html}" - -pandoc \ - --toc \ - --highlight-style pygments \ - --toc-depth=2 \ - -s \ - --metadata title="$PROJECT_UC - ${F%.*}" \ - --metadata lang=en \ - -r commonmark \ - -w html \ - -H aux/workflow/favicon.html \ - < "$F" > "public/$OUT" diff --git a/aux/workflow/dist.sh b/aux/workflow/dist.sh deleted file mode 100755 index c061a04b..00000000 --- a/aux/workflow/dist.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -set -eu - -DATE="$1" -VVERSION="v$2" -PROJECT="$3" - -if git show "$VVERSION" 1>/dev/null 2>/dev/null; then - echo "Version '$VVERSION' already exists." >&2 - exit 1 -fi - -if [ "$DATE" != "$(git log -1 --format=%cd --date=short HEAD)" ]; then - echo "Date '$DATE' is not up-to-date." >&2 - exit 1 -fi - -if [ "Release $VVERSION" != "$(git log --format=%B -1 HEAD | head -n1)" ]; then - echo "Commit message isn't 'Release $VVERSION'." >&2 - exit 1 -fi - -sh aux/workflow/assert-changelog.sh "$PROJECT" - -git tag "$VVERSION" - -sh aux/workflow/sign-tarballs.sh "$PROJECT" diff --git a/aux/workflow/favicon.html b/aux/workflow/favicon.html deleted file mode 100644 index 8f9327c7..00000000 --- a/aux/workflow/favicon.html +++ /dev/null @@ -1 +0,0 @@ -<link rel="icon" type="image/svg+xml" href="favicon.svg" /> diff --git a/aux/workflow/favicon.png b/aux/workflow/favicon.png Binary files differdeleted file mode 100644 index 051fdf1d..00000000 --- a/aux/workflow/favicon.png +++ /dev/null diff --git a/aux/workflow/favicon.svg b/aux/workflow/favicon.svg deleted file mode 100644 index ce566b2d..00000000 --- a/aux/workflow/favicon.svg +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"> - <path d="M 0 8 L 1 8 L 1 9 L 0 9 L 0 8 Z" /> - <path d="M 0 13 L 1 13 L 1 14 L 0 14 L 0 13 Z" /> - <path d="M 1 8 L 2 8 L 2 9 L 1 9 L 1 8 Z" /> - <path d="M 1 13 L 2 13 L 2 14 L 1 14 L 1 13 Z" /> - <path d="M 2 8 L 3 8 L 3 9 L 2 9 L 2 8 Z" /> - <path d="M 2 13 L 3 13 L 3 14 L 2 14 L 2 13 Z" /> - <path d="M 3 8 L 4 8 L 4 9 L 3 9 L 3 8 Z" /> - <path d="M 3 13 L 4 13 L 4 14 L 3 14 L 3 13 Z" /> - <path d="M 4 7 L 5 7 L 5 8 L 4 8 L 4 7 Z" /> - <path d="M 4 8 L 5 8 L 5 9 L 4 9 L 4 8 Z" /> - <path d="M 4 13 L 5 13 L 5 14 L 4 14 L 4 13 Z" /> - <path d="M 5 6 L 6 6 L 6 7 L 5 7 L 5 6 Z" /> - <path d="M 5 7 L 6 7 L 6 8 L 5 8 L 5 7 Z" /> - <path d="M 5 13 L 6 13 L 6 14 L 5 14 L 5 13 Z" /> - <path d="M 6 5 L 7 5 L 7 6 L 6 6 L 6 5 Z" /> - <path d="M 6 6 L 7 6 L 7 7 L 6 7 L 6 6 Z" /> - <path d="M 6 14 L 7 14 L 7 15 L 6 15 L 6 14 Z" /> - <path d="M 7 1 L 8 1 L 8 2 L 7 2 L 7 1 Z" /> - <path d="M 7 14 L 8 14 L 8 15 L 7 15 L 7 14 Z" /> - <path d="M 7 15 L 8 15 L 8 16 L 7 16 L 7 15 Z" /> - <path d="M 7 2 L 8 2 L 8 3 L 7 3 L 7 2 Z" /> - <path d="M 7 3 L 8 3 L 8 4 L 7 4 L 7 3 Z" /> - <path d="M 7 4 L 8 4 L 8 5 L 7 5 L 7 4 Z" /> - <path d="M 7 5 L 8 5 L 8 6 L 7 6 L 7 5 Z" /> - <path d="M 8 1 L 9 1 L 9 2 L 8 2 L 8 1 Z" /> - <path d="M 8 15 L 9 15 L 9 16 L 8 16 L 8 15 Z" /> - <path d="M 9 1 L 10 1 L 10 2 L 9 2 L 9 1 Z" /> - <path d="M 9 2 L 10 2 L 10 3 L 9 3 L 9 2 Z" /> - <path d="M 9 6 L 10 6 L 10 7 L 9 7 L 9 6 Z" /> - <path d="M 9 15 L 10 15 L 10 16 L 9 16 L 9 15 Z" /> - <path d="M 10 2 L 11 2 L 11 3 L 10 3 L 10 2 Z" /> - <path d="M 10 3 L 11 3 L 11 4 L 10 4 L 10 3 Z" /> - <path d="M 10 4 L 11 4 L 11 5 L 10 5 L 10 4 Z" /> - <path d="M 10 5 L 11 5 L 11 6 L 10 6 L 10 5 Z" /> - <path d="M 10 6 L 11 6 L 11 7 L 10 7 L 10 6 Z" /> - <path d="M 11 6 L 12 6 L 12 7 L 11 7 L 11 6 Z" /> - <path d="M 11 8 L 12 8 L 12 9 L 11 9 L 11 8 Z" /> - <path d="M 10 15 L 11 15 L 11 16 L 10 16 L 10 15 Z" /> - <path d="M 11 10 L 12 10 L 12 11 L 11 11 L 11 10 Z" /> - <path d="M 11 12 L 12 12 L 12 13 L 11 13 L 11 12 Z" /> - <path d="M 11 14 L 12 14 L 12 15 L 11 15 L 11 14 Z" /> - <path d="M 11 15 L 12 15 L 12 16 L 11 16 L 11 15 Z" /> - <path d="M 12 6 L 13 6 L 13 7 L 12 7 L 12 6 Z" /> - <path d="M 12 8 L 13 8 L 13 9 L 12 9 L 12 8 Z" /> - <path d="M 12 10 L 13 10 L 13 11 L 12 11 L 12 10 Z" /> - <path d="M 12 12 L 13 12 L 13 13 L 12 13 L 12 12 Z" /> - <path d="M 12 14 L 13 14 L 13 15 L 12 15 L 12 14 Z" /> - <path d="M 13 6 L 14 6 L 14 7 L 13 7 L 13 6 Z" /> - <path d="M 13 8 L 14 8 L 14 9 L 13 9 L 13 8 Z" /> - <path d="M 13 10 L 14 10 L 14 11 L 13 11 L 13 10 Z" /> - <path d="M 13 12 L 14 12 L 14 13 L 13 13 L 13 12 Z" /> - <path d="M 13 13 L 14 13 L 14 14 L 13 14 L 13 13 Z" /> - <path d="M 13 14 L 14 14 L 14 15 L 13 15 L 13 14 Z" /> - <path d="M 14 7 L 15 7 L 15 8 L 14 8 L 14 7 Z" /> - <path d="M 14 8 L 15 8 L 15 9 L 14 9 L 14 8 Z" /> - <path d="M 14 9 L 15 9 L 15 10 L 14 10 L 14 9 Z" /> - <path d="M 14 10 L 15 10 L 15 11 L 14 11 L 14 10 Z" /> - <path d="M 14 11 L 15 11 L 15 12 L 14 12 L 14 11 Z" /> - <path d="M 14 12 L 15 12 L 15 13 L 14 13 L 14 12 Z" /> -</svg> diff --git a/aux/workflow/preamble.md b/aux/workflow/preamble.md deleted file mode 100644 index 30efe0ba..00000000 --- a/aux/workflow/preamble.md +++ /dev/null @@ -1,16 +0,0 @@ -# About - -TODOs for @PROJECT_UC@. - -See also [@TLD@/@PROJECT@/](https://@TLD@/@PROJECT@/) and [CI logs](https://@TLD@/@PROJECT@/ci.html). - -Register a new one at -[~euandreh/@MAILING_LIST@@lists.sr.ht](mailto:~euandreh/@MAILING_LIST@@lists.sr.ht?subject=%5B@PROJECT@%5D%20BUG%20or%20TASK%3A%20%3Cdescription%3E) -and see [existing discussions](https://lists.sr.ht/~euandreh/@MAILING_LIST@?search=%5B@PROJECT@%5D). - -*Vocรช tambรฉm pode escrever em portuguรชs*. - -*Vous pouvez aussi รฉcrire en franรงais*. - -*Vi povas ankaลญ skribi esperante*. - diff --git a/aux/workflow/public.sh b/aux/workflow/public.sh deleted file mode 100755 index 8ecb8553..00000000 --- a/aux/workflow/public.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -set -eu - -PROJECT_UC="$1" -PROJECT="$2" -MAILING_LIST="$3" - -sh aux/workflow/TODOs.sh "$PROJECT_UC" "$PROJECT" "$MAILING_LIST" -sh aux/workflow/commonmark.sh "$PROJECT" README.md index.html ||: - -if [ -f CHANGELOG.md ]; then - sh aux/workflow/commonmark.sh "$PROJECT" CHANGELOG.md -fi - -sh aux/ci/report.sh "$PROJECT" - -cp aux/workflow/favicon.* public/ diff --git a/aux/workflow/sign-tarballs.sh b/aux/workflow/sign-tarballs.sh deleted file mode 100755 index 8de6ac43..00000000 --- a/aux/workflow/sign-tarballs.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -set -eu - -PROJECT="$1" - -SIGNATURES="$(git notes --ref=refs/notes/signatures/tar.gz list | cut -d\ -f2)" -for tag in $(git tag); do - COMMIT="$(git rev-list -n1 "$tag")" - if ! echo "$SIGNATURES" | grep -qF "$COMMIT"; then - echo "Adding missing signature to $tag" >&2 - git notes --ref=refs/notes/signatures/tar.gz add -f -C "$( - git archive --format tar.gz --prefix "$PROJECT-${tag#v}/" "$tag" | - gpg --output - --armor --detach-sign | - git hash-object -w --stdin - )" "$tag" - fi -done diff --git a/aux/workflow/style.css b/aux/workflow/style.css deleted file mode 100644 index d7935d0e..00000000 --- a/aux/workflow/style.css +++ /dev/null @@ -1,46 +0,0 @@ -<style> - hr { - background-color: #ccc; - } - - div.header-anchor { - opacity: 0.5; - } - - span.tag { - font-family: monospace; - font-size: 70%; - background-color: lightgray; - padding: 3px; - border-radius: 5px; - } - - /* - Replicate colors from: - https://git.euandreh.xyz/dotfiles/tree/spacemacs.el?id=fcd9f9c4ef399d45d54927382dc1cdde251ebb0a#n866 - */ - - .TODO { - color: brown; - } - - .DOING { - color: yellowgreen; - } - - .WAITING, .MEETING { - color: gray; - } - - .INACTIVE { - color: orange; - } - - .NEXT { - color: red; - } - - .CANCELLED, .DONE { - color: green; - } -</style> diff --git a/configuration.nix b/configuration.nix deleted file mode 100644 index 99d44aec..00000000 --- a/configuration.nix +++ /dev/null @@ -1,611 +0,0 @@ -{ config, pkgs, ... }: - -# rollback to a previously working channel version, useful -# when "doas nixos-rebuild switch --upgrade" breaks: -# -# $ doas nix-channel --rollback - -let - enable-virtualization = true; - extra-groups = if enable-virtualization then [ "docker" ] else []; - extra-packages = with pkgs; [ - ] ++ (if enable-virtualization then [ gitlab-runner ] else []); - work = { - packages = with pkgs; { - proprietary = [ - slack - zoom-us - openfortivpn - skypeforlinux - chromium - ]; - libre = [ - yubioath-desktop - clojure # =clj= - ]; - }; - config = { - yubioauth-support = true; - }; - }; -in { - imports = [ /etc/nixos/hardware-configuration.nix ]; - - # Use the systemd-boot EFI boot loader. - boot = { - loader = { - efi.canTouchEfiVariables = true; - grub = { - enable = true; - version = 2; - efiSupport = true; - device = "nodev"; - }; - }; - initrd.luks.devices = { - crypted = { - device = "/dev/nvme0n1p2"; - preLVM = true; - }; - }; - }; - - hardware = { - bluetooth.enable = true; - pulseaudio = { - package = pkgs.pulseaudioFull; - enable = true; - extraModules = [ pkgs.pulseaudio-modules-bt ]; - extraConfig = '' - # Switch between headset and headphone mode (e.g. for calls and music) automatically - load-module module-bluetooth-policy auto_switch=2 - # Echo cancellation and noise cleanup of mic - load-module module-echo-cancel aec_method=webrtc - - # https://til.flourishing.stream/2020/05/24/cancelamento-de-ruido-pulseaudio/ - ### Enable Echo/Noise-Cancellation - load-module module-echo-cancel use_master_format=1 aec_method=webrtc aec_args="analog_gain_control=0\ digital_gain_control=1" source_name=echoCancel_source sink_name=echoCancel_sink - set-default-source echoCancel_source - set-default-sink echoCancel_sink - ''; - }; - }; - - networking = { - hostName = "usurpador"; - networkmanager.enable = true; - }; - - console = { - keyMap = "br-abnt2"; - }; - - # Select internationalisation properties. - i18n = { - defaultLocale = "fr_FR.UTF-8"; - }; - - # Set your time zone. - time.timeZone = "America/Sao_Paulo"; - - documentation = { - enable = true; - man.enable = true; - dev.enable = true; - man.generateCaches = true; - nixos.includeAllModules = true; - }; - - environment = { - enableDebugInfo = true; - - systemPackages = let - pkgs-19 = import (fetchTarball - "https://github.com/NixOS/nixpkgs/archive/b0d748e244df6c977b2a1db3873ffdc271e59615.tar.gz") - { }; - pkgs-21 = import (fetchTarball - "https://github.com/NixOS/nixpkgs/archive/e6377ff35544226392b49fa2cf05590f9f0c4b43.tar.gz") - { }; - bmake-with-alias = pkgs.bmake.overrideAttrs (oldAttrs: { - postInstall = '' - ln -s $out/bin/bmake $out/bin/make - ''; - }); - tinycc-with-posix-alias = pkgs.tinycc.overrideAttrs (oldAttrs: { - postInstall = '' - ln -s $out/bin/tcc $out/bin/c99 - ''; - }); - timidity-with-more-formats = pkgs.timidity.overrideAttrs (oldAttrs: { - configureFlags = oldAttrs.configureFlags ++ [ "--enable-audio=vorbis,flac" ]; - buildInputs = oldAttrs.buildInputs ++ (with pkgs; [ libogg libvorbis flac ]); - }); - mktorrent-latest = pkgs.mktorrent.overrideAttrs (oldAttrs: rec { - version = "de7d011b35458de1472665f50b96c9cf6c303f39"; - src = pkgs.fetchFromGitHub { - owner = "Rudde"; - repo = "mktorrent"; - rev = version; - sha256 = "1gsky1ijxrfsw07lvfjw4annjkdfpmnp8nnddi1wakbzqn6v5dwq"; - }; - }); - - in with pkgs; - [ - vagrant - - ## Documentation - posix_man_pages - scheme-manpages - - ## DVCS - mr - fossil - mercurial - cvs - pkgs-19.bitkeeper - pkgs-19.packer - gitAndTools.gitFull - gitAndTools.gitRemoteGcrypt - gitAndTools.git-open - - ## Personal data tools - borgbackup - pass - gnupg - pinentry_gtk2 - - ## CLI tools - groff - mktorrent-latest - pkgs-21.diffoscope - diffoscope - bash-completion - nix-bash-completions - youtube-dl - wget - tmux - sox # =play=, SoX - Sound eXchange - gettext - perlPackages.Po4a - rlwrap - jq - rq - openvpn - xclip - psmisc # =killall= - tree - feh - qrencode - bind # =dig= - rsync - moreutils # =vipe=, =sponge=, errno - graphviz # =dot= and others - mkpasswd - direnv - recutils - sqlite - trash-cli - entr - mailutils - ffmpeg-full - ledger - gnuplot - ranger - electrum - zathura - st - pavucontrol - newsboat - acpi - xsel - nixfmt - nvi - fzf - calcurse - pandoc - cloc - inetutils # telnet - lsof - lsscsi - gotop - imagemagick - enscript - tcl - python3 - unzip - - ## System utilities - pmutils - btrfs-progs - - ## Mail - isync - notmuch - afew - # alot FIXME - pkgs-21.alot - w3m - urlscan - md4c - docutils - timidity-with-more-formats - - ## Conversations - # gomuks - weechat - # poezio - - ## Programming tools - perl - shellcheck - gcc - musl.dev - clang - clang-tools - valgrind - gdb - sbcl - nodejs_latest - quickjs - deno - lilypond - ghostscript - pdftk - guile_3_0 - - ## POSIX - bmake-with-alias - byacc - bc - lzip - gnugrep - file - ed - tinycc-with-posix-alias - m4 - bintools-unwrapped - units - - ## Containers and VMs - qemu - expect - - ## xmonad - xorg.xmodmap - xorg.xmessage - dmenu - escrotum - xorg.xbacklight - playerctl - lightdm - fvwm # =xpmroot= - haskellPackages.xmobar - arandr - alsaUtils # for xmonad volume commands - yad - amfora - cmus # remove it, use just mpv? - mutagen - - ## EuAndreh overlay - # xyz-euandreh.remembering-latest - # xyz-euandreh.git-permalink-latest - # xyz-euandreh.autoqemu-latest - - ## GUI programs - # frescobaldi broken - inkscape - # dino - fractal - poedit - audacity - zbar - (mpv-with-scripts.override { - scripts = with mpvScripts; [ mpris sponsorblock ]; - }) - firefox - libreoffice - - ## Candidates to be replaced by alternatives - transmission-gtk # https://github.com/btpd/btpd - tdesktop # telegram -> gomuks - whatsapp-for-linux - ] ++ work.packages.libre ++ work.packages.proprietary ++ extra-packages; - - etc = { - "with-email.sh".text = '' - #!/bin/sh - set -u - . ~/.bashrc - - while getopts 's:' flag; do - case "$flag" in - s) - SUBJECT="$OPTARG" - ;; - *) - exit 2 - ;; - esac - done - shift $((OPTIND - 1)) - - now() { - date '+%Y-%m-%dT%H:%M:%S%Z' - } - - OUT="$(echo 'mkstemp(template)' | m4 -D template="${"\${TMPDIR:-/tmp}"}/m4-tmpname.")" - printf 'Running command: %s\nStarting at: %s\n\n' "$*" "$(now)" >> "$OUT" - (sh -c "$@" 2>&1) >> "$OUT" - STATUS="$?" - printf '\nFinished at: %s\n' "$(now)" >> "$OUT" - - mail \ - -a 'Content-Type: text/plain; charset=UTF-8' \ - -a 'From:cron@euandre.org' \ - -s " (exit status: $STATUS) - ${"\${SUBJECT:-NO SUBJECT}"}" \ - eu@euandre.org < "$OUT" - ''; - }; - }; - - nixpkgs = let allow-unfree = builtins.length work.packages.proprietary > 0; - in { - config = { - android_sdk.accept_license = allow-unfree; - allowUnfree = allow-unfree; - }; - overlays = let - use-local = false; - euandreh-nixpkgs = import (if use-local then - ../package-repository/default.nix - else - fetchTarball { - url = - "https://euandreh.xyz/package-repository.git/snapshot/package-repository-main.tar.gz"; - }) { inherit pkgs; }; - in [ euandreh-nixpkgs ]; - }; - - # Look at - # https://www.vivaolinux.com.br/topico/Off-Code-Cafe/Me-apresente-sua-distro - - programs = { - bash.enableCompletion = true; - autojump.enable = true; - msmtp = { - enable = true; - extraConfig = '' - defaults - auth on - tls on - port 587 - syslog on - - account euandreh - host box.euandre.org - from eu@euandre.org - user eu@euandre.org - # msmtp in cron's MAILTO environment doesn't include PASSWORD_STORE_DIR - passwordeval pass show Mail-in-a-Box - - account euandrehxyz - host mail.euandreh.xyz - from eu@euandreh.xyz - user eu@euandreh.xyz - passwordeval pass show VPS/kuvira/mail - - account euandreharrobaponto - host mail.arrobaponto.org - from euandreh@arrobaponto.org - user euandreh@arrobaponto.org - passwordeval pass show VPS/toph/mail - - account nubank - host smtp.gmail.com - from andre.moreira@nubank.com.br - user andre.moreira@nubank.com.br - passwordeval pass show andre.moreira@nubank.com.br - - account default : euandreh - ''; - }; - }; - - services = { - # required by vagrant+libvirt - nfs.server.enable = enable-virtualization; - - # Required for local network printer - avahi = { - enable = true; - nssmdns = true; - }; - - printing = { - enable = false; - drivers = let - epson-201401w = with pkgs; - stdenv.mkDerivation rec { - v = "201401w"; - pname = "epson-${v}"; - version = "1.0.0"; - - src = fetchurl { - urls = [ - "https://download.ebz.epson.net/dsc/op/stable/SRPMS/epson-inkjet-printer-${v}-${version}-1lsb3.2.src.rpm" - "https://download3.ebz.epson.net/dsc/f/03/00/03/45/41/92e9c9254f0ee4230a069545ba27ec2858a2c457/epson-inkjet-printer-201401w-1.0.0-1lsb3.2.src.rpm" - ]; - sha256 = "0c60m1sd59s4sda38dc5nniwa7dh1b0kv1maajr0x9d38gqlyk3x"; - }; - - nativeBuildInputs = [ rpmextract autoreconfHook file ]; - - buildInputs = [ libjpeg cups ]; - - unpackPhase = '' - rpmextract $src - tar -zxf epson-inkjet-printer-${v}-${version}.tar.gz - tar -zxf epson-inkjet-printer-filter-${version}.tar.gz - for ppd in epson-inkjet-printer-${v}-${version}/ppds/*; do - substituteInPlace $ppd --replace "/opt/epson-inkjet-printer-${v}" "$out" - substituteInPlace $ppd --replace "/cups/lib" "/lib/cups" - done - cd epson-inkjet-printer-filter-${version} - ''; - - postInstall = '' - cd ../epson-inkjet-printer-${v}-${version} - cp -a lib64 resource watermark $out - mkdir -p $out/share/cups/model/epson-inkjet-printer-${v} - cp -a ppds $out/share/cups/model/epson-inkjet-printer-${v}/ - cp -a Manual.txt $out/doc/ - cp -a README $out/doc/README.driver - ''; - }; - in [ - epson-201401w - ]; - }; - - cron = { - enable = true; - # Keep this so that when the "mail" command fails I also get a notification email - mailto = "eu@euandre.org"; - systemCronJobs = [ - "40 23 * * * root sh /etc/with-email.sh -s '[CRON] usurpador: guix upgrade' -- 'guix pull && guix package -u && systemctl restart guix-daemon.service'" - "40 22 * * * andreh sh /etc/with-email.sh -s '[CRON] usurpador: guix upgrade' -- 'guix pull && guix package -u'" - "0 22 * * * andreh sh /etc/with-email.sh -s '[CRON] usurpador: guix deploy' -- 'guix deploy -L ~/dev/libre/servers/src/lib ~/dev/libre/servers/src/machines.scm'" - "10 22 * * * andreh sh /etc/with-email.sh -s '[CRON] usurpador: mr update' -- 'mr -s safeupdate'" - "20 */6 * * * andreh sh /etc/with-email.sh -s '[CRON] usurpador: email flush' -- 'msmtp-queue -r'" - "30 */6 * * * andreh sh /etc/with-email.sh -s '[CRON] usurpador: email sync' -- 'mbsync -a && notmuch new'" - "50 22 * * * andreh sh /etc/with-email.sh -s '[CRON] usurpador: borg backup' -- '~/dev/libre/dotfiles/src/bin/backup'" - ]; - }; - - xserver = { - enable = true; - layout = "br"; - xkbOptions = "caps:swapescape"; - - # Touchpad support - libinput.enable = true; - - config = '' - Section "Device" - Identifier "Intel Graphics" - Driver "intel01" - Option "Backlight" "intel_backlight" - EndSection - ''; - - windowManager.xmonad = { - enable = true; - enableContribAndExtras = true; - }; - displayManager = { - defaultSession = "none+xmonad"; - - lightdm.enable = true; - - # The config inception was inspired by: - # http://ubuntuforum-br.org/index.php?topic=13784.0 - # Lambda symbol name taken from: - # http://wiki.linuxquestions.org/wiki/List_of_Keysyms_Recognised_by_Xmodmap - # To test a keycode: - # xmodmap -e 'keycode 118 = bar Greek_lamda' - sessionCommands = '' - ${pkgs.fvwm}/bin/xpmroot ~/annex/docs/emotion.png & - ''; - }; - }; - - clipmenu.enable = true; - blueman.enable = true; - pcscd.enable = work.config.yubioauth-support; - }; - - security = { - sudo.enable = false; - doas = { - enable = true; - extraConfig = '' - permit persist setenv { NIX_PATH } :wheel - ''; - }; - }; - - users = { - extraUsers = let - andrehUser = { - andreh = { - isNormalUser = true; - uid = 1000; - description = "EuAndreh"; - extraGroups = [ "wheel" "networkmanager" "libvirtd" ] ++ extra-groups ; - }; - }; - # From the Guix manual: - # https://www.gnu.org/software/guix/manual/en/html_node/Build-Environment-Setup.html#Build-Environment-Setup - buildUser = (i: { - "guixbuilder${i}" = { # guixbuilder$i - group = "guixbuild"; # -g guixbuild - extraGroups = [ "guixbuild" ]; # -G guixbuild - home = "/var/empty"; # -d /var/empty - shell = pkgs.shadow; # -s `which nologin` - description = "Guix build user ${i}"; # -c "Guix buid user $i" - isSystemUser = true; # --system - }; - }); - # merge all users - in pkgs.lib.fold (str: acc: acc // buildUser str) andrehUser - # for i in `seq -w 1 10` - (map (pkgs.lib.fixedWidthNumber 2) (builtins.genList (n: n + 1) 10)); - - extraGroups.guixbuild = { name = "guixbuild"; }; - }; - - systemd = { - services = { - # Derived from Guix guix-daemon.service.in - # https://git.savannah.gnu.org/cgit/guix.git/tree/etc/guix-daemon.service.in?id=00c86a888488b16ce30634d3a3a9d871ed6734a2 - guix-daemon = { - enable = true; - description = "Build daemon for GNU Guix"; - serviceConfig = { - ExecStart = - "/var/guix/profiles/per-user/root/current-guix/bin/guix-daemon --build-users-group=guixbuild"; - }; - wantedBy = [ "multi-user.target" ]; - }; - }; - user.services = { - mpris-proxy = { - enable = true; - description = "Mpris proxy, added to support bluetooth media keys"; - serviceConfig = { - After = [ "network.target" "sound.target" ]; - ExecStart = "${pkgs.bluez}/bin/mpris-proxy"; - WantedBy = [ "default.target" ]; - }; - }; - }; - }; - - system = { - stateVersion = "20.03"; - autoUpgrade = { - enable = true; - dates = "0:10"; - }; - }; - - xdg.portal = { - enable = true; - extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; - }; - - virtualisation.libvirtd.enable = enable-virtualization; - virtualisation.docker.enable = enable-virtualization; -} diff --git a/description b/description deleted file mode 100644 index e5ca504a..00000000 --- a/description +++ /dev/null @@ -1 +0,0 @@ -Personal OS configuration files. diff --git a/infokey b/infokey deleted file mode 100644 index 90edc508..00000000 --- a/infokey +++ /dev/null @@ -1,7 +0,0 @@ -^e down-line -^y up-line - -#var -link-style=cyan -active-link-style=blue,bold -match-style=underline,bold,bggreen diff --git a/long-description b/long-description deleted file mode 100644 index 3dfc42e0..00000000 --- a/long-description +++ /dev/null @@ -1,2 +0,0 @@ -Repository with OS configuration files, including the support files that are -automatically generated for other repositories. diff --git a/mailcap.conf b/mailcap.conf deleted file mode 100644 index aeea68d6..00000000 --- a/mailcap.conf +++ /dev/null @@ -1 +0,0 @@ -text/html; w3m -dump -o document_charset=%{charset} '%s'; nametemplate=%s.html; copiousoutput diff --git a/npmrc.sh b/npmrc.sh deleted file mode 100644 index 0bc6ecba..00000000 --- a/npmrc.sh +++ /dev/null @@ -1,5 +0,0 @@ -# shellcheck disable=2148 disable=2034 -prefix=/home/andreh/.npm-packages -# Taken from: -# http://www.tomsquest.com/blog/2018/10/better-npm-ing/ -save-exact=true diff --git a/os.scm b/os.scm deleted file mode 100644 index 972c42d4..00000000 --- a/os.scm +++ /dev/null @@ -1,181 +0,0 @@ -(use-modules (gnu) - (srfi srfi-1)) -(use-service-modules desktop networking ssh xorg) - -(operating-system - (locale "en_US.utf8") - (timezone "America/Sao_Paulo") - (keyboard-layout (keyboard-layout "br" #:options '("caps:swapescape" "esperanto:qwerty"))) - (host-name "velhinho-guix-system") - (users (cons* (user-account - (name "andreh") - (comment "andreh") - (group "users") - (home-directory "/home/andreh") - (supplementary-groups - '("wheel" "netdev" "audio" "video"))) - %base-user-accounts)) - (packages - (append - (list (package-inputs guix)) - (map (compose list specification->package+output symbol->string) - '(;; Base - nss-certs ;; suggested by Guix - - ;; Personal data tools - git - git:send-email - git-lfs - git-annex - myrepos - git-remote-gcrypt - git-crypt - fossil - git-open - borg - gnupg - syncthing - - ;; CLI tools - groff - mktorrent - diffoscope - bash-completion - youtube-dl - ;;; wget - both already included? - ;;; curl - tmux - ;; tmuxinator - sox ; SoX - Sound eXchange - gettext - rlwrap - jq - ;; rq - openvpn - xclip - psmisc ; killall - xkill - ;; gksu - tree - unzip - feh - bind:utils - rsync - moreutils - graphviz - ;; graph-easy - ;; mkpasswd, is this required? - direnv - recutils - sqlite - trash-cli - entr ; need patch - mailutils - ffmpeg - ledger - gnuplot - ranger - electrum - zathura - ;; zathura-ps - ;; zathura-pdf-poppler - ;; zathura-djvu - ;; zathura-cb - ;; zathura-pdf-mupdf - st - pavucontrol - weechat - newsboat - acpi - xsel - pinentry - nvi - go-github-com-junegunn-fzf - autojump - calcurse - pandoc - openssh - festival ;; TTS software - - ;; Mail - notmuch - isync - neomutt - - ;; Programming tools - perl - shellcheck - ;; mrsh - dash - - ;; POSIX - ;; bmake - ;; byacc - ;; pax - flex - ;;; gnugrep - already included? - - ;; Containers and VMs - qemu - - ;; xmonad - xmodmap - xmessage - dmenu - ;; escrotum - xbacklight - playerctl - ;; lightdm - fvwm ; xpmroot - xmonad - ghc - ghc-xmonad-contrib - xmobar - remembering - arandr - alsa-utils ; for xmonad volume controls - xset - xmodmap - setxkbmap - - ;; GUI programs - audacity - zbar - ;; fractal - dino - calibre - vlc - gpodder - qutebrowser - blueman - bluez)) - %base-packages)) - (services - (append - (list (service gnome-desktop-service-type) - (set-xorg-configuration - (xorg-configuration - (keyboard-layout keyboard-layout)))) - %desktop-services)) - (bootloader - (bootloader-configuration - (bootloader grub-efi-bootloader) - (target "/boot/efi") - (keyboard-layout keyboard-layout))) - (mapped-devices - (list (mapped-device - (source - (uuid "67a25dfa-ed48-4466-89f3-e291365df104")) - (target "cryptroot") - (type luks-device-mapping)))) - (file-systems - (cons* (file-system - (mount-point "/") - (device "/dev/mapper/cryptroot") - (type "btrfs") - (dependencies mapped-devices)) - (file-system - (mount-point "/boot/efi") - (device (uuid "1B26-9F4E" 'fat32)) - (type "vfat")) - %base-file-systems))) diff --git a/sbclrc.lisp b/sbclrc.lisp deleted file mode 100644 index df7f57a6..00000000 --- a/sbclrc.lisp +++ /dev/null @@ -1,6 +0,0 @@ -;;; The following lines added by ql:add-to-init-file: -#-quicklisp -(let ((quicklisp-init (merge-pathnames "dev/quicklisp/setup.lisp" - (user-homedir-pathname)))) - (when (probe-file quicklisp-init) - (load quicklisp-init))) diff --git a/sh/Positive.ogg b/sh/Positive.ogg Binary files differdeleted file mode 100644 index 22cb5632..00000000 --- a/sh/Positive.ogg +++ /dev/null diff --git a/sh/agents.sh b/sh/agents.sh deleted file mode 100644 index f392c861..00000000 --- a/sh/agents.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) -GPG_TTY=$(tty) -export GPG_TTY SSH_AUTH_SOCK -gpgconf --launch gpg-agent -mkdir -p ~/.ssh -gpg --export-ssh-key eu@euandre.org > ~/.ssh/id_rsa.pub -chmod 600 ~/.ssh/id_rsa.pub - -eval "$(direnv hook bash)" diff --git a/sh/aliases.sh b/sh/aliases.sh deleted file mode 100644 index 79e4bcf6..00000000 --- a/sh/aliases.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2139 - -unalias -a - -alias r='reload' -alias rr='rreload' -alias rrr='rrreload' -alias p='ping euandre.org -c 3' -alias l='ls -lahF --color' -alias c='tmux send-keys -R \; clear-history' -alias o='open' -alias mail='mail -a "Content-Type: text/plain; charset=UTF-8" -aFrom:eu@euandre.org' - -alias m='mbsync EuAndreh & mbsync EuAndrehXYZ & mbsync Nubank & wait && notmuch new' -alias mm='msmtp-queue -r' - -alias mk='make clean && make dev-check' -alias wmk='aux/with-container "make clean && make dev-check"' -alias tt='mk && wmk' -alias todos='make public && open public/TODOs.html' -alias valgrind='valgrind --show-error-list=yes --show-leak-kinds=all --leak-check=full --track-origins=yes --error-exitcode=1' - -alias grep='grep --color=auto' -alias diff='diff --color=auto' -alias make='make -e' -alias less='less -R' -alias watch='watch --color ' -alias sbcl='rlwrap sbcl' -alias sqlite='rlwrap sqlite3' -alias guile='rlwrap guile' - -alias man='MANWIDTH=$((COLUMNS > 80 ? 80 : COLUMNS)) man' diff --git a/sh/bash-config.sh b/sh/bash-config.sh deleted file mode 100644 index dbfdb888..00000000 --- a/sh/bash-config.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env bash - -# ~/.bashrc: executed by bash(1) for non-login shells. - -# derived from Ubuntu's default .bashrc - - -# If not running interactively, don't do anything -case $- in - *i*) ;; - *) return;; -esac - -# Don't put duplicate linesin the history. -# Don't store commands that start with an empty space. -# See bash(1) for more options -HISTCONTROL=ignoreboth - -# append to the history file, don't overwrite it -shopt -s histappend - -# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) -HISTSIZE=1000000 -HISTFILESIZE=2000000 - -# check the window size after each command and, if necessary, -# update the values of LINES and COLUMNS. -shopt -s checkwinsize - -# If set, the pattern "**" used in a pathname expansion context will -# match all files and zero or more directories and subdirectories. -shopt -s globstar - -# If set, the pattern "*" will also match dotfiles. -shopt -s dotglob - -stty -ixon - - -# Taken from: -# https://sanctum.geek.nz/arabesque/better-bash-history/ - -# Record timestamps -# If you set $HISTTIMEFORMAT to something useful, Bash will record the timestamp of each command in its history. In this variable you can specify the format in which you want this timestamp displayed when viewed with history. I find the full date and time to be useful, because it can be sorted easily and works well with tools like cut and awk. -HISTTIMEFORMAT='%F %T ' - -# Use one command per line -# To make your .bash_history file a little easier to parse, you can force commands that you entered on more than one line to be adjusted to fit on only one with the cmdhist option: -shopt -s cmdhist - -# Store history immediately -# By default, Bash only records a session to the .bash_history file on disk when the session terminates. This means that if you crash or your session terminates improperly, you lose the history up to that point. You can fix this by recording each line of history as you issue it, through the $PROMPT_COMMAND variable: -PROMPT_COMMAND='history -a' - -bind -x '"\e\C-l": c' - -complete -cf doas diff --git a/sh/bash_profile.sh b/sh/bash_profile.sh deleted file mode 100644 index 805ae1c4..00000000 --- a/sh/bash_profile.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -# shellcheck disable=SC1090 -. ~/dev/libre/dotfiles/sh/bashrc.sh diff --git a/sh/bashrc.sh b/sh/bashrc.sh deleted file mode 100644 index c8928ca0..00000000 --- a/sh/bashrc.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC1090 disable=SC1091 - -export DOTFILES=~/dev/libre/dotfiles - -. $DOTFILES/sh/bash-config.sh -. $DOTFILES/sh/env.sh -. $DOTFILES/sh/colors.sh -. $DOTFILES/sh/ps1.sh -. $DOTFILES/sh/fzf.sh -. $DOTFILES/sh/aliases.sh -. $DOTFILES/sh/util.sh -. $DOTFILES/sh/agents.sh -. $DOTFILES/sh/symlinks.sh -. $DOTFILES/sh/vcs.sh -. ~/annex/bin/misc/priv.sh -. ~/.nurc diff --git a/sh/colors.sh b/sh/colors.sh deleted file mode 100644 index 7c8cb3e9..00000000 --- a/sh/colors.sh +++ /dev/null @@ -1,115 +0,0 @@ -#!/bin/sh -# shellcheck disable=2059 - -export end="\033[0m" -export black="\033[0;30m" -export blackb="\033[1;30m" -export white="\033[0;37m" -export whiteb="\033[1;37m" -export red="\033[0;31m" -export redb="\033[1;31m" -export green="\033[0;32m" -export greenb="\033[1;32m" -export yellow="\033[0;33m" -export yellowb="\033[1;33m" -export blue="\033[0;34m" -export blueb="\033[1;34m" -export purple="\033[0;35m" -export purpleb="\033[1;35m" -export lightblue="\033[0;36m" -export lightblueb="\033[1;36m" -export blacki="\033[0;90m" -export bluei="\033[0;94m" - -black() { - printf "${black}${1}${end}" -} - -blackb() { - printf "${blackb}${1}${end}" -} - -blacki() { - printf "${blacki}${1}${end}" -} - -white() { - printf "${white}${1}${end}" -} - -whiteb() { - printf "${whiteb}${1}${end}" -} - -red() { - printf "${red}${1}${end}" -} - -redb() { - printf "${redb}${1}${end}" -} - -green() { - printf "${green}${1}${end}" -} - -greenb() { - printf "${greenb}${1}${end}" -} - -yellow() { - printf "${yellow}${1}${end}" -} - -yellowb() { - printf "${yellowb}${1}${end}" -} - -blue() { - printf "${blue}${1}${end}" -} - -blueb() { - printf "${blueb}${1}${end}" -} - -bluei() { - printf "${bluei}${1}${end}" -} - -purple() { - printf "${purple}${1}${end}" -} - -purpleb() { - printf "${purpleb}${1}${end}" -} - -lightblue() { - printf "${lightblue}${1}${end}" -} - -lightblueb() { - printf "${lightblueb}${1}${end}" -} - -colors() { - black "black" - blackb "blackb" - white "white" - whiteb "whiteb" - red "red" - redb "redb" - green "green" - greenb "greenb" - yellow "yellow" - yellowb "yellowb" - blue "blue" - blueb "blueb" - purple "purple" - purpleb "purpleb" - lightblue "lightblue" - lightblueb "lightblueb" - blacki "blacki" - bluei "bluei" -} diff --git a/sh/env.sh b/sh/env.sh deleted file mode 100644 index 5e49d62e..00000000 --- a/sh/env.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -export EDITOR=vi -export VISUAL="$EDITOR" -export BROWSER=firefox -export INPUTRC="$HOME/.config/bash/inputrc" -export RLWRAP_HOME="$HOME/.cache/rlwrap" - -export BORG_REMOTE_PATH='borg1' -export BORG_PASSCOMMAND='pass show Usurpador/borg/passphrase' - -export GOPATH="$HOME/dev/go" -export CFLAGS='-std=c99 -Wall -Wextra -Wpedantic -g -flto -Werror' -export CC=musl-gcc -export AR=gcc-ar -export LEX=flex -export LDFLAGS='-flto' -MAKEFLAGS="-j$(nproc)" -export MAKEFLAGS -export NIXPREFIX='/run/current-system/sw' -export PREFIX="$HOME/.p" -export C_INCLUDE_PATH="$PREFIX/include:$NIXPREFIX/include/:${C_INCLUDE_PATH:-}" -export LIBRARY_PATH="$PREFIX/lib:$NIXPREFIX/lib/:${LIBRARY_PATH:-}" -export INFOPATH="$PREFIX/share/info:$HOME/.config/guix/current/share/info:$INFOPATH" -export MANPATH="$PREFIX/share/man:$(manpath -q)" -export LISP='sbcl --eval' - -export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale" -. ~/.guix-profile/etc/profile -GUIX_PROFILE= . ~/.config/guix/current/etc/profile - -PATH="$HOME/.p/bin:$HOME/.local/bin:$HOME/tmp/bin:$HOME/dev/libre/website/bin:$HOME/dev/others/dinheiros:$DOTFILES/src/bin:$HOME/dev/libre/eutils/src/impls/sh:$DOTFILES/xmonad/scripts:$DOTFILES/cron:$DOTFILES/cron/generated:$HOME/annex/bin/scripts:$PATH" diff --git a/sh/fake-symlinks.sh b/sh/fake-symlinks.sh deleted file mode 100644 index 06b9fe96..00000000 --- a/sh/fake-symlinks.sh +++ /dev/null @@ -1,354 +0,0 @@ -#!/usr/bin/env bash - -pushd "$DOTFILES/sh/templates/" &>/dev/null || exit 1 - -mkdir -p "$DOTFILES/cron/generated/" -for job in report-summary annex run-local-backup copy-box-backups repo-update mbox-archive mr-remotes-backup; do - sed "s/__JOB__/$job/" cronjob-with-email.sh > "$HOME/dev/libre/dotfiles/cron/generated/job-$job.sh" - chmod +x "$HOME/dev/libre/dotfiles/cron/$job.sh" - chmod +x "$HOME/dev/libre/dotfiles/cron/generated/job-$job.sh" -done - -mkdir -p "$HOME/annex/bin/cron/generated/" -# shellcheck disable=2043 -for job in pacheco; do - prefix="$HOME/annex/bin/cron" - sed "s/job-__JOB__/job-$job/" cronjob-with-email.sh | sed "s|.*__JOB__.*|$prefix/$job.sh|" > "$HOME/annex/bin/cron/generated/job-$job.sh" - chmod +x "$HOME/annex/bin/cron/$job.sh" - chmod +x "$HOME/annex/bin/cron/generated/job-$job.sh" -done - -cp ~/dev/libre/package-repository/EuAndreh.key ~/dev/libre/website/public-key.txt - -mkdir -p ~/archive/torrent/ -find ~/dev/libre/website/ -type f -name '*.torrent' -exec cp {} ~/archive/torrent/ \; - -normalize_name() { - if [ -n "$RENAME_TO" ]; then - echo "$RENAME_TO" - elif [[ "$1" = ..* ]]; then - echo "${1:1}" - else - echo "$1" - fi -} - -cp_all() { - for f in "$@"; do - OUT="$PPREFIX/$(normalize_name "$f")" - mkdir -p "$(dirname "$OUT")" - cp "$f" "$OUT" - done -} - -cp_if_not() { - for f in "$@"; do - OUT="$PPREFIX/$(normalize_name "$f")" - if [ ! -f "$OUT" ]; then - cp_all "$f" - fi - done -} - -cp_if() { - for f in "$@"; do - OUT="$PPREFIX/$(normalize_name "$f")" - if [ -f "$OUT" ]; then - rm -f "$OUT" - cp_all "$f" - fi - done -} - -sed_all() { - for f in "$@"; do - OUT="$PPREFIX/$(normalize_name "$f")" - mkdir -p "$(dirname "$OUT")" - - if [ -n "$ENABLE_CI" ]; then - ENABLE_CI_SCRIPT='s/__ENABLE_CI__ //g' - if [ -n "$ENABLE_AUTOTOOLS" ]; then - TLD_SCRIPT='' - else - TLD_SCRIPT="$DEFAULT_TLD_SCRIPT" - fi - else - ENABLE_CI_SCRIPT='/__ENABLE_CI__ /d' - TLD_SCRIPT="$DEFAULT_TLD_SCRIPT" - fi - - sed "$f" \ - -e "s/__PROJECT_UC__/$PROJECT_UC/g" \ - -e "s/__PROJECT__/$PROJECT/g" \ - -e "s/__MAILING_LIST__/$MAILING_LIST/g" \ - -e "$TLD_SCRIPT" \ - -e "$ENABLE_CI_SCRIPT" \ - -e "$ENABLE_AUTOTOOLS_SCRIPT" \ - > "$OUT" - - if [ -n "$EXECUTABLE" ]; then - chmod +x "$OUT" - fi - done -} - -sed_if_not() { - for f in "$@"; do - OUT="$PPREFIX/$(normalize_name "$f")" - if [ ! -f "$OUT" ]; then - sed_all "$f" - fi - done -} - -ln_env() { - export PROJECT="$1" - export PPREFIX="${PPREFIX_FOR_PROJECT[$PROJECT]:-$HOME/dev/libre/$PROJECT}" - export MAILING_LIST="${ML_FOR_PROJECT[$PROJECT]:-public-inbox}" - export PROJECT_UC="${PROJECT_NAMES[$PROJECT]:-$PROJECT}" - - if [ -f "$PPREFIX/Makefile" ] && [ "$PROJECT" != website ]; then - export ENABLE_CI=1 - else - export ENABLE_CI= - fi - - if [ -n "${GUILE_PROJECTS[$PROJECT]}" ]; then - ENABLE_GUILE=1 - else - ENABLE_GUILE= - fi -} - -ln_init() { - if ! grep -q "$PROJECT" ~/annex/bin/misc/git/mrconfig.ini; then - red "$(printf '%s missing from mrconfig.ini!\n' "$PROJECT")\n" - fi - - if [ ! -d "$PPREFIX" ]; then - git init "$PPREFIX" - fi - cp_if_not description long-description ..gitignore -} - -ln_build_aux() { - cp_all aux/assert-shellcheck.sh \ - aux/tld.txt \ - aux/workflow/assert-todos.sh \ - aux/workflow/assert-changelog.sh \ - aux/workflow/assert-readme.sh \ - aux/workflow/TODOs.sh \ - aux/workflow/style.css \ - aux/workflow/favicon.html \ - aux/workflow/preamble.md \ - aux/workflow/commonmark.sh \ - aux/workflow/dist.sh \ - aux/workflow/sign-tarballs.sh \ - aux/workflow/public.sh \ - aux/workflow/favicon.svg \ - aux/workflow/favicon.png - - cp_if_not TODOs.md - - cp_if \ - aux/assert-perltidy.sh - aux/tests-lib.sh -} - -ln_agpl() { - cp_all COPYING -} - -ln_guix_files() { - cp_all aux/guix/with-container.sh \ - aux/assert-shellcheck.sh - cp_if_not aux/guix/manifest.scm \ - aux/guix/pinned-channels.scm -} - -ln_ci() { - rm -f "$PPREFIX/.git/hooks/pre-push" - if [ -n "$ENABLE_CI" ]; then - EXECUTABLE=1 sed_all aux/ci/git-pre-push.sh - cp_all aux/assert-shellcheck.sh \ - aux/tld.txt \ - aux/ci/ci-build.sh \ - aux/ci/report.sh \ - aux/ci/git-post-receive.sh - ln -s "$PPREFIX/aux/ci/git-pre-push.sh" "$PPREFIX/.git/hooks/pre-push" - else - EXECUTABLE=1 sed_all ..git/hooks/pre-push - fi -} - -ln_simple_makefile() { - sed_if_not Makefile -} - -enforce_uniform_manpages() { - if [ -d "$PPREFIX/doc" ]; then - for f in $(find "$PPREFIX/doc" -type f -name '*.[0-9]'); do - if grep -Eq '^\.SH AUTHORS$' "$f"; then - EXPECTED="$(cat <<EOF -. -. -.SH AUTHORS -.P -EuAndreh -.MT eu@euandre.org -.ME -and contributors. -. -. -.SH BUGS -Report bugs to: -.MT ~euandreh/$MAILING_LIST@lists.sr.ht -.ME -.br -Browse bugs at: -.UR https://$PROJECT.euandreh.xyz/TODOs.html -.UE -.br -Home page: -.UR https://$PROJECT.euandreh.xyz -.UE -.br -Discussions: -.UR https://lists.sr.ht/~euandreh/$MAILING_LIST?search=[$PROJECT] -.UE -EOF -)" - if ! diff <(tail -n "$(wc -l <<< "$EXPECTED")" "$f") <(echo "$EXPECTED"); then - cat "$f" <(echo "$EXPECTED") | sponge "$f" - echo "$f" - fi - fi - done - fi -} - -ln_makefile_only_project() { - ln_env "$1" - ln_init - ln_agpl - ln_ci - ln_simple_makefile - enforce_uniform_manpages -} - -ln_makefile_only_guix_project() { - ln_makefile_only_project "$1" - ln_guix_files - ln_build_aux -} - -ln_bare_project() { - ln_env "$1" - ln_agpl - ln_ci -} - -ln_description_foreign_project() { - ln_env "$1" - # Foreign projects may have Makefiles and alike, and I don't want - # to have CI files copied to the repository - ENABLE_CI= - ln_ci -} - -declare -A PROJECT_NAMES=( - [servers]=Servers - [cement]=Cement - [songbooks]=Songbooks - [mediator]=Mediator - [byopds]=BYOPDS - [pires]=Pires -) - -declare -A ML_FOR_PROJECT=( - [cement]=byopds - [byopds]=byopds - [guile-pds]=byopds - [x-bindgen]=mediator - [mediator]=mediator - [libedn]=mediator - [konformigado]=mediator - [gluilo]=mediator - [fallible]=mediator - [eq]=mediator - [xq]=mediator - [songbooks]=songbooks - [pires]=pires -) - -declare -A PPREFIX_FOR_PROJECT=( - [guix]="$HOME/dev/guix/guix" -) - -declare -A GUILE_PROJECTS=( - [guile-quickcheck]=1 - [guile-pds]=1 - [songbooks]=1 -) - -ln_all() { - LN_FN="$1" - shift - for f in "$@"; do - "$LN_FN" "$f" - done -} - -ln_all ln_description_foreign_project guix \ - apollo-server-demo \ - ml-archives \ - 3rd-party-archives -ln_all ln_makefile_only_project boneco \ - pdfs-da-d-maria -ln_all ln_makefile_only_guix_project servers \ - pires \ - remembering \ - website \ - dotfiles \ - gluilo \ - konformigado \ - libedn \ - eq \ - xq \ - fallible \ - standardify \ - autoqemu \ - yoctoauth \ - mediator \ - songbooks \ - cement \ - guile-quickcheck \ - guile-pds \ - byopds \ - discussions-site \ - package-repository \ - paku \ - std-tools \ - gistatic \ - listatic \ - cl-fun \ - git-permalink \ - lisp-cli \ - caju \ - libpds \ - libmustache \ - libjson \ - yoctoparsec \ - sys-langs \ - r2h \ - book-queue \ - makecheck -ln_all ln_bare_project brinquedoteca \ - casa-do-caminho \ - music \ - swift2nix \ - swift2nix-demo \ - cargo2nix \ - cargo2nix-demo - -popd &> /dev/null || exit 1 diff --git a/sh/fzf.sh b/sh/fzf.sh deleted file mode 100644 index 529e0ee4..00000000 --- a/sh/fzf.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/sh - -# FIXME: fix "history" commands - -# shellcheck source=/dev/null -. "$(fzf-share)/completion.bash" -# Disable fzf key-bindings -# readline > fzf -# . "$(fzf-share)/key-bindings.bash" - -export FZF_CTRL_T_OPTS=' - --preview "(cat {} || tree -C {}) 2> /dev/null" - --select-1 - --exit-0 -' - -export FZF_ALT_C_OPTS='--preview "tree -C {} | head -200"' - -# FIXME: -# g '^\w.*json_destroy(' -g() { - # shellcheck disable=2086 - fn=$(git grep -n -- "$1" ${2:-} | \ - cut -d: -f -2 | \ - fzf --select-1 \ - --exit-0 \ - --preview "echo {} | \ - cut -d: -f1 | \ - xargs -I% awk -v bounds=25 -v pat=\"$1\" -v n=\$(echo {} | cut -d: -f2) ' - (n - bounds < NR) && (NR < n + bounds) && (NR != n) { print } - NR==n { gsub(pat, \"\033[1;33m&\033[1;000m\"); print } - ' %") - if [ -n "$fn" ]; then - f="$(echo "$fn" | cut -d: -f1)" - n="$(echo "$fn" | cut -d: -f2)" - # shellcheck disable=2068 - history -s g "$@" - history -s vi "+$n" "$f" - vi "+$n" "$f" - fi -} - -f() { - # FIXME: speed - # profile="f-shell-function$(pwd | sed -e 's_/_-_g')" - # file="$(git ls-files | grep ${2:-.} | remembering -p "$profile" -c "fzf --select-1 --exit-0 --preview 'cat {}'")" - # shellcheck disable=2086 - file="$(git ls-files | grep ${2:-.} | fzf --select-1 --exit-0 --preview 'cat {}')" - if [ -n "$file" ]; then - # shellcheck disable=2068 - # history -s f $@ - history -s "$1" "$file" - "$1" "$file" - fi -} - -V_FILES="$(echo ' -~/annex/txt/TODOs.md -~/tmp/scratch.txt -'"$(find ~/annex/txt/*.md -not -name TODOs.md | - sed 's|^/home/andreh|~|' | - LANG=POSIX.UTF-8 sort)"' -~/annex/bin/misc/git/mrconfig.ini -~/dev/libre/package-repository/dependencies.dot -~/dev/others/dinheiros/dinheiros.ledger -~/dev/libre/dotfiles/configuration.nix -' | tr ' ' '\n' | grep .)" - -v() { - f="$(echo "$V_FILES" | fzf --select-1 --exit-0 --query "$1")" - if [ -n "$f" ]; then - history -s vi $f - vi "$HOME/${f#'~/'}" - fi -} - -cn() { - CHOICE="$(git log --oneline | fzf)" - git log --oneline | grep -nF "$CHOICE" | cut -d: -f1 -} - -cm() { - n="$(cn)" - git rev-parse "HEAD~$((n - 1))" -} diff --git a/sh/mr-execute.sh b/sh/mr-execute.sh deleted file mode 100644 index 70479da7..00000000 --- a/sh/mr-execute.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -cd ~/ || exit 1 - -AUTOJUMP_TXT="$HOME/.local/share/autojump/autojump.txt" -mkdir -p "$(dirname "$AUTOJUMP_TXT")" -touch "$AUTOJUMP_TXT" -mr checkout > /dev/null - -cd - > /dev/null || exit 1 diff --git a/sh/ps1.sh b/sh/ps1.sh deleted file mode 100644 index c0fdd967..00000000 --- a/sh/ps1.sh +++ /dev/null @@ -1,135 +0,0 @@ -#!/bin/sh - -repo_status_git() { - BRANCH_NAME="$(git rev-parse --abbrev-ref HEAD)" - OUT="$(git status --short --branch --porcelain)" - BRANCH_LINE="$(echo "$OUT" | head -n 1)" - DIFF_LINES="$(echo "$OUT" | tail -n +2)" - - if echo "$BRANCH_LINE" | grep -q 'ahead'; then - IS_AHEAD=1 - fi - if echo "$BRANCH_LINE" | grep -q 'behind'; then - IS_BEHIND=1 - fi - - if [ -n "$IS_AHEAD" ] && [ -n "$IS_BEHIND" ]; then - BRANCH_MARKER="^^^ $BRANCH_NAME vvv" - elif [ -n "$IS_AHEAD" ]; then - BRANCH_MARKER="^ $BRANCH_NAME ^" - elif [ -n "$IS_BEHIND" ]; then - BRANCH_MARKER="v $BRANCH_NAME v" - else - BRANCH_MARKER="$BRANCH_NAME" - fi - - if echo "$DIFF_LINES" | grep -q '^[A|D|M| ][M|D| ]'; then - HAS_DIFF=1 - fi - - if echo "$DIFF_LINES" | grep -q '^[?][?]'; then - HAS_UNTRACKED=1 - fi - - if [ -n "$HAS_DIFF" ]; then - COLOR_FN=redb - LINE="{$BRANCH_MARKER}" - elif [ -n "$IS_AHEAD" ] || [ -n "$IS_BEHIND" ]; then - COLOR_FN=bluei - LINE="[$BRANCH_MARKER]" - elif [ -n "$HAS_UNTRACKED" ]; then - COLOR_FN=lightblue - LINE="($BRANCH_MARKER)" - else - COLOR_FN=green - LINE="($BRANCH_MARKER)" - fi - - "$COLOR_FN" "$LINE" - - blacki " - git/$(git rev-parse HEAD)" -} - -repo_status_fossil() { - BRANCH_NAME="$(fossil branch current)" - - if [ -n "$(fossil extras)" ]; then - HAS_UNTRACKED=1 - fi - - BRANCH_MARKER="$BRANCH_NAME" - - if [ -n "${HAS_UNTRACKED:-}" ]; then - COLOR_FN=lightblue - LINE="($BRANCH_MARKER)" - else - COLOR_FN=green - LINE="($BRANCH_MARKER)" - fi - - "$COLOR_FN" "$LINE" - - # echo 'FOSSIL!' - # printf '%s' "$BRANCH_NAME" - blacki " - fossil/$(fossil info | awk '/^checkout:/ { print $2 }')" -} - -repo_status_mercurial() { - BRANCH_NAME="$(hg branch)" -} - -repo_status() { - dir="$(basename "$PWD")" - if [ -d .git ]; then - repo_status_git - elif [ -f "$dir.fossil" ]; then - repo_status_fossil - elif [ -d .hg ]; then - repo_status_mercurial - fi -} - - -error_marker() { - STATUS=$? - if [ "$STATUS" != 0 ]; then - redb " (!! $STATUS !!) " - fi -} - -timestamp() { - blacki '\T' -} - -path() { - yellowb '\w/' -} - -guix_env() { - if [ "$GUIX_ENVIRONMENT" != '' ]; then - printf '\n' - blacki '~> ' - purple 'guix environment ' - printf '(' - blueb "$GUIX_ENVIRONMENT" - printf ')' - fi -} - -in_nix_shell() { - if [ "$IN_NIX_SHELL" != '' ]; then - printf '\n' - blacki '~> ' - purpleb "$IN_NIX_SHELL " - purple 'nix-shell ' - printf '(' - # $name comes from the mkShell declaration - # shellcheck disable=2154 - blueb "$name" - printf ')' - fi -} - -PS1='`error_marker`'$(timestamp)' '$(path)' `repo_status``guix_env``in_nix_shell` -$ ' -export PS1 diff --git a/sh/reload.sh b/sh/reload.sh deleted file mode 100644 index fd191a74..00000000 --- a/sh/reload.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC1090 disable=SC1091 - -. ~/.bashrc -. "$DOTFILES/sh/x.sh" -. "$DOTFILES/sh/mr-execute.sh" -. "$DOTFILES/sh/fake-symlinks.sh" diff --git a/sh/symlinks.sh b/sh/symlinks.sh deleted file mode 100644 index 4f95a64e..00000000 --- a/sh/symlinks.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh - -mkdir -p \ - ~/Downloads/Screenshots/ ~/.local/share/common-lisp ~/tmp/ ~/.gnupg \ - ~/.xmonad ~/.config/ranger/ ~/.config/guix \ - ~/.config/khal ~/.config/khard - -if [ ! -e ~/tmp/scratch.txt ]; then - touch ~/tmp/scratch.txt -fi - -ln -fs ~/dev/libre ~/common-lisp && - rm -f ~/dev/libre/libre -ln -fs ~/dev/others/password-store ~/.password-store && - rm -f ~/dev/others/password-store/password-store - -# FIXME: guix shell --check complains about this -ln -fs "$DOTFILES/sh/bashrc.sh" ~/.bashrc -ln -fs "$DOTFILES/sh/bash_profile.sh" ~/.bash_login -ln -fs "$DOTFILES/sh/bash_profile.sh" ~/.bash_profile -ln -fs "$HOME/annex/bin/misc/nurc.sh" ~/.nurc -ln -fs "$DOTFILES/inputrc.conf" ~/.inputrc -ln -fs "$DOTFILES/Xmodmap.conf" ~/.Xmodmap - -ln -fs "$DOTFILES/vcs/hgrc.ini" ~/.hgrc -ln -fs "$DOTFILES/vcs/gitconfig.ini" ~/.gitconfig -ln -fs "$HOME/annex/bin/misc/git/mrconfig.ini" ~/.mrconfig - -ln -fs "$DOTFILES/gpg/gpg.conf" ~/.gnupg/gpg.conf -ln -fs "$DOTFILES/gpg/gpg-agent.conf" ~/.gnupg/gpg-agent.conf -ln -fs "$DOTFILES/gpg/sshcontrol" ~/.gnupg/sshcontrol -ln -fs "$DOTFILES/ssh.conf" ~/.ssh/config - -ln -fs "$DOTFILES/xmonad/xsession.sh" ~/.xsession -ln -fs "$DOTFILES/xmonad/xmonad.hs" ~/.xmonad/xmonad.hs -ln -fs "$DOTFILES/xmonad/xmobar.hs" ~/.xmobarrc - -ln -fs "$DOTFILES/npmrc.sh" ~/.npmrc -ln -fs "$DOTFILES/mailcap.conf" ~/.mailcap -ln -fs "$DOTFILES/tmux.conf" ~/.tmux.conf -ln -fs "$DOTFILES/exrc.conf" ~/.exrc -ln -fs "$DOTFILES/ranger.conf" ~/.config/ranger/rc.conf -ln -fs "$DOTFILES/infokey" ~/.infokey -ln -fs "$DOTFILES/sbclrc.lisp" ~/.sbclrc -ln -fs "$DOTFILES/guix/channels.scm" ~/.config/guix/channels.scm -ln -fs "$HOME/annex/bin/misc/khard.conf" ~/.config/khard/khard.conf -ln -fs "$HOME/annex/bin/misc/khal.conf" ~/.config/khal/config diff --git a/sh/templates/..git/hooks/pre-push b/sh/templates/..git/hooks/pre-push deleted file mode 120000 index 29785d24..00000000 --- a/sh/templates/..git/hooks/pre-push +++ /dev/null @@ -1 +0,0 @@ -../../aux/ci/git-pre-push.sh
\ No newline at end of file diff --git a/sh/templates/..gitignore b/sh/templates/..gitignore deleted file mode 100644 index 87174b68..00000000 --- a/sh/templates/..gitignore +++ /dev/null @@ -1 +0,0 @@ -/public/ diff --git a/sh/templates/CHANGELOG.md b/sh/templates/CHANGELOG.md deleted file mode 100644 index 65f247b6..00000000 --- a/sh/templates/CHANGELOG.md +++ /dev/null @@ -1,10 +0,0 @@ -<!-- Entry template: --> -<!-- -# Unreleased -## Added -## Changed -## Deprecated -## Removed -## Fixed -## Security ---> diff --git a/sh/templates/COPYING b/sh/templates/COPYING deleted file mode 100644 index be3f7b28..00000000 --- a/sh/templates/COPYING +++ /dev/null @@ -1,661 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are 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. - - 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. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - 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 Affero 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. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - 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 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 work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero 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 Affero 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 Affero 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 Affero 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. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero 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 Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <https://www.gnu.org/licenses/>. - -Also add information on how to contact you by electronic and paper mail. - - If your software can interact with users remotely through a computer -network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different -solutions will be better for different programs; see section 13 for the -specific requirements. - - 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 AGPL, see -<https://www.gnu.org/licenses/>. diff --git a/sh/templates/Makefile b/sh/templates/Makefile deleted file mode 100644 index 5e04401c..00000000 --- a/sh/templates/Makefile +++ /dev/null @@ -1,100 +0,0 @@ -.POSIX: -CC = c99 -CFLAGS = -std=c99 -Wall -Wextra -Wpedantic -fPIC -g -O3 -LDFLAGS = -Wl,-rpath,$$LIBRARY_PATH -LDLIBS = -PREFIX = /usr/local -MANPREFIX = $(PREFIX)/share/man -DATE = 1970-01-01 -MAJOR = 0 -MINOR = 1 -PATCH = 0 -VERSION = $(MAJOR).$(MINOR).$(PATCH) -NAME = __PROJECT__ -MAILING_LIST = __MAILING_LIST__ - -headers = \ - src/f.h - -sources = \ - src/f.c - -binaries = \ - f - -manpages = \ - doc/f.1 - - -objects = $(sources:.c=.o) - -.SUFFIXES: .c .o - -.c.o: - $(CC) -c $(CFLAGS) $(LDFLAGS) -o $@ $< - -libname = lib$(NAME) -liba = $(libname).a -libso = $(libname).so -libso-real = $(libso).$(MAJOR).$(MINOR).$(PATCH) -soaliases = $(libso).$(MAJOR).$(MINOR) $(libso).$(MAJOR) $(libso) - -all: $(liba) $(libso-real) run-tests - -$(liba): $(headers) $(objects) - ar rcsv $@-t $(objects) - ranlib $@-t - mv $@-t $@ - -$(libso-real): $(headers) $(objects) - $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,$(libso).$(MAJOR) -o $@ $(objects) - -$(soaliases): $(libso-real) - ln -sf $? $@ - -run-tests: $(headers) $(sources) tests/tests.c - $(CC) $(CFLAGS) $(LDFLAGS) -DTEST -o $@ tests/tests.c $(sources) $(LDLIBS) - -fallible-tests: $(headers) $(sources) tests/tests.c - $(CC) $(CFLAGS) $(LDFLAGS) -DTEST -DFALLIBLE -o $@ tests/tests.c $(sources) $(LDLIBS) -lfallible - -check: run-tests - ./run-tests - -dev-check: all check fallible-tests - valgrind `fallible-check --valgrind-flags` ./run-tests - fallible-check ./fallible-tests - sh aux/assert-shellcheck.sh - sh aux/workflow/assert-todos.sh - sh aux/workflow/assert-changelog.sh $(NAME) - -do_subst = sed \ - -e 's:[@]VERSION[@]:$(VERSION):g' \ - -e 's:[@]DATE[@]:$(DATE):g' - -install: all $(soaliases) - for h in $(headers); do install -m 644 -D $$h $(DESTDIR)$(PREFIX)/include/`basename $$h`; done - for f in $(liba) $(libso-real); do install -m 755 -D $$f $(DESTDIR)$(PREFIX)/lib/$$f; done - for a in $(soaliases); do mv $$a $(DESTDIR)$(PREFIX)/lib/; done - for b in $(binaries); do install -m 755 -D $$b $(DESTDIR)$(PREFIX)/bin/$$b; done - for m in $(manpages); do \ - n=$${m##*.}; \ - mkdir -p $(DESTDIR)$(MANPREFIX)/man$$n; \ - $(do_subst) < $$m | gzip > $(DESTDIR)$(MANPREFIX)/man$$n/`basename $$m`.gz; \ - done - -uninstall: - for h in $(headers); do rm -f $(DESTDIR)$(PREFIX)/include/`basename $$h`; done - for l in $(liba) $(libso-real) $(soaliases); do rm -f $(DESTDIR)$(PREFIX)/lib/$$l; done - for m in $(manpages); do rm -f $(DESTDIR)$(MANPREFIX)/man$${m##*.}/`basename $$m`.gz; done - -clean: - rm -rf public/ $(objects) $(liba) $(libso-real) $(soaliases) run-tests fallible* vgcore* - -dist: clean public dev-check - sh aux/workflow/dist.sh $(DATE) $(VERSION) $(NAME) - -public: README.md TODOs.md CHANGELOG.md - sh aux/workflow/public.sh __PROJECT_UC__ $(NAME) $(MAILING_LIST) - -.PHONY: all clean check dev-check dist install uninstall diff --git a/sh/templates/TODOs.md b/sh/templates/TODOs.md deleted file mode 100644 index 6a96f294..00000000 --- a/sh/templates/TODOs.md +++ /dev/null @@ -1,16 +0,0 @@ -# Tasks - - -# Bugs - - -# Improvements - - -# Questions - - -# Resources - - -# Scratch diff --git a/sh/templates/_plugins/linter.rb b/sh/templates/_plugins/linter.rb deleted file mode 100644 index d5cca56a..00000000 --- a/sh/templates/_plugins/linter.rb +++ /dev/null @@ -1,55 +0,0 @@ -require 'i18n' - -module Jekyll - class Linter < Generator - safe true - - def slugify(s) - I18n.available_locales = [:pt_BR] - I18n.locale = :pt_BR - I18n.transliterate(s) - .gsub(/[\W]+/, ' ') - .strip - .gsub(/\s\s+/, '-') - .downcase - .gsub(' ', '-') - .gsub('_', '-') - end - - def assert_field(document, field) - f = document.data[field] - raise "Undefined '#{field}' for #{document.path}" unless f - f - end - - def assert_frontmatter_fields(document) - title = assert_field document, 'title' - layout = assert_field document, 'layout' - date = document.date.strftime('%Y-%m-%d') unless layout == 'page' - slug = assert_field document, 'slug' - - if 'post' != layout - raise "Layout mismatch: expected 'post', got '#{layout}' for #{document.path}" - end - - unless layout == 'page' then - path = "_posts/#{date}-#{slug}.md" - unless path == document.relative_path then - raise "date/filename mismatch:\ndate+slug: #{path}\nfilename: #{document.relative_path}" - end - end - - if slugify(title) != slug then - puts 'WARNING!' - puts "Filename isn't a slug of the title for '#{document.path}':\nslug: '#{slug}'\ntitle: '#{slugify(title)}'" - puts "Fix with:\n mv _posts/#{date}-#{slug}.md _posts/#{date}-#{slugify(title)}.md" - end - end - - def generate(site) - site.collections['posts'].docs.each do |document| - assert_frontmatter_fields(document) - end - end - end -end diff --git a/sh/templates/aux/assert-perltidy.sh b/sh/templates/aux/assert-perltidy.sh deleted file mode 100755 index e69de29b..00000000 --- a/sh/templates/aux/assert-perltidy.sh +++ /dev/null diff --git a/sh/templates/aux/assert-shellcheck.sh b/sh/templates/aux/assert-shellcheck.sh deleted file mode 100755 index cc01f3af..00000000 --- a/sh/templates/aux/assert-shellcheck.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -set -eux - -git ls-files | \ - xargs awk 'FNR==1 && /^#!\/bin\/sh$/ { print FILENAME }' | \ - xargs shellcheck diff --git a/sh/templates/aux/ci/ci-build.sh b/sh/templates/aux/ci/ci-build.sh deleted file mode 100755 index b6769a9d..00000000 --- a/sh/templates/aux/ci/ci-build.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -set -eux - -PACKAGE="$1" -LOGS_DIR="$2" -read -r _ SHA _ # oldrev newrev refname -FILENAME="$(date -Is)-$SHA.log" -LOGFILE="$LOGS_DIR/$FILENAME" - -{ - echo "Starting CI job at: $(date -Is)" - - finish() { - STATUS="$?" - printf "\n\n>>> exit status was %s\n" "$STATUS" - echo "Finishing CI job at: $(date -Is)" - cd - - NOTE=$(cat <<EOF -See CI logs with: - git notes --ref=refs/notes/ci-logs show $SHA - git notes --ref=refs/notes/ci-data show $SHA -EOF -) - git notes --ref=refs/notes/ci-data add -f -m "$STATUS $FILENAME" - git notes --ref=refs/notes/ci-logs add -f -F "$LOGFILE" - git notes append -m "$NOTE" - - cd - - sh aux/ci/report.sh "$PACKAGE" - rsync -a public/ "/srv/http/$PACKAGE/" --delete - - printf "\n>>>\n>>> CI logs added as Git note.\n>>>\n>>> Run status was %s" "$STATUS" - } - trap finish EXIT - - unset GIT_DIR - REMOTE="$PWD" - cd "$(mktemp -d)" - git clone "$REMOTE" . - git config --global user.email git@euandre.org - git config --global user.name 'EuAndreh CI' - git fetch origin refs/notes/*:refs/notes/* - git annex get ||: - - if [ -f aux/guix/with-container.sh ]; then - RUNNER='./aux/guix/with-container.sh' - else - RUNNER='sh -c' - fi - - $RUNNER 'make clean public dev-check' -} 2>&1 | tee "$LOGFILE" diff --git a/sh/templates/aux/ci/git-post-receive.sh b/sh/templates/aux/ci/git-post-receive.sh deleted file mode 100755 index ee8075f3..00000000 --- a/sh/templates/aux/ci/git-post-receive.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -set -eu - -for n in $(seq 0 $((GIT_PUSH_OPTION_COUNT - 1))); do - opt="$(eval "echo \$GIT_PUSH_OPTION_$n")" - if [ "$opt" = skip-ci ] || [ "$opt" = ci-skip ]; then - printf "\n'%s' option detected, not running ci-build.sh\n\n" "$opt" - exit 0 - fi -done - -PACKAGE="$(basename "$PWD" | cut -d. -f1)" # remove .git suffix -LOGS_DIR="/opt/ci/$PACKAGE/logs" -"/opt/ci/$PACKAGE/ci-build.sh" "$PACKAGE" "$LOGS_DIR" diff --git a/sh/templates/aux/ci/git-pre-push.sh b/sh/templates/aux/ci/git-pre-push.sh deleted file mode 100644 index 0580c87a..00000000 --- a/sh/templates/aux/ci/git-pre-push.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -set -eux - -TLD="$(cat aux/tld.txt)" - -PACKAGE="$(basename "$PWD")" -__ENABLE_CI__ LOGS_DIR="/opt/ci/$PACKAGE/logs" -REMOTE_GIT_DIR="/srv/git/$PACKAGE.git" - -DESCRIPTION="$(mktemp)" -if [ -f description ] -then - cp description "$DESCRIPTION" -else - git config euandreh.description > "$DESCRIPTION" -fi - -scp "$DESCRIPTION" "$TLD:$REMOTE_GIT_DIR/description" -__ENABLE_CI__ ssh "$TLD" mkdir -p "$LOGS_DIR" -__ENABLE_CI__ scp aux/ci/ci-build.sh "$TLD:$(dirname "$LOGS_DIR")/ci-build.sh" -__ENABLE_CI__ scp aux/ci/git-post-receive.sh "$TLD:$REMOTE_GIT_DIR/hooks/post-receive" diff --git a/sh/templates/aux/ci/report.sh b/sh/templates/aux/ci/report.sh deleted file mode 100755 index 65d33356..00000000 --- a/sh/templates/aux/ci/report.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/sh -set -eu - -PROJECT_UC="$1" - -PASS='โ
' -FAIL='โ' - -mkdir -p public/ci-logs public/ci-data - -OUT="$(mktemp)" -chmod 644 "$OUT" - -git fetch origin refs/notes/*:refs/notes/* ||: - -for c in $(git notes list | cut -d\ -f2); do - DATA="$(git notes --ref=refs/notes/ci-data show "$c")" - FILENAME="$(echo "$DATA" | cut -d\ -f2)" - echo "$DATA" > "public/ci-data/$FILENAME" - git notes --ref=refs/notes/ci-logs show "$c" > "public/ci-logs/$FILENAME" -done - -cat <<EOF >> "$OUT" -<!DOCTYPE html> -<html lang="en"> - <head> - <meta charset="UTF-8" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - <link rel="icon" type="image/svg+xml" href="favicon.svg" /> - - <style> - pre { - display: inline; - } - </style> - </head> - <body> - <h1> - CI logs for $PROJECT_UC - </h1> - <ul> -EOF - -for f in $(find public/ci-data/ -type f | LANG=C.UTF-8 sort -r); do - DATA="$(cat "$f")" - STATUS="$(echo "$DATA" | cut -d\ -f1)" - FILENAME="$(echo "$DATA" | cut -d\ -f2)" - - if [ "$STATUS" = 0 ]; then - STATUS_MARKER="$PASS" - else - STATUS_MARKER="$FAIL" - fi - - cat <<EOF >> "$OUT" - <li> - <a href="ci-logs/$FILENAME"> - $STATUS_MARKER <pre>$FILENAME</pre> - </a> - </li> -EOF -done - -cat <<EOF >> "$OUT" - </ul> - </body> -</html> -EOF - -mv "$OUT" public/ci.html diff --git a/sh/templates/aux/guix/manifest.scm b/sh/templates/aux/guix/manifest.scm deleted file mode 100644 index a6892351..00000000 --- a/sh/templates/aux/guix/manifest.scm +++ /dev/null @@ -1,17 +0,0 @@ -(specifications->manifest - (map symbol->string - '(bash - coreutils - findutils - diffutils - grep - sed - git - tar - gzip - gawk - make - perl - shellcheck - groff - pandoc))) diff --git a/sh/templates/aux/guix/pinned-channels.scm b/sh/templates/aux/guix/pinned-channels.scm deleted file mode 100644 index 504406f8..00000000 --- a/sh/templates/aux/guix/pinned-channels.scm +++ /dev/null @@ -1,11 +0,0 @@ -(cons* - (channel - (name 'xyz-euandreh) - (url "git://euandreh.xyz/package-repository") - (branch "main") - (introduction - (make-channel-introduction - "d749e053e6db365069cb9b2ef47a78b06f9e7361" - (openpgp-fingerprint - "5BDA E9B8 B2F6 C6BC BB0D 6CE5 81F9 0EC3 CD35 6060")))) - %default-channels) diff --git a/sh/templates/aux/guix/with-container.sh b/sh/templates/aux/guix/with-container.sh deleted file mode 100755 index b521c825..00000000 --- a/sh/templates/aux/guix/with-container.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -set -eux - -if [ -z "${1:-}" ]; then - guix time-machine --fallback -C aux/guix/pinned-channels.scm -- \ - environment --fallback -m aux/guix/manifest.scm -elif [ "$1" = '-p' ]; then - guix time-machine --fallback -C aux/guix/pinned-channels.scm -- \ - environment --fallback -m aux/guix/manifest.scm --pure -C -else - guix time-machine --fallback -C aux/guix/pinned-channels.scm -- \ - environment --fallback -m aux/guix/manifest.scm --pure -C -- sh -c "$@" -fi diff --git a/sh/templates/aux/tests-lib.sh b/sh/templates/aux/tests-lib.sh deleted file mode 100755 index e0759748..00000000 --- a/sh/templates/aux/tests-lib.sh +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/sh - -OUT= -ERR= -STATUS= - -assert_status() { - if [ "$STATUS" != "$1" ]; then - printf '\nERR: Bad status.\n\nexpected: %s\ngot: %s\n' \ - "$1" "$STATUS" >&2 - exit 1 - fi -} - -assert_usage() { - if ! grep -Fq 'Usage' "$1"; then - echo 'Expected to find "Usage" text, it was missing:' >&2 - cat "$1" >&2 - exit 1 - fi -} - -assert_empty_stream() { - if [ -s "$2" ]; then - printf '\nERR: Expected %s (%s) to be empty, but has content:\n%s\n' \ - "$1" "$2" "$(cat "$2")" >&2 - exit 1 - fi -} - -assert_empty_stdout() { - assert_empty_stream STDOUT "$OUT" -} - -assert_empty_stderr() { - assert_empty_stream STDERR "$ERR" -} - -assert_stream() { - if [ "$(cat "$2")" != "$3" ]; then - printf '\nERR: Bad %s (%s)\n\nexpected: %s\ngot: %s\n' \ - "$1" "$2" "$3" "$(cat "$2")" >&2 - exit 1 - fi -} - -assert_stdout() { - assert_stream STDOUT "$OUT" "$1" -} - -assert_stderr() { - assert_stream STDERR "$ERR" "$1" -} - -assert_grep_stream() { - if ! grep -qE "$3" "$2"; then - printf '\nERR: Bad %s (%s)\n\ngrepping: %s\nin:\n%s\n' \ - "$1" "$2" "$3" "$(cat "$2")" >&2 - exit 1 - fi -} - -assert_grep_stdout() { - assert_grep_stream STDOUT "$OUT" "$1" -} - -assert_grep_stderr() { - assert_grep_stream STDERR "$ERR" "$1" -} - -assert_fgrep_stream() { - if ! grep -Fq -- "$3" "$2"; then - printf '\nERR: Bad %s (%s)\n\ngrepping: %s\nin:\n%s\n' \ - "$1" "$2" "$3" "$(cat "$2")" >&2 - exit 1 - fi -} - -assert_fgrep_stdout() { - assert_fgrep_stream STDOUT "$OUT" "$1" -} - -assert_fgrep_stderr() { - assert_fgrep_stream STDERR "$ERR" "$1" -} - -testing() { - printf 'testing: %s...' "$1" >&2 -} - -test_ok() { - printf ' OK.\n' >&2 -} diff --git a/sh/templates/aux/tld.txt b/sh/templates/aux/tld.txt deleted file mode 100644 index 0cb8b8b0..00000000 --- a/sh/templates/aux/tld.txt +++ /dev/null @@ -1 +0,0 @@ -euandreh.xyz diff --git a/sh/templates/aux/utils.sh b/sh/templates/aux/utils.sh deleted file mode 100755 index 8d93fb56..00000000 --- a/sh/templates/aux/utils.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -uuid() { - # Taken from: - # https://serverfault.com/a/799198 - od -xN20 /dev/urandom | \ - head -1 | \ - awk '{OFS="-"; print $2$3,$4,$5,$6,$7$8$9}' -} diff --git a/sh/templates/aux/workflow/TODOs.sh b/sh/templates/aux/workflow/TODOs.sh deleted file mode 100755 index 80059ee4..00000000 --- a/sh/templates/aux/workflow/TODOs.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -set -eu - -mkdir -p public - -PROJECT_UC="$1" -PROJECT="$2" -MAILING_LIST="$3" -TLD="$(cat aux/tld.txt)" - -TODOS_REGEX='s/^## (TODO|DOING|WAITING|MEETING|INACTIVE|NEXT|CANCELLED|DONE) (.*) \{#(.*?)\}$/## <a href="#\3"><span class="\1">\1<\/span> \2<\/a>\n<span class="header-anchor" id="\3">#\3<\/span>\n/' - -TAGS_REGEX='s/tag:([\w-]+)/<span class="tag">\1<\/span>/g' - -sed -e "s:@PROJECT_UC@:$PROJECT_UC:g" \ - -e "s:@PROJECT@:$PROJECT:g" \ - -e "s:@MAILING_LIST@:$MAILING_LIST:g" \ - -e "s:@TLD@:$TLD:g" \ - < aux/workflow/preamble.md | \ - printf \ - '%s\n\n%s' \ - "$(cat -)" \ - "$(perl -pe "$TODOS_REGEX" TODOs.md | perl -pe "$TAGS_REGEX")" | \ - pandoc \ - --toc \ - --highlight-style pygments \ - --toc-depth=2 \ - -s \ - --metadata title="$PROJECT_UC - TODOs" \ - --metadata lang=en \ - -r commonmark \ - -w html \ - -H aux/workflow/favicon.html \ - -H aux/workflow/style.css \ - > public/TODOs.html diff --git a/sh/templates/aux/workflow/assert-changelog.sh b/sh/templates/aux/workflow/assert-changelog.sh deleted file mode 100755 index 8e81f1f4..00000000 --- a/sh/templates/aux/workflow/assert-changelog.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -set -eu - -PROJECT="$1" - -for VVERSION in $(git tag); do - VERSION="${VVERSION#v}" - DATE="$(git log -1 --format=%cd --date=short "$VVERSION")" - CHANGELOG_ENTRY="# [$VERSION](https://git.euandreh.xyz/$PROJECT/commit/?id=$VVERSION) - $DATE" - if ! grep -qF "$CHANGELOG_ENTRY" CHANGELOG.md; then - echo "Missing '$CHANGELOG_ENTRY' entry from CHANGELOG.md" >&2 - exit 1 - fi -done diff --git a/sh/templates/aux/workflow/assert-readme.sh b/sh/templates/aux/workflow/assert-readme.sh deleted file mode 100755 index cef75dd9..00000000 --- a/sh/templates/aux/workflow/assert-readme.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh -set -eu - -mkdir -p public - -PROJECT="$1" -MAILING_LIST="$2" -TLD="$(cat aux/tld.txt)" - -EXPECTED="$(mktemp)" -cat <<EOF >> "$EXPECTED" - -For running the extra development-only checks, run: - -\`\`\`shell -$ make dev-check -\`\`\` - -and for generating the documentation HTML and website, run: - -\`\`\`shell -$ make public -\`\`\` - - -## Links - -- [home page](https://$TLD/$PROJECT/) -- [source code](https://git.euandreh.xyz/$PROJECT/) -- [bug tracking](https://$TLD/$PROJECT/TODOs.html) -- [mailing list](https://lists.sr.ht/~euandreh/$MAILING_LIST?search=%5B$PROJECT%5D) -- [CI logs](https://$TLD/$PROJECT/ci.html) -- [CHANGELOG](https://$TLD/$PROJECT/CHANGELOG.html) -EOF - -RELEASES_LIST="$(mktemp)" -for version in $(git tag | perl -e 'print reverse <>'); do - echo "- version [$version](https://git.euandreh.xyz/$PROJECT/snapshot/$PROJECT-$version.tar.gz) ([sig](https://git.euandreh.xyz/$PROJECT/snapshot/$PROJECT-$version.tar.gz.asc)), released in $(git log -1 --format=%cd --date=short "$version")" >> "$RELEASES_LIST" -done - -if [ -s "$RELEASES_LIST" ]; then - printf '\n\n## Releases\n\n' >> "$EXPECTED" - cat "$RELEASES_LIST" >> "$EXPECTED" -fi - -cat <<EOF >> "$EXPECTED" - - -## License - -The code is licensed under [GNU Affero General Public License v3.0 or later][AGPL-3.0-or-later] (AGPL-3.0-or-later). - -[AGPL-3.0-or-later]: https://www.gnu.org/licenses/agpl-3.0.en.html -EOF - -if ! tail -n "$(wc -l < "$EXPECTED")" README.md | diff - "$EXPECTED"; then - echo 'Missing metadata at the end of README.md file' - exit 1 -fi diff --git a/sh/templates/aux/workflow/assert-todos.sh b/sh/templates/aux/workflow/assert-todos.sh deleted file mode 100755 index ca73b7f7..00000000 --- a/sh/templates/aux/workflow/assert-todos.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -set -eu - -if git grep FIXME | grep -v '^TODOs.md' | grep -v '^aux/workflow/assert-todos.sh'; then - echo "Found dangling FIXME markers on the project." - echo "You should write them down properly on TODOs.md." - exit 1 -fi - -awk -F'{#' ' -BEGIN { - exitstatus = 0 - h2flag = 0 - h2status = "" - prevline = "" - idx = 0 - delete ids[0] -} -h2flag == 1 { - split($0, l, " ") - timelinestatus = l[2] - if (h2status != timelinestatus) { - print "h2/timeline status mismatch for line " NR-1 - print prevline - print $0 - exitstatus = 1 - } - h2status = "" - h2flag = 0 -} - -/^## (TODO|DOING|WAITING|MEETING|INACTIVE|NEXT|CANCELLED|DONE)/ { - if (match($0, / \{#.*?\}$/) == 0) { - print "Missing ID for line " NR ":\n" $0 - exitstatus = 1 - } - id_with_prefix = substr($2, 0, length($2) - 1) - match(id_with_prefix, /^\w+-/) - id = substr(id_with_prefix, RLENGTH + 1) - if (id in arr) { - print "Duplicate ID: " id - exitstatus = 1 - } else { - arr[id] = 1 - } - - split($0, l, " ") - h2status = l[2] - h2flag = 1 - prevline = $0 -} - - -/^# Scratch$/ { - exit exitstatus -} -' TODOs.md diff --git a/sh/templates/aux/workflow/commonmark.sh b/sh/templates/aux/workflow/commonmark.sh deleted file mode 100755 index 6016f51b..00000000 --- a/sh/templates/aux/workflow/commonmark.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -set -eu - -mkdir -p public - -PROJECT_UC="$1" -F="$2" -OUT="${3:-${F%.*}.html}" - -pandoc \ - --toc \ - --highlight-style pygments \ - --toc-depth=2 \ - -s \ - --metadata title="$PROJECT_UC - ${F%.*}" \ - --metadata lang=en \ - -r commonmark \ - -w html \ - -H aux/workflow/favicon.html \ - < "$F" > "public/$OUT" diff --git a/sh/templates/aux/workflow/dist.sh b/sh/templates/aux/workflow/dist.sh deleted file mode 100755 index c061a04b..00000000 --- a/sh/templates/aux/workflow/dist.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -set -eu - -DATE="$1" -VVERSION="v$2" -PROJECT="$3" - -if git show "$VVERSION" 1>/dev/null 2>/dev/null; then - echo "Version '$VVERSION' already exists." >&2 - exit 1 -fi - -if [ "$DATE" != "$(git log -1 --format=%cd --date=short HEAD)" ]; then - echo "Date '$DATE' is not up-to-date." >&2 - exit 1 -fi - -if [ "Release $VVERSION" != "$(git log --format=%B -1 HEAD | head -n1)" ]; then - echo "Commit message isn't 'Release $VVERSION'." >&2 - exit 1 -fi - -sh aux/workflow/assert-changelog.sh "$PROJECT" - -git tag "$VVERSION" - -sh aux/workflow/sign-tarballs.sh "$PROJECT" diff --git a/sh/templates/aux/workflow/favicon.html b/sh/templates/aux/workflow/favicon.html deleted file mode 100644 index 8f9327c7..00000000 --- a/sh/templates/aux/workflow/favicon.html +++ /dev/null @@ -1 +0,0 @@ -<link rel="icon" type="image/svg+xml" href="favicon.svg" /> diff --git a/sh/templates/aux/workflow/favicon.png b/sh/templates/aux/workflow/favicon.png Binary files differdeleted file mode 100644 index 051fdf1d..00000000 --- a/sh/templates/aux/workflow/favicon.png +++ /dev/null diff --git a/sh/templates/aux/workflow/favicon.svg b/sh/templates/aux/workflow/favicon.svg deleted file mode 100644 index ce566b2d..00000000 --- a/sh/templates/aux/workflow/favicon.svg +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"> - <path d="M 0 8 L 1 8 L 1 9 L 0 9 L 0 8 Z" /> - <path d="M 0 13 L 1 13 L 1 14 L 0 14 L 0 13 Z" /> - <path d="M 1 8 L 2 8 L 2 9 L 1 9 L 1 8 Z" /> - <path d="M 1 13 L 2 13 L 2 14 L 1 14 L 1 13 Z" /> - <path d="M 2 8 L 3 8 L 3 9 L 2 9 L 2 8 Z" /> - <path d="M 2 13 L 3 13 L 3 14 L 2 14 L 2 13 Z" /> - <path d="M 3 8 L 4 8 L 4 9 L 3 9 L 3 8 Z" /> - <path d="M 3 13 L 4 13 L 4 14 L 3 14 L 3 13 Z" /> - <path d="M 4 7 L 5 7 L 5 8 L 4 8 L 4 7 Z" /> - <path d="M 4 8 L 5 8 L 5 9 L 4 9 L 4 8 Z" /> - <path d="M 4 13 L 5 13 L 5 14 L 4 14 L 4 13 Z" /> - <path d="M 5 6 L 6 6 L 6 7 L 5 7 L 5 6 Z" /> - <path d="M 5 7 L 6 7 L 6 8 L 5 8 L 5 7 Z" /> - <path d="M 5 13 L 6 13 L 6 14 L 5 14 L 5 13 Z" /> - <path d="M 6 5 L 7 5 L 7 6 L 6 6 L 6 5 Z" /> - <path d="M 6 6 L 7 6 L 7 7 L 6 7 L 6 6 Z" /> - <path d="M 6 14 L 7 14 L 7 15 L 6 15 L 6 14 Z" /> - <path d="M 7 1 L 8 1 L 8 2 L 7 2 L 7 1 Z" /> - <path d="M 7 14 L 8 14 L 8 15 L 7 15 L 7 14 Z" /> - <path d="M 7 15 L 8 15 L 8 16 L 7 16 L 7 15 Z" /> - <path d="M 7 2 L 8 2 L 8 3 L 7 3 L 7 2 Z" /> - <path d="M 7 3 L 8 3 L 8 4 L 7 4 L 7 3 Z" /> - <path d="M 7 4 L 8 4 L 8 5 L 7 5 L 7 4 Z" /> - <path d="M 7 5 L 8 5 L 8 6 L 7 6 L 7 5 Z" /> - <path d="M 8 1 L 9 1 L 9 2 L 8 2 L 8 1 Z" /> - <path d="M 8 15 L 9 15 L 9 16 L 8 16 L 8 15 Z" /> - <path d="M 9 1 L 10 1 L 10 2 L 9 2 L 9 1 Z" /> - <path d="M 9 2 L 10 2 L 10 3 L 9 3 L 9 2 Z" /> - <path d="M 9 6 L 10 6 L 10 7 L 9 7 L 9 6 Z" /> - <path d="M 9 15 L 10 15 L 10 16 L 9 16 L 9 15 Z" /> - <path d="M 10 2 L 11 2 L 11 3 L 10 3 L 10 2 Z" /> - <path d="M 10 3 L 11 3 L 11 4 L 10 4 L 10 3 Z" /> - <path d="M 10 4 L 11 4 L 11 5 L 10 5 L 10 4 Z" /> - <path d="M 10 5 L 11 5 L 11 6 L 10 6 L 10 5 Z" /> - <path d="M 10 6 L 11 6 L 11 7 L 10 7 L 10 6 Z" /> - <path d="M 11 6 L 12 6 L 12 7 L 11 7 L 11 6 Z" /> - <path d="M 11 8 L 12 8 L 12 9 L 11 9 L 11 8 Z" /> - <path d="M 10 15 L 11 15 L 11 16 L 10 16 L 10 15 Z" /> - <path d="M 11 10 L 12 10 L 12 11 L 11 11 L 11 10 Z" /> - <path d="M 11 12 L 12 12 L 12 13 L 11 13 L 11 12 Z" /> - <path d="M 11 14 L 12 14 L 12 15 L 11 15 L 11 14 Z" /> - <path d="M 11 15 L 12 15 L 12 16 L 11 16 L 11 15 Z" /> - <path d="M 12 6 L 13 6 L 13 7 L 12 7 L 12 6 Z" /> - <path d="M 12 8 L 13 8 L 13 9 L 12 9 L 12 8 Z" /> - <path d="M 12 10 L 13 10 L 13 11 L 12 11 L 12 10 Z" /> - <path d="M 12 12 L 13 12 L 13 13 L 12 13 L 12 12 Z" /> - <path d="M 12 14 L 13 14 L 13 15 L 12 15 L 12 14 Z" /> - <path d="M 13 6 L 14 6 L 14 7 L 13 7 L 13 6 Z" /> - <path d="M 13 8 L 14 8 L 14 9 L 13 9 L 13 8 Z" /> - <path d="M 13 10 L 14 10 L 14 11 L 13 11 L 13 10 Z" /> - <path d="M 13 12 L 14 12 L 14 13 L 13 13 L 13 12 Z" /> - <path d="M 13 13 L 14 13 L 14 14 L 13 14 L 13 13 Z" /> - <path d="M 13 14 L 14 14 L 14 15 L 13 15 L 13 14 Z" /> - <path d="M 14 7 L 15 7 L 15 8 L 14 8 L 14 7 Z" /> - <path d="M 14 8 L 15 8 L 15 9 L 14 9 L 14 8 Z" /> - <path d="M 14 9 L 15 9 L 15 10 L 14 10 L 14 9 Z" /> - <path d="M 14 10 L 15 10 L 15 11 L 14 11 L 14 10 Z" /> - <path d="M 14 11 L 15 11 L 15 12 L 14 12 L 14 11 Z" /> - <path d="M 14 12 L 15 12 L 15 13 L 14 13 L 14 12 Z" /> -</svg> diff --git a/sh/templates/aux/workflow/preamble.md b/sh/templates/aux/workflow/preamble.md deleted file mode 100644 index 30efe0ba..00000000 --- a/sh/templates/aux/workflow/preamble.md +++ /dev/null @@ -1,16 +0,0 @@ -# About - -TODOs for @PROJECT_UC@. - -See also [@TLD@/@PROJECT@/](https://@TLD@/@PROJECT@/) and [CI logs](https://@TLD@/@PROJECT@/ci.html). - -Register a new one at -[~euandreh/@MAILING_LIST@@lists.sr.ht](mailto:~euandreh/@MAILING_LIST@@lists.sr.ht?subject=%5B@PROJECT@%5D%20BUG%20or%20TASK%3A%20%3Cdescription%3E) -and see [existing discussions](https://lists.sr.ht/~euandreh/@MAILING_LIST@?search=%5B@PROJECT@%5D). - -*Vocรช tambรฉm pode escrever em portuguรชs*. - -*Vous pouvez aussi รฉcrire en franรงais*. - -*Vi povas ankaลญ skribi esperante*. - diff --git a/sh/templates/aux/workflow/public.sh b/sh/templates/aux/workflow/public.sh deleted file mode 100755 index 8ecb8553..00000000 --- a/sh/templates/aux/workflow/public.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -set -eu - -PROJECT_UC="$1" -PROJECT="$2" -MAILING_LIST="$3" - -sh aux/workflow/TODOs.sh "$PROJECT_UC" "$PROJECT" "$MAILING_LIST" -sh aux/workflow/commonmark.sh "$PROJECT" README.md index.html ||: - -if [ -f CHANGELOG.md ]; then - sh aux/workflow/commonmark.sh "$PROJECT" CHANGELOG.md -fi - -sh aux/ci/report.sh "$PROJECT" - -cp aux/workflow/favicon.* public/ diff --git a/sh/templates/aux/workflow/sign-tarballs.sh b/sh/templates/aux/workflow/sign-tarballs.sh deleted file mode 100755 index 8de6ac43..00000000 --- a/sh/templates/aux/workflow/sign-tarballs.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -set -eu - -PROJECT="$1" - -SIGNATURES="$(git notes --ref=refs/notes/signatures/tar.gz list | cut -d\ -f2)" -for tag in $(git tag); do - COMMIT="$(git rev-list -n1 "$tag")" - if ! echo "$SIGNATURES" | grep -qF "$COMMIT"; then - echo "Adding missing signature to $tag" >&2 - git notes --ref=refs/notes/signatures/tar.gz add -f -C "$( - git archive --format tar.gz --prefix "$PROJECT-${tag#v}/" "$tag" | - gpg --output - --armor --detach-sign | - git hash-object -w --stdin - )" "$tag" - fi -done diff --git a/sh/templates/aux/workflow/style.css b/sh/templates/aux/workflow/style.css deleted file mode 100644 index d7935d0e..00000000 --- a/sh/templates/aux/workflow/style.css +++ /dev/null @@ -1,46 +0,0 @@ -<style> - hr { - background-color: #ccc; - } - - div.header-anchor { - opacity: 0.5; - } - - span.tag { - font-family: monospace; - font-size: 70%; - background-color: lightgray; - padding: 3px; - border-radius: 5px; - } - - /* - Replicate colors from: - https://git.euandreh.xyz/dotfiles/tree/spacemacs.el?id=fcd9f9c4ef399d45d54927382dc1cdde251ebb0a#n866 - */ - - .TODO { - color: brown; - } - - .DOING { - color: yellowgreen; - } - - .WAITING, .MEETING { - color: gray; - } - - .INACTIVE { - color: orange; - } - - .NEXT { - color: red; - } - - .CANCELLED, .DONE { - color: green; - } -</style> diff --git a/sh/templates/cronjob-with-email.sh b/sh/templates/cronjob-with-email.sh deleted file mode 100644 index 304e51d1..00000000 --- a/sh/templates/cronjob-with-email.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -set -eux -LOG_FILE="$(mktemp)" -{ - finish() { - status=$? - if [ $status = 0 ]; then - STATUS="โ
SUCCESS (status $status)" - else - STATUS="โ FAILURE (status $status)" - fi - - echo "Registering status locally..." - set -x - printf '%s __JOB__\n' "$status" >> "/tmp/cron-dbg.summary.$(date -I).euandreh.log" - - echo "Sending report email..." - - SUBJECT="Job report on $(hostname): ${STATUS} for job-__JOB__.sh" - gpg -easr eu@euandre.org < "$LOG_FILE" | \ - mail eu@euandre.org \ - -s "$SUBJECT" \ - -a 'From:eu@euandre.org' \ - --content-type 'text/plain; charset=utf-8' - echo 'Mail sent!' - } - trap finish EXIT - - echo "Starting: $(date -Is)" - ~/dev/libre/dotfiles/cron/__JOB__.sh - echo "Finishing: $(date -Is)" -} | tee "$LOG_FILE" 2>&1 diff --git a/sh/templates/description b/sh/templates/description deleted file mode 100644 index 4c28ea5d..00000000 --- a/sh/templates/description +++ /dev/null @@ -1 +0,0 @@ -FIXME
\ No newline at end of file diff --git a/sh/templates/long-description b/sh/templates/long-description deleted file mode 100644 index 4c28ea5d..00000000 --- a/sh/templates/long-description +++ /dev/null @@ -1 +0,0 @@ -FIXME
\ No newline at end of file diff --git a/sh/templates/tests/lib.sh b/sh/templates/tests/lib.sh deleted file mode 100755 index 957566e2..00000000 --- a/sh/templates/tests/lib.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/sh - -OUT= -ERR= -STATUS= - -assert_status() { - if [ "$STATUS" != "$1" ]; then - printf '\nERR: Bad status.\n\nexpected: %s\ngot: %s\n' \ - "$1" "$STATUS" >&2 - exit 1 - fi -} - -assert_usage() { - if ! grep -Fq 'Usage' "$1"; then - echo 'Expected to find "Usage" text, it was missing:' >&2 - cat "$1" >&2 - exit 1 - fi -} - -assert_empty_stream() { - if [ -s "$2" ]; then - printf '\nERR: Expected %s (%s) to be empty, but has content:\n%s\n' \ - "$1" "$2" "$(cat "$2")" >&2 - exit 1 - fi -} - -assert_empty_stdout() { - assert_empty_stream STDOUT "$OUT" -} - -assert_empty_stderr() { - assert_empty_stream STDERR "$ERR" -} - -assert_stream() { - if [ "$(cat "$2")" != "$3" ]; then - printf '\nERR: Bad %s (%s)\n\nexpected: %s\ngot: %s\n' \ - "$1" "$2" "$3" "$(cat "$2")" >&2 - exit 1 - fi -} - -assert_stdout() { - assert_stream STDOUT "$OUT" "$1" -} - -assert_stderr() { - assert_stream STDERR "$ERR" "$1" -} - -assert_grep_stream() { - if ! grep -qE "$3" "$2"; then - printf '\nERR: Bad %s (%s)\n\ngrepping: %s\nin:\n%s\n' \ - "$1" "$2" "$3" "$(cat "$2")" >&2 - exit 1 - fi -} - -assert_grep_stdout() { - assert_grep_stream STDOUT "$OUT" "$1" -} - -assert_grep_stderr() { - assert_grep_stream STDERR "$ERR" "$1" -} - -testing() { - printf 'testing: %s...' "$1" >&2 -} - -test_ok() { - printf ' OK.\n' >&2 -} diff --git a/sh/util.sh b/sh/util.sh deleted file mode 100644 index 89199c11..00000000 --- a/sh/util.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -genpassword() { - length="${1-99}" - tr -cd '[:alnum:]' < /dev/urandom | fold "-w$length" | head -n1 ||: -} - -t() { - expand "$1" -t2 | sponge "$1" -} - -ut() { - unexpand "$1" -t2 | sponge "$1" -} - -gvi() { - if [ -e "$1" ]; then - INIT="gpg -qd" - else - INIT="echo" - fi - $INIT "$1" | vipe | gpg -qer eu@euandre.org | sponge "$1" -} - -disable_ci() { - NAME="$(basename "$PWD")" - rm -f ".git/hooks/$NAME/pre-push" - ssh euandreh.xyz rm -f "/srv/git/$NAME.git/hooks/post-receive" -} diff --git a/sh/vcs.sh b/sh/vcs.sh deleted file mode 100644 index 5d6afb51..00000000 --- a/sh/vcs.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -alias mr='mr -s' -alias s='git status' -alias d='git diff' -alias ds='git diff --staged' diff --git a/sh/x.sh b/sh/x.sh deleted file mode 100644 index 5202917c..00000000 --- a/sh/x.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -setxkbmap -option esperanto:qwerty -xset r rate 225 75 - -# query with: xdg-mime query filetype <file> -xdg-mime default evince.desktop application/pdf -xdg-mime default mpv.desktop video/mp4 -xdg-mime default mpv.desktop video/webm -xdg-mime default mpv.desktop video/x-matroska -xdg-mime default mpv.desktop audio/mpeg -xdg-mime default mpv.desktop audio/x-flac - -xdg-mime default firefox.desktop text/html -xdg-mime default firefox.desktop text/xml - -xdg-mime default nautilus.desktop inode/directory -xmodmap -e 'keycode 118 = bar Greek_lambda' diff --git a/src/bin/backup b/src/bin/backup deleted file mode 100755 index 828b96a8..00000000 --- a/src/bin/backup +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/sh -set -u - -usage() { - cat <<-'EOF' - Usage: - backup [ARCHIVE_TAG [COMMENT]] - backup -h - EOF -} - -help() { - cat <<-'EOF' - - ARCHIVE_TAG defaults to "cronjob". - COMMENT defaults to an empty string. - - Options: - -h, --help show this message - EOF -} - -for flag in "$@"; do - case "$flag" in - --) - break - ;; - --help) - usage - help - exit - ;; - *) - ;; - esac -done - -VERBOSE_FLAG='' -while getopts 'hv' flag; do - case "$flag" in - h) - usage - help - exit - ;; - v) - VERBOSE_FLAG='-v' - ;; - *) - usage >&2 - exit 2 - ;; - esac -done -shift $((OPTIND - 1)) - - -set -x - -finish() { - STATUS=$? - printf '\n>>>\n>>> exit status: %s\n>>>\n\n' "$STATUS" >&2 -} -trap finish EXIT - - -export BORG_REMOTE_PATH='borg1' -export BORG_PASSCOMMAND='pass show Usurpador/borg/passphrase' -SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" -export SSH_AUTH_SOCK - -borg init -e repokey-blake2 suyin:borg/usurpador ||: -borg key export suyin:borg/usurpador ~/archive/usurpador-borg-key.txt - -borg create \ - $VERBOSE_FLAG \ - --exclude ~/.cache \ - --stats \ - --compression lzma,9 \ - --comment "${2:-}" \ - "suyin:borg/usurpador::{hostname}-{now}-${1:-cronjob}" \ - ~/ - -borg check \ - --verbose \ - --last 3 \ - suyin:borg/usurpador - -borg prune \ - --verbose \ - --list \ - --keep-within=6m \ - --keep-weekly=52 \ - --keep-monthly=24 \ - suyin:borg/usurpador - -ssh suyin quota diff --git a/src/bin/commit-md b/src/bin/commit-md deleted file mode 100755 index 3d4d5f6a..00000000 --- a/src/bin/commit-md +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh -set -eu - -usage() { - cat <<-'EOF' - Usage: - commit-md [COMMIT] - commit-md -h -EOF -} - -help() { - cat <<-'EOF' - - Options: - -h, --help show this message -EOF -} - -for flag in "$@"; do - case "$flag" in - --) - break - ;; - --help) - usage - help - exit - ;; - *) - ;; - esac -done - -while getopts 'h' flag; do - case "$flag" in - h) - usage - help - exit - ;; - *) - usage >&2 - exit 2 - ;; - esac -done -shift $((OPTIND - 1)) - -COMMIT="${1:-$(git rev-parse HEAD)}" -REPOSITORY="$(basename "$PWD")" - -LINK="$(printf 'https://euandreh.xyz/%s.git/commit/?id=%s' "$REPOSITORY" "$COMMIT")" -# shellcheck disable=2016 -MD="$(printf '[`%s`](%s)' "$COMMIT" "$LINK")" - -xdg-open "$LINK" -printf ' Done in\n%s.' "$MD" | xclip -sel clip -printf 'Copied %s to the clipboard!\n' "$MD" >&2 diff --git a/src/bin/copy b/src/bin/copy deleted file mode 100755 index 04dc265d..00000000 --- a/src/bin/copy +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh -set -eu - -usage() { - cat <<-'EOF' - Usage: - copy [-n] < STDIN - copy -h -EOF -} - -help() { - cat <<-'EOF' - - Options: - -n remove newlines - -h, --help show this message - - Examples: - - Copy numbers to clipboard: - seq 10 | copy - - Copy string without newline: - echo 'with automatic newline' | copy -n -EOF -} - -for flag in "$@"; do - case "$flag" in - --) - break - ;; - --help) - usage - help - exit - ;; - *) - ;; - esac -done - -TRIM=false -while getopts 'nh' flag; do - case "$flag" in - n) - TRIM=true - ;; - h) - usage - help - exit - ;; - *) - usage >&2 - exit 2 - ;; - esac -done -shift $((OPTIND - 1)) - -if [ "$TRIM" = 'true' ]; then - cat - | tr -d '\n' | xclip -sel clip -else - cat - | xclip -sel clip -fi diff --git a/src/bin/fim b/src/bin/fim deleted file mode 100755 index 7a21a513..00000000 --- a/src/bin/fim +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -set -eu - -usage() { - cat <<-'EOF' - Usage: - fim - fim -h -EOF -} - -help() { - cat <<-'EOF' - - Options: - -h, --help show this message -EOF -} - -for flag in "$@"; do - case "$flag" in - --) - break - ;; - --help) - usage - help - exit - ;; - *) - ;; - esac -done - -while getopts 'h' flag; do - case "$flag" in - h) - usage - help - exit - ;; - *) - usage >&2 - exit 2 - ;; - esac -done -shift $((OPTIND - 1)) - -play "$DOTFILES/sh/Positive.ogg" 2> /dev/null diff --git a/src/bin/gc b/src/bin/gc deleted file mode 100755 index 0fd2ca78..00000000 --- a/src/bin/gc +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/sh -set -eu - -usage() { - cat <<-'EOF' - Usage: - gc - gc -h -EOF -} - -help() { - cat <<-'EOF' - - Options: - -h, --help show this message -EOF -} - -for flag in "$@"; do - case "$flag" in - --) - break - ;; - --help) - usage - help - exit - ;; - *) - ;; - esac -done - -while getopts 'h' flag; do - case "$flag" in - h) - usage - help - exit - ;; - *) - usage >&2 - exit 2 - ;; - esac -done -shift $((OPTIND - 1)) - -set -x -before="$(df -h .)" - -PROFILES=' -per-user/root/channels -per-user/andreh/profile -per-user/andreh/channels -system -' - -for p in $PROFILES; do - doas nix-env --delete-generations old -p "/nix/var/nix/profiles/$p" -done -nix-env --delete-generations old -nix-store --gc -nix-collect-garbage -d - -guix gc -d - -find ~/ -name 'nohup.out' -exec rm {} \; -rm -rf ~/.local/share/Trash/files/* -find /tmp/ -type f -atime +10 -exec rm {} \; ||: - -if command -V docker; then - echo y | docker system prune -a - docker rmi "$(docker images -a -q)" ||: - docker rm "$(docker ps -a -f status=exited -q)" ||: - docker stop "$(docker ps -a -q)" ||: - docker rm "$(docker ps -a -q)" ||: - echo y | docker volume prune - echo y | docker container prune -fi - -notmuch search --output=files --exclude=false tag:deleted | xargs -I{} rm "{}" -notmuch new - -after="$(df -h .)" - -set +x -echo 'Disk space before and after:' -echo " before: $before" -echo " after: $after" diff --git a/src/bin/open b/src/bin/open deleted file mode 100755 index 8ede1b7a..00000000 --- a/src/bin/open +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/sh -set -eu - -usage() { - cat <<-'EOF' - Usage: - open FILE... - open -h -EOF -} - -help() { - cat <<-'EOF' - - Options: - -h, --help show this message - - Examples: - - Open an HTML file on the current $BROWSER: - open index.html - - Open multiple PDF files (with zathura): - open *.pdf -EOF -} - -for flag in "$@"; do - case "$flag" in - --) - break - ;; - --help) - usage - help - exit - ;; - *) - ;; - esac -done - -while getopts 'h' flag; do - case "$flag" in - h) - usage - help - exit - ;; - *) - usage >&2 - exit 2 - ;; - esac -done -shift $((OPTIND - 1)) - -if [ -z "${1:-}" ]; then - usage >&2 - exit 2 -fi - -for f in "$@"; do - case "$f" in - *.ico|*.jpg|*.jpeg|*.png) - feh "$f" - ;; - https://www.youtube.com/watch*) - nohup mpv "$f" 1>&2 2>/dev/null & - ;; - *.flac|*.ogg|*.mkv|*.avi|*.mp4) - nohup mpv "$f" 1>&2 2>/dev/null & - ;; - http*|*.svg|*.html) - "$BROWSER" "$f" - ;; - gopher://*) - amfora "$f" - ;; - gemini://*) - amfora "$f" - ;; - *.pdf|*.djvu|*.ps|*.epub) - nohup zathura "$f" 1>&2 2>/dev/null & - ;; - *.txt) - less "$f" - ;; - *.midi) - timidity "$f" - ;; - *) - /run/current-system/sw/bin/xdg-open "$f" - ;; - esac -done diff --git a/src/bin/print b/src/bin/print deleted file mode 100755 index 735d8baa..00000000 --- a/src/bin/print +++ /dev/null @@ -1,151 +0,0 @@ -#!/bin/sh -set -eu - -usage() { - cat <<-'EOF' - Usage: - print [-d] [-q QUALITY] [FILE...] - print -h -EOF -} - -help() { - cat <<-'EOF' - - Options: - -d print duplex/double-sided - -q QUALITY choose the print quality, either: - low, medium (default) or high. - -h, --help show this message - - Examples: - - Print the given PostScript file with default quality: - $ print f1.ps - - Print multiple PDF files with high quality: - $ print -dq high *.pdf - - Print the file from STDIN, double-sided: - $ print -d < f2.ps - - Print multiple source code files: - $ print src/*.{c,h} -EOF -} - -mkdtemp() { - name="$(echo 'mkstemp(template)' | - m4 -D template="${TMPDIR:-/tmp}/m4-tmpname.")" - rm -f "$name" - mkdir "$name" - echo "$name" -} - -n_pages() { - pdftk "$1" dump_data | awk '/NumberOfPages/ { print $2 }' -} - -main() { - if file -b "$FILE" | grep -q PostScript; then - ps2pdf "$FILE" "$NEWDIR"/in.pdf - elif file -b "$FILE" | grep -q PDF; then - cp "$FILE" "$NEWDIR"/in.pdf - else - enscript -o- "$FILE" | ps2pdf - "$NEWDIR"/in.pdf - fi - cd "$NEWDIR" - - if [ -z "$DUPLEX" ]; then - lp in.pdf - cd - > /dev/null - return - fi - - if [ "$(n_pages in.pdf)" = '1' ]; then - lp in.pdf - return - fi - - pdftk A=in.pdf cat Aodd output odd.pdf - pdftk A=in.pdf cat Aeven output even.pdf - - NODD="$(n_pages odd.pdf)" - NEVEN="$(n_pages even.pdf)" - - printf 'Printing odd pages...\n' >&2 - lp odd.pdf - printf 'Has printing finished yet? Once it does, reload the pages and hit it enter to continue. ' - read -r < /dev/tty - lp even.pdf - - if [ "$NODD" != "$NEVEN" ]; then - printf '\n' | lp - fi - - cd - > /dev/null -} - -for flag in "$@"; do - case "$flag" in - --) - break - ;; - --help) - usage - help - exit - ;; - *) - ;; - esac -done - -lpoptions -o PrintQuality=standard -DUPLEX= -while getopts 'dq:h' flag; do - case "$flag" in - d) - DUPLEX=1 - ;; - q) - case "$OPTARG" in - low) - lpoptions -o PrintQuality=draft - ;; - medium) - lpoptions -o PrintQuality=standard - ;; - high) - lpoptions -o PrintQuality=high - ;; - *) - echo "Bad QUALITY option: \"$OPTARG\"" >&2 - exit 2 - ;; - esac - ;; - h) - usage - help - exit - ;; - *) - usage >&2 - exit 2 - ;; - esac -done -shift $((OPTIND - 1)) - -NEWDIR="$(mkdtemp)" -if [ -z "${1:-}" ]; then - FILE="$NEWDIR"/STDIN - cat - > "$FILE" - main -else - for f in "$@"; do - FILE="$f" - main - done -fi diff --git a/src/bin/qr b/src/bin/qr deleted file mode 100755 index 0fce2343..00000000 --- a/src/bin/qr +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh -set -eu - -usage() { - cat <<-'EOF' - Usage: - qr [-s PIXEL_SIZE] [DATA|-] - qr -h -EOF -} - -help() { - cat <<-'EOF' - - Options: - -s size of the pixel (default 10) - -h, --help show this help message -EOF -} - -for flag in "$@"; do - case "$flag" in - --) - break - ;; - --help) - usage - help - exit - ;; - *) - ;; - esac -done - -PIXEL_SIZE=10 -while getopts 's:h' flag; do - case "$flag" in - s) - PIXEL_SIZE="$OPTARG" - ;; - h) - usage - help - exit - ;; - *) - usage >&2 - exit 2 - ;; - esac -done -shift $((OPTIND - 1)) - - -echo "${1:-$(cat -)}" | qrencode -s "$PIXEL_SIZE" -o- | feh - diff --git a/src/bin/rfc b/src/bin/rfc deleted file mode 100755 index 27d5357b..00000000 --- a/src/bin/rfc +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/sh -set -eu -set -o pipefail - -usage() { - cat <<-'EOF' - Usage: - rfc [-w FORMAT] RFC_NUMBER - rfc -h -EOF -} - -help() { - cat <<-'EOF' - - Options: - -w FORMAT Choose between text (txt, the default) and - JSON (json) - -h, --help show this message -EOF -} - -for flag in "$@"; do - case "$flag" in - --) - break - ;; - --help) - usage - help - exit - ;; - *) - ;; - esac -done - -FORMAT='txt' -while getopts 'w:h' flag; do - case "$flag" in - w) - case "$OPTARG" in - json|txt) - FORMAT="$OPTARG" - ;; - *) - printf 'Bad FORMAT options: %s\n' \ - "$OPTARG" >&2 - exit 2 - ;; - esac - ;; - h) - usage - help - exit - ;; - *) - usage >&2 - exit 2 - ;; - esac -done -shift $((OPTIND - 1)) - - -if [ -z "${1:-}" ]; then - echo 'Missing argument RFC_NUMBER' >&2 - usage >&2 - exit 2 -fi - -if [ ! -e "$HOME/.local/share/doc/rfc/rfc$1.$FORMAT" ]; then - printf 'Given RFC_NUMBER "%s" does not exist\n' "$1" >&2 - exit 2 -fi - -view() { - if [ -t 1 ]; then - $PAGER - else - cat - - fi -} - -case "$FORMAT" in - txt) - cat "$HOME/.local/share/doc/rfc/rfc$1.txt" | view - ;; - json) - jq < "$HOME/.local/share/doc/rfc/rfc$1.json" | view - ;; - *) - printf 'Unreachable: unsupported FORMAT "%s"\n' \ - "$FORMAT" >&2 - exit 2 - ;; -esac diff --git a/src/bin/xdg-open b/src/bin/xdg-open deleted file mode 120000 index ce4a72b8..00000000 --- a/src/bin/xdg-open +++ /dev/null @@ -1 +0,0 @@ -open
\ No newline at end of file diff --git a/src/bin/yt b/src/bin/yt deleted file mode 100755 index 0ef5932c..00000000 --- a/src/bin/yt +++ /dev/null @@ -1,90 +0,0 @@ -#!/bin/sh -set -eu - -usage() { - cat <<-'EOF' - Usage: - yt [-f] URL... [PLAYLIST_COUNT:-15] - yt [-f] FILE... [PLAYLIST_COUNT:-15] - yt -h -EOF -} - -help() { - cat <<-'EOF' - - Options: - -f force to download a video already - in the archive - -h, --help show this message -EOF -} - -mkstemp() { - echo 'mkstemp(template)' | m4 -D template="${TMPDIR:-/tmp}/m4-tmpname." -} - - -for flag in "$@"; do - case "$flag" in - --) - break - ;; - --help) - usage - help - exit - ;; - *) - ;; - esac -done - -while getopts 'fh:' flag; do - case "$flag" in - f) - FORCE=1 - ;; - h) - usage - help - exit - ;; - *) - usage >&2 - exit 2 - ;; - esac -done -shift $((OPTIND - 1)) - -if [ -z "${1:-}" ]; then - echo 'Missing URL|FILE argument' >&2 - usage >&2 - exit 2 -fi - - -if [ ! -e "$1" ]; then - F="$(mkstemp)" - printf '%s\n' "$1" > "$F" -else - F="$1" -fi - - -DEFAULT_PLAYLIST_END=15 -YT_TEMPLATE="$HOME/Downloads/yt-dl/%(uploader)s/%(upload_date)s %(title)s.%(ext)s" - -if [ -z "${FORCE:-}" ]; then - ARCHIVE_OPTION="--download-archive $HOME/archive/youtube-dl-seen.conf" -fi - -youtube-dl \ - --batch-file "$F" \ - --format best \ - --prefer-free-formats \ - --playlist-end "${2:-$DEFAULT_PLAYLIST_END}" \ - --write-description \ - --output "$YT_TEMPLATE" \ - ${ARCHIVE_OPTION:-} diff --git a/xmonad/scripts/brightness.sh b/xmonad/scripts/brightness.sh deleted file mode 100755 index 7eae0e5c..00000000 --- a/xmonad/scripts/brightness.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -set -eux - -BRIGHTNESS_DIFF="$1" - -# base dir for backlight class -BASEDIR='/sys/class/backlight/' - -# get the backlight handler -HANDLER="$BASEDIR$(ls "$BASEDIR")" - -# get current brightness -OLD_BRIGHTNESS="$(cat "$HANDLER/brightness")" - -# get max brightness -MAX_BRIGHTNESS="$(cat "$HANDLER/max_brightness")" - -# get current brightness % -OLD_BRIGHTNESS_P=$(( 100 * "$OLD_BRIGHTNESS" / "$MAX_BRIGHTNESS" )) - -# calculate new brightness %, bounded by 0 100 range -NEW_BRIGHTNESS_P=$(("$OLD_BRIGHTNESS_P" + "$BRIGHTNESS_DIFF")) -NEW_BRIGHTNESS_P=$(("$NEW_BRIGHTNESS_P" > 100 ? 100 : "$NEW_BRIGHTNESS_P")) -NEW_BRIGHTNESS_P=$(("$NEW_BRIGHTNESS_P" < 1 ? 1 : "$NEW_BRIGHTNESS_P")) - -# calculate new brightness value -NEW_BRIGHTNESS=$(( "$MAX_BRIGHTNESS" * "$NEW_BRIGHTNESS_P" / 100 )) - -# set the new brightness value -echo "$NEW_BRIGHTNESS" > "$HANDLER/brightness" || doas chmod 666 "$HANDLER/brightness" diff --git a/xmonad/scripts/dmenu-clipmenu.sh b/xmonad/scripts/dmenu-clipmenu.sh deleted file mode 100755 index d1e9fc92..00000000 --- a/xmonad/scripts/dmenu-clipmenu.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -set -eu - -clipmenu -l 20 -i -p 'Entry: ' -fn Monospace-18 diff --git a/xmonad/scripts/dmenu-emoji.sh b/xmonad/scripts/dmenu-emoji.sh deleted file mode 100755 index 4ee93520..00000000 --- a/xmonad/scripts/dmenu-emoji.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -set -eu - -# Derived from: -# https://github.com/porras/dmenu-emoji - -cd ~/dev/libre/dotfiles/xmonad/scripts/ - -dmenu -l 20 -i -p 'Emoji: ' -fn Monospace-18 < list-emoji.txt | - awk '{print $(NF)}' | - tr -d '\n' | - xclip -sel clip diff --git a/xmonad/scripts/dmenu-pass-login.sh b/xmonad/scripts/dmenu-pass-login.sh deleted file mode 100755 index 915048d0..00000000 --- a/xmonad/scripts/dmenu-pass-login.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -set -eu - -choice="$(find ~/.password-store/ -type f -name '*.gpg' | - sed -e "s|^$HOME/.password-store/||" -e 's/\.gpg$//' | - dmenu -l 20 -i -p 'Pass: ' -fn Monospace-18)" - -if [ -n "$choice" ]; then - pass show -c2 "$choice" -fi diff --git a/xmonad/scripts/dmenu-pass.sh b/xmonad/scripts/dmenu-pass.sh deleted file mode 100755 index 5721c081..00000000 --- a/xmonad/scripts/dmenu-pass.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -set -eu - -clipctl disable - -choice="$( - find ~/.password-store/ -type f -name '*.gpg' | - sed -e "s|^$HOME/.password-store/||" -e 's/\.gpg$//' | - LANG=POSIX.UTF-8 sort | - dmenu -l 20 -i -p 'Pass: ' -fn Monospace-18 -)" - -if [ -n "$choice" ]; then - pass show -c "$choice" -fi - -clipctl enable diff --git a/xmonad/scripts/list-emoji.txt b/xmonad/scripts/list-emoji.txt deleted file mode 100644 index 06b5a582..00000000 --- a/xmonad/scripts/list-emoji.txt +++ /dev/null @@ -1,1432 +0,0 @@ -grinning face ๐ -smiling face with open mouth ๐ -smiling face with open mouth & smiling eyes ๐ -grinning face with smiling eyes ๐ -smiling face with open mouth & closed eyes ๐ -smiling face with open mouth & cold sweat ๐
-face with tears of joy ๐ -rolling on the floor laughing ๐คฃ -smiling face โบ๏ธ -smiling face with smiling eyes ๐ -smiling face with halo ๐ -slightly smiling face ๐ -upside-down face ๐ -winking face ๐ -relieved face ๐ -smiling face with heart-eyes ๐ -face blowing a kiss ๐ -kissing face ๐ -kissing face with smiling eyes ๐ -kissing face with closed eyes ๐ -face savouring delicious food ๐ -face with stuck-out tongue & winking eye ๐ -face with stuck-out tongue & closed eyes ๐ -face with stuck-out tongue ๐ -money-mouth face ๐ค -hugging face ๐ค -nerd face ๐ค -smiling face with sunglasses ๐ -clown face ๐คก -cowboy hat face ๐ค -smirking face ๐ -unamused face ๐ -disappointed face ๐ -pensive face ๐ -worried face ๐ -confused face ๐ -slightly frowning face ๐ -frowning face โน๏ธ -persevering face ๐ฃ -confounded face ๐ -tired face ๐ซ -weary face ๐ฉ -face with steam from nose ๐ค -angry face ๐ -pouting face ๐ก -face without mouth ๐ถ -neutral face ๐ -expressionless face ๐ -hushed face ๐ฏ -frowning face with open mouth ๐ฆ -anguished face ๐ง -face with open mouth ๐ฎ -astonished face ๐ฒ -dizzy face ๐ต -flushed face ๐ณ -face screaming in fear ๐ฑ -fearful face ๐จ -face with open mouth & cold sweat ๐ฐ -crying face ๐ข -disappointed but relieved face ๐ฅ -drooling face ๐คค -loudly crying face ๐ญ -face with cold sweat ๐ -sleepy face ๐ช -sleeping face ๐ด -face with rolling eyes ๐ -thinking face ๐ค -lying face ๐คฅ -grimacing face ๐ฌ -zipper-mouth face ๐ค -nauseated face ๐คข -sneezing face ๐คง -face with medical mask ๐ท -face with thermometer ๐ค -face with head-bandage ๐ค -smiling face with horns ๐ -angry face with horns ๐ฟ -ogre ๐น -goblin ๐บ -pile of poo ๐ฉ -ghost ๐ป -skull ๐ -skull and crossbones โ ๏ธ -alien ๐ฝ -alien monster ๐พ -robot face ๐ค -jack-o-lantern ๐ -smiling cat face with open mouth ๐บ -grinning cat face with smiling eyes ๐ธ -cat face with tears of joy ๐น -smiling cat face with heart-eyes ๐ป -cat face with wry smile ๐ผ -kissing cat face with closed eyes ๐ฝ -weary cat face ๐ -crying cat face ๐ฟ -pouting cat face ๐พ -open hands ๐ -raising hands ๐ -clapping hands ๐ -folded hands ๐ -handshake ๐ค -thumbs up ๐ -thumbs down ๐ -oncoming fist ๐ -raised fist โ -left-facing fist ๐ค -right-facing fist ๐ค -crossed fingers ๐ค -victory hand โ๏ธ -sign of the horns ๐ค -OK hand ๐ -backhand index pointing left ๐ -backhand index pointing right ๐ -backhand index pointing up ๐ -backhand index pointing down ๐ -index pointing up โ๏ธ -raised hand โ -raised back of hand ๐ค -raised hand with fingers splayed ๐ -vulcan salute ๐ -waving hand ๐ -call me hand ๐ค -flexed biceps ๐ช -middle finger ๐ -writing hand โ๏ธ -selfie ๐คณ -nail polish ๐
-ring ๐ -lipstick ๐ -kiss mark ๐ -mouth ๐ -tongue ๐
-ear ๐ -nose ๐ -footprints ๐ฃ -eye ๐ -eyes ๐ -speaking head ๐ฃ -bust in silhouette ๐ค -busts in silhouette ๐ฅ -baby ๐ถ -boy ๐ฆ -girl ๐ง -man ๐จ -woman ๐ฉ -blond-haired woman ๐ฑโโ -blond-haired person ๐ฑ -old man ๐ด -old woman ๐ต -man with Chinese cap ๐ฒ -woman wearing turban ๐ณโโ -person wearing turban ๐ณ -woman police officer ๐ฎโโ -police officer ๐ฎ -woman construction worker ๐ทโโ -construction worker ๐ท -woman guard ๐โโ -guard ๐ -woman detective ๐ต๏ธโโ๏ธ -detective ๐ต -woman health worker ๐ฉโโ -man health worker ๐จโโ -woman farmer ๐ฉโ๐พ -man farmer ๐จโ๐พ -woman cook ๐ฉโ๐ณ -man cook ๐จโ๐ณ -woman student ๐ฉโ๐ -man student ๐จโ๐ -woman singer ๐ฉโ๐ค -man singer ๐จโ๐ค -woman teacher ๐ฉโ๐ซ -man teacher ๐จโ๐ซ -woman factory worker ๐ฉโ๐ญ -man factory worker ๐จโ๐ญ -woman technologist ๐ฉโ๐ป -man technologist ๐จโ๐ป -woman office worker ๐ฉโ๐ผ -man office worker ๐จโ๐ผ -woman mechanic ๐ฉโ๐ง -man mechanic ๐จโ๐ง -woman scientist ๐ฉโ๐ฌ -man scientist ๐จโ๐ฌ -woman artist ๐ฉโ๐จ -man artist ๐จโ๐จ -woman firefighter ๐ฉโ๐ -man firefighter ๐จโ๐ -woman pilot ๐ฉโโ -man pilot ๐จโโ -woman astronaut ๐ฉโ๐ -man astronaut ๐จโ๐ -woman judge ๐ฉโโ -man judge ๐จโโ -Mrs. Claus ๐คถ -Santa Claus ๐
-princess ๐ธ -prince ๐คด -bride with veil ๐ฐ -man in tuxedo ๐คต -baby angel ๐ผ -pregnant woman ๐คฐ -woman bowing ๐โโ -person bowing ๐ -person tipping hand ๐ -man tipping hand ๐โโ -person gesturing NO ๐
-man gesturing NO ๐
โโ -person gesturing OK ๐ -man gesturing OK ๐โโ -person raising hand ๐ -man raising hand ๐โโ -woman facepalming ๐คฆโโ -man facepalming ๐คฆโโ -woman shrugging ๐คทโโ -man shrugging ๐คทโโ -person pouting ๐ -man pouting ๐โโ -person frowning ๐ -man frowning ๐โโ -person getting haircut ๐ -man getting haircut ๐โโ -person getting massage ๐ -man getting massage ๐โโ -man in business suit levitating ๐ด -woman dancing ๐ -man dancing ๐บ -people with bunny ears partying ๐ฏ -men with bunny ears partying ๐ฏโโ -woman walking ๐ถโโ -person walking ๐ถ -woman running ๐โโ -person running ๐ -man and woman holding hands ๐ซ -two women holding hands ๐ญ -two men holding hands ๐ฌ -couple with heart ๐ -couple with heart: woman woman ๐ฉโโค๏ธโ๐ฉ -couple with heart: man man ๐จโโค๏ธโ๐จ -kiss ๐ -kiss: woman woman ๐ฉโโค๏ธโ๐โ๐ฉ -kiss: man man ๐จโโค๏ธโ๐โ๐จ -family ๐ช -family: man woman girl ๐จโ๐ฉโ๐ง -family: man woman girl boy ๐จโ๐ฉโ๐งโ๐ฆ -family: man woman boy boy ๐จโ๐ฉโ๐ฆโ๐ฆ -family: man woman girl girl ๐จโ๐ฉโ๐งโ๐ง -family: woman woman boy ๐ฉโ๐ฉโ๐ฆ -family: woman woman girl ๐ฉโ๐ฉโ๐ง -family: woman woman girl boy ๐ฉโ๐ฉโ๐งโ๐ฆ -family: woman woman boy boy ๐ฉโ๐ฉโ๐ฆโ๐ฆ -family: woman woman girl girl ๐ฉโ๐ฉโ๐งโ๐ง -family: man man boy ๐จโ๐จโ๐ฆ -family: man man girl ๐จโ๐จโ๐ง -family: man man girl boy ๐จโ๐จโ๐งโ๐ฆ -family: man man boy boy ๐จโ๐จโ๐ฆโ๐ฆ -family: man man girl girl ๐จโ๐จโ๐งโ๐ง -family: woman boy ๐ฉโ๐ฆ -family: woman girl ๐ฉโ๐ง -family: woman girl boy ๐ฉโ๐งโ๐ฆ -family: woman boy boy ๐ฉโ๐ฆโ๐ฆ -family: woman girl girl ๐ฉโ๐งโ๐ง -family: man boy ๐จโ๐ฆ -family: man girl ๐จโ๐ง -family: man girl boy ๐จโ๐งโ๐ฆ -family: man boy boy ๐จโ๐ฆโ๐ฆ -family: man girl girl ๐จโ๐งโ๐ง -womanโs clothes ๐ -t-shirt ๐ -jeans ๐ -necktie ๐ -dress ๐ -bikini ๐ -kimono ๐ -high-heeled shoe ๐ -womanโs sandal ๐ก -womanโs boot ๐ข -manโs shoe ๐ -running shoe ๐ -womanโs hat ๐ -top hat ๐ฉ -graduation cap ๐ -crown ๐ -rescue workerโs helmet โ -school backpack ๐ -clutch bag ๐ -purse ๐ -handbag ๐ -briefcase ๐ผ -glasses ๐ -sunglasses ๐ถ -closed umbrella ๐ -umbrella โ๏ธ -dog face ๐ถ -cat face ๐ฑ -mouse face ๐ญ -hamster face ๐น -rabbit face ๐ฐ -fox face ๐ฆ -bear face ๐ป -panda face ๐ผ -koala ๐จ -tiger face ๐ฏ -lion face ๐ฆ -cow face ๐ฎ -pig face ๐ท -pig nose ๐ฝ -frog face ๐ธ -monkey face ๐ต -see-no-evil monkey ๐ -hear-no-evil monkey ๐ -speak-no-evil monkey ๐ -monkey ๐ -chicken ๐ -penguin ๐ง -bird ๐ฆ -baby chick ๐ค -hatching chick ๐ฃ -front-facing baby chick ๐ฅ -duck ๐ฆ -eagle ๐ฆ
-owl ๐ฆ -bat ๐ฆ -wolf face ๐บ -boar ๐ -horse face ๐ด -unicorn face ๐ฆ -honeybee ๐ -bug ๐ -butterfly ๐ฆ -snail ๐ -spiral shell ๐ -lady beetle ๐ -ant ๐ -spider ๐ท -spider web ๐ธ -turtle ๐ข -snake ๐ -lizard ๐ฆ -scorpion ๐ฆ -crab ๐ฆ -squid ๐ฆ -octopus ๐ -shrimp ๐ฆ -tropical fish ๐ -fish ๐ -blowfish ๐ก -dolphin ๐ฌ -shark ๐ฆ -spouting whale ๐ณ -whale ๐ -crocodile ๐ -leopard ๐ -tiger ๐
-water buffalo ๐ -ox ๐ -cow ๐ -deer ๐ฆ -camel ๐ช -two-hump camel ๐ซ -elephant ๐ -rhinoceros ๐ฆ -gorilla ๐ฆ -horse ๐ -pig ๐ -goat ๐ -ram ๐ -sheep ๐ -dog ๐ -poodle ๐ฉ -cat ๐ -rooster ๐ -turkey ๐ฆ -dove ๐ -rabbit ๐ -mouse ๐ -rat ๐ -chipmunk ๐ฟ -paw prints ๐พ -dragon ๐ -dragon face ๐ฒ -cactus ๐ต -Christmas tree ๐ -evergreen tree ๐ฒ -deciduous tree ๐ณ -palm tree ๐ด -seedling ๐ฑ -herb ๐ฟ -shamrock โ๏ธ -four leaf clover ๐ -pine decoration ๐ -tanabata tree ๐ -leaf fluttering in wind ๐ -fallen leaf ๐ -maple leaf ๐ -mushroom ๐ -sheaf of rice ๐พ -bouquet ๐ -tulip ๐ท -rose ๐น -wilted flower ๐ฅ -sunflower ๐ป -blossom ๐ผ -cherry blossom ๐ธ -hibiscus ๐บ -globe showing Americas ๐ -globe showing Europe-Africa ๐ -globe showing Asia-Australia ๐ -full moon ๐ -waning gibbous moon ๐ -last quarter moon ๐ -waning crescent moon ๐ -new moon ๐ -waxing crescent moon ๐ -first quarter moon ๐ -waxing gibbous moon ๐ -new moon face ๐ -full moon with face ๐ -sun with face ๐ -first quarter moon with face ๐ -last quarter moon with face ๐ -crescent moon ๐ -dizzy ๐ซ -white medium star โญ๏ธ -glowing star ๐ -sparkles โจ -high voltage โก๏ธ -fire ๐ฅ -collision ๐ฅ -comet โ -sun โ๏ธ -sun behind small cloud ๐ค -sun behind cloud โ
๏ธ -sun behind large cloud ๐ฅ -sun behind rain cloud ๐ฆ -rainbow ๐ -cloud โ๏ธ -cloud with rain ๐ง -cloud with lightning and rain โ -cloud with lightning ๐ฉ -cloud with snow ๐จ -snowman โ๏ธ -snowman without snow โ๏ธ -snowflake โ๏ธ -wind face ๐ฌ -dashing away ๐จ -tornado ๐ช -fog ๐ซ -water wave ๐ -droplet ๐ง -sweat droplets ๐ฆ -umbrella with rain drops โ๏ธ -green apple ๐ -red apple ๐ -pear ๐ -tangerine ๐ -lemon ๐ -banana ๐ -watermelon ๐ -grapes ๐ -strawberry ๐ -melon ๐ -cherries ๐ -peach ๐ -pineapple ๐ -kiwi fruit ๐ฅ -avocado ๐ฅ -tomato ๐
-eggplant ๐ -cucumber ๐ฅ -carrot ๐ฅ -ear of corn ๐ฝ -hot pepper ๐ถ -potato ๐ฅ -roasted sweet potato ๐ -chestnut ๐ฐ -peanuts ๐ฅ -honey pot ๐ฏ -croissant ๐ฅ -bread ๐ -baguette bread ๐ฅ -cheese wedge ๐ง -egg ๐ฅ -cooking ๐ณ -bacon ๐ฅ -pancakes ๐ฅ -fried shrimp ๐ค -poultry leg ๐ -meat on bone ๐ -pizza ๐ -hot dog ๐ญ -hamburger ๐ -french fries ๐ -stuffed flatbread ๐ฅ -taco ๐ฎ -burrito ๐ฏ -green salad ๐ฅ -shallow pan of food ๐ฅ -spaghetti ๐ -steaming bowl ๐ -pot of food ๐ฒ -fish cake with swirl ๐ฅ -sushi ๐ฃ -bento box ๐ฑ -curry rice ๐ -cooked rice ๐ -rice ball ๐ -rice cracker ๐ -oden ๐ข -dango ๐ก -shaved ice ๐ง -ice cream ๐จ -soft ice cream ๐ฆ -shortcake ๐ฐ -birthday cake ๐ -custard ๐ฎ -lollipop ๐ญ -candy ๐ฌ -chocolate bar ๐ซ -popcorn ๐ฟ -doughnut ๐ฉ -cookie ๐ช -glass of milk ๐ฅ -baby bottle ๐ผ -hot beverage โ๏ธ -teacup without handle ๐ต -sake ๐ถ -beer mug ๐บ -clinking beer mugs ๐ป -clinking glasses ๐ฅ -wine glass ๐ท -tumbler glass ๐ฅ -cocktail glass ๐ธ -tropical drink ๐น -bottle with popping cork ๐พ -spoon ๐ฅ -fork and knife ๐ด -fork and knife with plate ๐ฝ -soccer ball โฝ๏ธ -basketball ๐ -american football ๐ -baseball โพ๏ธ -tennis ๐พ -volleyball ๐ -rugby football ๐ -pool 8 ball ๐ฑ -ping pong ๐ -badminton ๐ธ -goal net ๐ฅ
-ice hockey ๐ -field hockey ๐ -cricket ๐ -flag in hole โณ๏ธ -bow and arrow ๐น -fishing pole ๐ฃ -boxing glove ๐ฅ -martial arts uniform ๐ฅ -ice skate โธ -skis ๐ฟ -skier โท -snowboarder ๐ -woman lifting weights ๐๏ธโโ๏ธ -person lifting weights ๐ -person fencing ๐คบ -women wrestling ๐คผโโ -men wrestling ๐คผโโ -woman cartwheeling ๐คธโโ -man cartwheeling ๐คธโโ -woman bouncing ball โน๏ธโโ๏ธ -person bouncing ball โน -woman playing handball ๐คพโโ -man playing handball ๐คพโโ -woman golfing ๐๏ธโโ๏ธ -person golfing ๐ -woman surfing ๐โโ -person surfing ๐ -woman swimming ๐โโ -person swimming ๐ -woman playing water polo ๐คฝโโ -man playing water polo ๐คฝโโ -woman rowing boat ๐ฃโโ -person rowing boat ๐ฃ -horse racing ๐ -woman biking ๐ดโโ -person biking ๐ด -woman mountain biking ๐ตโโ -person mountain biking ๐ต -running shirt ๐ฝ -sports medal ๐
-military medal ๐ -1st place medal ๐ฅ -2nd place medal ๐ฅ -3rd place medal ๐ฅ -trophy ๐ -rosette ๐ต -reminder ribbon ๐ -ticket ๐ซ -admission tickets ๐ -circus tent ๐ช -woman juggling ๐คนโโ -man juggling ๐คนโโ -performing arts ๐ญ -artist palette ๐จ -clapper board ๐ฌ -microphone ๐ค -headphone ๐ง -musical score ๐ผ -musical keyboard ๐น -drum ๐ฅ -saxophone ๐ท -trumpet ๐บ -guitar ๐ธ -violin ๐ป -game die ๐ฒ -direct hit ๐ฏ -bowling ๐ณ -video game ๐ฎ -slot machine ๐ฐ -automobile ๐ -taxi ๐ -sport utility vehicle ๐ -bus ๐ -trolleybus ๐ -racing car ๐ -police car ๐ -ambulance ๐ -fire engine ๐ -minibus ๐ -delivery truck ๐ -articulated lorry ๐ -tractor ๐ -kick scooter ๐ด -bicycle ๐ฒ -motor scooter ๐ต -motorcycle ๐ -police car light ๐จ -oncoming police car ๐ -oncoming bus ๐ -oncoming automobile ๐ -oncoming taxi ๐ -aerial tramway ๐ก -mountain cableway ๐ -suspension railway ๐ -railway car ๐ -tram car ๐ -mountain railway ๐ -monorail ๐ -high-speed train ๐ -high-speed train with bullet nose ๐
-light rail ๐ -locomotive ๐ -train ๐ -metro ๐ -tram ๐ -station ๐ -helicopter ๐ -small airplane ๐ฉ -airplane โ๏ธ -airplane departure ๐ซ -airplane arrival ๐ฌ -rocket ๐ -satellite ๐ฐ -seat ๐บ -canoe ๐ถ -sailboat โต๏ธ -motor boat ๐ฅ -speedboat ๐ค -passenger ship ๐ณ -ferry โด -ship ๐ข -anchor โ๏ธ -construction ๐ง -fuel pump โฝ๏ธ -bus stop ๐ -vertical traffic light ๐ฆ -horizontal traffic light ๐ฅ -world map ๐บ -moai ๐ฟ -Statue of Liberty ๐ฝ -fountain โฒ๏ธ -Tokyo tower ๐ผ -castle ๐ฐ -Japanese castle ๐ฏ -stadium ๐ -ferris wheel ๐ก -roller coaster ๐ข -carousel horse ๐ -umbrella on ground โฑ -beach with umbrella ๐ -desert island ๐ -mountain โฐ -snow-capped mountain ๐ -mount fuji ๐ป -volcano ๐ -desert ๐ -camping ๐ -tent โบ๏ธ -railway track ๐ค -motorway ๐ฃ -building construction ๐ -factory ๐ญ -house ๐ -house with garden ๐ก -house ๐ -derelict house ๐ -office building ๐ข -department store ๐ฌ -Japanese post office ๐ฃ -post office ๐ค -hospital ๐ฅ -bank ๐ฆ -hotel ๐จ -convenience store ๐ช -school ๐ซ -love hotel ๐ฉ -wedding ๐ -classical building ๐ -church โช๏ธ -mosque ๐ -synagogue ๐ -kaaba ๐ -shinto shrine โฉ -map of Japan ๐พ -moon viewing ceremony ๐ -national park ๐ -sunrise ๐
-sunrise over mountains ๐ -shooting star ๐ -sparkler ๐ -fireworks ๐ -sunset ๐ -cityscape at dusk ๐ -cityscape ๐ -night with stars ๐ -milky way ๐ -bridge at night ๐ -foggy ๐ -watch โ๏ธ -mobile phone ๐ฑ -mobile phone with arrow ๐ฒ -laptop computer ๐ป -keyboard โจ๏ธ -desktop computer ๐ฅ -printer ๐จ -computer mouse ๐ฑ -trackball ๐ฒ -joystick ๐น -clamp ๐ -computer disk ๐ฝ -floppy disk ๐พ -optical disk ๐ฟ -dvd ๐ -videocassette ๐ผ -camera ๐ท -camera with flash ๐ธ -video camera ๐น -movie camera ๐ฅ -film projector ๐ฝ -film frames ๐ -telephone receiver ๐ -telephone โ๏ธ -pager ๐ -fax machine ๐ -television ๐บ -radio ๐ป -studio microphone ๐ -level slider ๐ -control knobs ๐ -stopwatch โฑ -timer clock โฒ -alarm clock โฐ -mantelpiece clock ๐ฐ -hourglass โ๏ธ -hourglass with flowing sand โณ -satellite antenna ๐ก -battery ๐ -electric plug ๐ -light bulb ๐ก -flashlight ๐ฆ -candle ๐ฏ -wastebasket ๐ -oil drum ๐ข -money with wings ๐ธ -dollar banknote ๐ต -yen banknote ๐ด -euro banknote ๐ถ -pound banknote ๐ท -money bag ๐ฐ -credit card ๐ณ -gem stone ๐ -balance scale โ๏ธ -wrench ๐ง -hammer ๐จ -hammer and pick โ -hammer and wrench ๐ -pick โ -nut and bolt ๐ฉ -gear โ๏ธ -chains โ -pistol ๐ซ -bomb ๐ฃ -kitchen knife ๐ช -dagger ๐ก -crossed swords โ๏ธ -shield ๐ก -cigarette ๐ฌ -coffin โฐ๏ธ -funeral urn โฑ๏ธ -amphora ๐บ -crystal ball ๐ฎ -prayer beads ๐ฟ -barber pole ๐ -alembic โ๏ธ -telescope ๐ญ -microscope ๐ฌ -hole ๐ณ -pill ๐ -syringe ๐ -thermometer ๐ก -toilet ๐ฝ -potable water ๐ฐ -shower ๐ฟ -bathtub ๐ -person taking bath ๐ -bellhop bell ๐ -key ๐ -old key ๐ -door ๐ช -couch and lamp ๐ -bed ๐ -person in bed ๐ -framed picture ๐ผ -shopping bags ๐ -shopping cart ๐ -wrapped gift ๐ -balloon ๐ -carp streamer ๐ -ribbon ๐ -confetti ball ๐ -party popper ๐ -Japanese dolls ๐ -red paper lantern ๐ฎ -wind chime ๐ -envelope โ๏ธ -envelope with arrow ๐ฉ -incoming envelope ๐จ -e-mail ๐ง -love letter ๐ -inbox tray ๐ฅ -outbox tray ๐ค -package ๐ฆ -label ๐ท -closed mailbox with lowered flag ๐ช -closed mailbox with raised flag ๐ซ -open mailbox with raised flag ๐ฌ -open mailbox with lowered flag ๐ญ -postbox ๐ฎ -postal horn ๐ฏ -scroll ๐ -page with curl ๐ -page facing up ๐ -bookmark tabs ๐ -bar chart ๐ -chart increasing ๐ -chart decreasing ๐ -spiral notepad ๐ -spiral calendar ๐ -tear-off calendar ๐ -calendar ๐
-card index ๐ -card file box ๐ -ballot box with ballot ๐ณ -file cabinet ๐ -clipboard ๐ -file folder ๐ -open file folder ๐ -card index dividers ๐ -rolled-up newspaper ๐ -newspaper ๐ฐ -notebook ๐ -notebook with decorative cover ๐ -ledger ๐ -closed book ๐ -green book ๐ -blue book ๐ -orange book ๐ -books ๐ -open book ๐ -bookmark ๐ -link ๐ -paperclip ๐ -linked paperclips ๐ -triangular ruler ๐ -straight ruler ๐ -pushpin ๐ -round pushpin ๐ -scissors โ๏ธ -pen ๐ -fountain pen ๐ -black nib โ๏ธ -paintbrush ๐ -crayon ๐ -memo ๐ -pencil โ๏ธ -left-pointing magnifying glass ๐ -right-pointing magnifying glass ๐ -locked with pen ๐ -locked with key ๐ -locked ๐ -unlocked ๐ -red heart โค๏ธ -yellow heart ๐ -green heart ๐ -blue heart ๐ -purple heart ๐ -black heart ๐ค -broken heart ๐ -heavy heart exclamation โฃ๏ธ -two hearts ๐ -revolving hearts ๐ -beating heart ๐ -growing heart ๐ -sparkling heart ๐ -heart with arrow ๐ -heart with ribbon ๐ -heart decoration ๐ -peace symbol โฎ๏ธ -latin cross โ๏ธ -star and crescent โช๏ธ -om ๐ -wheel of dharma โธ๏ธ -star of David โก๏ธ -dotted six-pointed star ๐ฏ -menorah ๐ -yin yang โฏ๏ธ -orthodox cross โฆ๏ธ -place of worship ๐ -Ophiuchus โ -Aries โ๏ธ -Taurus โ๏ธ -Gemini โ๏ธ -Cancer โ๏ธ -Leo โ๏ธ -Virgo โ๏ธ -Libra โ๏ธ -Scorpius โ๏ธ -Sagittarius โ๏ธ -Capricorn โ๏ธ -Aquarius โ๏ธ -Pisces โ๏ธ -ID button ๐ -atom symbol โ๏ธ -Japanese โacceptableโ button ๐ -radioactive โข๏ธ -biohazard โฃ๏ธ -mobile phone off ๐ด -vibration mode ๐ณ -Japanese โnot free of chargeโ button ๐ถ -Japanese โfree of chargeโ button ๐๏ธ -Japanese โapplicationโ button ๐ธ -Japanese โopen for businessโ button ๐บ -Japanese โmonthly amountโ button ๐ท๏ธ -eight-pointed star โด๏ธ -VS button ๐ -white flower ๐ฎ -Japanese โbargainโ button ๐ -Japanese โsecretโ button ใ๏ธ -Japanese โcongratulationsโ button ใ๏ธ -Japanese โpassing gradeโ button ๐ด -Japanese โno vacancyโ button ๐ต -Japanese โdiscountโ button ๐น -Japanese โprohibitedโ button ๐ฒ -A button (blood type) ๐
ฐ๏ธ -B button (blood type) ๐
ฑ๏ธ -AB button (blood type) ๐ -CL button ๐ -O button (blood type) ๐
พ๏ธ -SOS button ๐ -cross mark โ -heavy large circle โญ๏ธ -stop sign ๐ -no entry โ๏ธ -name badge ๐ -prohibited ๐ซ -hundred points ๐ฏ -anger symbol ๐ข -hot springs โจ๏ธ -no pedestrians ๐ท -no littering ๐ฏ -no bicycles ๐ณ -non-potable water ๐ฑ -no one under eighteen ๐ -no mobile phones ๐ต -no smoking ๐ญ -exclamation mark โ๏ธ -white exclamation mark โ -question mark โ -white question mark โ -double exclamation mark โผ๏ธ -exclamation question mark โ๏ธ -dim button ๐
-bright button ๐ -part alternation mark ใฝ๏ธ -warning โ ๏ธ -children crossing ๐ธ -trident emblem ๐ฑ -fleur-de-lis โ๏ธ -Japanese symbol for beginner ๐ฐ -recycling symbol โป๏ธ -white heavy check mark โ
-Japanese โreservedโ button ๐ฏ๏ธ -chart increasing with yen ๐น -sparkle โ๏ธ -eight-spoked asterisk โณ๏ธ -cross mark button โ -globe with meridians ๐ -diamond with a dot ๐ -circled M โ๏ธ -cyclone ๐ -zzz ๐ค -ATM sign ๐ง -water closet ๐พ -wheelchair symbol โฟ๏ธ -P button ๐
ฟ๏ธ -Japanese โvacancyโ button ๐ณ -Japanese โservice chargeโ button ๐๏ธ -passport control ๐ -customs ๐ -baggage claim ๐ -left luggage ๐
-menโs room ๐น -womenโs room ๐บ -baby symbol ๐ผ -restroom ๐ป -litter in bin sign ๐ฎ -cinema ๐ฆ -antenna bars ๐ถ -Japanese โhereโ button ๐ -input symbols ๐ฃ -information โน๏ธ -input latin letters ๐ค -input latin lowercase ๐ก -input latin uppercase ๐ -NG button ๐ -OK button ๐ -UP! button ๐ -COOL button ๐ -NEW button ๐ -FREE button ๐ -keycap: 0 0๏ธโฃ -keycap: 1 1๏ธโฃ -keycap: 2 2๏ธโฃ -keycap: 3 3๏ธโฃ -keycap: 4 4๏ธโฃ -keycap: 5 5๏ธโฃ -keycap: 6 6๏ธโฃ -keycap: 7 7๏ธโฃ -keycap: 8 8๏ธโฃ -keycap: 9 9๏ธโฃ -keycap 10 ๐ -input numbers ๐ข -keycap: # #๏ธโฃ -keycap: * *๏ธโฃ -play button โถ๏ธ -pause button โธ -play or pause button โฏ -stop button โน -record button โบ -next track button โญ -last track button โฎ -fast-forward button โฉ -fast reverse button โช -fast up button โซ -fast down button โฌ -reverse button โ๏ธ -up button ๐ผ -down button ๐ฝ -right arrow โก๏ธ -left arrow โฌ
๏ธ -up arrow โฌ๏ธ -down arrow โฌ๏ธ -up-right arrow โ๏ธ -down-right arrow โ๏ธ -down-left arrow โ๏ธ -up-left arrow โ๏ธ -up-down arrow โ๏ธ -left-right arrow โ๏ธ -left arrow curving right โช๏ธ -right arrow curving left โฉ๏ธ -right arrow curving up โคด๏ธ -right arrow curving down โคต๏ธ -shuffle tracks button ๐ -repeat button ๐ -repeat single button ๐ -anticlockwise arrows button ๐ -clockwise vertical arrows ๐ -musical note ๐ต -musical notes ๐ถ -heavy plus sign โ -heavy minus sign โ -heavy division sign โ -heavy multiplication x โ๏ธ -heavy dollar sign ๐ฒ -currency exchange ๐ฑ -trade mark โข๏ธ -copyright ยฉ๏ธ -registered ยฎ๏ธ -wavy dash ใฐ๏ธ -curly loop โฐ -double curly loop โฟ -END arrow ๐ -BACK arrow ๐ -ON! arrow ๐ -TOP arrow ๐ -SOON arrow ๐ -heavy check mark โ๏ธ -ballot box with check โ๏ธ -radio button ๐ -white circle โช๏ธ -black circle โซ๏ธ -red circle ๐ด -blue circle ๐ต -red triangle pointed up ๐บ -red triangle pointed down ๐ป -small orange diamond ๐ธ -small blue diamond ๐น -large orange diamond ๐ถ -large blue diamond ๐ท -white square button ๐ณ -black square button ๐ฒ -black small square โช๏ธ -white small square โซ๏ธ -black medium-small square โพ๏ธ -white medium-small square โฝ๏ธ -black medium square โผ๏ธ -white medium square โป๏ธ -black large square โฌ๏ธ -white large square โฌ๏ธ -speaker low volume ๐ -muted speaker ๐ -speaker medium volume ๐ -speaker high volume ๐ -bell ๐ -bell with slash ๐ -megaphone ๐ฃ -loudspeaker ๐ข -eye in speech bubble ๐โ๐จ -speech balloon ๐ฌ -thought balloon ๐ญ -right anger bubble ๐ฏ -spade suit โ ๏ธ -club suit โฃ๏ธ -heart suit โฅ๏ธ -diamond suit โฆ๏ธ -joker ๐ -flower playing cards ๐ด -mahjong red dragon ๐๏ธ -one oโclock ๐ -two oโclock ๐ -three oโclock ๐ -four oโclock ๐ -five oโclock ๐ -six oโclock ๐ -seven oโclock ๐ -eight oโclock ๐ -nine oโclock ๐ -ten oโclock ๐ -eleven oโclock ๐ -twelve oโclock ๐ -one-thirty ๐ -two-thirty ๐ -three-thirty ๐ -four-thirty ๐ -five-thirty ๐ -six-thirty ๐ก -seven-thirty ๐ข -eight-thirty ๐ฃ -nine-thirty ๐ค -ten-thirty ๐ฅ -eleven-thirty ๐ฆ -twelve-thirty ๐ง -white flag ๐ณ๏ธ -black flag ๐ด -chequered flag ๐ -triangular flag ๐ฉ -rainbow flag ๐ณ๏ธโ๐ -Afghanistan ๐ฆ๐ซ -ร
land Islands ๐ฆ๐ฝ -Albania ๐ฆ๐ฑ -Algeria ๐ฉ๐ฟ -American Samoa ๐ฆ๐ธ -Andorra ๐ฆ๐ฉ -Angola ๐ฆ๐ด -Anguilla ๐ฆ๐ฎ -Antarctica ๐ฆ๐ถ -Antigua & Barbuda ๐ฆ๐ฌ -Argentina ๐ฆ๐ท -Armenia ๐ฆ๐ฒ -Aruba ๐ฆ๐ผ -Australia ๐ฆ๐บ -Austria ๐ฆ๐น -Azerbaijan ๐ฆ๐ฟ -Bahamas ๐ง๐ธ -Bahrain ๐ง๐ญ -Bangladesh ๐ง๐ฉ -Barbados ๐ง๐ง -Belarus ๐ง๐พ -Belgium ๐ง๐ช -Belize ๐ง๐ฟ -Benin ๐ง๐ฏ -Bermuda ๐ง๐ฒ -Bhutan ๐ง๐น -Bolivia ๐ง๐ด -Caribbean Netherlands ๐ง๐ถ -Bosnia & Herzegovina ๐ง๐ฆ -Botswana ๐ง๐ผ -Brazil ๐ง๐ท -British Indian Ocean Territory ๐ฎ๐ด -British Virgin Islands ๐ป๐ฌ -Brunei ๐ง๐ณ -Bulgaria ๐ง๐ฌ -Burkina Faso ๐ง๐ซ -Burundi ๐ง๐ฎ -Cape Verde ๐จ๐ป -Cambodia ๐ฐ๐ญ -Cameroon ๐จ๐ฒ -Canada ๐จ๐ฆ -Canary Islands ๐ฎ๐จ -Cayman Islands ๐ฐ๐พ -Central African Republic ๐จ๐ซ -Chad ๐น๐ฉ -Chile ๐จ๐ฑ -China ๐จ๐ณ -Christmas Island ๐จ๐ฝ -Cocos (Keeling) Islands ๐จ๐จ -Colombia ๐จ๐ด -Comoros ๐ฐ๐ฒ -Congo - Brazzaville ๐จ๐ฌ -Congo - Kinshasa ๐จ๐ฉ -Cook Islands ๐จ๐ฐ -Costa Rica ๐จ๐ท -Cรดte dโIvoire ๐จ๐ฎ -Croatia ๐ญ๐ท -Cuba ๐จ๐บ -Curaรงao ๐จ๐ผ -Cyprus ๐จ๐พ -Czech Republic ๐จ๐ฟ -Denmark ๐ฉ๐ฐ -Djibouti ๐ฉ๐ฏ -Dominica ๐ฉ๐ฒ -Dominican Republic ๐ฉ๐ด -Ecuador ๐ช๐จ -Egypt ๐ช๐ฌ -El Salvador ๐ธ๐ป -Equatorial Guinea ๐ฌ๐ถ -Eritrea ๐ช๐ท -Estonia ๐ช๐ช -Ethiopia ๐ช๐น -European Union ๐ช๐บ -Falkland Islands ๐ซ๐ฐ -Faroe Islands ๐ซ๐ด -Fiji ๐ซ๐ฏ -Finland ๐ซ๐ฎ -France ๐ซ๐ท -French Guiana ๐ฌ๐ซ -French Polynesia ๐ต๐ซ -French Southern Territories ๐น๐ซ -Gabon ๐ฌ๐ฆ -Gambia ๐ฌ๐ฒ -Georgia ๐ฌ๐ช -Germany ๐ฉ๐ช -Ghana ๐ฌ๐ญ -Gibraltar ๐ฌ๐ฎ -Greece ๐ฌ๐ท -Greenland ๐ฌ๐ฑ -Grenada ๐ฌ๐ฉ -Guadeloupe ๐ฌ๐ต -Guam ๐ฌ๐บ -Guatemala ๐ฌ๐น -Guernsey ๐ฌ๐ฌ -Guinea ๐ฌ๐ณ -Guinea-Bissau ๐ฌ๐ผ -Guyana ๐ฌ๐พ -Haiti ๐ญ๐น -Honduras ๐ญ๐ณ -Hong Kong SAR China ๐ญ๐ฐ -Hungary ๐ญ๐บ -Iceland ๐ฎ๐ธ -India ๐ฎ๐ณ -Indonesia ๐ฎ๐ฉ -Iran ๐ฎ๐ท -Iraq ๐ฎ๐ถ -Ireland ๐ฎ๐ช -Isle of Man ๐ฎ๐ฒ -Israel ๐ฎ๐ฑ -Italy ๐ฎ๐น -Jamaica ๐ฏ๐ฒ -Japan ๐ฏ๐ต -crossed flags ๐ -Jersey ๐ฏ๐ช -Jordan ๐ฏ๐ด -Kazakhstan ๐ฐ๐ฟ -Kenya ๐ฐ๐ช -Kiribati ๐ฐ๐ฎ -Kosovo ๐ฝ๐ฐ -Kuwait ๐ฐ๐ผ -Kyrgyzstan ๐ฐ๐ฌ -Laos ๐ฑ๐ฆ -Latvia ๐ฑ๐ป -Lebanon ๐ฑ๐ง -Lesotho ๐ฑ๐ธ -Liberia ๐ฑ๐ท -Libya ๐ฑ๐พ -Liechtenstein ๐ฑ๐ฎ -Lithuania ๐ฑ๐น -Luxembourg ๐ฑ๐บ -Macau SAR China ๐ฒ๐ด -Macedonia ๐ฒ๐ฐ -Madagascar ๐ฒ๐ฌ -Malawi ๐ฒ๐ผ -Malaysia ๐ฒ๐พ -Maldives ๐ฒ๐ป -Mali ๐ฒ๐ฑ -Malta ๐ฒ๐น -Marshall Islands ๐ฒ๐ญ -Martinique ๐ฒ๐ถ -Mauritania ๐ฒ๐ท -Mauritius ๐ฒ๐บ -Mayotte ๐พ๐น -Mexico ๐ฒ๐ฝ -Micronesia ๐ซ๐ฒ -Moldova ๐ฒ๐ฉ -Monaco ๐ฒ๐จ -Mongolia ๐ฒ๐ณ -Montenegro ๐ฒ๐ช -Montserrat ๐ฒ๐ธ -Morocco ๐ฒ๐ฆ -Mozambique ๐ฒ๐ฟ -Myanmar (Burma) ๐ฒ๐ฒ -Namibia ๐ณ๐ฆ -Nauru ๐ณ๐ท -Nepal ๐ณ๐ต -Netherlands ๐ณ๐ฑ -New Caledonia ๐ณ๐จ -New Zealand ๐ณ๐ฟ -Nicaragua ๐ณ๐ฎ -Niger ๐ณ๐ช -Nigeria ๐ณ๐ฌ -Niue ๐ณ๐บ -Norfolk Island ๐ณ๐ซ -Northern Mariana Islands ๐ฒ๐ต -North Korea ๐ฐ๐ต -Norway ๐ณ๐ด -Oman ๐ด๐ฒ -Pakistan ๐ต๐ฐ -Palau ๐ต๐ผ -Palestinian Territories ๐ต๐ธ -Panama ๐ต๐ฆ -Papua New Guinea ๐ต๐ฌ -Paraguay ๐ต๐พ -Peru ๐ต๐ช -Philippines ๐ต๐ญ -Pitcairn Islands ๐ต๐ณ -Poland ๐ต๐ฑ -Portugal ๐ต๐น -Puerto Rico ๐ต๐ท -Qatar ๐ถ๐ฆ -Rรฉunion ๐ท๐ช -Romania ๐ท๐ด -Russia ๐ท๐บ -Rwanda ๐ท๐ผ -St. Barthรฉlemy ๐ง๐ฑ -St. Helena ๐ธ๐ญ -St. Kitts & Nevis ๐ฐ๐ณ -St. Lucia ๐ฑ๐จ -St. Pierre & Miquelon ๐ต๐ฒ -St. Vincent & Grenadines ๐ป๐จ -Samoa ๐ผ๐ธ -San Marino ๐ธ๐ฒ -Sรฃo Tomรฉ & Prรญncipe ๐ธ๐น -Saudi Arabia ๐ธ๐ฆ -Senegal ๐ธ๐ณ -Serbia ๐ท๐ธ -Seychelles ๐ธ๐จ -Sierra Leone ๐ธ๐ฑ -Singapore ๐ธ๐ฌ -Sint Maarten ๐ธ๐ฝ -Slovakia ๐ธ๐ฐ -Slovenia ๐ธ๐ฎ -Solomon Islands ๐ธ๐ง -Somalia ๐ธ๐ด -South Africa ๐ฟ๐ฆ -South Georgia & South Sandwich Islands ๐ฌ๐ธ -South Korea ๐ฐ๐ท -South Sudan ๐ธ๐ธ -Spain ๐ช๐ธ -Sri Lanka ๐ฑ๐ฐ -Sudan ๐ธ๐ฉ -Suriname ๐ธ๐ท -Swaziland ๐ธ๐ฟ -Sweden ๐ธ๐ช -Switzerland ๐จ๐ญ -Syria ๐ธ๐พ -Taiwan ๐น๐ผ -Tajikistan ๐น๐ฏ -Tanzania ๐น๐ฟ -Thailand ๐น๐ญ -Timor-Leste ๐น๐ฑ -Togo ๐น๐ฌ -Tokelau ๐น๐ฐ -Tonga ๐น๐ด -Trinidad & Tobago ๐น๐น -Tunisia ๐น๐ณ -Turkey ๐น๐ท -Turkmenistan ๐น๐ฒ -Turks & Caicos Islands ๐น๐จ -Tuvalu ๐น๐ป -Uganda ๐บ๐ฌ -Ukraine ๐บ๐ฆ -United Arab Emirates ๐ฆ๐ช -United Kingdom ๐ฌ๐ง -United States ๐บ๐ธ -U.S. Virgin Islands ๐ป๐ฎ -Uruguay ๐บ๐พ -Uzbekistan ๐บ๐ฟ -Vanuatu ๐ป๐บ -Vatican City ๐ป๐ฆ -Venezuela ๐ป๐ช -Vietnam ๐ป๐ณ -Wallis & Futuna ๐ผ๐ซ -Western Sahara ๐ช๐ญ -Yemen ๐พ๐ช -Zambia ๐ฟ๐ฒ -Zimbabwe ๐ฟ๐ผ diff --git a/xmonad/scripts/playerctl-play-pause.sh b/xmonad/scripts/playerctl-play-pause.sh deleted file mode 100755 index a24733ae..00000000 --- a/xmonad/scripts/playerctl-play-pause.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -if [ -z "${1:-}" ]; then - playerctl --player="$(cat ~/.cache/euandreh/mpris-player.txt)" play-pause -fi - -if [ "$(playerctl --player="$(cat ~/.cache/euandreh/mpris-player.txt)" status)" = 'Paused' ]; then - cat ~/.cache/euandreh/mpris-player.txt >> ~/.cache/euandreh/mpris-player-xmobar.txt -elif [ "$(playerctl --player="$(cat ~/.cache/euandreh/mpris-player.txt)" status)" = 'Playing' ]; then - printf '%s: %s\n' \ - "$(cat ~/.cache/euandreh/mpris-player.txt)" \ - "$(playerctl --player="$(cat ~/.cache/euandreh/mpris-player.txt)" metadata xesam:title)" \ - >> ~/.cache/euandreh/mpris-player-xmobar.txt -fi diff --git a/xmonad/scripts/rotate-mpris-player.sh b/xmonad/scripts/rotate-mpris-player.sh deleted file mode 100755 index ce93e95f..00000000 --- a/xmonad/scripts/rotate-mpris-player.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -set -eu - -mkdir -p "$HOME/.cache/euandreh/" -CURRENT_PLAYER_PATH="$HOME/.cache/euandreh/mpris-player.txt" -AVAILABLE_PLAYERS="$(playerctl --list-all | sort)" -CURRENT_PLAYER="$(cat "$CURRENT_PLAYER_PATH" ||:)" - -pick_first() { - echo "$AVAILABLE_PLAYERS" | head -n1 > "$CURRENT_PLAYER_PATH" -} - -if [ -z "$CURRENT_PLAYER" ]; then - pick_first -elif ! echo "$AVAILABLE_PLAYERS" | grep -q "$CURRENT_PLAYER"; then - # Unknown $CURRENT_PLAYER, pick anyone - pick_first -else - INDEX="$(echo "$AVAILABLE_PLAYERS" | grep -n "$CURRENT_PLAYER" | cut -d: -f1)" - LENGTH="$(echo "$AVAILABLE_PLAYERS" | wc -l)" - if [ "$INDEX" = "$LENGTH" ]; then - # Reached the end of the $AVAILABLE_PLAYERS list, wrapping - pick_first - else - # Get the next player instead - echo "$AVAILABLE_PLAYERS" | awk -v idx="$INDEX" 'NR == idx+1 {print}' > "$CURRENT_PLAYER_PATH" - fi -fi - -sh ~/dev/libre/dotfiles/xmonad/scripts/playerctl-play-pause.sh --refresh-only diff --git a/xmonad/scripts/toggle-pulseaudio-sink.sh b/xmonad/scripts/toggle-pulseaudio-sink.sh deleted file mode 100755 index 90f5734e..00000000 --- a/xmonad/scripts/toggle-pulseaudio-sink.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -set -eu - -# This script assumes that at most 2 sinks exist at any time. -# When this premise is no longer true, it needs to be upgraded. - -CURRENT="$(pacmd list-sinks | grep '\* index' | cut -d: -f2 | tr -d ' ')" -OTHER="$(pacmd list-sinks | grep index | grep -v '\* index' | tail -n1 | cut -d: -f2 | tr -d ' ')" - -if [ "$CURRENT" = 0 ]; then - pacmd set-default-sink "$OTHER" -else - pacmd set-default-sink 0 -fi diff --git a/xmonad/scripts/xmobar-mail.sh b/xmonad/scripts/xmobar-mail.sh deleted file mode 100755 index 5f317053..00000000 --- a/xmonad/scripts/xmobar-mail.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -set -eu - -while true; do - printf "mail: %s/%s - %s\n" "$(notmuch count tag:unread AND \(tag:to-me OR to:nubank.com.br OR to:euandre.org\) AND NOT tag:killed AND NOT tag:archive)" "$(notmuch count tag:inbox AND \(tag:to-me OR to:nubank.com.br OR to:euandre.org\) AND NOT tag:killed AND NOT tag:archive)" "$(msmtp-queue -d | grep -c '^From')" - if acpi -a | grep -q off-line; then - sleep $((60 * 15)) - else - sleep $((60 * 1)) - fi -done diff --git a/xmonad/scripts/xmobar-mpris.sh b/xmonad/scripts/xmobar-mpris.sh deleted file mode 100755 index 3ac48863..00000000 --- a/xmonad/scripts/xmobar-mpris.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -set -eu - -CUR_PATH="$HOME/.cache/euandreh/mpris-player-xmobar.txt" -mkdir -p "$(dirname "$CUR_PATH")" -touch "$CUR_PATH" - -tail -f "$CUR_PATH" 2> /dev/null diff --git a/xmonad/scripts/xmobar-notifications.sh b/xmonad/scripts/xmobar-notifications.sh deleted file mode 100755 index d05a2d48..00000000 --- a/xmonad/scripts/xmobar-notifications.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -set -eu - -CUR_PATH="$HOME/.cache/euandreh/xmobar-notifications.txt" -mkdir -p "$(dirname "$CUR_PATH")" -touch "$CUR_PATH" - -tail -f "$CUR_PATH" 2> /dev/null diff --git a/xmonad/scripts/zero-brightness.sh b/xmonad/scripts/zero-brightness.sh deleted file mode 100755 index c487dd3c..00000000 --- a/xmonad/scripts/zero-brightness.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -set -eux - -# base dir for backlight class -BASEDIR='/sys/class/backlight/' - -# get the backlight handler -HANDLER="${BASEDIR}$(ls "${BASEDIR}")" - -# set the new brightness value -echo 0 > "${HANDLER}/brightness" || sudo chmod 666 "${HANDLER}/brightness" |
