diff options
158 files changed, 0 insertions, 8099 deletions
diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 3a2db9e..0000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/cron/generated/ -/aux/workflow/assert-todos.sh -/public/ diff --git a/COPYING b/COPYING deleted file mode 100644 index be3f7b2..0000000 --- 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 cbce89b..0000000 --- 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 0e5e8e3..0000000 --- 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 4f8a73b..0000000 --- a/TODOs.md +++ /dev/null @@ -1,31 +0,0 @@ -# Tasks - -## 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://git.euandreh.xyz/dotfiles/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/Xmodmap.conf b/Xmodmap.conf deleted file mode 100644 index 2807e71..0000000 --- a/Xmodmap.conf +++ /dev/null @@ -1 +0,0 @@ -keycode 118 = bar Greek_lamda diff --git a/aux/assert-nixfmt.sh b/aux/assert-nixfmt.sh deleted file mode 100755 index 19bd0a2..0000000 --- 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 cc01f3a..0000000 --- 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 5827e34..0000000 --- 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 b6769a9..0000000 --- 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 ee8075f..0000000 --- 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 e73b9b8..0000000 --- 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 65d3335..0000000 --- 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 e8c1cd1..0000000 --- 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 504406f..0000000 --- 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 b521c82..0000000 --- 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 0cb8b8b..0000000 --- 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 80059ee..0000000 --- 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 8e81f1f..0000000 --- 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 cef75dd..0000000 --- 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 6016f51..0000000 --- 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 c061a04..0000000 --- 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 8f9327c..0000000 --- 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 051fdf1..0000000 --- a/aux/workflow/favicon.png +++ /dev/null diff --git a/aux/workflow/favicon.svg b/aux/workflow/favicon.svg deleted file mode 100644 index ce566b2..0000000 --- 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 30efe0b..0000000 --- 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 8ecb855..0000000 --- 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 8de6ac4..0000000 --- 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 d7935d0..0000000 --- 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 979c3d1..0000000 --- a/configuration.nix +++ /dev/null @@ -1,500 +0,0 @@ -{ config, pkgs, ... }: - -let - log-redirect = name: ">> /tmp/cron-dbg.${name}.euandreh.log 2>&1"; - cron-for-name = prefix: name: cron: - "${cron} andreh ${prefix}/${name}.sh ${log-redirect name}"; - daily-at-12h30min = "30 12 * * *"; - every-x-hours = "0 * * * *"; - pub-crons = { - no-mail = { deliver-enqueued-emails = every-x-hours; }; - - with-mail = { - report-summary = "30 13 * * *"; - - sync-mail = daily-at-12h30min; - job-annex = daily-at-12h30min; - job-repo-update = daily-at-12h30min; - job-notmuch-dump = daily-at-12h30min; - job-mbox-archive = daily-at-12h30min; - job-copy-box-backups = daily-at-12h30min; - job-run-local-backup = daily-at-12h30min; - job-mr-remotes-backup = daily-at-12h30min; - }; - }; - priv-crons = { pacheco = "0 12 5 * *"; }; - crons = builtins.attrValues - (builtins.mapAttrs (cron-for-name "/home/andreh/dev/libre/dotfiles/cron") - pub-crons.no-mail) ++ builtins.attrValues (builtins.mapAttrs - (cron-for-name "/home/andreh/dev/libre/dotfiles/cron/generated") - pub-crons.with-mail) ++ builtins.attrValues - (builtins.mapAttrs (cron-for-name "/home/andreh/annex/cron") priv-crons); - privateConfiguration = import /etc/nixos/private-configuration.nix; - proprietaryPackages = with pkgs; [ slack zoom-us openfortivpn skype chromium ]; - allowUnfree = builtins.length proprietaryPackages > 0; -in { - imports = [ # Include the results of the hardware scan. - /etc/nixos/hardware-configuration.nix - ]; - - # Use the systemd-boot EFI boot loader. - boot = { - loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; - 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-nixos"; - networkmanager.enable = true; - }; - - system.autoUpgrade = { - enable = true; - channel = "https://nixos.org/channels/nixos-unstable"; - }; - - console = { - keyMap = "br-abnt2"; - font = "Lat2-Terminus16"; - }; - - # Select internationalisation properties. - i18n = { defaultLocale = "fr_FR.UTF-8"; }; - - # Set your time zone. - time.timeZone = "America/Sao_Paulo"; - - fonts.fonts = with pkgs; [ - source-code-pro - fira-code - fira-mono - fira-code-symbols - freefont_ttf - symbola - ]; - - documentation = { - enable = true; - man.enable = true; - dev.enable = true; - man.generateCaches = true; - }; - - environment = { - enableDebugInfo = true; - - systemPackages = let - 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 - ''; - }); - flex-with-posix-alias = pkgs.flex.overrideAttrs (oldAttrs: { - postInstall = '' - ln -s $out/bin/flex $out/bin/lex - ''; - }); - pax-with-good-path = pkgs.pax.overrideAttrs (oldAttrs: { - postPatch = '' - substituteInPlace ar_io.c --replace 'putenv' '// putenv' - ${({ postPatch = ""; } // oldAttrs).postPatch} - ''; - }); - - nu-packages = with pkgs; [ - awscli - yubioath-desktop - leiningen - openjdk8 - clojure # =clj= - kubernetes - nssTools # =pk12util= - python3 - ]; - - in with pkgs; - [ - ## Documentation - posix_man_pages - scheme-manpages - - ## Personal data tools - gitAndTools.git-open - gitAndTools.gitFull - gitAndTools.git-annex - gitAndTools.gitRemoteGcrypt - git-crypt - git-lfs - mr - borgbackup - pass - gnupg - pinentry_gtk2 - fossil - mercurial - - ## CLI tools - groff - mktorrent - diffoscope - bundix - bash-completion - nix-bash-completions - youtube-dl - wget - tmux - tmuxinator - sox # =play=, SoX - Sound eXchange - gettext - rlwrap - jq - rq - openvpn - xclip - psmisc # =killall= - xorg.xkill - gksu - tree - unzip # used by extract bash function and Clojure go-to-source - feh - nixUnstable # =nix= - bind # =dig= - rsync - moreutils # =vipe=, =sponge= - graphviz # =dot= and others - graph-easy # ASCII drawings for GraphViz output - mkpasswd - direnv - recutils - sqlite - trash-cli - entr - mailutils - ffmpeg-full - ledger - gnuplot - ranger - electrum - zathura - st - pavucontrol - newsboat - acpi - xsel - pinentry - nixfmt - # nvi # broken, now using the one from Guix - fzf - calcurse - pandoc - buku # replaces Firefox bookmarks - cloc - inetutils # telnet - nodePackages.node2nix - lsof - lsscsi - bpytop - - ## Mail - isync - notmuch - afew - alot - w3m - urlscan - - ## Conversations - gomuks - weechat # replacing ERC - poezio - - ## Programming tools - perl - shellcheck - mrsh - dash - gcc - clang - clang-tools - valgrind - gdb - scdoc - sbcl - - ## POSIX - bmake-with-alias - byacc - bc - pax-with-good-path - lzip - flex-with-posix-alias - gnugrep - file - ed - tinycc-with-posix-alias - m4 - llvmPackages.bintools # ar, nm and friends - 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 - - ## EuAndreh overlay - xyz-euandreh.remembering-latest - xyz-euandreh.autoqemu-latest - - ## GUI programs - audacity - zbar - calibre - (mpv-with-scripts.override { - scripts = with mpvScripts; [ mpris sponsorblock ]; - }) - firefox - - ## Desktop programs - cmus - mutagen - - ## Candidates to be replaced by alternatives - transmission-gtk # https://github.com/btpd/btpd - tdesktop # telegram -> gomuks - ] ++ proprietaryPackages ++ nu-packages; - }; - - nixpkgs = { - config = { - android_sdk.accept_license = allowUnfree; - allowUnfree = allowUnfree; - }; - overlays = let - version = "main"; - use-local = false; - euandreh-nixpkgs = import (if use-local then - ../package-repository/default.nix - else - fetchTarball { - url = - "https://git.euandreh.xyz/package-repository/snapshot/package-repository-${version}.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 = builtins.readFile /home/andreh/.config/msmtp/config; - setSendmail = false; - }; - }; - - xdg.portal.enable = true; - services = { - - mail.sendmailSetuidWrapper = { - program = "sendmail"; - source = "${pkgs.msmtp}/bin/msmtpq"; - setuid = false; - setgid = false; - }; - - blueman.enable = true; - - # We can see the actual generated crontab at /etc/crontab - cron = { - enable = true; - systemCronJobs = crons; - }; - - logrotate = { - enable = true; - extraConfig = '' - compress - - /tmp/*.euandreh.log { - rotate 5 - daily - olddir /home/andreh/archive/logs/cron/ - createolddir 744 andreh users - su andreh users - } - - /home/andreh/.bash_history { - rotate 30 - daily - olddir /home/andreh/archive/bash_history/ - createolddir 744 andreh users - su andreh users - } - ''; - }; - - 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; - }; - desktopManager = { xterm.enable = false; }; - 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 & - ''; - }; - }; - - pcscd.enable = true; # required by yubioath - }; - - security = { - sudo.enable = true; - doas = { - enable = true; - extraConfig = '' - permit persist setenv { NIX_PATH } :wheel - ''; - }; - }; - - users = { - extraUsers = let - andrehUser = { - andreh = { - isNormalUser = true; - uid = 1000; - description = "EuAndreh"; - extraGroups = [ "wheel" "networkmanager" "docker" ]; - }; - }; - # 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.nologin; # -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" ]; - }; - }; - }; - }; - - # This value determines the NixOS release with which your system is to be - # compatible, in order to avoid breaking some software such as database - # servers. You should change this only after NixOS release notes say you - # should. - system.stateVersion = "20.03"; # Did you read the comment? -} diff --git a/cron/annex.sh b/cron/annex.sh deleted file mode 100755 index 6443a05..0000000 --- a/cron/annex.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -set -eux - -# Required for properly running Git Annex, related issue: -# https://git-annex.branchable.com/bugs/assistant_crashes_in_TransferScanner/ -export LANG=C.UTF-8 -AWS_ACCESS_KEY_ID="$(cat ~/annex/secret/AWS/annex/key-id.txt)" -AWS_SECRET_ACCESS_KEY="$(cat ~/annex/secret/AWS/annex/access-key.txt)" -export AWS_ACCESS_KEY_ID -export AWS_SECRET_ACCESS_KEY -# shellcheck source=/dev/null -. "$HOME/dev/libre/dotfiles/cron/gpg-cron-setup.sh" - -cd ~/annex/ -git annex sync diff --git a/cron/archive-box.sh b/cron/archive-box.sh deleted file mode 100755 index bd3298f..0000000 --- a/cron/archive-box.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -set -eux - -# https://archivy.github.io/ -# Derived from ArchiveBox: -# https://github.com/pirate/ArchiveBox/blob/db1f6efc934bbcdf53377bf51a064c6fd0fc5b1d/bin/archivebox-export-browser-history#L23-L37 -QUERY=$(cat <<EOF -SELECT "[" - || - group_concat(json_object('timestamp', dateAdded, 'description', title, 'href', url)) - || - "]" -FROM ( - SELECT b.dateAdded, b.title, p.url - FROM moz_bookmarks AS b - JOIN moz_places AS p - ON b.fk = p.id - WHERE b.fk IN ( - SELECT DISTINCT(fk) FROM moz_bookmarks - WHERE parent IN ( - -- get all tags - SELECT id FROM moz_bookmarks - WHERE parent = 4 - ) - ) - ORDER BY - b.dateAdded ASC, - b.title ASC, - p.url -) -EOF -) - -# copy the database to avoid locking issues -TMPDB="$(mktemp)" -cp ~/.mozilla/firefox/*.default/places.sqlite "$TMPDB" - -mkdir -p "$HOME/UTCLOUD/archive-box/" -cd "$HOME/UTCLOUD/archive-box/" - -# I gave up on proper packaging for now, I'll stick with Docker -# while I regain energy and try again later -docker run -v "$PWD:/data" -ti archivebox/archivebox init -cat <<EOF > ArchiveBox.conf -[SERVER_CONFIG] -SECRET_KEY = c2.o66u!7!tdfohba7r7w!qhgb9.+1hmjtg_lfvebucus6pow3 -SAVE_MEDIA=False -EOF -sqlite3 "$TMPDB" "${QUERY}" | docker run -v "$PWD:/data" -i archivebox/archivebox add - -# Start server with: -# $ cd "$HOME/UTCLOUD/archive-box/" -# $ docker run -v $PWD:/data -it -p 8000:8000 archivebox/archivebox diff --git a/cron/copy-box-backups.sh b/cron/copy-box-backups.sh deleted file mode 100755 index 7557916..0000000 --- a/cron/copy-box-backups.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -set -eux - -# shellcheck source=/dev/null -. "$HOME/dev/libre/dotfiles/cron/gpg-cron-setup.sh" -R='16686@ch-s010.rsync.net' - -ssh euandre.org rsync -avzP --delete-after /home/user-data/backup/ "$R:box-duplicity/" diff --git a/cron/delever-enqueued-emails.sh b/cron/delever-enqueued-emails.sh deleted file mode 100755 index 98cbafe..0000000 --- a/cron/delever-enqueued-emails.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -set -eux - -: diff --git a/cron/gpg-cron-setup.sh b/cron/gpg-cron-setup.sh deleted file mode 100644 index 85e2400..0000000 --- a/cron/gpg-cron-setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -unset SSH_AGENT_PID -if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then - SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" - export SSH_AUTH_SOCK -fi diff --git a/cron/mbox-archive.sh b/cron/mbox-archive.sh deleted file mode 100755 index 337cbd2..0000000 --- a/cron/mbox-archive.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -set -eux - -echo 'TODO: Download MBOX archive of mailing lists, see:' -echo 'https://todo.sr.ht/~sircmpwn/lists.sr.ht/162' diff --git a/cron/mr-remotes-backup.sh b/cron/mr-remotes-backup.sh deleted file mode 100755 index 272bd97..0000000 --- a/cron/mr-remotes-backup.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -set -eux - -# shellcheck source=/dev/null -. "$HOME/dev/libre/dotfiles/cron/gpg-cron-setup.sh" -cd ~/dev/libre/ -mr -s push rsyncnet -mr -s push gitlab diff --git a/cron/notmuch-dump.sh b/cron/notmuch-dump.sh deleted file mode 100755 index 4215831..0000000 --- a/cron/notmuch-dump.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -eux - -[ -f ~/archive/notmuch-archive.today.txt ] && { - mv ~/archive/notmuch-archive.today.txt ~/archive/notmuch-archive.yesterday.txt -} -notmuch dump --output ~/archive/notmuch-archive.today.txt diff --git a/cron/repo-update.sh b/cron/repo-update.sh deleted file mode 100755 index 10f79b1..0000000 --- a/cron/repo-update.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -set -eu - -# shellcheck source=/dev/null -. "$HOME/dev/libre/dotfiles/cron/gpg-cron-setup.sh" -cd "${HOME}" -mr -s safeupdate diff --git a/cron/report-summary.sh b/cron/report-summary.sh deleted file mode 100755 index b69c0b3..0000000 --- a/cron/report-summary.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -set -eux - -F="/tmp/cron-dbg.summary.$(date -I).euandreh.log" -if grep ^1 "$F"; then - echo 'Some report failed for today:' - grep ^1 "$F" - exit 1 -fi diff --git a/cron/run-local-backup.sh b/cron/run-local-backup.sh deleted file mode 100755 index 3630dce..0000000 --- a/cron/run-local-backup.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -set -eux - -LABEL="${1:-job}" - -# shellcheck source=/dev/null -. "$HOME/dev/libre/dotfiles/cron/gpg-cron-setup.sh" - -set +x -BORG_PASSPHRASE="$(pass show Borg)" -set -x - -export BORG_PASSPHRASE -R='16686@ch-s010.rsync.net' -export BORG_REMOTE_PATH='borg1' - -# env has BORG_PASSPHRASE='...' BORG_REMOTE_PATH='...' -# borg init -e repokey-blake2 $R:desktop-borg - -# What about the ~/Downloads folder? -borg create \ - --exclude ~/.cache/ \ - --exclude ~/Downloads/ \ - --verbose \ - --stats \ - --progress \ - --compression lzma,9 \ - "$R:desktop-borg::{hostname}-{now}-$LABEL" \ - ~/ - -borg prune \ - --verbose \ - --list \ - --keep-within=6m \ - --keep-weekly=52 \ - --keep-monthly=24 \ - --save-space \ - $R:desktop-borg diff --git a/cron/sync-mail.sh b/cron/sync-mail.sh deleted file mode 100755 index cdee275..0000000 --- a/cron/sync-mail.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -set -eux - -mbsync -a -notmuch new diff --git a/description b/description deleted file mode 100644 index e5ca504..0000000 --- a/description +++ /dev/null @@ -1 +0,0 @@ -Personal OS configuration files. diff --git a/exrc.conf b/exrc.conf deleted file mode 100644 index d737a1a..0000000 --- a/exrc.conf +++ /dev/null @@ -1,7 +0,0 @@ -" set number -set autoindent -set tabstop=2 -set shiftwidth=2 -set ruler -set showmode -set showmatch diff --git a/git/gitattributes b/git/gitattributes deleted file mode 100644 index 6ef9672..0000000 --- a/git/gitattributes +++ /dev/null @@ -1,3 +0,0 @@ -*.gif diff=image -*.jpg diff=image -*.png diff=image diff --git a/git/gitconfig.ini b/git/gitconfig.ini deleted file mode 100644 index 578a013..0000000 --- a/git/gitconfig.ini +++ /dev/null @@ -1,67 +0,0 @@ -[user] - email = eu@euandre.org - name = EuAndreh - signingkey = 81F90EC3CD356060 -[transfer] - # https://matthiasbussonnier.com/posts/33-sign-commits-on-github.md.html - fsckobjects = true -[log] - # https://git-scm.com/docs/git-config#git-config-logshowSignature - # showSignature = true -[diff "sqlite3"] - # drops a db file into sqlite3 and runs .dump before any diff comparisons - binary = true - textconv = "echo .dump | sqlite3" -[core] - editor = vi - excludesfile = ~/.gitignore_global - - # https://stackoverflow.com/questions/5834014/lf-will-be-replaced-by-crlf-in-git-what-is-that-and-is-it-important#5834094 - # https://help.github.com/articles/dealing-with-line-endings/ - autocrlf = input - attributesfile = ~/.gitattributes -[push] - # https://stackoverflow.com/a/22933955 - default = current -[filter "lfs"] - clean = git-lfs clean -- %f - smudge = git-lfs smudge -- %f - process = git-lfs filter-process - required = true - fetchrecentalways = true - fetchrecentrefsdays = 15 - fetchrecentcommitsdays = 7 - fetchrecentremoterefs = true - followTags = true -[alias] - sha = rev-parse HEAD - sha7 = ! git sha | head -c 7 - prune-branches = !git branch --merged | grep -v master | xargs git branch -d - sync = !git annex sync s3 && git annex sync origin - tarball = !git-tarball.sh -[annex] - gnupg-options = --no-tty - gnupg-decrypt-options = --no-tty - autocommit = false - synccontent = true - genmetadata = true -[commit] - gpgsign = true -[fetch] - prune = true -[pack] - packSizeLimit = 2g -[pull] - rebase = false -[sendemail] - assume8bitEncoding = UTF-8 - smtpuser = eu@euandre.org - smtpserver = box.euandre.org - smtpencryption = tls - smtpserverport = 587 - annotate = yes - confirm = never -[include] - path = ~/annex/secret/Git/gitconfig.ini -[init] - defaultBranch = main diff --git a/git/gitignore b/git/gitignore deleted file mode 100644 index ac4f89f..0000000 --- a/git/gitignore +++ /dev/null @@ -1,10 +0,0 @@ -playground.clj -req.http -.postman-ns -*.swp -/gemset.nix -/.ignore -/tmp/ -/patches/ -*.nix -nohup.out diff --git a/gpg/gpg-agent.conf b/gpg/gpg-agent.conf deleted file mode 100644 index e21ae64..0000000 --- a/gpg/gpg-agent.conf +++ /dev/null @@ -1,6 +0,0 @@ -default-cache-ttl 172800 -default-cache-ttl-ssh 172800 -max-cache-ttl 604800 -max-cache-ttl-ssh 604800 -enable-ssh-support -pinentry-program /run/current-system/sw/bin/pinentry-gtk-2 diff --git a/gpg/gpg.conf b/gpg/gpg.conf deleted file mode 100644 index fbc8053..0000000 --- a/gpg/gpg.conf +++ /dev/null @@ -1 +0,0 @@ -keyserver pool.sks-keyservers.net
\ No newline at end of file diff --git a/gpg/sshcontrol b/gpg/sshcontrol deleted file mode 100644 index 1ae03ed..0000000 --- a/gpg/sshcontrol +++ /dev/null @@ -1 +0,0 @@ -750154E135FD7B11FDDF0107CC0904F92EBD2AE4 diff --git a/guix/channels.scm b/guix/channels.scm deleted file mode 100644 index 4a8fa99..0000000 --- a/guix/channels.scm +++ /dev/null @@ -1,12 +0,0 @@ -(append - (list - (channel - (name 'xyz-euandreh) - (url "git://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/guix/os.scm b/guix/os.scm deleted file mode 100644 index 972c42d..0000000 --- a/guix/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/hgrc.ini b/hgrc.ini deleted file mode 100644 index 656f40b..0000000 --- a/hgrc.ini +++ /dev/null @@ -1,2 +0,0 @@ -[ui] -username = EuAndreh <eu@euandre.org> diff --git a/infokey b/infokey deleted file mode 100644 index f78b9a7..0000000 --- a/infokey +++ /dev/null @@ -1,2 +0,0 @@ -^e down-line -^y up-line diff --git a/inputrc.conf b/inputrc.conf deleted file mode 100644 index 9d84fe2..0000000 --- a/inputrc.conf +++ /dev/null @@ -1,2 +0,0 @@ -"\e[B": history-search-forward -"\e[A": history-search-backward
\ No newline at end of file diff --git a/long-description b/long-description deleted file mode 100644 index e5ca504..0000000 --- a/long-description +++ /dev/null @@ -1 +0,0 @@ -Personal OS configuration files. diff --git a/mailcap.conf b/mailcap.conf deleted file mode 100644 index aeea68d..0000000 --- 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 0bc6ecb..0000000 --- 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/ranger.conf b/ranger.conf deleted file mode 100644 index 312936e..0000000 --- a/ranger.conf +++ /dev/null @@ -1 +0,0 @@ -map DD shell mv %s /home/${USER}/.local/share/Trash/files/
\ No newline at end of file diff --git a/sbclrc.lisp b/sbclrc.lisp deleted file mode 100644 index df7f57a..0000000 --- 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/scripts/backup b/scripts/backup deleted file mode 120000 index 2343098..0000000 --- a/scripts/backup +++ /dev/null @@ -1 +0,0 @@ -../cron/run-local-backup.sh
\ No newline at end of file diff --git a/scripts/c b/scripts/c deleted file mode 100755 index 630eb63..0000000 --- a/scripts/c +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -set -eu - -if [ -n "${TMUX:-}" ]; then - tmux send-keys -R \; clear-history -else - clear -fi diff --git a/scripts/commit-md b/scripts/commit-md deleted file mode 100755 index 91610b6..0000000 --- a/scripts/commit-md +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -set -eu - -LAST_COMMIT="$(git rev-parse HEAD)" -COMMIT="${1:-$LAST_COMMIT}" -REPOSITORY="$(basename "$PWD")" - -usage() { - cat <<EOF -Usage: - $0 [COMMIT] -EOF -} - -if [ -z "$COMMIT" ]; then - echo "Missing \$COMMIT argument" - usage >&2 - exit 2 -fi - -LINK="$(printf 'https://git.euandreh.xyz/%s/commit/?id=%s' "$REPOSITORY" "$COMMIT")" -MD="$(printf '[`%s`](%s)' "$COMMIT" "$LINK")" - -xdg-open "$LINK" -printf '%s' "$MD" | xclip -sel clip -printf 'Copied %s to the clipboard!\n' "$MD" >&2 diff --git a/scripts/fim b/scripts/fim deleted file mode 100755 index 040dbe9..0000000 --- a/scripts/fim +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -set -eu - -play "$DOTFILES/sh/Positive.ogg" 2> /dev/null diff --git a/scripts/gc-mail.sh b/scripts/gc-mail.sh deleted file mode 100755 index 9a04cdd..0000000 --- a/scripts/gc-mail.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -set -eux - -# shellcheck source=/dev/null -. "$DOTFILES/sh/colors.sh" - -# Source: https://www.reddit.com/r/emacs/comments/6wqfp3/notmuch_delete_mail/ -yellow "Clean up deleted email files" -notmuch search --output=files --exclude=false tag:deleted | xargs -I{} rm "{}" -notmuch new diff --git a/scripts/gc-nix.sh b/scripts/gc-nix.sh deleted file mode 100755 index 7c22c1d..0000000 --- a/scripts/gc-nix.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -set -eu - -# shellcheck source=/dev/null -. "$DOTFILES/sh/colors.sh" -yellow "Cleaning up the NixOS store\n" - -PROFILES="$(mktemp)" -printf "per-user/root/channels\nper-user/andreh/profile\nper-user/andreh/channels\nsystem\n" > "$PROFILES" - -while IFS='' read -r p; do - sudo nix-env --delete-generations old -p "/nix/var/nix/profiles/$p" -done < "$PROFILES" - -# Current profile, change when installing with =nix-env -iA nixpkgs.bsdgames= -nix-env --delete-generations old - -nix-store --gc -nix-collect-garbage -d diff --git a/scripts/gc.sh b/scripts/gc.sh deleted file mode 100755 index f432c0c..0000000 --- a/scripts/gc.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -set -eu - -# shellcheck source=/dev/null -. "$DOTFILES/sh/colors.sh" - -disk_space() { - u | awk '{print $5" "$6}' -} - -before=$(disk_space) - -gc-nix.sh - -yellow "Cleaning up Guix store\n" - -guix gc -d - - -yellow "Cleaning up up the Trash and /tmp folders\n" - -sudo rm -rf ~/.local/share/Trash/files/* -# https://askubuntu.com/a/609396 -sudo find /tmp -type f -atime +10 -delete - -if which docker; then - - yellow "Erasing docker images\n" - - 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 - -gc-mail.sh - -after=$(disk_space) - -green "Done.\n" -green "Disk space before and after:\n" -blue " before: ${before}\n" -blue " after: ${after}\n" diff --git a/scripts/git-permalink b/scripts/git-permalink deleted file mode 120000 index 031ddba..0000000 --- a/scripts/git-permalink +++ /dev/null @@ -1 +0,0 @@ -../../git-permalink/src/git-permalink.sh
\ No newline at end of file diff --git a/scripts/hd.sh b/scripts/hd.sh deleted file mode 100755 index e9d64d1..0000000 --- a/scripts/hd.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -set -eux - -annex.sh - -rsync -avzP --delete "$R:vps-borg/" ~/UTCLOUD/backups/vps-borg/ -rsync -avzP --delete "$R:desktop-borg/" ~/UTCLOUD/backups/desktop-borg/ -rsync -avzP --delete "$R:box-duplicity" ~/UTCLOUD/backups/box-duplicity/ -rsync -avzP --delete euandre.org:/home/user-data/ ~/UTCLOUD/backups/box-ssd/ - -cd ~/dev/ -mr -s -j4 hd diff --git a/scripts/mailing-list-import-mbox.sh b/scripts/mailing-list-import-mbox.sh deleted file mode 100755 index d69c42f..0000000 --- a/scripts/mailing-list-import-mbox.sh +++ /dev/null @@ -1,116 +0,0 @@ -#!/usr/bin/env nix-shell -#!nix-shell -i bash -p bash wget mb2md -# shellcheck shell=bash -set -Eeuo pipefail - -MAILING_LIST_PROVIDER="${1:-}" -MAILING_LIST_NAME="${2:-}" -GNU_MBOX_ARCHIVE_URL='ftp://lists.gnu.org' -OUT_MAILDIR="$HOME/mbsync/EuAndreh/mailing-lists/" -TMP_DIR="$HOME/tmp/mbox-import" -usage() { - cat <<EOF -Usage: - $0 <MAILING_LIST_PROVIDER> <MAILING_LIST_NAME> - - Arguments - MAILING_LIST_NAME The name of the mailing list, e.g.: info-guix. - MAILING_LIST_PROVIDER The name of the host of the mailing list, e.g.: gnu. - Supported providers: - 'gnu' for GNU mailing lists - 'google' for Google Groups - -Examples: - Download and import into mbsync the MBOX archive from info-guix mailing-list: - mailing-list-import-mbox.sh gnu info-guix - - Download and import into mbsync the contents for lisp-br Google Groups: - mailing-list-import-mbox.sh google lisp-br -EOF -} - -gnu_mailing_list_import() { - mkdir -p "${TMP_DIR}" - pushd "${TMP_DIR}" - - # Subscribe to the mailing list - local -r recipient="${MAILING_LIST_NAME}-join@gnu.org" - local -r subject="Subscribe to ${MAILING_LIST_NAME} mailing list" - mail "$recipient" \ - -s "$subject" \ - -aFrom:mailing-list@euandre.org <<<'' - - # Download existing archive as MBOX files - wget -c -r "${GNU_MBOX_ARCHIVE_URL}/${MAILING_LIST_NAME}/" - - # Concatenate all MBOX files into as single MBOX file - cat "lists.gnu.org/${MAILING_LIST_NAME}/"* > "${MAILING_LIST_NAME}.all.mbox" - - # Transform the MBOX file into a MailDir format and put it on the right place - mb2md -s "${TMP_DIR}/${MAILING_LIST_NAME}.all.mbox" -d "${OUT_MAILDIR}" - popd -} - -google_groups_import() { - [[ -f ~/dev/misc/google-group-crawler/crawler.sh ]] || { - red "Missing ${HOME}/dev/misc/google-group-crawler/crawler.sh file." - red "Clone it before importing Google Groups emails." - exit 1 - } - mkdir -p "${TMP_DIR}" - pushd "${TMP_DIR}" - - # Subscribe to the mailing list - local -r recipient="${MAILING_LIST_NAME}+subscribe@googlegroups.com" - local -r subject="Subscribe to ${MAILING_LIST_NAME} mailing list" - mail.sh "${recipient}" "${subject}" ' ' 'mailing-list@euandre.org' - - # Download existing messages into MBOX Files - CRAWLER_FILE="${TMP_DIR}/${MAILING_LIST_NAME}-crawler.sh" - export _GROUP="${MAILING_LIST_NAME}" - ~/dev/misc/google-group-crawler/crawler.sh -sh > "${CRAWLER_FILE}" - bash "${CRAWLER_FILE}" - - cat "${MAILING_LIST_NAME}/mbox/"* > "${MAILING_LIST_NAME}.all.mbox" - - echo before - echo mb2md -s "${TMP_DIR}/${MAILING_LIST_NAME}.all.mbox" -d "${OUT_MAILDIR}" - echo after - popd -} - -main() { - [[ -z "${MAILING_LIST_PROVIDER}" ]] && { - red "Missing input argument 'MAILING_LIST_PROVIDER'.\n" - usage - exit 2 - } - - [[ -z "${MAILING_LIST_NAME}" ]] && { - red "Missing input argument 'MAILING_LIST_NAME'.\n" - usage - exit 2 - } - - case "${MAILING_LIST_PROVIDER}" in - "gnu") - gnu_mailing_list_import - ;; - "google") - google_groups_import - ;; - *) - red "Unsupported mailing list provider '${MAILING_LIST_PROVIDER}'." - usage - exit 2 - ;; - esac - - echo "${MAILING_LIST_PROVIDER} ${MAILING_LIST_NAME}" >> ~/annex/txt/mailing-list-subscriptions.txt - - green "Done." - yellow "Make sure to add the correct tagging rules for notmuch post-hook!" - blue "Remember to sync new changes by running sync-mail.sh!" -} - -main "$@" diff --git a/scripts/notify b/scripts/notify deleted file mode 100755 index 984c7ac..0000000 --- a/scripts/notify +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -set -eu - -# Derived from: -# https://unix.stackexchange.com/questions/61205/how-to-supress-the-display-of-previous-job-details -( ( - echo "$1" > ~/.cache/euandreh/xmobar-notifications.txt - sleep 10 - echo "" > ~/.cache/euandreh/xmobar-notifications.txt -) &) diff --git a/scripts/notmuch-restore.sh b/scripts/notmuch-restore.sh deleted file mode 100755 index f3dc386..0000000 --- a/scripts/notmuch-restore.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -eux - -notmuch new -notmuch restore --input ~/archive/notmuch-archive.today.txt diff --git a/scripts/open b/scripts/open deleted file mode 100755 index 23f12fe..0000000 --- a/scripts/open +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -set -eu - -if [ -z "${1:-}" ]; then - exit -fi - -set -x - -case "$1" in - *.ico|*.jpg|*.jpeg|*.png) - feh "$1" - ;; - https://www.youtube.com/watch*) - vid "$1" - ;; - http*|*.svg|*.html) - "$BROWSER" "$1" - ;; - *.pdf|*.djvu) - nohup zathura "$1" 1>&2 2>/dev/null & - ;; - *.flac|*.ogg|*.mkv) - vid "$1" - ;; - *) - /run/current-system/sw/bin/xdg-open "$1" - ;; -esac diff --git a/scripts/pastebin b/scripts/pastebin deleted file mode 100755 index 319b126..0000000 --- a/scripts/pastebin +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/sh -set -eu - -usage() { - cat <<EOF -Missing argument <$1>. - -Usage: - $0 <FULL_TITLE> [-|FILE] - - Reads contents from [FILE], from stdin if '-' is given, and opens the - editor on the content. - - Arguments: - FULL_TITLE Full title of the pastebin - -Examples: - pastebin 'My example pastebin title' - pastebin 'My example pastebin title' - < file - cat file | pastebin 'My example pastebin title' - -EOF -} - -FULL_TITLE="${1:-}" -[ -z "$FULL_TITLE" ] && { - usage 'FULL_TITLE' - exit 2 -} - -# Derived from: -# https://stackoverflow.com/questions/4009281/how-can-i-generate-url-slugs-in-perl/4009519#4009519 -slugify() { - echo "$1" | \ - tr '[:upper:]' '[:lower:]' | \ - perl -ne 'tr/\000-\177//cd; - s/[^\w\s-]//g; - s/^\s+|\s+$//g; - s/[-\s]+/-/g; - print;' -} - -SLUG_TITLE="$(slugify "$FULL_TITLE")" -PASTE_DATE="$(date -I)" -OUT="_pastebins/$PASTE_DATE-$SLUG_TITLE.md" -if [ -n "${2:-}" ]; then - shift - CONTENT=$(cat "$@") -else - CONTENT='FIXME' -fi - -cd ~/dev/libre/website > /dev/null - -[ -f "$OUT" ] && { - echo "Pastebin named $OUT already exists." - exit 1 -} - -cat <<EOF | vipe | sponge > "$OUT" ---- - -title: ${FULL_TITLE} - -date: ${PASTE_DATE} - -layout: post - -lang: en - -ref: $SLUG_TITLE - ---- - -\`\`\`FIXME -$CONTENT -\`\`\` -EOF - -git reset . -git add "$OUT" -git commit -m "$0: Auto-add $OUT" -make clean publish -open "https://euandre.org/pastebin/$(echo "$PASTE_DATE" | tr '-' '/')/$SLUG_TITLE.html" -cd - > /dev/null diff --git a/scripts/post.sh b/scripts/post.sh deleted file mode 100755 index 3c4b483..0000000 --- a/scripts/post.sh +++ /dev/null @@ -1,136 +0,0 @@ -#!/bin/sh -set -eu - -# shellcheck source=/dev/null -. "$DOTFILES/sh/colors.sh" - -missing() { - red "Missing argument <${1}>.\n" >&2 -} - -usage() { - cat <<EOF >&2 -Usage: - $0 <TYPE> <FULL_TITLE> - - Arguments: - TYPE The type of the article: article, til, slides, podcast, screencast - FULL_TITLE Full title of the post - -Examples: - $0 til 'I just learned this' - $0 article 'My example article title' -EOF -} - -TYPE="${1:-}" -[ -z "$TYPE" ] && { - missing 'TYPE' - usage - exit 2 -} - -EXTRA='' -case "$TYPE" in - article|til) - LAYOUT=post - DIR="_${TYPE}s" - EXT=md - ;; - podcast|screencast) - LAYOUT=post - DIR="_${TYPE}s" - EXT=md - EXTRA=" -$TYPE: true -" - ;; - slides) - LAYOUT=slides - DIR=_slides - EXT=slides - ;; - *) - red "Invalid type '$TYPE'\n" >&2 - usage - exit 2 - ;; -esac - -FULL_TITLE="${2:-}" -[ -z "$FULL_TITLE" ] && { - missing 'FULL_TITLE' - usage - exit 2 -} - -# Derived from: -# https://stackoverflow.com/questions/4009281/how-can-i-generate-url-slugs-in-perl/4009519#4009519 -slugify() { - echo "$1" | \ - tr '[:upper:]' '[:lower:]' | \ - perl -ne 'tr/\000-\177//cd; - s/[^\w\s-]//g; - s/^\s+|\s+$//g; - s/[-\s]+/-/g; - print;' -} - -WEBSITE_REPO="$HOME/dev/libre/website" -SLUG_TITLE="$(slugify "$FULL_TITLE")" -PASTE_DATE="$(date -I)" -OUT="$WEBSITE_REPO/$DIR/$PASTE_DATE-$SLUG_TITLE.$EXT" - -cd "$WEBSITE_REPO" - -if [ -f "$OUT" ]; then - exec vi "$OUT" -fi - -if [ "$LAYOUT" = 'slides' ]; then - ARTICLE="$($0 article "$FULL_TITLE")" - cat<<EOF > "$OUT" ---- - -title: $FULL_TITLE - -date: $PASTE_DATE - -layout: $LAYOUT - -lang: en - -ref: $SLUG_TITLE - -article: $ARTICLE -$EXTRA ---- - ---- - -## Thank you! - -References: - -1. FIXME -2. FIXME -EOF -else - cat <<EOF > "$OUT" ---- - -title: $FULL_TITLE - -date: $PASTE_DATE - -layout: $LAYOUT - -lang: en - -ref: $SLUG_TITLE - ---- -EOF -fi - -vi "$OUT" diff --git a/scripts/record-my-screen.sh b/scripts/record-my-screen.sh deleted file mode 100755 index 65d01b9..0000000 --- a/scripts/record-my-screen.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh -set -eux - -usage() { - red "Missing argument $1.\n" - cat <<EOF -Usage: - record-my-screen.sh <OUTPUT_PATH> -[a|v] - - Arguments: - OUTPUT_PATH Path of the final WebM file - -a Include audio - -v Video only - -Examples: - Capture the screen without audio and save it in 'output.webm' - record-my-screen.sh output.webm -v -EOF -} - -OUTPUT_PATH="${1:-}" -[ -z "${OUTPUT_PATH}" ] && { - usage 'OUTPUT_PATH' - exit 2 -} -shift - -SCREEN_RESOLUTION="$(xrandr -q --current | grep '[*]' | awk '{print$1}')" -DEFAULT_FLAGS=" --f x11grab --s $SCREEN_RESOLUTION --i :0 -" -while getopts 'av' flag; do - case "$flag" in - a) - FLAGS="$DEFAULT_FLAGS" - ;; - v) - FLAGS="$DEFAULT_FLAGS -f pulse -i default" - ;; - *) - ;; - esac -done - -if [ -z "${FLAGS:-}" ]; then - usage '[a|b]' - exit 2 -fi - -# shellcheck disable=2086 -ffmpeg $FLAGS "$OUTPUT_PATH" - -# https://github.com/georgmartius/vid.stab diff --git a/scripts/todo b/scripts/todo deleted file mode 100755 index 6905784..0000000 --- a/scripts/todo +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/sh -set -eu - -usage() { - cat <<EOF -Usage: - $0 [OPTIONS] [TITLE] - -Options: - -h Show this help message - -c Commit directly only with the title, without adding a description - -t TYPE Pick the type of todo to be added (default: task) - -m MESSAGE_TITLE The message (default: FIXME) -EOF -} - -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}' -} - -insert_at_line() { - N="$1" - F="$2" - TMP="$(mktemp)" - printf '%s\n\n%s\n\n%s\n' \ - "$(head "-n$N" "$F")" \ - "$(cat -)" \ - "$(tail "-n+$((N+1))" "$F")" \ - > "$TMP" - mv "$TMP" "$F" -} - -SHORT=false -TYPE=task -MESSAGE=FIXME -while getopts 'hct:m:' flag; do - case "$flag" in - h) - usage - exit - ;; - c) - SHORT=true - ;; - t) - TYPE="$OPTARG" - ;; - m) - MESSAGE="$OPTARG" - ;; - *) - ;; - esac -done - -case "$TYPE" in - task|bug|improvement|question) - ;; - *) - echo "Unsupported type: $TYPE" - exit 2 - ;; -esac - -ID="#$TYPE-$(uuid)" -TITLE_LINE="$(printf '## TODO %s {%s}\n- TODO in %s\n' "$MESSAGE" "$ID" "$(date -I)")" -TYPE_LINE="$(grep -in "^# ${TYPE}s$" TODOs.md | cut -d: -f1)" -INSERT_LINE=$((TYPE_LINE + 1)) - -if [ "$SHORT" = 'true' ] && [ "$MESSAGE" != 'FIXME' ]; then - echo "$TITLE_LINE" | insert_at_line "$INSERT_LINE" TODOs.md -else - printf '%s\n\n---\n\nFIXME\n' "$TITLE_LINE" | vipe | insert_at_line "$INSERT_LINE" TODOs.md -fi - -git reset . -git add TODOs.md -git commit -m "TODOs.md: Add $ID" diff --git a/scripts/vid b/scripts/vid deleted file mode 100755 index 2d9f08c..0000000 --- a/scripts/vid +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -set -eu - -mkdir -p ~/archive/vid/ -echo "$1" >> ~/archive/vid/history.txt -nohup mpv "$1" 1>/dev/null 2>/dev/null & diff --git a/scripts/viddq b/scripts/viddq deleted file mode 100755 index 6abb66a..0000000 --- a/scripts/viddq +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -set -eu - -QUEUE="$HOME/archive/vid/queue.txt" -NEXT="$(head -n1 "$QUEUE")" -if [ -z "$NEXT" ]; then - echo 'Queue is empty!' -else - if mpv "$NEXT" 2>/dev/null | tail -n1 | grep '^Exiting\.\.\. (End of file)$'; then - echo "Finished playing '$NEXT', getting next on the queue." >&2 - NEW_QUEUE="$(mktemp)" - tail -n+2 "$QUEUE" > "$NEW_QUEUE" - mv "$NEW_QUEUE" "$QUEUE" - viddq - else - echo "Quit playing '$NEXT' without finishing, not removing it from the queue." - fi -fi diff --git a/scripts/videq b/scripts/videq deleted file mode 100755 index 067875b..0000000 --- a/scripts/videq +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -set -eu - -mkdir -p ~/archive/vid/ -echo "$1" >> ~/archive/vid/queue.txt diff --git a/scripts/vidrm b/scripts/vidrm deleted file mode 100755 index dbdc6d4..0000000 --- a/scripts/vidrm +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -set -eu - -QUEUE="$HOME/archive/vid/queue.txt" -DB="$HOME/archive/vid/metadata-database.txt" - -LIST="$(mktemp)" -touch "$DB" -while IFS='' read -r url; do - MATCH="$(grep -F "$url" "$DB" || echo "$url")" - echo "$MATCH" >> "$LIST" -done < "$QUEUE" - -file_and_stuff="$(fzf < "$LIST")" - -if [ -n "$file_and_stuff" ]; then - file="$(echo "$file_and_stuff" | awk -F' - ' '{print $NF}')" - NEW_QUEUE="$(mktemp)" - awk -v file="$file" ' - BEGIN { - once=0 - } - once == 0 && $0 == file { - once=1 - print file - } - $0 != file { print } - ' "$QUEUE" > "$NEW_QUEUE" - mv "$NEW_QUEUE" "$QUEUE" -fi diff --git a/scripts/xdg-open b/scripts/xdg-open deleted file mode 120000 index ce4a72b..0000000 --- a/scripts/xdg-open +++ /dev/null @@ -1 +0,0 @@ -open
\ No newline at end of file diff --git a/scripts/yt b/scripts/yt deleted file mode 100755 index ba7feb2..0000000 --- a/scripts/yt +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/sh -set -eu - -export DEFAULT_PLAYLIST_END=15 -export DEFAULT_INC_STEP=10 -export YT_TEMPLATE="${HOME}/Downloads/yt-dl/%(uploader)s/%(upload_date)s %(title)s.%(ext)s" - -download() { - youtube-dl "$1" \ - --download-archive ~/archive/youtube-dl-seen.conf \ - --prefer-free-formats \ - --playlist-end "$2" \ - --write-description \ - --output "$YT_TEMPLATE" -} - -download_user() { - download "https://www.youtube.com/user/$1" "${2-$DEFAULT_PLAYLIST_END}" -} - -download_channel() { - download "https://www.youtube.com/channel/$1" "${2-$DEFAULT_PLAYLIST_END}" -} - -download_playlist() { - download "https://www.youtube.com/playlist?list=$1" "${2-$DEFAULT_PLAYLIST_END}" -} - -inc_download() { - fn="$1" - id="$2" - step="${3-$DEFAULT_INC_STEP}" - - file="$HOME/.yt-db/$id" - mkdir -p "$HOME/.yt-db" - cat "$file" 2> /dev/null - n_count="$(cat "$file" 2> /dev/null || printf 10)" - n_count_new="$((n_count + step))" - - echo "$n_count_new" > "$file" - - "$fn" "$id" "$n_count" -} - -# Always downloads video, doesn't look at the download-archive - -URL_OR_PATH="${1:-}" -[ -z "${URL_OR_PATH}" ] && { - # shellcheck disable=2016 - echo 'Input "$URL_OR_PATH" is undefined.' > /dev/stderr - exit 2 -} - -if [ -f "${URL_OR_PATH}" ]; then - echo "File '${URL_OR_PATH}' exists, loading URLs from it..." > /dev/stderr - youtube-dl --batch-file "${URL_OR_PATH}" \ - --format best \ - --output "${YT_TEMPLATE}" \ - --write-description \ - 1>&2 - FILES="$(youtube-dl --batch-file "${URL_OR_PATH}" \ - --output "${YT_TEMPLATE}" \ - --format best \ - --get-filename)" -else - echo "File '${URL_OR_PATH}' doesn't exist, treating it as an URL..." > /dev/stderr - youtube-dl "${URL_OR_PATH}" \ - --output "${YT_TEMPLATE}" \ - --format best \ - --write-description \ - 1>&2 - FILES="$(youtube-dl "${URL_OR_PATH}" \ - --output "${YT_TEMPLATE}" \ - --format best \ - --get-filename)" -fi - -for f in $FILES; do - videq "$f" -done diff --git a/sh/Positive.ogg b/sh/Positive.ogg Binary files differdeleted file mode 100644 index 22cb563..0000000 --- a/sh/Positive.ogg +++ /dev/null diff --git a/sh/agents.sh b/sh/agents.sh deleted file mode 100644 index f392c86..0000000 --- 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 7c32b42..0000000 --- a/sh/aliases.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2139 - -unalias -a - -alias sbcl='rlwrap sbcl' -alias sqlite='rlwrap sqlite3' -alias guile='rlwrap guile' - -alias l="ls -lahF --color" -alias copy="tr -d '\\n' | xclip -sel clip" -alias cop="xclip -sel clip" -alias vpn="sudo openvpn --config $DOTFILES/VPN/euandreh.ovpn" -# Source: https://unix.stackexchange.com/questions/25327/watch-command-alias-expansion#25329 -alias watch="watch --color " -alias mr="mr -s" -alias ncdu="ncdu --color dark" -alias m="mbsync -a && notmuch new && alot" -alias n='neomutt' -alias p='ping euandre.org -c 3' -alias playerctl="playerctl --player=\"\$(cat ~/.cache/euandreh/mpris-player.txt)\"" -alias mux="tmuxinator start" -alias s="git status" -alias d="git diff" -alias ds="git diff --staged" - -u() { - cd ~/annex > /dev/null || exit 1; - git annex info --fast | grep available; - cd - > /dev/null || exit 1; -} - -alias reload=". $DOTFILES/sh/reload.sh" -alias rr=". $DOTFILES/sh/reload.sh" -alias r=". ~/.bashrc" - -alias ag="ag --hidden" -alias jk-shell="bundix && nix-shell -E '((import <nixpkgs> {}).bundlerEnv { name=\"jekyll-env\"; gemdir = ./.; }).env'" -alias grep='grep --color=auto' -alias diff='diff --color=auto' -# https://linuxhandbook.com/run-alias-as-sudo/ -alias sudo='sudo ' - -alias mktorrent='mktorrent -a udp://tracker.coppersurfer.tk:6969/announce -a udp://tracker.ccc.de:80/announce -a udp://tracker.publicbt.com:80 -a udp://tracker.istole.it:80 -a http://tracker.openbittorrent.com:80/announce -a http://tracker.ipv6tracker.org:80/announce' - -alias :x='echo "Already out of vi XD"' -alias :w='echo "Not inside vi!" && false' -alias sudo='echo "did you mean \"doas\""? && false' -alias mk='make clean public dev-check' -alias mail='mail -aFrom:eu@euandre.org' -alias borg="BORG_PASSPHRASE=$(pass show Borg) borg" diff --git a/sh/bash-config.sh b/sh/bash-config.sh deleted file mode 100644 index 416f5e8..0000000 --- a/sh/bash-config.sh +++ /dev/null @@ -1,58 +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' -set -h - -complete -cf doas diff --git a/sh/bash_profile.sh b/sh/bash_profile.sh deleted file mode 100644 index 805ae1c..0000000 --- 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 80aff07..0000000 --- a/sh/bashrc.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC1090 disable=SC1091 - -export DOTFILES=~/dev/libre/dotfiles - -. $DOTFILES/sh/bash-config.sh -. $DOTFILES/sh/env.sh -. "$GUIX_PROFILE/etc/profile" -. $DOTFILES/sh/colors.sh -. $DOTFILES/sh/git-prompt.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 -. ~/annex/bin/misc/priv.sh -. ~/.nurc diff --git a/sh/colors.sh b/sh/colors.sh deleted file mode 100644 index 7c8cb3e..0000000 --- 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 a56b570..0000000 --- a/sh/env.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -export R='16686@ch-s010.rsync.net' -export EDITOR=vi -export BROWSER=firefox -export INPUTRC=~/.inputrc -export BORG_REMOTE_PATH='borg1' -export GOPATH="$HOME/dev/go" -export PASSWORD_STORE_DIR="$HOME/dev/others/password-store" -export RLWRAP_HOME="$HOME/.cache/rlwrap" -export CFLAGS='-std=c99 -Wall -Wextra -Wpedantic -Werror -fPIC -g' -export CC=gcc - -export C_INCLUDE_PATH="${C_INCLUDE_PATH:-}${C_INCLUDE_PATH:+:}$HOME/.local/include" -export LIBRARY_PATH="${LIBRARY_PATH:-}${LIBRARY_PATH:+:}$HOME/.local/lib" -export PKG_CONFIG_PATH="${PKG_CONFIG_PATH:-}${PKG_CONFIG_PATH:+:}$HOME/.local/lib/pkgconfig" -export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:-}${LD_LIBRARY_PATH:+:}$HOME/.local/lib" -MANPATH="${MANPATH:-$HOME/.local/share/man:$(manpath)}" -export MANPATH -export PREFIX="$HOME/.local" -export INFOPATH="${INFOPATH:-}${INFOPATH:+:}$HOME/.local/info" - -# https://git.savannah.gnu.org/cgit/guix.git/tree/doc/guix.texi?id=cd6ae1cee95644b9aa712a7192bc9677a04c146b#n1287 -export NIX_BUILD_CORES=0 - -export GUIX_PROFILE="$HOME/.guix-profile" -export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale" - -PATH="$HOME/.local/bin:$HOME/tmp/bin:$HOME/dev/others/dinheiros:$DOTFILES/scripts:$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 06b9fe9..0000000 --- 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 5b693c1..0000000 --- a/sh/fzf.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/sh - -# 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"' - -fzg() { - fn=$(git grep -n "$1" | \ - cut -d: -f -2 | \ - fzf --select-1 \ - --exit-0 \ - --preview "echo {} | \ - cut -d: -f1 | \ - xargs -I% awk -v bounds=15 -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 fzg $@ - history -s vi "+$n" "$f" - vi "+$n" "$f" - fi -} - -f() { - profile="f-shell-function$(pwd | sed -e 's_/_-_g')" - file="$(git ls-files | remembering -p "$profile" -c "fzf --select-1 --exit-0 --query \"$2\" --preview 'cat {}'")" - if [ -n "$file" ]; then - # shellcheck disable=2068 - history -s f $@ - history -s "$1" "$file" - "$1" "$file" - fi -} - -V_FILES=' -annex/TODOs.md -tmp/scratch.txt -annex/bin/misc/git/mrconfig.ini -annex/bin/misc/dependencies.dot -archive/vid/playlist.txt -dev/others/dinheiros/money.ledger -' - -v() { - # I want to keep the pre-defined order - f="$(echo "$V_FILES" | awk /./ | fzf --select-1 --exit-0 --query "$1")" - if [ -n "$f" ]; then - history -s v "$@" - # shellcheck disable=2088 - history -s vi "~/$f" - echo "$f" - vi "$HOME/$f" - fi -} - -cn() { - CHOICE="$(git log --oneline | fzf)" - git log --oneline | grep -nF "$CHOICE" | cut -d: -f1 -} - -cm() { - git rev-parse "HEAD~$(cn)" -} diff --git a/sh/git-prompt.sh b/sh/git-prompt.sh deleted file mode 100644 index 79fd908..0000000 --- a/sh/git-prompt.sh +++ /dev/null @@ -1,589 +0,0 @@ -# Taken from: -# curl -L https://raw.github.com/git/git/master/contrib/completion/git-prompt.sh > bash/git-prompt.sh - -# bash/zsh git prompt support -# -# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> -# Distributed under the GNU General Public License, version 2.0. -# -# This script allows you to see repository status in your prompt. -# -# To enable: -# -# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh). -# 2) Add the following line to your .bashrc/.zshrc: -# source ~/.git-prompt.sh -# 3a) Change your PS1 to call __git_ps1 as -# command-substitution: -# Bash: PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ ' -# ZSH: setopt PROMPT_SUBST ; PS1='[%n@%m %c$(__git_ps1 " (%s)")]\$ ' -# the optional argument will be used as format string. -# 3b) Alternatively, for a slightly faster prompt, __git_ps1 can -# be used for PROMPT_COMMAND in Bash or for precmd() in Zsh -# with two parameters, <pre> and <post>, which are strings -# you would put in $PS1 before and after the status string -# generated by the git-prompt machinery. e.g. -# Bash: PROMPT_COMMAND='__git_ps1 "\u@\h:\w" "\\\$ "' -# will show username, at-sign, host, colon, cwd, then -# various status string, followed by dollar and SP, as -# your prompt. -# ZSH: precmd () { __git_ps1 "%n" ":%~$ " "|%s" } -# will show username, pipe, then various status string, -# followed by colon, cwd, dollar and SP, as your prompt. -# Optionally, you can supply a third argument with a printf -# format string to finetune the output of the branch status -# -# The repository status will be displayed only if you are currently in a -# git repository. The %s token is the placeholder for the shown status. -# -# The prompt status always includes the current branch name. -# -# In addition, if you set GIT_PS1_SHOWDIRTYSTATE to a nonempty value, -# unstaged (*) and staged (+) changes will be shown next to the branch -# name. You can configure this per-repository with the -# bash.showDirtyState variable, which defaults to true once -# GIT_PS1_SHOWDIRTYSTATE is enabled. -# -# You can also see if currently something is stashed, by setting -# GIT_PS1_SHOWSTASHSTATE to a nonempty value. If something is stashed, -# then a '$' will be shown next to the branch name. -# -# If you would like to see if there're untracked files, then you can set -# GIT_PS1_SHOWUNTRACKEDFILES to a nonempty value. If there're untracked -# files, then a '%' will be shown next to the branch name. You can -# configure this per-repository with the bash.showUntrackedFiles -# variable, which defaults to true once GIT_PS1_SHOWUNTRACKEDFILES is -# enabled. -# -# If you would like to see the difference between HEAD and its upstream, -# set GIT_PS1_SHOWUPSTREAM="auto". A "<" indicates you are behind, ">" -# indicates you are ahead, "<>" indicates you have diverged and "=" -# indicates that there is no difference. You can further control -# behaviour by setting GIT_PS1_SHOWUPSTREAM to a space-separated list -# of values: -# -# verbose show number of commits ahead/behind (+/-) upstream -# name if verbose, then also show the upstream abbrev name -# legacy don't use the '--count' option available in recent -# versions of git-rev-list -# git always compare HEAD to @{upstream} -# svn always compare HEAD to your SVN upstream -# -# You can change the separator between the branch name and the above -# state symbols by setting GIT_PS1_STATESEPARATOR. The default separator -# is SP. -# -# When there is an in-progress operation such as a merge, rebase, -# revert, cherry-pick, or bisect, the prompt will include information -# related to the operation, often in the form "|<OPERATION-NAME>". -# -# When the repository has a sparse-checkout, a notification of the form -# "|SPARSE" will be included in the prompt. This can be shortened to a -# single '?' character by setting GIT_PS1_COMPRESSSPARSESTATE, or omitted -# by setting GIT_PS1_OMITSPARSESTATE. -# -# By default, __git_ps1 will compare HEAD to your SVN upstream if it can -# find one, or @{upstream} otherwise. Once you have set -# GIT_PS1_SHOWUPSTREAM, you can override it on a per-repository basis by -# setting the bash.showUpstream config variable. -# -# If you would like to see more information about the identity of -# commits checked out as a detached HEAD, set GIT_PS1_DESCRIBE_STYLE -# to one of these values: -# -# contains relative to newer annotated tag (v1.6.3.2~35) -# branch relative to newer tag or branch (master~4) -# describe relative to older annotated tag (v1.6.3.1-13-gdd42c2f) -# tag relative to any older tag (v1.6.3.1-13-gdd42c2f) -# default exactly matching tag -# -# If you would like a colored hint about the current dirty state, set -# GIT_PS1_SHOWCOLORHINTS to a nonempty value. The colors are based on -# the colored output of "git status -sb" and are available only when -# using __git_ps1 for PROMPT_COMMAND or precmd in Bash, -# but always available in Zsh. -# -# If you would like __git_ps1 to do nothing in the case when the current -# directory is set up to be ignored by git, then set -# GIT_PS1_HIDE_IF_PWD_IGNORED to a nonempty value. Override this on the -# repository level by setting bash.hideIfPwdIgnored to "false". - -# check whether printf supports -v -__git_printf_supports_v= -printf -v __git_printf_supports_v -- '%s' yes >/dev/null 2>&1 - -# stores the divergence from upstream in $p -# used by GIT_PS1_SHOWUPSTREAM -__git_ps1_show_upstream () -{ - local key value - local svn_remote svn_url_pattern count n - local upstream=git legacy="" verbose="" name="" - - svn_remote=() - # get some config options from git-config - local output="$(git config -z --get-regexp '^(svn-remote\..*\.url|bash\.showupstream)$' 2>/dev/null | tr '\0\n' '\n ')" - while read -r key value; do - case "$key" in - bash.showupstream) - GIT_PS1_SHOWUPSTREAM="$value" - if [[ -z "${GIT_PS1_SHOWUPSTREAM}" ]]; then - p="" - return - fi - ;; - svn-remote.*.url) - svn_remote[$((${#svn_remote[@]} + 1))]="$value" - svn_url_pattern="$svn_url_pattern\\|$value" - upstream=svn+git # default upstream is SVN if available, else git - ;; - esac - done <<< "$output" - - # parse configuration values - local option - for option in ${GIT_PS1_SHOWUPSTREAM}; do - case "$option" in - git|svn) upstream="$option" ;; - verbose) verbose=1 ;; - legacy) legacy=1 ;; - name) name=1 ;; - esac - done - - # Find our upstream - case "$upstream" in - git) upstream="@{upstream}" ;; - svn*) - # get the upstream from the "git-svn-id: ..." in a commit message - # (git-svn uses essentially the same procedure internally) - local -a svn_upstream - svn_upstream=($(git log --first-parent -1 \ - --grep="^git-svn-id: \(${svn_url_pattern#??}\)" 2>/dev/null)) - if [[ 0 -ne ${#svn_upstream[@]} ]]; then - svn_upstream=${svn_upstream[${#svn_upstream[@]} - 2]} - svn_upstream=${svn_upstream%@*} - local n_stop="${#svn_remote[@]}" - for ((n=1; n <= n_stop; n++)); do - svn_upstream=${svn_upstream#${svn_remote[$n]}} - done - - if [[ -z "$svn_upstream" ]]; then - # default branch name for checkouts with no layout: - upstream=${GIT_SVN_ID:-git-svn} - else - upstream=${svn_upstream#/} - fi - elif [[ "svn+git" = "$upstream" ]]; then - upstream="@{upstream}" - fi - ;; - esac - - # Find how many commits we are ahead/behind our upstream - if [[ -z "$legacy" ]]; then - count="$(git rev-list --count --left-right \ - "$upstream"...HEAD 2>/dev/null)" - else - # produce equivalent output to --count for older versions of git - local commits - if commits="$(git rev-list --left-right "$upstream"...HEAD 2>/dev/null)" - then - local commit behind=0 ahead=0 - for commit in $commits - do - case "$commit" in - "<"*) ((behind++)) ;; - *) ((ahead++)) ;; - esac - done - count="$behind $ahead" - else - count="" - fi - fi - - # calculate the result - if [[ -z "$verbose" ]]; then - case "$count" in - "") # no upstream - p="" ;; - "0 0") # equal to upstream - p="=" ;; - "0 "*) # ahead of upstream - p=">" ;; - *" 0") # behind upstream - p="<" ;; - *) # diverged from upstream - p="<>" ;; - esac - else - case "$count" in - "") # no upstream - p="" ;; - "0 0") # equal to upstream - p=" u=" ;; - "0 "*) # ahead of upstream - p=" u+${count#0 }" ;; - *" 0") # behind upstream - p=" u-${count% 0}" ;; - *) # diverged from upstream - p=" u+${count#* }-${count% *}" ;; - esac - if [[ -n "$count" && -n "$name" ]]; then - __git_ps1_upstream_name=$(git rev-parse \ - --abbrev-ref "$upstream" 2>/dev/null) - if [ $pcmode = yes ] && [ $ps1_expanded = yes ]; then - p="$p \${__git_ps1_upstream_name}" - else - p="$p ${__git_ps1_upstream_name}" - # not needed anymore; keep user's - # environment clean - unset __git_ps1_upstream_name - fi - fi - fi - -} - -# Helper function that is meant to be called from __git_ps1. It -# injects color codes into the appropriate gitstring variables used -# to build a gitstring. -__git_ps1_colorize_gitstring () -{ - if [[ -n ${ZSH_VERSION-} ]]; then - local c_red='%F{red}' - local c_green='%F{green}' - local c_lblue='%F{blue}' - local c_clear='%f' - else - # Using \[ and \] around colors is necessary to prevent - # issues with command line editing/browsing/completion! - local c_red='\[\e[31m\]' - local c_green='\[\e[32m\]' - local c_lblue='\[\e[1;34m\]' - local c_clear='\[\e[0m\]' - fi - local bad_color=$c_red - local ok_color=$c_green - local flags_color="$c_lblue" - - local branch_color="" - if [ $detached = no ]; then - branch_color="$ok_color" - else - branch_color="$bad_color" - fi - c="$branch_color$c" - - z="$c_clear$z" - if [ "$w" = "*" ]; then - w="$bad_color$w" - fi - if [ -n "$i" ]; then - i="$ok_color$i" - fi - if [ -n "$s" ]; then - s="$flags_color$s" - fi - if [ -n "$u" ]; then - u="$bad_color$u" - fi - r="$c_clear$r" -} - -# Helper function to read the first line of a file into a variable. -# __git_eread requires 2 arguments, the file path and the name of the -# variable, in that order. -__git_eread () -{ - test -r "$1" && IFS=$'\r\n' read "$2" <"$1" -} - -# see if a cherry-pick or revert is in progress, if the user has committed a -# conflict resolution with 'git commit' in the middle of a sequence of picks or -# reverts then CHERRY_PICK_HEAD/REVERT_HEAD will not exist so we have to read -# the todo file. -__git_sequencer_status () -{ - local todo - if test -f "$g/CHERRY_PICK_HEAD" - then - r="|CHERRY-PICKING" - return 0; - elif test -f "$g/REVERT_HEAD" - then - r="|REVERTING" - return 0; - elif __git_eread "$g/sequencer/todo" todo - then - case "$todo" in - p[\ \ ]|pick[\ \ ]*) - r="|CHERRY-PICKING" - return 0 - ;; - revert[\ \ ]*) - r="|REVERTING" - return 0 - ;; - esac - fi - return 1 -} - -# __git_ps1 accepts 0 or 1 arguments (i.e., format string) -# when called from PS1 using command substitution -# in this mode it prints text to add to bash PS1 prompt (includes branch name) -# -# __git_ps1 requires 2 or 3 arguments when called from PROMPT_COMMAND (pc) -# in that case it _sets_ PS1. The arguments are parts of a PS1 string. -# when two arguments are given, the first is prepended and the second appended -# to the state string when assigned to PS1. -# The optional third parameter will be used as printf format string to further -# customize the output of the git-status string. -# In this mode you can request colored hints using GIT_PS1_SHOWCOLORHINTS=true -__git_ps1 () -{ - # preserve exit status - local exit=$? - local pcmode=no - local detached=no - local ps1pc_start='\u@\h:\w ' - local ps1pc_end='\$ ' - local printf_format=' (%s)' - - case "$#" in - 2|3) pcmode=yes - ps1pc_start="$1" - ps1pc_end="$2" - printf_format="${3:-$printf_format}" - # set PS1 to a plain prompt so that we can - # simply return early if the prompt should not - # be decorated - PS1="$ps1pc_start$ps1pc_end" - ;; - 0|1) printf_format="${1:-$printf_format}" - ;; - *) return $exit - ;; - esac - - # ps1_expanded: This variable is set to 'yes' if the shell - # subjects the value of PS1 to parameter expansion: - # - # * bash does unless the promptvars option is disabled - # * zsh does not unless the PROMPT_SUBST option is set - # * POSIX shells always do - # - # If the shell would expand the contents of PS1 when drawing - # the prompt, a raw ref name must not be included in PS1. - # This protects the user from arbitrary code execution via - # specially crafted ref names. For example, a ref named - # 'refs/heads/$(IFS=_;cmd=sudo_rm_-rf_/;$cmd)' might cause the - # shell to execute 'sudo rm -rf /' when the prompt is drawn. - # - # Instead, the ref name should be placed in a separate global - # variable (in the __git_ps1_* namespace to avoid colliding - # with the user's environment) and that variable should be - # referenced from PS1. For example: - # - # __git_ps1_foo=$(do_something_to_get_ref_name) - # PS1="...stuff...\${__git_ps1_foo}...stuff..." - # - # If the shell does not expand the contents of PS1, the raw - # ref name must be included in PS1. - # - # The value of this variable is only relevant when in pcmode. - # - # Assume that the shell follows the POSIX specification and - # expands PS1 unless determined otherwise. (This is more - # likely to be correct if the user has a non-bash, non-zsh - # shell and safer than the alternative if the assumption is - # incorrect.) - # - local ps1_expanded=yes - [ -z "${ZSH_VERSION-}" ] || [[ -o PROMPT_SUBST ]] || ps1_expanded=no - [ -z "${BASH_VERSION-}" ] || shopt -q promptvars || ps1_expanded=no - - local repo_info rev_parse_exit_code - repo_info="$(git rev-parse --git-dir --is-inside-git-dir \ - --is-bare-repository --is-inside-work-tree \ - --short HEAD 2>/dev/null)" - rev_parse_exit_code="$?" - - if [ -z "$repo_info" ]; then - return $exit - fi - - local short_sha="" - if [ "$rev_parse_exit_code" = "0" ]; then - short_sha="${repo_info##*$'\n'}" - repo_info="${repo_info%$'\n'*}" - fi - local inside_worktree="${repo_info##*$'\n'}" - repo_info="${repo_info%$'\n'*}" - local bare_repo="${repo_info##*$'\n'}" - repo_info="${repo_info%$'\n'*}" - local inside_gitdir="${repo_info##*$'\n'}" - local g="${repo_info%$'\n'*}" - - if [ "true" = "$inside_worktree" ] && - [ -n "${GIT_PS1_HIDE_IF_PWD_IGNORED-}" ] && - [ "$(git config --bool bash.hideIfPwdIgnored)" != "false" ] && - git check-ignore -q . - then - return $exit - fi - - local sparse="" - if [ -z "${GIT_PS1_COMPRESSSPARSESTATE}" ] && - [ -z "${GIT_PS1_OMITSPARSESTATE}" ] && - [ "$(git config --bool core.sparseCheckout)" = "true" ]; then - sparse="|SPARSE" - fi - - local r="" - local b="" - local step="" - local total="" - if [ -d "$g/rebase-merge" ]; then - __git_eread "$g/rebase-merge/head-name" b - __git_eread "$g/rebase-merge/msgnum" step - __git_eread "$g/rebase-merge/end" total - r="|REBASE" - else - if [ -d "$g/rebase-apply" ]; then - __git_eread "$g/rebase-apply/next" step - __git_eread "$g/rebase-apply/last" total - if [ -f "$g/rebase-apply/rebasing" ]; then - __git_eread "$g/rebase-apply/head-name" b - r="|REBASE" - elif [ -f "$g/rebase-apply/applying" ]; then - r="|AM" - else - r="|AM/REBASE" - fi - elif [ -f "$g/MERGE_HEAD" ]; then - r="|MERGING" - elif __git_sequencer_status; then - : - elif [ -f "$g/BISECT_LOG" ]; then - r="|BISECTING" - fi - - if [ -n "$b" ]; then - : - elif [ -h "$g/HEAD" ]; then - # symlink symbolic ref - b="$(git symbolic-ref HEAD 2>/dev/null)" - else - local head="" - if ! __git_eread "$g/HEAD" head; then - return $exit - fi - # is it a symbolic ref? - b="${head#ref: }" - if [ "$head" = "$b" ]; then - detached=yes - b="$( - case "${GIT_PS1_DESCRIBE_STYLE-}" in - (contains) - git describe --contains HEAD ;; - (branch) - git describe --contains --all HEAD ;; - (tag) - git describe --tags HEAD ;; - (describe) - git describe HEAD ;; - (* | default) - git describe --tags --exact-match HEAD ;; - esac 2>/dev/null)" || - - b="$short_sha..." - b="($b)" - fi - fi - fi - - if [ -n "$step" ] && [ -n "$total" ]; then - r="$r $step/$total" - fi - - local w="" - local i="" - local s="" - local u="" - local h="" - local c="" - local p="" - - if [ "true" = "$inside_gitdir" ]; then - if [ "true" = "$bare_repo" ]; then - c="BARE:" - else - b="GIT_DIR!" - fi - elif [ "true" = "$inside_worktree" ]; then - if [ -n "${GIT_PS1_SHOWDIRTYSTATE-}" ] && - [ "$(git config --bool bash.showDirtyState)" != "false" ] - then - git diff --no-ext-diff --quiet || w="*" - git diff --no-ext-diff --cached --quiet || i="+" - if [ -z "$short_sha" ] && [ -z "$i" ]; then - i="#" - fi - fi - if [ -n "${GIT_PS1_SHOWSTASHSTATE-}" ] && - git rev-parse --verify --quiet refs/stash >/dev/null - then - s="$" - fi - - if [ -n "${GIT_PS1_SHOWUNTRACKEDFILES-}" ] && - [ "$(git config --bool bash.showUntrackedFiles)" != "false" ] && - git ls-files --others --exclude-standard --directory --no-empty-directory --error-unmatch -- ':/*' >/dev/null 2>/dev/null - then - u="%${ZSH_VERSION+%}" - fi - - if [ -n "${GIT_PS1_COMPRESSSPARSESTATE}" ] && - [ "$(git config --bool core.sparseCheckout)" = "true" ]; then - h="?" - fi - - if [ -n "${GIT_PS1_SHOWUPSTREAM-}" ]; then - __git_ps1_show_upstream - fi - fi - - local z="${GIT_PS1_STATESEPARATOR-" "}" - - # NO color option unless in PROMPT_COMMAND mode or it's Zsh - if [ -n "${GIT_PS1_SHOWCOLORHINTS-}" ]; then - if [ $pcmode = yes ] || [ -n "${ZSH_VERSION-}" ]; then - __git_ps1_colorize_gitstring - fi - fi - - b=${b##refs/heads/} - if [ $pcmode = yes ] && [ $ps1_expanded = yes ]; then - __git_ps1_branch_name=$b - b="\${__git_ps1_branch_name}" - fi - - local f="$h$w$i$s$u" - local gitstring="$c$b${f:+$z$f}${sparse}$r$p" - - if [ $pcmode = yes ]; then - if [ "${__git_printf_supports_v-}" != yes ]; then - gitstring=$(printf -- "$printf_format" "$gitstring") - else - printf -v gitstring -- "$printf_format" "$gitstring" - fi - PS1="$ps1pc_start$gitstring$ps1pc_end" - else - printf -- "$printf_format" "$gitstring" - fi - - return $exit -} diff --git a/sh/mr-execute.sh b/sh/mr-execute.sh deleted file mode 100644 index 70479da..0000000 --- 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 0c03070..0000000 --- a/sh/ps1.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/sh - -error_marker() { - STATUS=$? - if [ "$STATUS" != 0 ]; then - redb " (!! $STATUS !!) " - fi -} - -timestamp() { - blacki '\T' -} - -path() { - yellowb '\w/' -} - -repo_status() { - inner="$(__git_ps1 "%s")" - if [ -n "$inner" ]; then - OUT="$(git status --short --branch --porcelain 2>/dev/null)" - 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="^^^ $inner vvv" - elif [ -n "$IS_AHEAD" ]; then - BRANCH_MARKER="^ $inner ^" - elif [ -n "$IS_BEHIND" ]; then - BRANCH_MARKER="v $inner v" - else - BRANCH_MARKER="$inner" - 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" - - printf ' - ' - blacki "$(git rev-parse HEAD)" - fi -} - -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 6eeb53a..0000000 --- a/sh/reload.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC1090 disable=SC1091 - -. ~/.bashrc -. "$DOTFILES/sh/x.sh" -. "$DOTFILES/sh/mr-execute.sh" -. "$DOTFILES/sh/fake-symlinks.sh" -. ~/annex/bin/misc/tmuxinator-templates.sh diff --git a/sh/symlinks.sh b/sh/symlinks.sh deleted file mode 100644 index 20e0dbb..0000000 --- a/sh/symlinks.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh - -ln -fs "$DOTFILES/sh/bashrc.sh" ~/.bashrc -ln -fs "$DOTFILES/sh/bash_profile.sh" ~/.bash_profile -ln -fs "$DOTFILES/git/gitattributes" ~/.gitattributes -ln -fs "$DOTFILES/git/gitignore" ~/.gitignore_global -ln -fs "$DOTFILES/git/gitconfig.ini" ~/.gitconfig -ln -fs "$DOTFILES/sbclrc.lisp" ~/.sbclrc -ln -fs "$DOTFILES/inputrc.conf" ~/.inputrc -ln -fs "$DOTFILES/Xmodmap.conf" ~/.Xmodmap -ln -fs "$DOTFILES/npmrc.sh" ~/.npmrc -ln -fs "$DOTFILES/mailcap.conf" ~/.mailcap - -mkdir -p ~/Downloads/Screenshots/ - -mkdir -p ~/.local/share/common-lisp -[ ! -e ~/.local/share/common-lisp/source ] && ln -fs ~/dev/libre ~/.local/share/common-lisp/source - -mkdir -p ~/tmp/ -touch ~/tmp/scratch.txt -touch /tmp/fp.euandreh.log - -mkdir -p ~/.gnupg -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/../servers/ssh.conf" ~/.ssh/config -ln -fs "$HOME/annex/bin/misc/git/mrconfig.ini" ~/.mrconfig - -mkdir -p ~/.newsboat -ln -fs "${HOME}/annex/bin/misc/atom/newsboat-urls.txt" ~/.newsboat/urls - -## tmux -ln -fs "$DOTFILES/tmux.conf" ~/.tmux.conf - -## vi -ln -fs "$DOTFILES/exrc.conf" ~/.exrc - -## xmonad -mkdir -p ~/.xmonad -ln -fs "$DOTFILES/xmonad/xsession.sh" ~/.xsession -ln -fs "$DOTFILES/xmonad/xmonad.hs" ~/.xmonad/xmonad.hs -ln -fs "$DOTFILES/xmonad/xmobar.hs" ~/.xmobarrc - -## Mercurial -ln -fs "${DOTFILES}/hgrc.ini" ~/.hgrc - -## ranger -mkdir -p ~/.config/ranger/ -ln -fs "${DOTFILES}/ranger.conf" ~/.config/ranger/rc.conf - -## nu -ln -fs "$HOME/annex/bin/misc/nurc.sh" ~/.nurc - -## Guix -mkdir -p ~/.config/guix -ln -fs "$DOTFILES/guix/channels.scm" ~/.config/guix/channels.scm - -## pimutils -mkdir -p ~/.config/vdirsyncer/ ~/.config/khal -ln -fs "$HOME/annex/bin/misc/pimutils/vdirsyncer.conf" ~/.config/vdirsyncer/config -ln -fs "$HOME/annex/bin/misc/pimutils/khal.conf" ~/.config/khal/config - -ln -fs "$DOTFILES/infokey" ~/.infokey diff --git a/sh/templates/..git/hooks/pre-push b/sh/templates/..git/hooks/pre-push deleted file mode 120000 index 29785d2..0000000 --- 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 87174b6..0000000 --- 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 65f247b..0000000 --- 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 be3f7b2..0000000 --- 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 5e04401..0000000 --- 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 6a96f29..0000000 --- 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 d5cca56..0000000 --- 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 e69de29..0000000 --- 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 cc01f3a..0000000 --- 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 b6769a9..0000000 --- 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 ee8075f..0000000 --- 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 0580c87..0000000 --- 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 65d3335..0000000 --- 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 a689235..0000000 --- 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 504406f..0000000 --- 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 b521c82..0000000 --- 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 e075974..0000000 --- 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 0cb8b8b..0000000 --- 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 8d93fb5..0000000 --- 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 80059ee..0000000 --- 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 8e81f1f..0000000 --- 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 cef75dd..0000000 --- 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 ca73b7f..0000000 --- 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 6016f51..0000000 --- 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 c061a04..0000000 --- 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 8f9327c..0000000 --- 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 051fdf1..0000000 --- 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 ce566b2..0000000 --- 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 30efe0b..0000000 --- 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 8ecb855..0000000 --- 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 8de6ac4..0000000 --- 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 d7935d0..0000000 --- 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 304e51d..0000000 --- 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 4c28ea5..0000000 --- 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 4c28ea5..0000000 --- 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 957566e..0000000 --- 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 89199c1..0000000 --- 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/x.sh b/sh/x.sh deleted file mode 100644 index 7e28b20..0000000 --- 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 ~/.Xmodmap diff --git a/tmux.conf b/tmux.conf deleted file mode 100644 index f2b7118..0000000 --- a/tmux.conf +++ /dev/null @@ -1,77 +0,0 @@ -# Use personal prefix over "C-b" -unbind C-b -set -g prefix C-v - -# Turn on mouse mode -# https://groups.google.com/forum/#!msg/tmux-users/TRwPgEOVqho/Ck_oth_SDgAJ -# https://github.com/tmux/tmux/blob/310f0a960ca64fa3809545badc629c0c166c6cd2/CHANGES#L12 -set -g mouse on - -# Bind "C-x r" to reload the configuration file -bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded" - -# Holy answer that properly implements copying from tmux! -# https://unix.stackexchange.com/a/349020/276661 -bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe "xclip -selection clipboard -i" \; -bind-key y send-keys -X copy-pipe "xclip -selection clipboard -i" \; display-message "Copied system clipboard! Hooray! Long-live tmux!" - -# Moving around panes -bind-key -n M-h select-pane -L -bind-key -n M-j select-pane -D -bind-key -n M-k select-pane -U -bind-key -n M-l select-pane -R - -# Resizing panes -bind-key -n M-H resize-pane -L 5 -bind-key -n M-J resize-pane -D 5 -bind-key -n M-K resize-pane -U 5 -bind-key -n M-L resize-pane -R 5 - -# Reorder windows -bind-key -n C-S-Left swap-window -t -1\; select-window -t -1 -bind-key -n C-S-Right swap-window -t +1\; select-window -t +1 -# -# To change the number of a window, use: PREFIX-., and pick a new unused number -# - -# Join windows -bind-key -n C-S-M-Left join-pane -s :-0 -t :-1 -bind-key -n C-S-M-Right join-pane -s :-0 -t :+1 - -# "C-x m" to actually clear the pane history -bind-key m send-keys -R \; clear-history - -# Keybinding to activate pane typing sync -# https://stackoverflow.com/questions/25909964/tmux-how-to-toggle-on-and-off-options-with-the-same-key -bind-key b setw synchronize-panes \; display-message "synchronize-panes toggle" - -setw -g mode-keys vi # Move around with vi keys -set-option -g status-key "vi" # Use vi mode for status bar command (like after typing "C-x [" one can search with "/") -set-option -g status-bg "#666666" # Status bar background color -set-option -g status-fg "#aaaaaa" # Status bar foreground color -set-option -g status-left-length 50 # session name in status bar length =[annex]= part -set-option -g history-limit 150000 # How many lines of history to keep - -# Set the panes initial index value to 1 instead of 0 -# 0 is too far from ` ;) -set -g base-index 1 -set-window-option -g pane-base-index 1 - -# Automatically set window title -set-window-option -g automatic-rename on -set-option -g set-titles on - -# Set "correct term" -# https://wiki.archlinux.org/index.php/Tmux -set -g default-terminal screen-256color - -# No delay for escape key press -# https://mutelight.org/practical-tmux#faster-command-sequences -set -sg escape-time 0 - -# Enable arrow key navigation -set-option -gw xterm-keys on - -# Display pane numbers for longer -# https://unix.stackexchange.com/questions/307696/how-to-increase-tmux-pane-numbers-display-time-ctrl-b-q -set -g display-panes-time 2500 diff --git a/xmonad/scripts/brightness.sh b/xmonad/scripts/brightness.sh deleted file mode 100755 index 77dc9b3..0000000 --- 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" || sudo chmod 666 "${HANDLER}/brightness" diff --git a/xmonad/scripts/dmenu-emoji.sh b/xmonad/scripts/dmenu-emoji.sh deleted file mode 100755 index 71ccde8..0000000 --- a/xmonad/scripts/dmenu-emoji.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -set -eux - -# Derived from: -# https://github.com/porras/dmenu-emoji - -LIST="$HOME/dev/libre/dotfiles/xmonad/scripts/emoji-list.txt" - -dmenu \ - -l 20 \ - -i \ - -p 'Emoji: ' -fn Monospace-18 \ - < "$LIST" \ - | awk '{print $(NF)}' | tr -d '\n' | xclip -sel clip diff --git a/xmonad/scripts/dmenu-pass.sh b/xmonad/scripts/dmenu-pass.sh deleted file mode 100755 index 6edd135..0000000 --- a/xmonad/scripts/dmenu-pass.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -set -eu - -export PASSWORD_STORE_DIR="$HOME/dev/others/password-store" - -choice="$(find "$PASSWORD_STORE_DIR" -type f | \ - grep -Ev '(.git|.gpg-id)' | \ - sed -e "s|$PASSWORD_STORE_DIR/||" -e 's/\.gpg$//' | \ - remembering -p password-store \ - -c "dmenu -l 20 -i -p 'Pass: ' -fn Monospace-18")" - -if [ -n "$choice" ]; then - pass show "$choice" -c -fi diff --git a/xmonad/scripts/dmenu-vid.sh b/xmonad/scripts/dmenu-vid.sh deleted file mode 100755 index 8b5ec40..0000000 --- a/xmonad/scripts/dmenu-vid.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -set -eu -set -x - -QUEUE="$HOME/archive/vid/queue.txt" -DB="$HOME/archive/vid/metadata-database.txt" - -LIST="$(mktemp)" -touch "$DB" -while IFS='' read -r url; do - MATCH="$(grep -F "$url" "$DB" ||:)" - if [ -n "$MATCH" ]; then - echo "$MATCH" >> "$LIST" - else - printf '%s - %s\n' "$(youtube-dl "$url" -o '%(title)s - %(uploader)s' --get-filename)" "$url" >> "$DB" & - echo "$url" >> "$LIST" - fi -done < "$QUEUE" - -file_and_stuff="$(dmenu -l 20 -p 'Media: ' < "$LIST")" - -if [ -n "$file_and_stuff" ]; then - file="$(echo "$file_and_stuff" | awk -F' - ' '{print $NF}')" - "$HOME/dev/libre/dotfiles/scripts/vid" "$file" -fi diff --git a/xmonad/scripts/dmenu-videq.sh b/xmonad/scripts/dmenu-videq.sh deleted file mode 100755 index 9e64bfd..0000000 --- a/xmonad/scripts/dmenu-videq.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -set -eu - -URL="$(xsel -bo)" - -res="$(printf 'yes\nno\n' | dmenu -l 2 -p "$(printf 'Add to media queue: %s' "$URL")")" - -if [ "$res" = 'yes' ]; then - videq "$URL" -fi diff --git a/xmonad/scripts/emoji-list.txt b/xmonad/scripts/emoji-list.txt deleted file mode 100755 index 06b5a58..0000000 --- a/xmonad/scripts/emoji-list.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/ezran.sh b/xmonad/scripts/ezran.sh deleted file mode 100755 index cabc578..0000000 --- a/xmonad/scripts/ezran.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -set -eu -xrandr --output eDP-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output DP-1 --off --output DP-2 --off --output DP-3 --mode 1360x768 --pos 1920x0 --rotate normal diff --git a/xmonad/scripts/playerctl-play-pause.sh b/xmonad/scripts/playerctl-play-pause.sh deleted file mode 100755 index a24733a..0000000 --- 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 ce93e95..0000000 --- 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/single-monitor.sh b/xmonad/scripts/single-monitor.sh deleted file mode 100755 index ec0815a..0000000 --- a/xmonad/scripts/single-monitor.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -set -eux -xrandr --output VIRTUAL1 --off --output eDP1 --primary --mode 1920x1080 --pos 640x1440 --rotate normal --output DP1 --off --output HDMI2 --off --output HDMI1 --off --output DP2 --off diff --git a/xmonad/scripts/three-monitors.sh b/xmonad/scripts/three-monitors.sh deleted file mode 100755 index d1ef7c6..0000000 --- a/xmonad/scripts/three-monitors.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -xrandr --output VIRTUAL1 --off --output eDP1 --primary --mode 1920x1080 --pos 640x1440 --rotate normal --output DP1 --off --output HDMI2 --off --output HDMI1 --mode 2560x1440 --pos 0x0 --rotate normal --output DP2 --mode 2560x1440 --pos 2560x0 --rotate left diff --git a/xmonad/scripts/toggle-pulseaudio-sink.sh b/xmonad/scripts/toggle-pulseaudio-sink.sh deleted file mode 100755 index b20f575..0000000 --- a/xmonad/scripts/toggle-pulseaudio-sink.sh +++ /dev/null @@ -1,16 +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 ' ')" -echo $CURRENT - -if [ "$CURRENT" = 0 ]; then - pacmd set-default-sink 10 -elif [ "$CURRENT" = 10 ]; then - pacmd set-default-sink 0 -else - echo "I don't know what to do now." -fi diff --git a/xmonad/scripts/usurpador.sh b/xmonad/scripts/usurpador.sh deleted file mode 100755 index cd24199..0000000 --- a/xmonad/scripts/usurpador.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -set -eu -xrandr --output eDP-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output DP-1 --off --output DP-2 --off --output DP-3 --off diff --git a/xmonad/scripts/xmobar-mail.sh b/xmonad/scripts/xmobar-mail.sh deleted file mode 100755 index 259e81b..0000000 --- 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 NOT tag:lists AND NOT tag:killed)" "$(notmuch count tag:inbox AND NOT tag:lists AND NOT tag:killed)" "$(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 3ac4886..0000000 --- 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 d05a2d4..0000000 --- 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/yad-buku.sh b/xmonad/scripts/yad-buku.sh deleted file mode 100755 index 20d2f8e..0000000 --- a/xmonad/scripts/yad-buku.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -set -euo - -URL="$(yad --title 'Add the URL' --form --field 'URL')" - -if [ -n "$URL" ]; then - buku -a "$URL" -fi diff --git a/xmonad/scripts/zero-brightness.sh b/xmonad/scripts/zero-brightness.sh deleted file mode 100755 index c487dd3..0000000 --- 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" diff --git a/xmonad/xmobar.hs b/xmonad/xmobar.hs deleted file mode 100644 index 1526b60..0000000 --- a/xmonad/xmobar.hs +++ /dev/null @@ -1,26 +0,0 @@ -Config { - font = "xft:DejaVu Sans Mono:size=9" - , commands = [ - Run Cpu ["-L","3","-H","50", "--normal","#5ea2a4","--high","red"] 10 - , Run Memory ["-t","Mem: <usedratio>%"] 30 - , Run Swap [] 30 - , Run Date "%A, %e %B %Y, %H:%M:%S" "date" 10 - , Run DiskU [("/", "<used>/<size>")] [] 600 - , Run Wireless "wlp0s20f3" [] 100 - , Run Volume "default" "Master" [] 10 - , Run Battery [ - "-t", "<acstatus>: <fc=#5ea2a4><left></fc>% - <timeleft>", - "--", - "-O", "AC", - "-i", "Full", - "-o", "Bat", - "-p", "orange", - "-h", "green", - "-l", "red"] - 10 - , Run CommandReader "~/dev/libre/dotfiles/xmonad/scripts/xmobar-mpris.sh" "mpris" - , Run CommandReader "~/dev/libre/dotfiles/xmonad/scripts/xmobar-notifications.sh" "notifications" - , Run CommandReader "~/dev/libre/dotfiles/xmonad/scripts/xmobar-mail.sh" "notmuch" - ] - , template = " <fc=#5ea2a4>%date%</fc> | %default:Master%| %mpris% } { <fc=#008000>%notifications%</fc> | %notmuch% | %wlp0s20f3wi% | %battery% | %memory% * %swap% | %cpu% | %disku% " -} diff --git a/xmonad/xmonad.hs b/xmonad/xmonad.hs deleted file mode 100644 index 465cde5..0000000 --- a/xmonad/xmonad.hs +++ /dev/null @@ -1,107 +0,0 @@ -import XMonad -import XMonad.Actions.SpawnOn(spawnHere) -import XMonad.Hooks.ManageDocks -import XMonad.Util.EZConfig(additionalKeysP) -import XMonad.Layout.NoBorders -import XMonad.Hooks.SetWMName -import XMonad.Hooks.ManageHelpers -import XMonad.Util.Run(spawnPipe) -import XMonad.Layout.ResizableTile -import XMonad.Layout.ResizableTile(MirrorResize(MirrorShrink, MirrorExpand)) - -main :: IO () -main = do - xmproc <- spawnPipe "xmobar ~/.xmobarrc" - xmonad $ def - -- Fullscreen handling: - -- https://stackoverflow.com/questions/20446348/xmonad-toggle-fullscreen-xmobar - { manageHook = manageDocks <+> (isFullscreen --> doFullFloat) <+> (className =? "trayer" --> doIgnore) <+> manageHook def - , handleEventHook = handleEventHook def <+> docksEventHook - , layoutHook = myLayoutHook - , modMask = mod4Mask -- User Super instead of Alt - , terminal = myTerminal - , startupHook = myStartup - } `additionalKeysP` myKeyPBindings - -myTerminal :: String -myTerminal = "st" - -dbg :: String -dbg = "xmessage 'xmonad EuAndreh debug'" - -myKeyPBindings :: [(String, X ())] -myKeyPBindings = - [ -- Volume - ("<F1>", spawn "amixer -q sset Master toggle") - , ("<F2>", spawn "amixer -q sset Master 5%- unmute") - , ("<F3>", spawn "amixer -q sset Master 5%+ unmute") - - -- Playback - , ("<F4>", spawn "playerctl --player=$(cat ~/.cache/euandreh/mpris-player.txt) position 5-") - , ("S-<F4>", spawn "playerctl --player=$(cat ~/.cache/euandreh/mpris-player.txt) previous") - , ("<F5>", spawn "~/dev/libre/dotfiles/xmonad/scripts/playerctl-play-pause.sh") - , ("S-<F5>", spawn "~/dev/libre/dotfiles/xmonad/scripts/rotate-mpris-player.sh") - , ("<F6>", spawn "playerctl --player=$(cat ~/.cache/euandreh/mpris-player.txt) position 5+") - , ("S-<F6>", spawn "playerctl --player=$(cat ~/.cache/euandreh/mpris-player.txt) next") - - -- Brightness - , ("<F7>", spawn "~/dev/libre/dotfiles/xmonad/scripts/brightness.sh -10") - , ("S-<F7>", spawn "~/dev/libre/dotfiles/xmonad/scripts/zero-brightness.sh") - , ("<F8>", spawn "~/dev/libre/dotfiles/xmonad/scripts/brightness.sh +10") - - , ("M-p", spawnHere "exe=$(dmenu_path | remembering -p dmenu_exec -c dmenu) && exec $exe") - , ("M-i", spawnHere "~/dev/libre/dotfiles/xmonad/scripts/dmenu-pass.sh") - , ("M-o", spawnHere "~/dev/libre/dotfiles/xmonad/scripts/dmenu-emoji.sh") - - , ("M-b", spawnHere "~/dev/libre/dotfiles/xmonad/scripts/yad-buku.sh") - - -- Lock screen - , ("C-M-l", spawn "dm-tool switch-to-greeter") - - -- print whole screen - , ("M-<Print>", spawn "escrotum ~/Downloads/Screenshots/%Y-%m-%d-%T-screenshot.png") - -- print screen of clicked window - , ("C-M-<Print>", spawn "escrotum ~/Downloads/Screenshots/%Y-%m-%d-%T-screenshot.png -s") - - -- xrandr single monitor setup - , ("C-M-1", spawn "~/dev/libre/dotfiles/xmonad/scripts/single-monitor.sh") - - -- xrandr three monitor setup - , ("C-M-3", spawn "~/dev/libre/dotfiles/xmonad/scripts/three-monitors.sh") - - -- restart network - , ("M-x", spawn "gksudo -S systemctl restart NetworkManager") - - -- Toggle appearence of xmobar - -- https://stackoverflow.com/a/27646652 - , ("M-f", sendMessage ToggleStruts) - - , ("M-รง", spawn dbg) - - -- Vertically resize, taken from: - -- https://stackoverflow.com/questions/25857674/xmonad-vertical-resize-tile-window - , ("M-a", sendMessage MirrorExpand) - , ("M-z", sendMessage MirrorShrink) - - - -- Toggle PulseAudio sink - , ("M-v", spawn "~/dev/libre/dotfiles/xmonad/scripts/toggle-pulseaudio-sink.sh") - - -- Enqueue link on clipboard in VLC - -- , ("M-v", spawn "~/dev/libre/dotfiles/xmonad/scripts/dmenu-vid.sh") - -- , ("C-M-v", spawn "~/dev/libre/dotfiles/xmonad/scripts/dmenu-videq.sh") - ] - -myLayoutHook = - smartBorders $ avoidStruts $ (tiled ||| Mirror tiled ||| Full) - where - tiled = ResizableTall nmaster delta ratio [] - nmaster = 1 - delta = 3/100 - ratio = 1/2 - -myStartup :: X () -myStartup = do - -- Taken from: - -- https://stackoverflow.com/questions/30742662/java-swing-gui-not-displaying-in-xmonad - setWMName "LG3D" diff --git a/xmonad/xsession.sh b/xmonad/xsession.sh deleted file mode 100755 index b25a9a1..0000000 --- a/xmonad/xsession.sh +++ /dev/null @@ -1 +0,0 @@ -xmonad |