commit 281fb063826db13cbf57ea01368abdc39eca1301 Author: [yuri] <[yuri.kuit@gmail.com]> Date: Mon Nov 10 09:37:46 2025 +0100 CLEANUP v1 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/README.md b/README.md new file mode 100644 index 0000000..e0d6deb --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +![starburst_logo](https://github.com/user-attachments/assets/58862fe1-84bf-4c61-be7e-5ddf654907d0) +# starburst - work in progress diff --git a/_old/v1/--1110-arch-plasma-full.sh b/_old/v1/--1110-arch-plasma-full.sh new file mode 100755 index 0000000..6a7cfce --- /dev/null +++ b/_old/v1/--1110-arch-plasma-full.sh @@ -0,0 +1,89 @@ +#!/bin/bash +#set -e +################################################################################################################################## +#tput setaf 0 = black +#tput setaf 1 = red +#tput setaf 2 = green +#tput setaf 3 = yellow +#tput setaf 4 = dark blue +#tput setaf 5 = purple +#tput setaf 6 = cyan +#tput setaf 7 = gray +#tput setaf 8 = light blue +################################################################################################################################## + +installed_dir=$(dirname $(readlink -f $(basename `pwd`))) + +################################################################################################################################## + +if [ "$DEBUG" = true ]; then + echo + echo "------------------------------------------------------------" + echo "Running $(basename $0)" + echo "------------------------------------------------------------" + echo + read -n 1 -s -r -p "Debug mode is on. Press any key to continue..." + echo +fi + +################################################################################################################################## + +func_install() { + if pacman -Qi $1 &> /dev/null; then + tput setaf 2 + echo "#######################################################################################" + echo "################## The package "$1" is already installed" + echo "#######################################################################################" + echo + tput sgr0 + else + tput setaf 3 + echo "#######################################################################################" + echo "################## Installing package " $1 + echo "#######################################################################################" + echo + tput sgr0 + sudo pacman -S --noconfirm --needed $1 + fi +} + +func_install_plasma_full() { + + echo + tput setaf 2 + echo "########################################################################" + echo "################### Install Plasma Full" + echo "########################################################################" + tput sgr0 + echo + + list=( + ) + + count=0 + + for name in "${list[@]}" ; do + count=$[count+1] + tput setaf 3;echo "Installing package nr. "$count " " $name;tput sgr0; + func_install $name + done +} + +echo +tput setaf 2 +echo "########################################################################" +echo "################### Let us install Plasma Full" +echo "########################################################################" +tput sgr0 +echo + +func_install_plasma_full + + +echo +tput setaf 6 +echo "##############################################################" +echo "################### $(basename $0) done" +echo "##############################################################" +tput sgr0 +echo \ No newline at end of file diff --git a/_old/v1/--1110-arch-plasma-minimal.sh b/_old/v1/--1110-arch-plasma-minimal.sh new file mode 100755 index 0000000..05fc513 --- /dev/null +++ b/_old/v1/--1110-arch-plasma-minimal.sh @@ -0,0 +1,89 @@ +#!/bin/bash +#set -e +################################################################################################################################## +#tput setaf 0 = black +#tput setaf 1 = red +#tput setaf 2 = green +#tput setaf 3 = yellow +#tput setaf 4 = dark blue +#tput setaf 5 = purple +#tput setaf 6 = cyan +#tput setaf 7 = gray +#tput setaf 8 = light blue +################################################################################################################################## + +installed_dir=$(dirname $(readlink -f $(basename `pwd`))) + +################################################################################################################################## + +if [ "$DEBUG" = true ]; then + echo + echo "------------------------------------------------------------" + echo "Running $(basename $0)" + echo "------------------------------------------------------------" + echo + read -n 1 -s -r -p "Debug mode is on. Press any key to continue..." + echo +fi + +################################################################################################################################## + +func_install() { + if pacman -Qi $1 &> /dev/null; then + tput setaf 2 + echo "#######################################################################################" + echo "################## The package "$1" is already installed" + echo "#######################################################################################" + echo + tput sgr0 + else + tput setaf 3 + echo "#######################################################################################" + echo "################## Installing package " $1 + echo "#######################################################################################" + echo + tput sgr0 + sudo pacman -S --noconfirm --needed $1 + fi +} + +func_install_plasma_min() { + + echo + tput setaf 2 + echo "########################################################################" + echo "################### Install Plasma Minimal" + echo "########################################################################" + tput sgr0 + echo + + list=( + ) + + count=0 + + for name in "${list[@]}" ; do + count=$[count+1] + tput setaf 3;echo "Installing package nr. "$count " " $name;tput sgr0; + func_install $name + done +} + +echo +tput setaf 2 +echo "########################################################################" +echo "################### Let us install Plasma Minimal" +echo "########################################################################" +tput sgr0 +echo + +func_install_plasma_min + + +echo +tput setaf 6 +echo "##############################################################" +echo "################### $(basename $0) done" +echo "##############################################################" +tput sgr0 +echo \ No newline at end of file diff --git a/_old/v1/--1120-arch-hyprland.sh b/_old/v1/--1120-arch-hyprland.sh new file mode 100755 index 0000000..698d520 --- /dev/null +++ b/_old/v1/--1120-arch-hyprland.sh @@ -0,0 +1,88 @@ +#!/bin/bash +#set -e +################################################################################################################################## +#tput setaf 0 = black +#tput setaf 1 = red +#tput setaf 2 = green +#tput setaf 3 = yellow +#tput setaf 4 = dark blue +#tput setaf 5 = purple +#tput setaf 6 = cyan +#tput setaf 7 = gray +#tput setaf 8 = light blue +################################################################################################################################## + +installed_dir=$(dirname $(readlink -f $(basename `pwd`))) + +################################################################################################################################## + +if [ "$DEBUG" = true ]; then + echo + echo "------------------------------------------------------------" + echo "Running $(basename $0)" + echo "------------------------------------------------------------" + echo + read -n 1 -s -r -p "Debug mode is on. Press any key to continue..." + echo +fi + +################################################################################################################################## + +func_install() { + if pacman -Qi $1 &> /dev/null; then + tput setaf 2 + echo "#######################################################################################" + echo "################## The package "$1" is already installed" + echo "#######################################################################################" + echo + tput sgr0 + else + tput setaf 3 + echo "#######################################################################################" + echo "################## Installing package " $1 + echo "#######################################################################################" + echo + tput sgr0 + sudo pacman -S --noconfirm --needed $1 + fi +} + +func_install_hyprland() { + + echo + tput setaf 2 + echo "########################################################################" + echo "################### Install Hyprland" + echo "########################################################################" + tput sgr0 + echo + + list=( + ) + + count=0 + + for name in "${list[@]}" ; do + count=$[count+1] + tput setaf 3;echo "Installing package nr. "$count " " $name;tput sgr0; + func_install $name + done +} + +echo +tput setaf 2 +echo "########################################################################" +echo "################### Let us install Hyprland" +echo "########################################################################" +tput sgr0 +echo + +func_install_hyprland + +echo +tput setaf 6 +echo "##############################################################" +echo "################### $(basename $0) done" +echo "##############################################################" +tput sgr0 +echo \ No newline at end of file diff --git a/_old/v1/0-setup-linux.sh b/_old/v1/0-setup-linux.sh new file mode 100755 index 0000000..0d0c29f --- /dev/null +++ b/_old/v1/0-setup-linux.sh @@ -0,0 +1,71 @@ +#!/bin/bash +#set -e +################################################################################################################## +#tput setaf 0 = black +#tput setaf 1 = red +#tput setaf 2 = green +#tput setaf 3 = yellow +#tput setaf 4 = dark blue +#tput setaf 5 = purple +#tput setaf 6 = cyan +#tput setaf 7 = gray +#tput setaf 8 = light blue +################################################################################################################## + +echo +tput setaf 3 +echo "################################################################" +echo "################### Start OS Detection" +echo "################################################################" +tput sgr0 +echo + +# Detect OS and set flags +OS="" +if grep -qi "arch" /etc/os-release; then + OS="arch" +elif grep -qi "debian" /etc/os-release; then + OS="debian" +fi + +# If unknown, exit +if [[ -z "$OS" ]]; then + tput setaf 1 + echo "################################################################################" + echo "ERROR: Unsupported or unknown Linux distribution." + echo "This script only supports Arch-based or Debian-based systems." + echo "################################################################################" + tput sgr0 + exit 1 +fi + +# Show detected OS +tput setaf 6 +echo "################################################################################" +echo "Detected OS: ${OS:-unknown}" +echo "################################################################################" +tput sgr0 + +if [[ "$OS" == "arch" ]]; then + echo "Running Arch Linux setup steps..." + # your pacman install section goes here + sh 1000-arch-base.sh +fi + +if [[ "$OS" == "debian" ]]; then + echo "Running Debian setup steps..." + # your apt install section goes here + bash 1000-debian-base.sh +fi + +if [[ -z "$OS" ]]; then + tput setaf 3 + echo "Warning: Unknown Linux distribution. Script may not work as expected." + tput sgr0 +fi + +tput setaf 3 +echo "################################################################" +echo "End OS Detection" +echo "################################################################" +tput sgr0 \ No newline at end of file diff --git a/_old/v1/1000-arch-base.sh b/_old/v1/1000-arch-base.sh new file mode 100755 index 0000000..e4ced9c --- /dev/null +++ b/_old/v1/1000-arch-base.sh @@ -0,0 +1,103 @@ +#!/bin/bash +#set -e +################################################################################################################## +#tput setaf 0 = black +#tput setaf 1 = red +#tput setaf 2 = green +#tput setaf 3 = yellow +#tput setaf 4 = dark blue +#tput setaf 5 = purple +#tput setaf 6 = cyan +#tput setaf 7 = gray +#tput setaf 8 = light blue +################################################################################################################## + +echo +tput setaf 3 +echo "################################################################" +echo "################### Start Arch setup" +echo "################################################################" +tput sgr0 +echo + +# Setting installed_dir to base folder of the git-repository +installed_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +# Installing chaotic-aur keys and mirrors +pkg_dir="packages" + +# Ensure directory exists +if [[ ! -d "$pkg_dir" ]]; then + echo "Directory not found: $pkg_dir" + exit 1 +fi + +# Install all local packages using pacman +find "$pkg_dir" -maxdepth 1 -name '*.pkg.tar.zst' -print0 | sudo xargs -0 pacman -U --noconfirm + + +# personal pacman.conf +if [[ ! -f /etc/pacman.conf.starburst ]]; then + echo + tput setaf 2 + echo "################################################################################" + echo "Copying /etc/pacman.conf to /etc/pacman.conf.starburst" + echo "################################################################################" + tput sgr0 + echo + sudo cp -v /etc/pacman.conf /etc/pacman.conf.starburst + echo +else + echo + tput setaf 2 + echo "################################################################################" + echo "Backup already exists: /etc/pacman.conf.starburst" + echo "################################################################################" + tput sgr0 + echo +fi + +sudo cp -v $installed_dir/config-files/pacman.conf /etc/pacman.conf + +echo +tput setaf 2 +echo "################################################################################" +echo "Updating the system - sudo pacman -Syyu" +echo "################################################################################" +tput sgr0 +echo + +sudo pacman -Syyu --noconfirm + +echo +tput setaf 3 +echo "################################################################" +echo "################### fix missing console font" +echo "################################################################" +tput sgr0 +echo + +if grep -q FONT= /etc/vconsole.conf; then + + echo + tput setaf 2 + echo "################################################################" + echo "################### FONT is already set in /etc/vconsole.conf" + echo "################################################################" + tput sgr0 + echo + +else + + tput setaf 2 + echo "################################################################" + echo "################### FONT added to /etc/vconsole.conf" + echo "################################################################" + tput sgr0 + +echo 'FONT=gr737c-8x14' | sudo tee -a /etc/vconsole.conf +fi + + + +sh 1010-select-desktop.sh \ No newline at end of file diff --git a/_old/v1/1000-debian-base.sh b/_old/v1/1000-debian-base.sh new file mode 100755 index 0000000..42898b0 --- /dev/null +++ b/_old/v1/1000-debian-base.sh @@ -0,0 +1,51 @@ +#!/bin/bash +#set -e +################################################################################################################## +#tput setaf 0 = black +#tput setaf 1 = red +#tput setaf 2 = green +#tput setaf 3 = yellow +#tput setaf 4 = dark blue +#tput setaf 5 = purple +#tput setaf 6 = cyan +#tput setaf 7 = gray +#tput setaf 8 = light blue +################################################################################################################## + +echo +tput setaf 3 +echo "################################################################" +echo "################### Start Debian setup" +echo "################################################################" +tput sgr0 +echo + +# Setting installed_dir to base folder of the git-repository +installed_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +# Installing chaotic-aur keys and mirrors +pkg_dir="packages" + +# Ensure directory exists +if [[ ! -d "$pkg_dir" ]]; then + echo "Directory not found: $pkg_dir" + exit 1 +fi + +echo +tput setaf 2 +echo "################################################################################" +echo "Updating the system - sudo apt update" +echo "################################################################################" +tput sgr0 +echo + +sudo apt update && sudo apt full-upgrade -y + +tput setaf 3 +echo "################################################################" +echo "End current choices" +echo "################################################################" +tput sgr0 + +sh 1010-select-desktop.sh \ No newline at end of file diff --git a/_old/v1/1010-select-desktop.sh b/_old/v1/1010-select-desktop.sh new file mode 100755 index 0000000..52f1a5d --- /dev/null +++ b/_old/v1/1010-select-desktop.sh @@ -0,0 +1,181 @@ +#!/bin/bash +#set -e +################################################################################################################## +#tput setaf 0 = black +#tput setaf 1 = red +#tput setaf 2 = green +#tput setaf 3 = yellow +#tput setaf 4 = dark blue +#tput setaf 5 = purple +#tput setaf 6 = cyan +#tput setaf 7 = gray +#tput setaf 8 = light blue +################################################################################################################## + +installed_dir=$(dirname $(readlink -f $(basename `pwd`))) + +if grep -qi "arch" /etc/os-release; then + OS="arch" +elif grep -qi "debian" /etc/os-release; then + OS="debian" +else + echo "Unsupported OS. Exiting." + exit 1 +fi + +echo +tput setaf 3 +echo "################################################################" +echo "################### Select Desktop Environment / Window Manager" +echo "################################################################" +tput sgr0 +echo + +echo +tput setaf 3 +echo "########################################################################" +echo "Which desktop environment do you want to install?" +echo "Choose one of the following options:" +echo +echo "1) XFCE4 minimal" +echo "2) XFCE4 full" +echo "3) XFCE4 workstation" +echo "4) Plasma minimal" +echo "5) Plasma full" +echo "X) None" +echo "########################################################################" +tput sgr0 +echo + +read -r -p "Enter the number of your choice: " choice + +case "$choice" in + 1) + touch /tmp/install-xfce4-minimal + ;; + 2) + touch /tmp/install-xfce4-full + ;; + 3) + touch /tmp/install-xfce4-workstation + ;; + 4) + touch /tmp/install-plasma-minimal + ;; + 5) + touch /tmp/install-plasma-full + ;; + [Xx]) + echo "No desktop environment will be installed." + ;; + *) + tput setaf 1 + echo "Invalid choice. Exiting." + tput sgr0 + exit 1 + ;; +esac + + +echo +tput setaf 3 +echo "########################################################################" +echo "Would you like to install an additional Tiling Window Manager?" +echo "Choose one of the following options:" +echo +echo "1) CHADWM" +echo "2) Hyprland (not possible on VM)" +echo "X) None" +echo "########################################################################" +tput sgr0 +echo + +read -p "Enter the number of your choice: " choice + +case "$choice" in + 1) + touch /tmp/install-chadwm + ;; + 2) + touch /tmp/install-hyprland + ;; + [Xx]) + echo "No desktop environment will be installed." + ;; + *) + tput setaf 1 + echo "Invalid choice. Exiting." + tput sgr0 + exit 1 + ;; +esac + +tput setaf 3 +echo "################################################################" +echo "Starting installation of chosen Desktop Environment" +echo "################################################################" +tput sgr0 + +if [ -f /tmp/install-xfce4-minimal ]; then + bash 1020-$OS* + bash 1030-$OS* + bash 1040-$OS-* + bash 1110-$OS* + bash 1120-$OS* +fi + +if [ -f /tmp/install-xfce4-full ]; then + bash 1020-$OS* + bash 1030-$OS* + bash 1040-$OS-* + bash 1110-$OS-xfce* + bash 1120-$OS-xfce* + bash 1130-$OS-xfce* +fi + +if [ -f /tmp/install-xfce4-workstation ]; then + bash 1020-$OS-* + bash 1030-$OS-* + bash 1040-$OS-* + bash 1110-$OS-xfce* + bash 1120-$OS-xfce* + bash 1130-$OS-xfce* + bash 1140-$OS-xfce* +fi + +if [ -f /tmp/install-plasma-minimal ]; then + bash 1110-$OS-plasma-minimal* +fi + +if [ -f /tmp/install-plasma-full ]; then + bash 1110-$OS-plasma-minimal* + bash 1110-$OS-plasma-full* +fi + +# installation of Tiling Window Managers +if [ -f /tmp/install-chadwm ]; then + bash 1200-$OS-chadwm* +fi + +if [ -f /tmp/install-hyprland ]; then + bash 1120-$OS-hyprland* +fi + +tput setaf 3 +echo "################################################################" +echo "End Arch setup" +echo "################################################################" +tput sgr0 + +tput setaf 3 +echo "################################################################" +echo "Cleaning up" +echo "################################################################" +tput sgr0 + +rm -f /tmp/install-* + +### Run final scripts +#sh 9990-skel.sh + +### DONE \ No newline at end of file diff --git a/_old/v1/1020-arch-remove-apps.sh b/_old/v1/1020-arch-remove-apps.sh new file mode 100755 index 0000000..dbd7e58 --- /dev/null +++ b/_old/v1/1020-arch-remove-apps.sh @@ -0,0 +1,123 @@ +#!/bin/bash +#set -e +################################################################################################################## +#tput setaf 0 = black +#tput setaf 1 = red +#tput setaf 2 = green +#tput setaf 3 = yellow +#tput setaf 4 = dark blue +#tput setaf 5 = purple +#tput setaf 6 = cyan +#tput setaf 7 = gray +#tput setaf 8 = light blue +################################################################################################################## + +installed_dir=$(dirname $(readlink -f $(basename `pwd`))) + +echo +tput setaf 3 +echo "################################################################" +echo "################### Remove unwanted packages" +echo "################################################################" +tput sgr0 +echo + +tput setaf 1; + echo "###############################################################################" + echo "### - KEEP LINUX KERNEL GET RID OF THE OTHER KERNELS" + echo "### - GET RID OF BROADCOM AND REALTEK DRIVERS" + echo "### - GET RID OF CONKYS" + echo "###############################################################################" + tput sgr0 + + #######broadcom and realtek + sudo pacman -Rs broadcom-wl-dkms r8168-dkms rtl8821cu-morrownr-dkms-git --noconfirm + + # Ensure at least one kernel remains + if pacman -Qi linux &> /dev/null && pacman -Qi linux-headers &> /dev/null; then + + # Define all the kernels and their headers you want to remove + KERNELS_TO_REMOVE=( + linux-lts-headers linux-lts + linux-zen-headers linux-zen + linux-hardened-headers linux-hardened + linux-rt-headers linux-rt + linux-rt-lts-headers linux-rt-lts + linux-cachyos-headers linux-cachyos + linux-xanmod-headers linux-xanmod + ) + remove_package() { + local package=$1 + # Check if the package is installed + if pacman -Q $package &> /dev/null; then + echo "$package is installed. Removing..." + sudo pacman -Rns --noconfirm $package + else + echo "$package is not installed." + fi + } + + # Loop over the array and remove each kernel package + for kernel in "${KERNELS_TO_REMOVE[@]}"; do + remove_package "$kernel" + done + + else + echo "Cannot proceed: At least one kernel must remain installed." + fi + + #######conkys + # Array of packages to check + packages=("conky-lua-archers" "arcolinux-conky-collection-git" "arcolinux-conky-collection-plasma-git") + + # Function to check if a package is installed + is_package_installed() { + if pacman -Q "$1" &> /dev/null; then + echo "Package $1 is installed." + return 0 # Success + else + echo "Package $1 is not installed." + return 1 # Failure + fi + } + + # Iterate over each package in the array + for package in "${packages[@]}"; do + if is_package_installed "$package"; then + echo "Removing $package..." + sudo pacman -Rns "$package" --noconfirm + else + echo "$package is not installed, no need to remove." + fi + echo + echo "########################" + echo "Double checking $package" + echo "########################" + echo + if ! is_package_installed "$package"; then + echo "$package is not installed!" + else + echo "$package is still installed. Check manually why not." + fi + done + + echo + tput setaf 3 + echo "########################################################################" + echo "######## Removing the drivers" + echo "########################################################################" + tput sgr0 + echo + + sudo pacman -Rs --noconfirm xf86-video-amdgpu --noconfirm + sudo pacman -Rs --noconfirm xf86-video-ati --noconfirm + sudo pacman -Rs --noconfirm xf86-video-fbdev --noconfirm + sudo pacman -Rs --noconfirm xf86-video-nouveau --noconfirm + sudo pacman -Rs --noconfirm xf86-video-openchrome --noconfirm + sudo pacman -Rs --noconfirm xf86-video-vesa --noconfirm + + sudo systemctl disable tlp.service + sudo pacman -Rs tlp --noconfirm + + sudo pacman -Rs vim vim-runtime --noconfirm + diff --git a/_old/v1/1020-debian-remove-apps.sh b/_old/v1/1020-debian-remove-apps.sh new file mode 100755 index 0000000..7118717 --- /dev/null +++ b/_old/v1/1020-debian-remove-apps.sh @@ -0,0 +1,73 @@ +#!/bin/bash +#set -e +################################################################################################################## +#tput setaf 0 = black +#tput setaf 1 = red +#tput setaf 2 = green +#tput setaf 3 = yellow +#tput setaf 4 = dark blue +#tput setaf 5 = purple +#tput setaf 6 = cyan +#tput setaf 7 = gray +#tput setaf 8 = light blue +################################################################################################################## + +installed_dir=$(dirname $(readlink -f $(basename `pwd`))) + +echo +tput setaf 3 +echo "################################################################" +echo "################### Remove unwanted packages" +echo "################################################################" +tput sgr0 +echo + +tput setaf 1; + echo "###############################################################################" + echo "### - KEEP LINUX KERNEL GET RID OF THE OTHER KERNELS" + echo "### - GET RID OF BROADCOM AND REALTEK DRIVERS" + echo "###############################################################################" + tput sgr0 + +read -n1 -r -p "Press any key to continue..." key + + echo + echo "############################################################" + echo " Remaining installed kernels:" + echo "############################################################" + + # List installed kernel images + dpkg -l | grep '^ii' | grep 'linux-image-[0-9]' | awk '{print $2, $3}' + + echo + echo "Currently running kernel: $(uname -r)" + +read -n1 -r -p "Press any key to continue..." key + + echo + tput setaf 3 + echo "########################################################################" + echo "######## Removing the drivers" + echo "########################################################################" + tput sgr0 + echo + + sudo apt-get purge -y \ + xserver-xorg-video-amdgpu \ + xserver-xorg-video-ati \ + xserver-xorg-video-fbdev \ + xserver-xorg-video-nouveau \ + xserver-xorg-video-openchrome \ + xserver-xorg-video-vesa + sudo apt-get autoremove -y + +read -n1 -r -p "Press any key to continue..." key + + sudo systemctl disable --now tlp.service + sudo apt-get purge -y tlp + sudo apt-get autoremove -y + +read -n1 -r -p "Press any key to continue..." key + + sudo apt-get purge -y vim vim-runtime vim-common vim-tiny + sudo apt-get autoremove -y \ No newline at end of file diff --git a/_old/v1/1030-arch-base.sh b/_old/v1/1030-arch-base.sh new file mode 100755 index 0000000..cd8ad33 --- /dev/null +++ b/_old/v1/1030-arch-base.sh @@ -0,0 +1,108 @@ +#!/bin/bash +#set -e +################################################################################################################## +#tput setaf 0 = black +#tput setaf 1 = red +#tput setaf 2 = green +#tput setaf 3 = yellow +#tput setaf 4 = dark blue +#tput setaf 5 = purple +#tput setaf 6 = cyan +#tput setaf 7 = gray +#tput setaf 8 = light blue +################################################################################################################## + +installed_dir=$(dirname $(readlink -f $(basename `pwd`))) + +echo +tput setaf 3 +echo "################################################################" +echo "################### Start Arch setup" +echo "################################################################" +tput sgr0 +echoþ + +echo +tput setaf 2 +echo "################################################################################" +echo "Installing much needed software" +echo "################################################################################" +tput sgr0 +echo + +#firmwares +sudo pacman -S --noconfirm --needed aic94xx-firmware linux-firmware-qlogic upd72020x-fw wd719x-firmware mkinitcpio-firmware + +#fonts +sudo pacman -S --noconfirm --needed font-manager adobe-source-sans-fonts noto-fonts ttf-bitstream-vera ttf-dejavu ttf-droid ttf-hack ttf-inconsolata ttf-liberation ttf-roboto ttf-roboto-mono ttf-ubuntu-font-family terminus-font awesome-terminal-fonts ttf-jetbrains-mono-nerd + +#tools +sudo pacman -S --noconfirm --needed wget curl nano fastfetch lolcat bash-completion starship alacritty hwinfo lshw reflector expac betterlockscreen pamac-aur avahi +if [ ! -f /usr/bin/duf ]; then + sudo pacman -S --noconfirm --needed duf +fi +sudo pacman -S --noconfirm --needed man-db man-pages pacmanlogviewer paru-git yay-git thunar thunar-archive-plugin thunar-volman tree xdg-user-dirs polkit-gnome rate-mirrors rsync time bat ntp nss-mdns + +#disk-tools +sudo pacman -S --noconfirm --needed baobab gvfs-smb hddtemp squashfs-tools +#sudo pacman -S --noconfirm --needed gvfs-dnssd the_silver_searcher gnome-disk-utility + +#archive-managers +sudo pacman -S --noconfirm --needed zip gzip p7zip unace unrar unzip file-roller + +#theming +sudo pacman -S --noconfirm --needed bibata-cursor-theme-bin feh +#sudo pacman -S --noconfirm --needed breeze-icons sardi-flat-colora-variations-icons-git + +#enable services +sudo systemctl enable avahi-daemon.service +sudo systemctl enable ntpd.service + +#Run service that will discard unused blocks on mounted filesystems. This is useful for solid-state drives (SSDs) and thinly-provisioned storage. +echo +echo "Enable fstrim timer" +sudo systemctl enable fstrim.timer + +echo +echo "################################################################" +echo "Getting latest /etc/nsswitch.conf" +echo "################################################################" +echo +sudo cp /etc/nsswitch.conf /etc/nsswitch.conf.bak +sudo wget https://raw.githubusercontent.com/yurikuit/nemesis/refs/heads/main/Personal/settings/nsswitch/nsswitch.conf -O $workdir/etc/nsswitch.conf + + +echo +tput setaf 3 +echo "########################################################################" +echo "Detecting virtualization platform..." +echo "########################################################################" +tput sgr0 +echo + +virt_type=$(systemd-detect-virt) + +case "$virt_type" in + kvm) + echo "Detected KVM. Installing qemu-guest-agent..." + sudo pacman -S --noconfirm --needed qemu-guest-agent spice-vdagent + sudo systemctl enable qemu-guest-agent.service + ;; + oracle) + echo "Detected VirtualBox. Installing virtualbox-guest-utils..." + sudo pacman -S --noconfirm --needed virtualbox-guest-utils + sudo systemctl enable vboxservice.service + ;; + none) + echo "No virtualization detected. Skipping guest utilities." + ;; + *) + echo "Virtualization detected: $virt_type, but no install routine defined." + ;; +esac + +tput setaf 3 +echo "################################################################" +echo "End base setup" +echo "################################################################" +tput sgr0 diff --git a/_old/v1/1030-debian-base.sh b/_old/v1/1030-debian-base.sh new file mode 100755 index 0000000..f86f616 --- /dev/null +++ b/_old/v1/1030-debian-base.sh @@ -0,0 +1,123 @@ +#!/bin/bash +#set -e +################################################################################################################## +#tput setaf 0 = black +#tput setaf 1 = red +#tput setaf 2 = green +#tput setaf 3 = yellow +#tput setaf 4 = dark blue +#tput setaf 5 = purple +#tput setaf 6 = cyan +#tput setaf 7 = gray +#tput setaf 8 = light blue +################################################################################################################## + +installed_dir=$(dirname $(readlink -f $(basename `pwd`))) + +echo +tput setaf 3 +echo "################################################################" +echo "################### Start Arch setup" +echo "################################################################" +tput sgr0 +echoþ + +echo +tput setaf 2 +echo "################################################################################" +echo "Installing much needed software" +echo "################################################################################" +tput sgr0 +echo + +#firmwares +sudo apt-get install -y dkms linux-headers-$(uname -r) + +read -n1 -r -p "Press any key to continue..." key + +#fonts +sudo apt install -y font-manager adobe-source-sans-fonts noto-fonts ttf-bitstream-vera ttf-dejavu ttf-droid ttf-hack ttf-inconsolata ttf-liberation ttf-roboto ttf-roboto-mono ttf-ubuntu-font-family terminus-font awesome-terminal-fonts ttf-jetbrains-mono-nerd + +read -n1 -r -p "Press any key to continue..." key + +#tools +sudo apt install -y wget curl nano fastfetch lolcat bash-completion starship alacritty hwinfo lshw reflector expac betterlockscreen pamac-aur avahi +if [ ! -f /usr/bin/duf ]; then + sudo apt install -y duf +fi +sudo apt install -y man-db man-pages thunar thunar-archive-plugin thunar-volman tree xdg-user-dirs polkit-gnome rate-mirrors rsync time bat ntp nss-mdns + +read -n1 -r -p "Press any key to continue..." key + +#disk-tools +sudo apt install -y gvfs-smb squashfs-tools + +read -n1 -r -p "Press any key to continue..." key + +#archive-managers +sudo apt install -y zip gzip p7zip unace unrar unzip file-roller + +read -n1 -r -p "Press any key to continue..." key + +#theming +sudo apt install -y bibata-cursor-theme-bin feh + +read -n1 -r -p "Press any key to continue..." key + +#enable services +sudo systemctl enable avahi-daemon.service +sudo systemctl enable ntpd.service + +read -n1 -r -p "Press any key to continue..." key + +#Run service that will discard unused blocks on mounted filesystems. This is useful for solid-state drives (SSDs) and thinly-provisioned storage. +echo +echo "Enable fstrim timer" +sudo systemctl enable fstrim.timer + +read -n1 -r -p "Press any key to continue..." key + +echo +echo "################################################################" +echo "Getting latest /etc/nsswitch.conf" +echo "################################################################" +echo +sudo cp /etc/nsswitch.conf /etc/nsswitch.conf.bak +sudo wget https://raw.githubusercontent.com/yurikuit/nemesis/refs/heads/main/Personal/settings/nsswitch/nsswitch.conf -O $workdir/etc/nsswitch.conf + +read -n1 -r -p "Press any key to continue..." key + +echo +tput setaf 3 +echo "########################################################################" +echo "Detecting virtualization platform..." +echo "########################################################################" +tput sgr0 +echo + +virt_type=$(systemd-detect-virt) + +case "$virt_type" in + kvm) + echo "Detected KVM. Installing qemu-guest-agent..." + sudo apt install -y qemu-guest-agent spice-vdagent + sudo systemctl enable qemu-guest-agent.service + ;; + oracle) + echo "Detected VirtualBox. Installing virtualbox-guest-utils..." + sudo apt install -y virtualbox-guest-utils + sudo systemctl enable vboxservice.service + ;; + none) + echo "No virtualization detected. Skipping guest utilities." + ;; + *) + echo "Virtualization detected: $virt_type, but no install routine defined." + ;; +esac + +tput setaf 3 +echo "################################################################" +echo "End base setup" +echo "################################################################" +tput sgr0 diff --git a/_old/v1/1040-arch-core-apps.sh b/_old/v1/1040-arch-core-apps.sh new file mode 100755 index 0000000..16f6bd5 --- /dev/null +++ b/_old/v1/1040-arch-core-apps.sh @@ -0,0 +1,36 @@ +#!/bin/bash +#set -e +################################################################################################################## +#tput setaf 0 = black +#tput setaf 1 = red +#tput setaf 2 = green +#tput setaf 3 = yellow +#tput setaf 4 = dark blue +#tput setaf 5 = purple +#tput setaf 6 = cyan +#tput setaf 7 = gray +#tput setaf 8 = light blue +################################################################################################################## + +installed_dir=$(dirname $(readlink -f $(basename `pwd`))) + +echo +tput setaf 2 +echo "########################################################################" +echo "################### Core software" +echo "########################################################################" +tput sgr0 +echo +sudo pacman -S --noconfirm --needed edu-rofi-git +sudo pacman -S --noconfirm --needed edu-rofi-themes-git + +# All the software below will be installed on all desktops +sudo pacman -S --noconfirm --needed archlinux-tools dconf-editor devtools hardinfo2 hw-probe logrotate lsb-release powertop inxi acpi plocate most namcap nm-connection-editor python-pylint python-pywal +#sudo pacman -S --noconfirm --needed nomacs + +tput setaf 6 +echo "##############################################################" +echo "################### $(basename $0) done" +echo "##############################################################" +tput sgr0 +echo \ No newline at end of file diff --git a/_old/v1/1040-debian-core-apps.sh b/_old/v1/1040-debian-core-apps.sh new file mode 100755 index 0000000..0e251e4 --- /dev/null +++ b/_old/v1/1040-debian-core-apps.sh @@ -0,0 +1,33 @@ +#!/bin/bash +#set -e +################################################################################################################## +#tput setaf 0 = black +#tput setaf 1 = red +#tput setaf 2 = green +#tput setaf 3 = yellow +#tput setaf 4 = dark blue +#tput setaf 5 = purple +#tput setaf 6 = cyan +#tput setaf 7 = gray +#tput setaf 8 = light blue +################################################################################################################## + +installed_dir=$(dirname $(readlink -f $(basename `pwd`))) + +echo +tput setaf 2 +echo "########################################################################" +echo "################### Core software" +echo "########################################################################" +tput sgr0 +echo + +# All the software below will be installed on all desktops +sudo apt install -y dconf-editor build-essential hardinfo hw-probe logrotate lsb-release powertop inxi acpi plocate most network-manager-gnome python3-pylint python3-pywal module-assistent + +tput setaf 6 +echo "##############################################################" +echo "################### $(basename $0) done" +echo "##############################################################" +tput sgr0 +echo \ No newline at end of file diff --git a/_old/v1/1110-xfce-minimal.sh b/_old/v1/1110-xfce-minimal.sh new file mode 100755 index 0000000..eab833c --- /dev/null +++ b/_old/v1/1110-xfce-minimal.sh @@ -0,0 +1,118 @@ +#!/bin/bash + +if [ "$DISTRO" = "arch" ]; then + set -euo pipefail +else + set -e +fi + +################################################################# +# Colors +# tput setaf 0 = black, 1 = red, 2 = green, 3 = yellow +# tput setaf 4 = blue, 5 = purple, 6 = cyan, 7 = gray +################################################################# + +. /etc/os-release +DISTRO=$ID + +installed_dir="$(dirname "$(readlink -f "$0")")" + +################################################################# +# Debug mode +################################################################# +if [ "${DEBUG:-false}" = true ]; then + echo + echo "------------------------------------------------------------" + echo "Running $(basename "$0")" + echo "------------------------------------------------------------" + echo + read -n 1 -s -r -p "Debug mode is on. Press any key to continue..." + echo +fi + +################################################################# +# Functions for package management +################################################################# +install_pkgs() { + case "$DISTRO" in + arch) + sudo pacman -S --noconfirm --needed "$@" + ;; + debian|ubuntu) + sudo apt-get update + sudo apt-get install --no-install-recommends -y "$@" + ;; + esac +} + +remove_pkgs() { + case "$DISTRO" in + arch) + sudo pacman -Rs --noconfirm "$@" + ;; + debian|ubuntu) + sudo apt-get remove -y "$@" + ;; + esac +} + +################################################################# +# Install XFCE and SDDM +################################################################# +echo +tput setaf 2 +echo "########################################################################" +echo "################### Install XFCE4 Minimal" +echo "########################################################################" +tput sgr0 +echo + +if [ "$DISTRO" = "arch" ]; then + install_pkgs xfce4 xfce4-goodies sddm + remove_pkgs mousepad parole xfburn xfce4-screenshooter xfce4-notes-plugin +else + install_pkgs xfce4 xfce4-goodies sddm + remove_pkgs mousepad parole xfburn xfce4-screenshooter xfce4-notes +fi + +################################################################# +# Create directories (skel + user) +################################################################# +echo +tput setaf 2 +echo "########################################################################" +echo "################### Creating directories" +echo "########################################################################" +tput sgr0 +echo + +sudo mkdir -p /etc/skel/.config/xfce4/{panel,xfconf} +mkdir -p \ + "$HOME"/{.bin,.fonts,.icons,.themes,DATA} \ + "$HOME/.local/share/"{icons,themes,applications} \ + "$HOME/.config/"{xfce4,autostart,xfce4/xfconf,gtk-{3.0,4.0},variety,fish,neofetch} + +################################################################# +# Enable SDDM +################################################################# +echo +tput setaf 6 +echo "##############################################################" +echo "################### Enabling SDDM" +echo "##############################################################" +tput sgr0 +echo + +sudo systemctl disable lightdm.service 2>/dev/null || true +sudo systemctl enable sddm.service + +################################################################# +# Done +################################################################# +echo +tput setaf 6 +echo "##############################################################" +echo "################### $(basename "$0") done" +echo "##############################################################" +tput sgr0 +echo diff --git a/_old/v1/1120_arch-xfce-minimal-core.sh b/_old/v1/1120_arch-xfce-minimal-core.sh new file mode 100755 index 0000000..47cb3fd --- /dev/null +++ b/_old/v1/1120_arch-xfce-minimal-core.sh @@ -0,0 +1,35 @@ +#!/bin/bash +#set -e +################################################################################################################## +#tput setaf 0 = black +#tput setaf 1 = red +#tput setaf 2 = green +#tput setaf 3 = yellow +#tput setaf 4 = dark blue +#tput setaf 5 = purple +#tput setaf 6 = cyan +#tput setaf 7 = gray +#tput setaf 8 = light blue +################################################################################################################## + +installed_dir=$(dirname $(readlink -f $(basename `pwd`))) + +echo +tput setaf 2 +echo "########################################################################" +echo "################### Install XFCE4 minimal Core Software" +echo "########################################################################" +tput sgr0 +echo + +#settings +sudo pacman -S --noconfirm --needed yuku-dot-files-git yuku-sddm-simplicity-git yuku-flat-remix-dark-git +#sudo pacman -S --noconfirm --needed edu-shells-git edu-xfce-git + +#theming +sudo pacman -S --noconfirm --needed arc-gtk-theme hardcode-fixer-git qt5-quickcontrols qt5-quickcontrols2 +#sudo pacman -S --noconfirm --needed surfn-icons-git + +#tools +sudo pacman -S --noconfirm --needed archlinux-logout-git arandr catfish dmenu galculator networkmanager network-manager-applet networkmanager-openvpn numlockx pavucontrol playerctl xcolor xorg-xkill gparted +#sudo pacman -S --noconfirm --needed nitrogen diff --git a/_old/v1/1130-arch-xfce-full-core.sh b/_old/v1/1130-arch-xfce-full-core.sh new file mode 100755 index 0000000..1abce32 --- /dev/null +++ b/_old/v1/1130-arch-xfce-full-core.sh @@ -0,0 +1,49 @@ +#!/bin/bash +#set -e +################################################################################################################## +#tput setaf 0 = black +#tput setaf 1 = red +#tput setaf 2 = green +#tput setaf 3 = yellow +#tput setaf 4 = dark blue +#tput setaf 5 = purple +#tput setaf 6 = cyan +#tput setaf 7 = gray +#tput setaf 8 = light blue +################################################################################################################## + +installed_dir=$(dirname $(readlink -f $(basename `pwd`))) + +echo +tput setaf 2 +echo "########################################################################" +echo "################### Install XFCE4 Full Core Software" +echo "########################################################################" +tput sgr0 +echo + +#internet +sudo pacman -S --noconfirm --needed chromium + + +echo +tput setaf 2 +echo "########################################################################" +echo "################### Configure XFCE4-settings" +echo "########################################################################" +tput sgr0 +echo + +echo +echo "Setting bashrc" +echo +sudo cp -v /etc/skel/.bashrc /etc/skel/.bashrc.starburst +sudo cp -rf $installed_dir/assets/.bashrc /etc/skel/.bashrc + +echo +tput setaf 6 +echo "##############################################################" +echo "################### $(basename $0) done" +echo "##############################################################" +tput sgr0 +echo \ No newline at end of file diff --git a/_old/v1/1140-arch-xfce-full-ws.sh b/_old/v1/1140-arch-xfce-full-ws.sh new file mode 100755 index 0000000..7cfde6a --- /dev/null +++ b/_old/v1/1140-arch-xfce-full-ws.sh @@ -0,0 +1,53 @@ +#!/bin/bash +#set -e +################################################################################################################################## +#tput setaf 0 = black +#tput setaf 1 = red +#tput setaf 2 = green +#tput setaf 3 = yellow +#tput setaf 4 = dark blue +#tput setaf 5 = purple +#tput setaf 6 = cyan +#tput setaf 7 = gray +#tput setaf 8 = light blue +################################################################################################################################## + +installed_dir=$(dirname $(readlink -f $(basename `pwd`))) + +echo +tput setaf 2 +echo "########################################################################" +echo "################### Install XFCE4 Full Workstation" +echo "########################################################################" +tput sgr0 +echo + +#editors +sudo pacman -S --noconfirm --needed code + +#internet +sudo pacman -Rs --noconfirm chromium +sudo pacman -S --noconfirm --needed google-chrome brave-bin insync +#sudo pacman -S --noconfirm --needed discord firefox + +#theming +#sudo pacman -S --noconfirm --needed variety + +#media +#sudo pacman -S --noconfirm --needed gimp inkscape spotify lollypop +sudo pacman -S --noconfirm --needed flameshot-git vlc + +#shells +sudo pacman -S --noconfirm --needed fish zsh zsh-completions zsh-syntax-highlighting oh-my-zsh-git + +#system-tools +#sudo pacman -S --noconfirm --needed base-devel + +#tools +#sudo pacman -S --noconfirm --needed gitahead-git +sudo pacman -S --noconfirm --needed wttr system-config-printer +sudo pacman -S --noconfirm --needed ripgrep meld btop htop hwinfo lshw reflector expac sublime-text-4 +if [ ! -f /usr/bin/duf ]; then + sudo pacman -S --noconfirm --needed duf +fi +sudo pacman -S --noconfirm --needed man-db man-pages pacmanlogviewer paru-git yay-git thunar thunar-archive-plugin thunar-volman tree xdg-user-dirs polkit-gnome rate-mirrors rsync time bat ntp nss-mdns diff --git a/_old/v1/1200-arch-chadwm.sh b/_old/v1/1200-arch-chadwm.sh new file mode 100755 index 0000000..1328d2b --- /dev/null +++ b/_old/v1/1200-arch-chadwm.sh @@ -0,0 +1,119 @@ +#!/bin/bash +#set -e +################################################################################################################################## +#tput setaf 0 = black +#tput setaf 1 = red +#tput setaf 2 = green +#tput setaf 3 = yellow +#tput setaf 4 = dark blue +#tput setaf 5 = purple +#tput setaf 6 = cyan +#tput setaf 7 = gray +#tput setaf 8 = light blue +################################################################################################################################## + +installed_dir=$(dirname $(readlink -f $(basename `pwd`))) + +################################################################################################################################## + +if [ "$DEBUG" = true ]; then + echo + echo "------------------------------------------------------------" + echo "Running $(basename $0)" + echo "------------------------------------------------------------" + echo + read -n 1 -s -r -p "Debug mode is on. Press any key to continue..." + echo +fi + +################################################################################################################################## + +func_install() { + if pacman -Qi $1 &> /dev/null; then + tput setaf 2 + echo "#######################################################################################" + echo "################## The package "$1" is already installed" + echo "#######################################################################################" + echo + tput sgr0 + else + tput setaf 3 + echo "#######################################################################################" + echo "################## Installing package " $1 + echo "#######################################################################################" + echo + tput sgr0 + sudo pacman -S --noconfirm --needed $1 + fi +} + +func_install_chadwm() { + + echo + tput setaf 2 + echo "########################################################################" + echo "################### Install chadwm" + echo "########################################################################" + tput sgr0 + echo + + list=( + alacritty + archlinux-logout-git + edu-chadwm-git + autorandr + dash + dmenu + eww + feh + gcc + gvfs + lolcat + lxappearance-gtk3 + make + picom + polkit-gnome + rofi-lbonn-wayland + sxhkd + thunar + thunar-archive-plugin + thunar-volman + ttf-hack + ttf-jetbrains-mono-nerd + ttf-meslo-nerd-font-powerlevel10k + volumeicon + xfce4-notifyd + xfce4-power-manager + xfce4-screenshooter + xfce4-settings + xfce4-taskmanager + xfce4-terminal + xorg-xsetroot + ) + + count=0 + + for name in "${list[@]}" ; do + count=$[count+1] + tput setaf 3;echo "Installing package nr. "$count " " $name;tput sgr0; + func_install $name + done +} + +echo +tput setaf 2 +echo "########################################################################" +echo "################### Let us install Chadwm" +echo "########################################################################" +tput sgr0 +echo + +func_install_chadwm + +echo +tput setaf 6 +echo "##############################################################" +echo "################### $(basename $0) done" +echo "##############################################################" +tput sgr0 +echo \ No newline at end of file diff --git a/_old/v1/9990-skel.sh b/_old/v1/9990-skel.sh new file mode 100755 index 0000000..6cac3db --- /dev/null +++ b/_old/v1/9990-skel.sh @@ -0,0 +1,51 @@ +#!/bin/bash +#set -e +################################################################################################################################## +#tput setaf 0 = black +#tput setaf 1 = red +#tput setaf 2 = green +#tput setaf 3 = yellow +#tput setaf 4 = dark blue +#tput setaf 5 = purple +#tput setaf 6 = cyan +#tput setaf 7 = gray +#tput setaf 8 = light blue +################################################################################################################################## + +installed_dir=$(dirname $(readlink -f $(basename `pwd`))) + +################################################################################################################################## + +if [ "$DEBUG" = true ]; then + echo + echo "------------------------------------------------------------" + echo "Running $(basename $0)" + echo "------------------------------------------------------------" + echo + read -n 1 -s -r -p "Debug mode is on. Press any key to continue..." + echo +fi + +################################################################################################################################## + +echo +tput setaf 3 +echo "########################################################################" +echo "FINAL SKEL" +echo "Copying all files and folders from /etc/skel to ~" +echo "First we make a backup of .config" +echo "Wait for it ...." +echo "########################################################################" +tput sgr0 +echo + +cp -Rf ~/.config ~/.config-backup-$(date +%Y.%m.%d-%H.%M.%S) +cp -arf /etc/skel/. ~ + +echo +tput setaf 6 +echo "##############################################################" +echo "################### $(basename $0) done" +echo "##############################################################" +tput sgr0 +echo diff --git a/_old/v1/assets/.bashrc b/_old/v1/assets/.bashrc new file mode 100644 index 0000000..7da553e --- /dev/null +++ b/_old/v1/assets/.bashrc @@ -0,0 +1,326 @@ +### EXPORT ### +export EDITOR='nano' +export VISUAL='nano' +export HISTCONTROL=ignoreboth:erasedups +export PAGER='most' + +PS1='[\u@\h \W]\$ ' + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +#ignore upper and lowercase when TAB completion +bind "set completion-ignore-case on" + +### ALIASES ### + +#list +alias ls='ls --color=auto' +alias la='ls -a' +alias ll='ls -alFh' +alias l='ls' +alias l.="ls -A | grep -E '^\.'" +alias listdir="ls -d */ > list" + +#pacman +alias sps='sudo pacman -S' +alias spr='sudo pacman -R' +alias sprs='sudo pacman -Rs' +alias sprdd='sudo pacman -Rdd' +alias spqo='sudo pacman -Qo' +alias spsii='sudo pacman -Sii' + +# show the list of packages that need this package - depends mpv as example +function_depends() { + search=$(echo "$1") + sudo pacman -Sii $search | grep "Required" | sed -e "s/Required By : //g" | sed -e "s/ /\n/g" + } + +alias depends='function_depends' + +#fix obvious typo's +alias cd..='cd ..' + +## Colorize the grep command output for ease of use (good for log files)## +alias grep='grep --color=auto' +alias egrep='grep -E --color=auto' +alias fgrep='grep -F --color=auto' + +#readable output +alias df='df -h' + +#setlocale +alias setlocale="sudo localectl set-locale LANG=en_US.UTF-8" + +#pacman unlock +alias unlock="sudo rm /var/lib/pacman/db.lck" +alias rmpacmanlock="sudo rm /var/lib/pacman/db.lck" + +#arcolinux logout unlock +alias rmlogoutlock="sudo rm /tmp/arcologout.lock" + +#which graphical card is working +alias whichvga="/usr/local/bin/arcolinux-which-vga" + +#free +alias free="free -mt" + +#continue download +alias wget="wget -c" + +#userlist +alias userlist="cut -d: -f1 /etc/passwd | sort" + +#merge new settings +alias merge="xrdb -merge ~/.Xresources" + +# Aliases for software managment +# pacman or pm +alias pacman='sudo pacman --color auto' +alias update='sudo pacman -Syyu' +alias upd='sudo pacman -Syyu' + +# paru as aur helper - updates everything +alias pksyua="paru -Syu --noconfirm" +alias upall="paru -Syu --noconfirm" +alias upa="paru -Syu --noconfirm" + +#ps +alias psa="ps auxf" +alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e" + +#grub update +alias update-grub="sudo grub-mkconfig -o /boot/grub/grub.cfg" +alias grub-update="sudo grub-mkconfig -o /boot/grub/grub.cfg" +#grub issue 08/2022 +alias install-grub-efi="sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ArcoLinux" + +#add new fonts +alias update-fc='sudo fc-cache -fv' + +#copy/paste all content of /etc/skel over to home folder - backup of config created - beware +#skel alias has been replaced with a script at /usr/local/bin/skel + +#backup contents of /etc/skel to hidden backup folder in home/user +alias bupskel='cp -Rf /etc/skel ~/.skel-backup-$(date +%Y.%m.%d-%H.%M.%S)' + +#copy shell configs +alias cb='cp /etc/skel/.bashrc ~/.bashrc && exec bash' +alias cz='cp /etc/skel/.zshrc ~/.zshrc && echo "Copied."' +alias cf='cp /etc/skel/.config/fish/config.fish ~/.config/fish/config.fish && echo "Copied."' + +#switch between bash and zsh +alias tobash="sudo chsh $USER -s /bin/bash && echo 'Now log out.'" +alias tozsh="sudo chsh $USER -s /bin/zsh && echo 'Now log out.'" +alias tofish="sudo chsh $USER -s /bin/fish && echo 'Now log out.'" + +# kill commands +# quickly kill conkies +alias kc='killall conky' +# quickly kill polybar +alias kp='killall polybar' +# quickly kill picom +alias kpi='killall picom' + +# hardware info --short +alias hw="hwinfo --short" + +# fastfetch --short +alias ff="fastfetch | lolcat" + +# audio check pulseaudio or pipewire +alias audio="pactl info | grep 'Server Name'" + +# skip integrity check +alias paruskip='paru -S --mflags --skipinteg' +alias yayskip='yay -S --mflags --skipinteg' +alias trizenskip='trizen -S --skipinteg' + +# check vulnerabilities microcode +alias microcode='grep . /sys/devices/system/cpu/vulnerabilities/*' + +#approximation of how old your hardware is +alias howold="sudo lshw | grep -B 3 -A 8 BIOS" + +#check cpu +alias cpu="cpuid -i | grep uarch | head -n 1" + +#get fastest mirrors in your neighborhood +alias mirror="sudo reflector -f 30 -l 30 --number 10 --verbose --save /etc/pacman.d/mirrorlist" +alias mirrord="sudo reflector --latest 30 --number 10 --sort delay --save /etc/pacman.d/mirrorlist" +alias mirrors="sudo reflector --latest 30 --number 10 --sort score --save /etc/pacman.d/mirrorlist" +alias mirrora="sudo reflector --latest 30 --number 10 --sort age --save /etc/pacman.d/mirrorlist" +#our experimental - best option for the moment +alias mirrorx="sudo reflector --age 6 --latest 20 --fastest 20 --threads 5 --sort rate --protocol https --save /etc/pacman.d/mirrorlist" +alias mirrorxx="sudo reflector --age 6 --latest 20 --fastest 20 --threads 20 --sort rate --protocol https --save /etc/pacman.d/mirrorlist" +alias ram='rate-mirrors --allow-root --disable-comments arch | sudo tee /etc/pacman.d/mirrorlist' +alias rams='rate-mirrors --allow-root --disable-comments --protocol https arch | sudo tee /etc/pacman.d/mirrorlist' + +#Recent Installed Packages +alias rip="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -200 | nl" +alias riplong="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -3000 | nl" + +#Cleanup orphaned packages +alias cleanup='sudo pacman -Rns $(pacman -Qtdq)' + +# This will generate a list of explicitly installed packages +alias list="sudo pacman -Qqe" +#This will generate a list of explicitly installed packages without dependencies +alias listt="sudo pacman -Qqet" +# list of AUR packages +alias listaur="sudo pacman -Qqem" +# add > list at the end to write to a file + +# install packages from list +# pacman -S --needed - < my-list-of-packages.txt + +#clear +alias clean="clear; seq 1 $(tput cols) | sort -R | sparklines | lolcat" +alias cls="clear; seq 1 $(tput cols) | sort -R | sparklines | lolcat" + +#search content with ripgrep +alias rg="rg --sort path" + +#get the error messages from journalctl +alias jctl="journalctl -p 3 -xb" + +#nano for important configuration files +#know what you do in these files +alias npacman="sudo $EDITOR /etc/pacman.conf" +alias ngrub="sudo $EDITOR /etc/default/grub" +alias nconfgrub="sudo $EDITOR /boot/grub/grub.cfg" +alias nmakepkg="sudo $EDITOR /etc/makepkg.conf" +alias nmkinitcpio="sudo $EDITOR /etc/mkinitcpio.conf" +alias nmirrorlist="sudo $EDITOR /etc/pacman.d/mirrorlist" +alias nsddm="sudo $EDITOR /etc/sddm.conf" +alias nsddmk="sudo $EDITOR /etc/sddm.conf.d/kde_settings.conf" +alias nsddmd="sudo $EDITOR /usr/lib/sddm/sddm.conf.d/default.conf" +alias nfstab="sudo $EDITOR /etc/fstab" +alias nnsswitch="sudo $EDITOR /etc/nsswitch.conf" +alias nsamba="sudo $EDITOR /etc/samba/smb.conf" +alias ngnupgconf="sudo $EDITOR /etc/pacman.d/gnupg/gpg.conf" +alias nhosts="sudo $EDITOR /etc/hosts" +alias nhostname="sudo $EDITOR /etc/hostname" +alias nresolv="sudo $EDITOR /etc/resolv.conf" +alias nb="$EDITOR ~/.bashrc" +alias nz="$EDITOR ~/.zshrc" +alias nf="$EDITOR ~/.config/fish/config.fish" +alias nfastfetch="$EDITOR ~/.config/fastfetch/config.jsonc" +alias nvconsole="sudo $EDITOR /etc/vconsole.conf" +alias nenvironment="sudo $EDITOR /etc/environment" +alias nloader="sudo $EDITOR /boot/efi/loader/loader.conf" +alias nalacritty="nano /home/$USER/.config/alacritty/alacritty.toml" +alias nemptty="sudo $EDITOR /etc/emptty/conf" + +#reading logs with bat +alias lpacman="bat /var/log/pacman.log" +alias lxorg="bat /var/log/Xorg.0.log" +alias lxorgo="bat /var/log/Xorg.0.log.old" + +#reading logs with sublime-text-4 +alias spac="subl /etc/pacman.conf" + +#gpg +#verify signature for isos +alias gpg-check="gpg2 --keyserver-options auto-key-retrieve --verify" +alias fix-gpg-check="gpg2 --keyserver-options auto-key-retrieve --verify" +#receive the key of a developer +alias gpg-retrieve="gpg2 --keyserver-options auto-key-retrieve --receive-keys" +alias fix-gpg-retrieve="gpg2 --keyserver-options auto-key-retrieve --receive-keys" +alias fix-keyserver="[ -d ~/.gnupg ] || mkdir ~/.gnupg ; cp /etc/pacman.d/gnupg/gpg.conf ~/.gnupg/ ; echo 'done'" + +#fixes +alias fix-permissions="sudo chown -R $USER:$USER ~/.config ~/.local" +alias keyfix="/usr/local/bin/arcolinux-fix-pacman-databases-and-keys" +alias key-fix="/usr/local/bin/arcolinux-fix-pacman-databases-and-keys" +alias keys-fix="/usr/local/bin/arcolinux-fix-pacman-databases-and-keys" +alias fixkey="/usr/local/bin/arcolinux-fix-pacman-databases-and-keys" +alias fixkeys="/usr/local/bin/arcolinux-fix-pacman-databases-and-keys" +alias fix-key="/usr/local/bin/arcolinux-fix-pacman-databases-and-keys" +alias fix-keys="/usr/local/bin/arcolinux-fix-pacman-databases-and-keys" +alias fix-pacman-conf="/usr/local/bin/arcolinux-fix-pacman-conf" +alias fix-pacman-keyserver="/usr/local/bin/arcolinux-fix-pacman-gpg-conf" +alias fix-grub="sudo /usr/local/bin/arcolinux-fix-grub" +alias fixgrub="sudo /usr/local/bin/arcolinux-fix-grub" +alias fix-archlinux-mirrors="/usr/local/bin/arcolinux-fix-archlinux-servers" +alias fix-arcolinux-mirrors="/usr/local/bin/arcolinux-fix-arcolinux-servers" + +#maintenance +alias big="expac -H M '%m\t%n' | sort -h | nl" +alias downgrada="sudo downgrade --ala-url https://ant.seedhost.eu/arcolinux/" + +#systeminfo +alias sysfailed="systemctl list-units --failed" + +#shutdown or reboot +alias ssn="sudo shutdown now" +alias sr="reboot" + +#update betterlockscreen images +alias bls="betterlockscreen -u /usr/share/backgrounds/" + +#give the list of all installed desktops - xsessions desktops +alias xd="ls /usr/share/xsessions" +alias xdw="ls /usr/share/wayland-sessions" + +#give a list of the kernels installed +alias kernel="ls /usr/lib/modules" +alias kernels="ls /usr/lib/modules" + +# # ex = EXtractor for all kinds of archives +# # usage: ex +ex () +{ + if [ -f $1 ] ; then + case $1 in + *.tar.bz2) tar xjf $1 ;; + *.tar.gz) tar xzf $1 ;; + *.bz2) bunzip2 $1 ;; + *.rar) unrar x $1 ;; + *.gz) gunzip $1 ;; + *.tar) tar xf $1 ;; + *.tbz2) tar xjf $1 ;; + *.tgz) tar xzf $1 ;; + *.zip) unzip $1 ;; + *.Z) uncompress $1;; + *.7z) 7z x $1 ;; + *.deb) ar x $1 ;; + *.tar.xz) tar xf $1 ;; + *.tar.zst) tar xf $1 ;; + *) echo "'$1' cannot be extracted via ex()" ;; + esac + else + echo "'$1' is not a valid file" + fi +} + +#wayland aliases +alias wsimplescreen="wf-recorder -a" +alias wsimplescreenrecorder="wf-recorder -a -c h264_vaapi -C aac -d /dev/dri/renderD128 --file=recording.mp4" + +#btrfs aliases +alias btrfsfs="sudo btrfs filesystem df /" +alias btrfsli="sudo btrfs su li / -t" + +#snapper aliases +alias snapcroot="sudo snapper -c root create-config /" +alias snapchome="sudo snapper -c home create-config /home" +alias snapli="sudo snapper list" +alias snapcr="sudo snapper -c root create" +alias snapch="sudo snapper -c home create" + +#git +alias rmgitcache="rm -r ~/.cache/git" +alias grh="git reset --hard" + +#pamac +alias pamac-unlock="sudo rm /var/tmp/pamac/dbs/db.lock" + +#create a file called .bashrc-personal and put all your personal aliases +#in there. They will not be overwritten by skel. + +[[ -f ~/.bashrc-personal ]] && . ~/.bashrc-personal + +# reporting tools - install when not installed +fastfetch | lolcat +#neofetch diff --git a/_old/v1/assets/images/starburst_logo.png b/_old/v1/assets/images/starburst_logo.png new file mode 100644 index 0000000..ba81ef5 Binary files /dev/null and b/_old/v1/assets/images/starburst_logo.png differ diff --git a/_old/v1/assets/xfce4/helpers.rc b/_old/v1/assets/xfce4/helpers.rc new file mode 100644 index 0000000..e293c41 --- /dev/null +++ b/_old/v1/assets/xfce4/helpers.rc @@ -0,0 +1,3 @@ +FileManager=Thunar +TerminalEmulator=alacritty +WebBrowser=chromium diff --git a/_old/v1/assets/xfce4/panel/xfce4-clipman-actions.xml b/_old/v1/assets/xfce4/panel/xfce4-clipman-actions.xml new file mode 100644 index 0000000..ba2f9ea --- /dev/null +++ b/_old/v1/assets/xfce4/panel/xfce4-clipman-actions.xml @@ -0,0 +1,44 @@ + + + + Bugz + bug\s*#?\s*([0-9]+) + 0 + + + GNOME Bug + exo-open https://bugzilla.gnome.org/show_bug.cgi?id=\1 + + + Xfce Bug + exo-open https://bugzilla.xfce.org/show_bug.cgi?id=\1 + + + + + Image + (http|ftp).+\.(jpg|png|gif) + 0 + + + View with Ristretto + ristretto "\0" + + + Edit with Gimp + gimp "\0" + + + + + Long URL + https?://[^\s]{120,} + 0 + + + Shrink the URL + exo-open https://tinyurl.com/create.php?url=\0 + + + + \ No newline at end of file diff --git a/_old/v1/assets/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml b/_old/v1/assets/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml new file mode 100644 index 0000000..d973e35 --- /dev/null +++ b/_old/v1/assets/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml @@ -0,0 +1,751 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_old/v1/assets/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml b/_old/v1/assets/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml new file mode 100644 index 0000000..52e7d0d --- /dev/null +++ b/_old/v1/assets/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_old/v1/assets/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml b/_old/v1/assets/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml new file mode 100644 index 0000000..dbeae43 --- /dev/null +++ b/_old/v1/assets/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_old/v1/config-files/pacman.conf b/_old/v1/config-files/pacman.conf new file mode 100644 index 0000000..d9e6046 --- /dev/null +++ b/_old/v1/config-files/pacman.conf @@ -0,0 +1,113 @@ +# /etc/pacman.conf +# +# See the pacman.conf(5) manpage for option and repository directives + +# +# GENERAL OPTIONS +# +[options] +# The following paths are commented out with their default values listed. +# If you wish to use different paths, uncomment and update the paths. +#RootDir = / +#DBPath = /var/lib/pacman/ +#CacheDir = /var/cache/pacman/pkg/ +#LogFile = /var/log/pacman.log +#GPGDir = /etc/pacman.d/gnupg/ +#HookDir = /etc/pacman.d/hooks/ +HoldPkg = pacman glibc +#XferCommand = /usr/bin/curl -L -C - -f -o %o %u +#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u +#CleanMethod = KeepInstalled +Architecture = auto + +# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup +#IgnorePkg = +#IgnoreGroup = + +#NoUpgrade = +#NoExtract = + +# Misc options +#UseSyslog +Color +#NoProgressBar +CheckSpace +VerbosePkgLists +ParallelDownloads = 25 +#DownloadUser = alpm +#DisableSandbox +ILoveCandy +DisableDownloadTimeout + +# By default, pacman accepts packages signed by keys that its local keyring +# trusts (see pacman-key and its man page), as well as unsigned packages. +SigLevel = Required DatabaseOptional +LocalFileSigLevel = Optional +#RemoteFileSigLevel = Required + +# NOTE: You must run `pacman-key --init` before first using pacman; the local +# keyring can then be populated with the keys of all official Arch Linux +# packagers with `pacman-key --populate archlinux`. + +# +# REPOSITORIES +# - can be defined here or included from another file +# - pacman will search repositories in the order defined here +# - local/custom mirrors can be added here or in separate files +# - repositories listed first will take precedence when packages +# have identical names, regardless of version number +# - URLs will have $repo replaced by the name of the current repo +# - URLs will have $arch replaced by the name of the architecture +# +# Repository entries are of the format: +# [repo-name] +# Server = ServerName +# Include = IncludePath +# +# The header [repo-name] is crucial - it must be present and +# uncommented to enable the repo. +# + +# The testing repositories are disabled by default. To enable, uncomment the +# repo name header and Include lines. You can add preferred servers immediately +# after the header, and they will be used before the default mirrors. + +#[core-testing] +#Include = /etc/pacman.d/mirrorlist + +[core] +Include = /etc/pacman.d/mirrorlist + +#[extra-testing] +#Include = /etc/pacman.d/mirrorlist + +[extra] +Include = /etc/pacman.d/mirrorlist + +# If you want to run 32 bit applications on your x86_64 system, +# enable the multilib repositories as required here. + +#[multilib-testing] +#Include = /etc/pacman.d/mirrorlist + +[multilib] +Include = /etc/pacman.d/mirrorlist + +# An example of a custom package repository. See the pacman manpage for +# tips on creating your own repositories. +#[custom] +#SigLevel = Optional TrustAll +#Server = file:///home/custompkgs + +[yuku_repo] +SigLevel = Never +Server = https://yurikuit.github.io/$repo/$arch + +[nemesis_repo] +SigLevel = Never +Server = https://erikdubois.github.io/$repo/$arch + +[chaotic-aur] +SigLevel = Required DatabaseOptional +Include = /etc/pacman.d/chaotic-mirrorlist + diff --git a/_old/v1/packages/chaotic-keyring-20230616-1-any.pkg.tar.zst b/_old/v1/packages/chaotic-keyring-20230616-1-any.pkg.tar.zst new file mode 100644 index 0000000..e75313d Binary files /dev/null and b/_old/v1/packages/chaotic-keyring-20230616-1-any.pkg.tar.zst differ diff --git a/_old/v1/packages/chaotic-mirrorlist-20240724-3-any.pkg.tar.zst b/_old/v1/packages/chaotic-mirrorlist-20240724-3-any.pkg.tar.zst new file mode 100644 index 0000000..520aec5 Binary files /dev/null and b/_old/v1/packages/chaotic-mirrorlist-20240724-3-any.pkg.tar.zst differ diff --git a/_old/v1/xxx-template.sh b/_old/v1/xxx-template.sh new file mode 100755 index 0000000..aed77c3 --- /dev/null +++ b/_old/v1/xxx-template.sh @@ -0,0 +1,21 @@ +#!/bin/bash +#set -e +################################################################################################################## +#tput setaf 0 = black +#tput setaf 1 = red +#tput setaf 2 = green +#tput setaf 3 = yellow +#tput setaf 4 = dark blue +#tput setaf 5 = purple +#tput setaf 6 = cyan +#tput setaf 7 = gray +#tput setaf 8 = light blue +################################################################################################################## + +echo +tput setaf 3 +echo "################################################################" +echo "################### Start Arch setup" +echo "################################################################" +tput sgr0 +echo \ No newline at end of file diff --git a/v2/0-setup-linux.sh b/v2/0-setup-linux.sh new file mode 100755 index 0000000..aafbc8f --- /dev/null +++ b/v2/0-setup-linux.sh @@ -0,0 +1,247 @@ +#!/bin/bash +set -euo pipefail + +########################## +# Color helpers +########################## +tput_reset() { tput sgr0; } +tput_black() { tput setaf 0; } +tput_red() { tput setaf 1; } +tput_green() { tput setaf 2; } +tput_yellow() { tput setaf 3; } +tput_blue() { tput setaf 4; } +tput_purple() { tput setaf 5; } +tput_cyan() { tput setaf 6; } +tput_gray() { tput setaf 7; } + +echo +tput_yellow +echo "################################################################" +echo "################### Start OS Detection" +echo "################################################################" +tput_reset +echo + +########################## +# OS Detection +########################## +source /etc/os-release + +OS_ID="${ID,,}" +OS_LIKE="${ID_LIKE:-}" +OS_LIKE="${OS_LIKE,,}" +OS_VERSION="$VERSION_ID" +OS_PRETTY="$PRETTY_NAME" +OS="" + +case "$OS_ID" in + arch) OS="arch" ;; + debian) OS="debian" ;; + ubuntu) OS="ubuntu" ;; + fedora) OS="fedora" ;; + *) + # fallback for derivatives + if [[ "$OS_LIKE" == *"ubuntu"* ]]; then + OS="ubuntu" + elif [[ "$OS_LIKE" == *"arch"* ]]; then + OS="arch" + elif [[ "$OS_LIKE" == *"debian"* ]]; then + OS="debian" + elif [[ "$OS_LIKE" == *"fedora"* || "$OS_LIKE" == *"rhel"* ]]; then + OS="fedora" + fi + ;; +esac + +if [[ -n "$OS" ]]; then + tput_cyan + echo "################################################################################" + echo "Detected OS: $OS ($OS_PRETTY)" + echo "Version: $OS_VERSION" + echo "################################################################################" + tput_reset +else + tput_red + echo "################################################################################" + echo "ERROR: Unsupported or unknown Linux distribution." + echo "Detected: ID=$OS_ID, ID_LIKE=${OS_LIKE:-empty}" + echo "################################################################################" + tput_reset + exit 1 +fi + +########################## +# Desktop Environment Detection / Selection +########################## +echo +tput_yellow +echo "################################################################" +echo "################### Desktop Environment Selection" +echo "################################################################" +tput_reset +echo + +DE_RAW="${XDG_CURRENT_DESKTOP:-${DESKTOP_SESSION:-}}" +DE="" + +case "${DE_RAW,,}" in + *xfce*) DE="xfce" ;; + *plasma*|*kde*) DE="plasma" ;; + *gnome*) DE="gnome" ;; + ""|none) DE="" ;; # trigger menu +esac + +if [[ -n "$DE" ]]; then + echo + tput_cyan + echo "################################################################################" + echo "Detected Desktop Environment: $DE (${DE_RAW})" + echo "################################################################################" + tput_reset +else + # No DE detected — ask user + echo + echo "No Desktop Environment detected. Select one to install:" + while true; do + echo " 1) XFCE" + echo " 2) Plasma" + echo " 3) GNOME" + echo " x) None (default)" + read -rp "Enter choice [1/2/3/x] (default: x): " choice + case "${choice,,}" in + 1) DE="xfce"; break ;; + 2) DE="plasma"; break ;; + 3) DE="gnome"; break ;; + x|"") DE="none"; break ;; + *) echo "Invalid option. Please enter 1, 2, 3, or x." ;; + esac + done + echo + tput_cyan + echo "################################################################################" + echo "Selected Desktop Environment: $DE" + echo "################################################################################" + tput_reset +fi + +########################## +# Tiling Window Manager Selection +########################## +echo +tput_yellow +echo "################################################################" +echo "################### Tiling WM Selection" +echo "################################################################" +tput_reset +echo + +TWM="none" +while true; do + echo + echo "Select a tiling window manager:" + echo " 1) CHADWM" + echo " 2) Hyprland" + echo " x) None (default)" + read -rp "Enter choice [1/2/x] (default: x): " choice + case "${choice,,}" in + 1) TWM="chadwm"; break ;; + 2) TWM="hyprland"; break ;; + x|"") TWM="none"; break ;; + *) echo "Invalid option. Please enter 1, 2, or x." ;; + esac +done + +echo +tput_cyan +echo "################################################################################" +echo "Selected Tiling WM: $TWM" +echo "################################################################################" +tput_reset + +########################## +# Installation Level Selection +########################## +echo +tput_yellow +echo "################################################################" +echo "################### Installation Level Selection" +echo "################################################################" +tput_reset +echo + +INSTALL_LEVEL="minimal" # default + +while true; do + echo + echo "Select installation level:" + echo " 1) minimal" + echo " 2) full" + echo " 3) workstation" + echo " 4) server" + read -rp "Enter choice [1/2/3/4] (default: 1): " choice + case "$choice" in + 1|"") INSTALL_LEVEL="minimal"; break ;; + 2) INSTALL_LEVEL="full"; break ;; + 3) INSTALL_LEVEL="workstation"; break ;; + 4) INSTALL_LEVEL="server"; break ;; + *) echo "Invalid option. Please enter 1, 2, 3, or 4." ;; + esac +done + +echo +tput_cyan +echo "################################################################################" +echo "Selected Installation Level: $INSTALL_LEVEL" +echo "################################################################################" +tput_reset + +########################## +# Export selections for OS script +########################## +export DETECTED_OS="$OS" +export DETECTED_DE="$DE_RAW" +export SELECTED_DE="$DE" +export SELECTED_TWM="$TWM" +export INSTALL_LEVEL + +########################## +# Determine OS script +########################## +case "$OS" in + debian) OS_SCRIPT="./debian.sh" ;; + ubuntu) OS_SCRIPT="./ubuntu.sh" ;; + arch) OS_SCRIPT="./arch.sh" ;; + fedora) OS_SCRIPT="./fedora.sh" ;; + *) + tput_red + echo + echo "No OS script available for $OS" + tput_reset + exit 1 + ;; +esac + +########################## +# Preflight check +########################## +if [[ ! -x "$OS_SCRIPT" ]]; then + tput_red + echo + echo "ERROR: OS script not found or not executable: $OS_SCRIPT" + tput_reset + exit 1 +fi + +########################## +# Run OS script +########################## +echo +echo "Running OS script: $OS_SCRIPT" +"$OS_SCRIPT" + +echo +tput_yellow +echo "################################################################" +echo "End Detection" +echo "################################################################" +tput_reset diff --git a/v2/arch.sh b/v2/arch.sh new file mode 100755 index 0000000..80b7035 --- /dev/null +++ b/v2/arch.sh @@ -0,0 +1,255 @@ +#!/bin/bash +set -euo pipefail + +########################## +# Color helpers +########################## +tput_reset() { tput sgr0; } +tput_black() { tput setaf 0; } +tput_red() { tput setaf 1; } +tput_green() { tput setaf 2; } +tput_yellow() { tput setaf 3; } +tput_blue() { tput setaf 4; } +tput_purple() { tput setaf 5; } +tput_cyan() { tput setaf 6; } +tput_gray() { tput setaf 7; } + +########################## +# Use exported variables from main detection script +########################## +OS="${DETECTED_OS}" +DDE="${DETECTED_DE}" +DE="${SELECTED_DE:-none}" +TWM="${SELECTED_TWM:-none}" +INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" + +tput_cyan +echo +echo "Starting Arch Linux setup..." +tput_reset +echo +echo "DE: $DE, TWM: $TWM, Install Level: $INSTALL_LEVEL" + +########################## +# 0. Ensure base is ready for installation +########################## +# Setting installed_dir to base folder of the git-repository +installed_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +# Installing chaotic-aur keys and mirrors +pkg_dir="packages" + +# Ensure directory exists +if [[ ! -d "$pkg_dir" ]]; then + echo "Directory not found: $pkg_dir" + exit 1 +fi + +if ! command -v curl >/dev/null 2>&1; then + tput_yellow + echo + echo "curl is not installed. Installing..." + tput_reset + sudo pacman -Sy + sudo sudo pacman -S --noconfirm --needed curl +fi + +# Install all local packages using pacman +find "$pkg_dir" -maxdepth 1 -name '*.pkg.tar.zst' -print0 | sudo xargs -0 pacman -U --noconfirm + +########################## +# 1. Add repsotirories if missing +########################## +tput_yellow +echo +echo "Checking /etc/apt/sources.list for contrib/non-free..." +tput_reset +sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak.$(date +%s) +sudo sed -i -r 's/^(deb\s+\S+\s+\S+)\s+(main)$/\1 main contrib non-free/' /etc/apt/sources.list +tput_green +echo +echo "Updated sources.list to include contrib/non-free where needed." +tput_reset + +# personal pacman.conf +if [[ ! -f /etc/pacman.conf.starburst ]]; then + echo + tput setaf 2 + echo "################################################################################" + echo "Copying /etc/pacman.conf to /etc/pacman.conf.starburst" + echo "################################################################################" + tput sgr0 + echo + sudo cp -v /etc/pacman.conf /etc/pacman.conf.starburst + echo +else + echo + tput setaf 2 + echo "################################################################################" + echo "Backup already exists: /etc/pacman.conf.starburst" + echo "################################################################################" + tput sgr0 + echo +fi + +sudo cp -v $installed_dir/config-files/pacman.conf /etc/pacman.conf + +# update the system +echo +tput setaf 2 +echo "################################################################################" +echo "Updating the system - sudo pacman -Syyu" +echo "################################################################################" +tput sgr0 +echo + +sudo pacman -Syyu --noconfirm + +# fix missing console font +echo +tput setaf 3 +echo "################################################################" +echo "################### fix missing console font" +echo "################################################################" +tput sgr0 +echo + +if grep -q FONT= /etc/vconsole.conf; then + + echo + tput setaf 2 + echo "################################################################" + echo "################### FONT is already set in /etc/vconsole.conf" + echo "################################################################" + tput sgr0 + echo + +else + + tput setaf 2 + echo "################################################################" + echo "################### FONT added to /etc/vconsole.conf" + echo "################################################################" + tput sgr0 + +echo 'FONT=gr737c-8x14' | sudo tee -a /etc/vconsole.conf +fi + + + + + + + + + + + + + + + + + + + + + +echo +tput_yellow +echo "################################################################################" +echo "################### Detected OS / Desktop Environmet / Tiling Window Manager" +echo "################################################################################" +tput_reset +echo + +echo "Installing OS-specific packages..." +echo "Selected DE: $SELECTED_DE" +echo "Selected TWM: $SELECTED_TWM" +echo "Installation Level: $INSTALL_LEVEL" + +if [[ "$SELECTED_DE" == "xfce" ]]; then + echo + tput_green + echo "################################################################################" + echo "################### Installing XFCE4" + echo "################################################################################" + tput_reset + echo + + echo "Installing XFCE packages..." + +fi + +if [[ "$SELECTED_DE" == "plasma" ]]; then + echo + tput_green + echo "################################################################################" + echo "################### Installing KDE Plasma 6" + echo "################################################################################" + tput_reset + echo + + echo "Installing Plasma packages..." +fi + +if [[ "$SELECTED_DE" == "gnome" ]]; then + echo + tput_green + echo "################################################################################" + echo "################### Installing Gnome 48" + echo "################################################################################" + tput_reset + echo + + echo "Installing Gnome packages..." +fi + +if [[ "$SELECTED_DE" == "none" ]]; then + echo + tput_green + echo "################################################################################" + echo "################### Installing no Desktop Environment" + echo "################################################################################" + tput_reset + echo + + echo "Installing no Desktop Environment packages..." +fi + + +if [[ "$SELECTED_TWM" == "chadwm" ]]; then + echo + tput_green + echo "################################################################################" + echo "################### Installing Chadwm" + echo "################################################################################" + tput_reset + echo + + echo "Installing CHADWM..." +fi + +if [[ "$SELECTED_TWM" == "hyprland" ]]; then + echo + tput_green + echo "################################################################################" + echo "################### Installing Hyprland" + echo "################################################################################" + tput_reset + echo + + echo "Installing Hyperland..." +fi + +if [[ "$SELECTED_TWM" == "none" ]]; then + echo + tput_green + echo "################################################################################" + echo "################### Installing no Tiling Window Manager" + echo "################################################################################" + tput_reset + echo + + echo "Installing no Tiling Window Manager packages..." +fi diff --git a/v2/debian-chadwm.sh b/v2/debian-chadwm.sh new file mode 100755 index 0000000..9457646 --- /dev/null +++ b/v2/debian-chadwm.sh @@ -0,0 +1,27 @@ +#!/bin/bash +set -euo pipefail + +########################## +# Color helpers +########################## +tput_reset() { tput sgr0; } +tput_black() { tput setaf 0; } +tput_red() { tput setaf 1; } +tput_green() { tput setaf 2; } +tput_yellow() { tput setaf 3; } +tput_cyan() { tput setaf 4; } +tput_purple() { tput setaf 5; } +tput_cyan() { tput setaf 6; } +tput_gray() { tput setaf 7; } + +########################## +# Use exported variables from main detection script +########################## +OS="${DETECTED_OS}" +DDE="${DETECTED_DE}" +DE="${SELECTED_DE:-none}" +TWM="${SELECTED_TWM:-none}" +INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" + +# Pause +read -n 1 -s -r -p "Press any key to continue" \ No newline at end of file diff --git a/v2/debian-full.sh b/v2/debian-full.sh new file mode 100755 index 0000000..4a4ab10 --- /dev/null +++ b/v2/debian-full.sh @@ -0,0 +1,47 @@ +#!/bin/bash +set -euo pipefail + +########################## +# Color helpers +########################## +tput_reset() { tput sgr0; } +tput_black() { tput setaf 0; } +tput_red() { tput setaf 1; } +tput_green() { tput setaf 2; } +tput_yellow() { tput setaf 3; } +tput_cyan() { tput setaf 4; } +tput_purple() { tput setaf 5; } +tput_cyan() { tput setaf 6; } +tput_gray() { tput setaf 7; } + +########################## +# Use exported variables from main detection script +########################## +OS="${DETECTED_OS}" +DDE="${DETECTED_DE}" +DE="${SELECTED_DE:-none}" +TWM="${SELECTED_TWM:-none}" +INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" + +# Pause +read -n 1 -s -r -p "Press any key to continue" + +# Before running FULL first run Minimal +bash debian-minimal.sh + +# Now continue with FULL + # install tools + sudo apt install -y \ + arandr \ + catfish \ + galculator \ + network-manager \ + network-manager-applet \ + network-manager-openvpn \ + numlockx \ + pavucontrol \ + playerctl \ + xcolors \ + gparted + + \ No newline at end of file diff --git a/v2/debian-gnome.sh b/v2/debian-gnome.sh new file mode 100755 index 0000000..31cfca5 --- /dev/null +++ b/v2/debian-gnome.sh @@ -0,0 +1,135 @@ +#!/bin/bash +set -euo pipefail + +########################## +# Color helpers +########################## +tput_reset() { tput sgr0; } +tput_black() { tput setaf 0; } +tput_red() { tput setaf 1; } +tput_green() { tput setaf 2; } +tput_yellow() { tput setaf 3; } +tput_blue() { tput setaf 4; } +tput_purple() { tput setaf 5; } +tput_cyan() { tput setaf 6; } +tput_gray() { tput setaf 7; } + +########################## +# Use exported variables from main detection script +########################## +OS="${DETECTED_OS}" +DDE="${DETECTED_DE}" +DE="${SELECTED_DE:-none}" +TWM="${SELECTED_TWM:-none}" +INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" + +########################## +# 4. Desktop Environment installation +########################## +tput_yellow +echo "Installing Gnome..." +tput_reset + +#detect if Gnome and SDDM are installed and if not install them +if [[ -z "$DDE" ]]; then + tput_cyan + echo + echo "No Desktop Environment detected. Installing Gnome (light setup with SDDM)..." + tput_reset + + sudo apt update + sudo apt install -y --no-install-recommends sddm \ + gnome-shell \ + gnome-terminal \ + nautilus \ + gnome-control-center \ + gnome-system-monitor \ + gnome-settings-daemon \ + gnome-tweaks \ + network-manager-gnome \ + gnome-keyring \ + gnome-session + + # Enable SDDM as the display manager + sudo systemctl enable sddm + + # Enable graphical target + sudo systemctl set-default graphical.target + + tput_green + echo + echo "Gnome with SDDM installed successfully." + echo "You can reboot now to start Gnome." + tput_reset +else + tput_cyan + echo + echo "You already have $DE installed." + tput_reset + + # Check if LightDM is installed and active + if systemctl is-active --quiet lightdm; then + tput_yellow + echo + echo "LightDM is currently active. Replacing with SDDM..." + tput_reset + + # Disable and remove LightDM + sudo systemctl disable lightdm + sudo apt purge -y lightdm lightdm-gtk-greeter + + # Install and enable SDDM + sudo apt install -y sddm + sudo systemctl enable sddm + + # Enable graphical target + sudo systemctl set-default graphical.target + + tput_green + echo + echo "LightDM removed and replaced with SDDM." + tput_reset + else + tput_cyan + echo + echo "No LightDM detected, leaving current display manager unchanged." + tput_reset + fi +fi + +#cleanup unwanted packages + # Packages to remove + #packages=("vim" "vim-runtime" "vim-common" "vim-tiny" "mousepad" "parole") + #sudo apt-mark manual xfce4-goodies + + # Function to check if a package is installed + is_package_installed() { + dpkg -s "$1" &> /dev/null + } + + # Iterate over each package + for package in "${packages[@]}"; do + if is_package_installed "$package"; then + echo "Removing $package..." + sudo apt-get purge -y "$package" + else + echo "$package is not installed, skipping." + fi + + # Optional double-check + if ! is_package_installed "$package"; then + echo "$package successfully removed." + else + echo "$package is still installed. Check manually." + fi + + echo "----------------------------" + done + + # Resolving network issues + sudo mv /etc/network/interfaces /etc/network/interfaces.bak + sudo systemctl restart NetworkManager + + # Remove leftover dependencies + sudo apt-get autoremove -y + diff --git a/v2/debian-hyprland.sh b/v2/debian-hyprland.sh new file mode 100755 index 0000000..9457646 --- /dev/null +++ b/v2/debian-hyprland.sh @@ -0,0 +1,27 @@ +#!/bin/bash +set -euo pipefail + +########################## +# Color helpers +########################## +tput_reset() { tput sgr0; } +tput_black() { tput setaf 0; } +tput_red() { tput setaf 1; } +tput_green() { tput setaf 2; } +tput_yellow() { tput setaf 3; } +tput_cyan() { tput setaf 4; } +tput_purple() { tput setaf 5; } +tput_cyan() { tput setaf 6; } +tput_gray() { tput setaf 7; } + +########################## +# Use exported variables from main detection script +########################## +OS="${DETECTED_OS}" +DDE="${DETECTED_DE}" +DE="${SELECTED_DE:-none}" +TWM="${SELECTED_TWM:-none}" +INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" + +# Pause +read -n 1 -s -r -p "Press any key to continue" \ No newline at end of file diff --git a/v2/debian-minimal.sh b/v2/debian-minimal.sh new file mode 100755 index 0000000..52eaae3 --- /dev/null +++ b/v2/debian-minimal.sh @@ -0,0 +1,298 @@ +#!/bin/bash +set -euo pipefail + +########################## +# Color helpers +########################## +tput_reset() { tput sgr0; } +tput_black() { tput setaf 0; } +tput_red() { tput setaf 1; } +tput_green() { tput setaf 2; } +tput_yellow() { tput setaf 3; } +tput_cyan() { tput setaf 4; } +tput_purple() { tput setaf 5; } +tput_cyan() { tput setaf 6; } +tput_gray() { tput setaf 7; } + +########################## +# Use exported variables from main detection script +########################## +OS="${DETECTED_OS}" +DDE="${DETECTED_DE}" +DE="${SELECTED_DE:-none}" +TWM="${SELECTED_TWM:-none}" +INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" + +# Pause +read -n 1 -s -r -p "Press any key to continue" + +# on all DE + ################################################################# + # Create directories (skel + user) + ################################################################# + echo + tput setaf 2 + echo "########################################################################" + echo "################### Creating directories" + echo "########################################################################" + tput sgr0 + echo + + sudo mkdir -p /etc/skel/.config/xfce4/{panel,xfconf} + mkdir -p \ + "$HOME"/{.bin,.fonts,.icons,.themes,DATA} \ + "$HOME/.local/share/"{icons,themes,applications} \ + "$HOME/.config/"{autostart,gtk-{3.0,4.0},variety,fish,neofetch} + + # Packages to remove + packages=("vim" "vim-runtime" "vim-common" "vim-tiny" "mousepad" "parole") + + # Function to check if a package is installed + is_package_installed() { + dpkg -s "$1" &> /dev/null + } + + # Iterate over each package + for package in "${packages[@]}"; do + if is_package_installed "$package"; then + echo "Removing $package..." + sudo apt-get purge -y "$package" + else + echo "$package is not installed, skipping." + fi + + # Optional double-check + if ! is_package_installed "$package"; then + echo "$package successfully removed." + else + echo "$package is still installed. Check manually." + fi + + echo "----------------------------" + done + + # Remove leftover dependencies + sudo apt-get autoremove -y + + # install needed packages + #firmwares + sudo apt-get install -y \ + dkms \ + linux-headers-$(uname -r) + + #archive-managers + sudo apt install -y zip gzip p7zip unace unrar unzip + + #fonts + sudo apt install -y \ + font-manager \ + fonts-noto \ + fonts-dejavu \ + fonts-droid-fallback \ + fonts-hack \ + fonts-inconsolata \ + fonts-liberation \ + fonts-roboto \ + fonts-ubuntu \ + fonts-terminus + + # Install RobotoMono Nerd Font + # Destination directory + FONT_DIR="$HOME/.local/share/fonts" + mkdir -p "$FONT_DIR" + + # Download RobotoMono Nerd Font (latest release) + ZIP_URL="https://github.com/ryanoasis/nerd-fonts/releases/latest/download/RobotoMono.zip" + TMP_DIR="$(mktemp -d)" + + echo "Downloading RobotoMono Nerd Font..." + curl -L "$ZIP_URL" -o "$TMP_DIR/RobotoMono.zip" + + echo "Extracting..." + unzip -q "$TMP_DIR/RobotoMono.zip" -d "$FONT_DIR" + + echo "Cleaning up..." + rm -rf "$TMP_DIR" + + echo "Updating font cache..." + fc-cache -fv + + echo "RobotoMono Nerd Font installed successfully in $FONT_DIR" + + #tools + sudo apt install -y \ + wget \ + curl \ + nano \ + fastfetch \ + lolcat \ + bash-completion \ + starship \ + alacritty \ + hwinfo \ + lshw \ + libpam0g \ + libpam-modules \ + libpam-runtime \ + libpam-modules-bin \ + avahi-daemon \ + avahi-utils \ + libnss-mdns + + if [ ! -f /usr/bin/duf ]; then + sudo apt install -y duf + fi + sudo apt install -y \ + man-db \ + manpages \ + tree \ + xdg-user-dirs \ + mate-polkit \ + rsync \ + time \ + bat \ + chrony + + #theming + sudo apt install -y \ + bibata-cursor-theme \ + feh \ + arc-theme + + echo "Installing Surfn icon theme..." + # Clone Surfn repo + TEMP_DIR=$(mktemp -d) + git clone https://github.com/erikdubois/Surfn.git "$TEMP_DIR/surfn" + cd "$TEMP_DIR/surfn" + # Copy the icon theme to the user's local icons directory + cp -r surfn-icons/* ~/.icons/ + cd ~ + rm -rf "$TEMP_DIR" + echo "Surfn icon theme installed." + + echo "Installing Flat Remix Dark GTK theme..." + TEMP_DIR=$(mktemp -d) + cd "$TEMP_DIR" + # Download latest master as tar.gz + wget -O flat-remix-gtk.tar.gz https://github.com/daniruiz/flat-remix-gtk/archive/refs/heads/master.tar.gz + # Extract + tar -xzf flat-remix-gtk.tar.gz + # Move the Dark GTK theme to ~/.themes + # The actual theme folder is "Flat-Remix-Dark" inside the extracted directory + mv flat-remix-gtk-master/themes/* ~/.themes/ + cd ~ + rm -rf "$TEMP_DIR" + echo "Flat Remix Dark GTK theme installed." + + #internet + sudo apt install -y \ + chromium + + #enable services + sudo systemctl enable avahi-daemon.service + sudo systemctl enable chrony + + #Run service that will discard unused blocks on mounted filesystems. This is useful for solid-state drives (SSDs) and thinly-provisioned storage. + echo + echo "Enable fstrim timer" + sudo systemctl enable fstrim.timer + + echo + tput setaf 3 + echo "########################################################################" + echo "Detecting virtualization platform..." + echo "########################################################################" + tput sgr0 + echo + + virt_type=$(systemd-detect-virt) + + case "$virt_type" in + kvm) + echo "Detected KVM. Installing qemu-guest-agent..." + sudo apt install -y qemu-guest-agent spice-vdagent + sudo systemctl enable qemu-guest-agent.service + ;; + oracle) + echo "Detected VirtualBox. Installing virtualbox-guest-utils..." + sudo apt install -y virtualbox-guest-utils + sudo systemctl enable vboxservice.service + ;; + none) + echo "No virtualization detected. Skipping guest utilities." + ;; + *) + echo "Virtualization detected: $virt_type, but no install routine defined." + ;; + esac + +# if on XFCE +case "$DE" in + xfce) + ################################################################# + # Create directories (skel + user) + ################################################################# + echo + tput setaf 2 + echo "########################################################################" + echo "################### Creating directories" + echo "########################################################################" + tput sgr0 + echo + + sudo mkdir -p /etc/skel/.config/xfce4/{panel,xfconf} + mkdir -p \ + "$HOME/.config/"{xfce4,xfce4/xfconf} + + # cleanup unwanted packages + tput_yellow + echo + echo "Removing unwanted packages from $DE..." + tput_reset + + # Packages to remove + packages=("xfburn" "xfce4-screenshooter" "xfce4-notes") + sudo apt-mark manual xfce4-goodies + + # Function to check if a package is installed + is_package_installed() { + dpkg -s "$1" &> /dev/null + } + + # Iterate over each package + for package in "${packages[@]}"; do + if is_package_installed "$package"; then + echo "Removing $package..." + sudo apt-get purge -y "$package" + else + echo "$package is not installed, skipping." + fi + + # Optional double-check + if ! is_package_installed "$package"; then + echo "$package successfully removed." + else + echo "$package is still installed. Check manually." + fi + + echo "----------------------------" + done + + # Remove leftover dependencies + sudo apt-get autoremove -y + + # install needed packages + #tools + sudo apt install -y thunar thunar-archive-plugin thunar-volman + + #archive-managers + sudo apt install -y file-roller + + + ;; +esac + + + + + diff --git a/v2/debian-plasma.sh b/v2/debian-plasma.sh new file mode 100755 index 0000000..b3b25fc --- /dev/null +++ b/v2/debian-plasma.sh @@ -0,0 +1,142 @@ +#!/bin/bash +set -euo pipefail + +########################## +# Color helpers +########################## +tput_reset() { tput sgr0; } +tput_black() { tput setaf 0; } +tput_red() { tput setaf 1; } +tput_green() { tput setaf 2; } +tput_yellow() { tput setaf 3; } +tput_blue() { tput setaf 4; } +tput_purple() { tput setaf 5; } +tput_cyan() { tput setaf 6; } +tput_gray() { tput setaf 7; } + +########################## +# Use exported variables from main detection script +########################## +OS="${DETECTED_OS}" +DDE="${DETECTED_DE}" +DE="${SELECTED_DE:-none}" +TWM="${SELECTED_TWM:-none}" +INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" + +########################## +# 4. Desktop Environment installation +########################## +tput_yellow +echo "Installing KDE Plasma..." +tput_reset + +#detect if KDE Plasma and SDDM are installed and if not install them +if [[ -z "$DDE" ]]; then + tput_cyan + echo + echo "No Desktop Environment detected. Installing KDE Plasma (light setup with SDDM)..." + tput_reset + + sudo apt update + sudo apt install -y --no-install-recommends sddm \ + plasma-desktop \ + dolphin \ + konsole \ + kate \ + plasma-nm \ + plasma-workspace \ + kde-config-gtk-style \ + kde-config-sddm \ + plasma-discover \ + plasma-discover-common \ + plasma-discover-backend-snap \ + plasma-discover-backend-flatpak \ + plasma-discover-backend-fwupd \ + kscreen + + # Enable SDDM as the display manager + sudo systemctl enable sddm + + # Enable graphical target + sudo systemctl set-default graphical.target + + # Rebuild Discover cache + kbuildsycoca6 + + tput_green + echo + echo "KDE Plasma with SDDM installed successfully." + echo "You can reboot now to start KDE Plasma." + tput_reset +else + tput_cyan + echo + echo "You already have $DE installed." + tput_reset + + # Check if LightDM is installed and active + if systemctl is-active --quiet lightdm; then + tput_yellow + echo + echo "LightDM is currently active. Replacing with SDDM..." + tput_reset + + # Disable and remove LightDM + sudo systemctl disable lightdm + sudo apt purge -y lightdm lightdm-gtk-greeter + + # Install and enable SDDM + sudo apt install -y sddm + sudo systemctl enable sddm + + # Enable graphical target + sudo systemctl set-default graphical.target + + tput_green + echo + echo "LightDM removed and replaced with SDDM." + tput_reset + else + tput_cyan + echo + echo "No LightDM detected, leaving current display manager unchanged." + tput_reset + fi +fi + +#cleanup unwanted packages + # Packages to remove + #packages=("vim" "vim-runtime" "vim-common" "vim-tiny" "mousepad" "parole") + #sudo apt-mark manual xfce4-goodies + + # Function to check if a package is installed + is_package_installed() { + dpkg -s "$1" &> /dev/null + } + + # Iterate over each package + for package in "${packages[@]}"; do + if is_package_installed "$package"; then + echo "Removing $package..." + sudo apt-get purge -y "$package" + else + echo "$package is not installed, skipping." + fi + + # Optional double-check + if ! is_package_installed "$package"; then + echo "$package successfully removed." + else + echo "$package is still installed. Check manually." + fi + + echo "----------------------------" + done + + # Resolving network issues + sudo mv /etc/network/interfaces /etc/network/interfaces.bak + sudo systemctl restart NetworkManager + + # Remove leftover dependencies + sudo apt-get autoremove -y + diff --git a/v2/debian-server.sh b/v2/debian-server.sh new file mode 100755 index 0000000..9457646 --- /dev/null +++ b/v2/debian-server.sh @@ -0,0 +1,27 @@ +#!/bin/bash +set -euo pipefail + +########################## +# Color helpers +########################## +tput_reset() { tput sgr0; } +tput_black() { tput setaf 0; } +tput_red() { tput setaf 1; } +tput_green() { tput setaf 2; } +tput_yellow() { tput setaf 3; } +tput_cyan() { tput setaf 4; } +tput_purple() { tput setaf 5; } +tput_cyan() { tput setaf 6; } +tput_gray() { tput setaf 7; } + +########################## +# Use exported variables from main detection script +########################## +OS="${DETECTED_OS}" +DDE="${DETECTED_DE}" +DE="${SELECTED_DE:-none}" +TWM="${SELECTED_TWM:-none}" +INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" + +# Pause +read -n 1 -s -r -p "Press any key to continue" \ No newline at end of file diff --git a/v2/debian-workstation.sh b/v2/debian-workstation.sh new file mode 100755 index 0000000..9457646 --- /dev/null +++ b/v2/debian-workstation.sh @@ -0,0 +1,27 @@ +#!/bin/bash +set -euo pipefail + +########################## +# Color helpers +########################## +tput_reset() { tput sgr0; } +tput_black() { tput setaf 0; } +tput_red() { tput setaf 1; } +tput_green() { tput setaf 2; } +tput_yellow() { tput setaf 3; } +tput_cyan() { tput setaf 4; } +tput_purple() { tput setaf 5; } +tput_cyan() { tput setaf 6; } +tput_gray() { tput setaf 7; } + +########################## +# Use exported variables from main detection script +########################## +OS="${DETECTED_OS}" +DDE="${DETECTED_DE}" +DE="${SELECTED_DE:-none}" +TWM="${SELECTED_TWM:-none}" +INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" + +# Pause +read -n 1 -s -r -p "Press any key to continue" \ No newline at end of file diff --git a/v2/debian-xfce.sh b/v2/debian-xfce.sh new file mode 100755 index 0000000..1741a4c --- /dev/null +++ b/v2/debian-xfce.sh @@ -0,0 +1,87 @@ +#!/bin/bash +set -euo pipefail + +########################## +# Color helpers +########################## +tput_reset() { tput sgr0; } +tput_black() { tput setaf 0; } +tput_red() { tput setaf 1; } +tput_green() { tput setaf 2; } +tput_yellow() { tput setaf 3; } +tput_blue() { tput setaf 4; } +tput_purple() { tput setaf 5; } +tput_cyan() { tput setaf 6; } +tput_gray() { tput setaf 7; } + +########################## +# Use exported variables from main detection script +########################## +OS="${DETECTED_OS}" +DDE="${DETECTED_DE}" +DE="${SELECTED_DE:-none}" +TWM="${SELECTED_TWM:-none}" +INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" + +########################## +# 4. Desktop Environment installation +########################## +tput_yellow +echo "Installing XFCE..." +tput_reset + +#detect if XFCE and SDDM are installed and if not install them +if [[ -z "$DDE" ]]; then + tput_cyan + echo + echo "No Desktop Environment detected. Installing XFCE (light setup with SDDM)..." + tput_reset + + sudo apt update + sudo apt install -y --no-install-recommends sddm \ + xfce4 \ + xfce4-goodies + + # Enable SDDM as the display manager + sudo systemctl enable sddm + + # Enable graphical target + sudo systemctl set-default graphical.target + + tput_green + echo + echo "XFCE with SDDM installed successfully." + echo "You can reboot now to start XFCE." + tput_reset +else + tput_cyan + echo + echo "You already have $DE installed." + tput_reset + + # Check if LightDM is installed and active + if systemctl is-active --quiet lightdm; then + tput_yellow + echo + echo "LightDM is currently active. Replacing with SDDM..." + tput_reset + + # Disable and remove LightDM + sudo systemctl disable lightdm + sudo apt purge -y lightdm lightdm-gtk-greeter + + # Install and enable SDDM + sudo apt install -y sddm + sudo systemctl enable sddm + + tput_green + echo + echo "LightDM removed and replaced with SDDM." + tput_reset + else + tput_cyan + echo + echo "No LightDM detected, leaving current display manager unchanged." + tput_reset + fi +fi diff --git a/v2/debian.sh b/v2/debian.sh new file mode 100755 index 0000000..f3fcfd8 --- /dev/null +++ b/v2/debian.sh @@ -0,0 +1,348 @@ +#!/bin/bash +set -euo pipefail + +########################## +# Color helpers +########################## +tput_reset() { tput sgr0; } +tput_black() { tput setaf 0; } +tput_red() { tput setaf 1; } +tput_green() { tput setaf 2; } +tput_yellow() { tput setaf 3; } +tput_cyan() { tput setaf 4; } +tput_purple() { tput setaf 5; } +tput_cyan() { tput setaf 6; } +tput_gray() { tput setaf 7; } + +########################## +# Use exported variables from main detection script +########################## +OS="${DETECTED_OS}" +DDE="${DETECTED_DE}" +DE="${SELECTED_DE:-none}" +TWM="${SELECTED_TWM:-none}" +INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" + +tput_cyan +echo +echo "Starting Debian setup..." +tput_reset +echo +echo "DE: $DE, TWM: $TWM, Install Level: $INSTALL_LEVEL" + +########################## +# 0. Ensure curl is installed +########################## +if ! command -v curl >/dev/null 2>&1; then + tput_yellow + echo + echo "curl is not installed. Installing..." + tput_reset + sudo apt update + sudo apt -y install curl +fi + +########################## +# 1. Add contrib and non-free if missing +########################## +tput_yellow +echo +echo "Checking /etc/apt/sources.list for contrib/non-free..." +tput_reset +sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak.$(date +%s) +sudo sed -i -r 's/^(deb\s+\S+\s+\S+)\s+(main)$/\1 main contrib non-free/' /etc/apt/sources.list +tput_green +echo +echo "Updated sources.list to include contrib/non-free where needed." +tput_reset + +########################## +# 1a. Check for archive.debian.org and update to deb.debian.org (only if Bullseye or newer) +########################## +CURRENT_CODENAME=$(grep -Po 'deb\s+\S+\s+\K\S+' /etc/apt/sources.list | grep -E '^(buster|bullseye|bookworm|trixie)$' | head -n1) +DEBIAN_ORDER=(buster bullseye bookworm trixie) + +# Function to get numeric index of codename +codename_index() { + local code="$1" + for i in "${!DEBIAN_ORDER[@]}"; do + [[ "${DEBIAN_ORDER[$i]}" == "$code" ]] && echo "$i" && return + done + echo -1 +} + +CURRENT_INDEX=$(codename_index "$CURRENT_CODENAME") +BULLSEYE_INDEX=$(codename_index "bullseye") + +if [[ "$CURRENT_INDEX" -ge "$BULLSEYE_INDEX" ]] && grep -q "archive.debian.org" /etc/apt/sources.list; then + tput_yellow + echo + echo "Found archive.debian.org in sources.list and system is Bullseye or newer, updating to deb.debian.org..." + tput_reset + sudo sed -i -r 's|archive\.debian\.org|deb.debian.org|g' /etc/apt/sources.list + tput_green + echo + echo "Updated sources.list to use deb.debian.org." + tput_reset +fi + +########################## +# 2. Full update and upgrade +########################## +tput_yellow +echo +echo "Updating package lists..." +tput_reset +sudo apt update + +# Autoremove before full-upgrade +AUTOREMOVE_PENDING=$(apt -s autoremove | grep -E 'Remv' || true) +if [[ -n "$AUTOREMOVE_PENDING" ]]; then + tput_yellow + echo + echo "Removing packages that are no longer required before upgrade..." + tput_reset + sudo apt -y autoremove +fi + +tput_yellow +echo +echo "Upgrading installed packages..." +tput_reset +sudo apt -y full-upgrade + +# Autoremove after full-upgrade +AUTOREMOVE_PENDING=$(apt -s autoremove | grep -E 'Remv' || true) +if [[ -n "$AUTOREMOVE_PENDING" ]]; then + tput_yellow + echo + echo "Removing packages that are no longer required after upgrade..." + tput_reset + sudo apt -y autoremove +fi + +UPGRADE_PENDING=$(apt list --upgradable 2>/dev/null | grep -v Listing || true) +if [[ -n "$UPGRADE_PENDING" ]]; then + tput_red + echo + echo "Some packages were upgraded. A reboot is recommended before continuing." + tput_reset + read -rp "Reboot now? [y/N]: " reboot_choice + case "${reboot_choice,,}" in + y|yes) + tput_red + echo + echo "Rebooting now. After reboot, please restart this script to continue..." + tput_reset + sudo reboot + ;; + *) + tput_yellow + echo + echo "Skipping reboot. Make sure to reboot manually before continuing upgrades." + tput_reset + exit 0 + ;; + esac +else + tput_green + echo + echo "All packages are up to date. Continuing to Debian major version check..." + tput_reset +fi + +########################## +# 3. Stepwise major version upgrade +########################## +DEBIAN_SEQUENCE=(buster bullseye bookworm trixie) +CURRENT_CODENAME=$(grep -Po 'deb\s+\S+\s+\K\S+' /etc/apt/sources.list | grep -E '^(buster|bullseye|bookworm|trixie)$' | head -n1) +LATEST_CODENAME=${DEBIAN_SEQUENCE[-1]} + +tput_cyan +echo +echo "Current codename: $CURRENT_CODENAME" +echo "Latest stable codename: $LATEST_CODENAME" +tput_reset + +while [[ "$CURRENT_CODENAME" != "$LATEST_CODENAME" ]]; do + NEXT_CODENAME="" + for i in "${!DEBIAN_SEQUENCE[@]}"; do + if [[ "${DEBIAN_SEQUENCE[$i]}" == "$CURRENT_CODENAME" ]]; then + NEXT_CODENAME="${DEBIAN_SEQUENCE[$((i+1))]}" + break + fi + done + + if [[ -z "$NEXT_CODENAME" ]]; then + tput_red + echo + echo "Error: Cannot determine next codename after $CURRENT_CODENAME" + tput_reset + exit 1 + fi + + tput_yellow + echo + echo "Detected codename $CURRENT_CODENAME, next stable version: $NEXT_CODENAME" + tput_reset + read -rp "Do you want to upgrade to $NEXT_CODENAME? [y/N]: " choice + case "${choice,,}" in + y|yes) + tput_yellow + echo + echo "Updating sources.list to $NEXT_CODENAME..." + tput_reset + sudo sed -i -r "s/\b$CURRENT_CODENAME\b/$NEXT_CODENAME/g" /etc/apt/sources.list + + tput_yellow + echo + echo "Updating packages..." + tput_reset + sudo apt update + + # Autoremove before full-upgrade + AUTOREMOVE_PENDING=$(apt -s autoremove | grep -E 'Remv' || true) + if [[ -n "$AUTOREMOVE_PENDING" ]]; then + tput_yellow + echo + echo "Removing packages that are no longer required before upgrade..." + tput_reset + sudo apt -y autoremove + fi + + sudo apt -y full-upgrade + + # Autoremove after full-upgrade + AUTOREMOVE_PENDING=$(apt -s autoremove | grep -E 'Remv' || true) + if [[ -n "$AUTOREMOVE_PENDING" ]]; then + tput_yellow + echo + echo "Removing packages that are no longer required after upgrade..." + tput_reset + sudo apt -y autoremove + fi + + tput_green + echo + echo "Upgrade to $NEXT_CODENAME complete. A reboot is recommended." + tput_reset + read -rp "Press Enter to reboot..." _ + sudo reboot + ;; + *) + tput_yellow + echo + echo "Skipping upgrade to $NEXT_CODENAME. Continuing with current version." + tput_reset + break + ;; + esac + + CURRENT_CODENAME=$(grep -Po 'deb\s+\S+\s+\K\S+' /etc/apt/sources.list | grep -E '^(buster|bullseye|bookworm|trixie)$' | head -n1) +done + +tput_green +echo +echo "Debian is now at codename $CURRENT_CODENAME. Continuing with DE/TWM installation..." +tput_reset + +########################## +# 4. Desktop Environment installation +########################## +case "$DE" in + xfce|plasma|gnome) + tput_yellow + echo + echo "Preparing to install $DE..." + tput_reset + + # Run DE-specific script dynamically + SCRIPT_NAME="${OS}-${DE}.sh" + if [[ -f "$SCRIPT_NAME" ]]; then + tput_cyan + echo + echo "Running $SCRIPT_NAME..." + tput_reset + bash "$SCRIPT_NAME" + else + tput_red + echo + echo "Error: $SCRIPT_NAME not found!" + tput_reset + exit 1 + fi + ;; + none) + tput_gray + echo + echo "No Desktop Environment selected, skipping DE installation." + tput_reset + ;; +esac + +########################## +# 5. Tiling Window Manager installation +########################## +case "$TWM" in + chadwm|hyprland) + tput_yellow + echo + echo "Installing CHADWM..." + tput_reset + + # Run TWM-specific script dynamically + SCRIPT_NAME="${OS}-${TWM}.sh" + if [[ -f "$SCRIPT_NAME" ]]; then + tput_cyan + echo + echo "Running $SCRIPT_NAME..." + tput_reset + bash "$SCRIPT_NAME" + else + tput_red + echo + echo "Error: $SCRIPT_NAME not found!" + tput_reset + exit 1 + fi + ;; + none) + tput_gray + echo + echo "No tiling window manager selected." + tput_reset + ;; +esac + +########################## +# 6. Installation level handling +########################## +case "$INSTALL_LEVEL" in + minimal|full|workstation|server) + tput_cyan + echo + echo "Minimal installation selected." + tput_reset + + # Run Installation Level-specific script dynamically + SCRIPT_NAME="${OS}-${INSTALL_LEVEL}.sh" + if [[ -f "$SCRIPT_NAME" ]]; then + tput_cyan + echo + echo "Running $SCRIPT_NAME..." + tput_reset + bash "$SCRIPT_NAME" + else + tput_red + echo + echo "Error: $SCRIPT_NAME not found!" + tput_reset + exit 1 + fi + ;; +esac + +tput_green +echo +echo "Debian setup complete." +tput_reset diff --git a/v2/fedora.sh b/v2/fedora.sh new file mode 100755 index 0000000..be50691 --- /dev/null +++ b/v2/fedora.sh @@ -0,0 +1,114 @@ +#!/bin/bash +set -euo pipefail + +########################## +# Color helpers +########################## +tput_reset() { tput sgr0; } +tput_black() { tput setaf 0; } +tput_red() { tput setaf 1; } +tput_green() { tput setaf 2; } +tput_yellow() { tput setaf 3; } +tput_blue() { tput setaf 4; } +tput_purple() { tput setaf 5; } +tput_cyan() { tput setaf 6; } +tput_gray() { tput setaf 7; } + +echo +tput_yellow +echo "################################################################################" +echo "################### Detected OS / Desktop Environmet / Tiling Window Manager" +echo "################################################################################" +tput_reset +echo + +echo "Installing OS-specific packages..." +echo "Selected DE: $SELECTED_DE" +echo "Selected TWM: $SELECTED_TWM" +echo "Installation Level: $INSTALL_LEVEL" + +if [[ "$SELECTED_DE" == "xfce" ]]; then + echo + tput_green + echo "################################################################################" + echo "################### Installing XFCE4" + echo "################################################################################" + tput_reset + echo + + echo "Installing XFCE packages..." + +fi + +if [[ "$SELECTED_DE" == "plasma" ]]; then + echo + tput_green + echo "################################################################################" + echo "################### Installing KDE Plasma 6" + echo "################################################################################" + tput_reset + echo + + echo "Installing Plasma packages..." +fi + +if [[ "$SELECTED_DE" == "gnome" ]]; then + echo + tput_green + echo "################################################################################" + echo "################### Installing Gnome 48" + echo "################################################################################" + tput_reset + echo + + echo "Installing Gnome packages..." +fi + +if [[ "$SELECTED_DE" == "none" ]]; then + echo + tput_green + echo "################################################################################" + echo "################### Installing no Desktop Environment" + echo "################################################################################" + tput_reset + echo + + echo "Installing no Desktop Environment packages..." +fi + + +if [[ "$SELECTED_TWM" == "chadwm" ]]; then + echo + tput_green + echo "################################################################################" + echo "################### Installing Chadwm" + echo "################################################################################" + tput_reset + echo + + echo "Installing CHADWM..." +fi + +if [[ "$SELECTED_TWM" == "hyprland" ]]; then + echo + tput_green + echo "################################################################################" + echo "################### Installing Hyprland" + echo "################################################################################" + tput_reset + echo + + echo "Installing Hyperland..." +fi + +if [[ "$SELECTED_TWM" == "none" ]]; then + echo + tput_green + echo "################################################################################" + echo "################### Installing no Tiling Window Manager" + echo "################################################################################" + tput_reset + echo + + echo "Installing no Tiling Window Manager packages..." +fi diff --git a/v2/ubuntu.sh b/v2/ubuntu.sh new file mode 100755 index 0000000..be50691 --- /dev/null +++ b/v2/ubuntu.sh @@ -0,0 +1,114 @@ +#!/bin/bash +set -euo pipefail + +########################## +# Color helpers +########################## +tput_reset() { tput sgr0; } +tput_black() { tput setaf 0; } +tput_red() { tput setaf 1; } +tput_green() { tput setaf 2; } +tput_yellow() { tput setaf 3; } +tput_blue() { tput setaf 4; } +tput_purple() { tput setaf 5; } +tput_cyan() { tput setaf 6; } +tput_gray() { tput setaf 7; } + +echo +tput_yellow +echo "################################################################################" +echo "################### Detected OS / Desktop Environmet / Tiling Window Manager" +echo "################################################################################" +tput_reset +echo + +echo "Installing OS-specific packages..." +echo "Selected DE: $SELECTED_DE" +echo "Selected TWM: $SELECTED_TWM" +echo "Installation Level: $INSTALL_LEVEL" + +if [[ "$SELECTED_DE" == "xfce" ]]; then + echo + tput_green + echo "################################################################################" + echo "################### Installing XFCE4" + echo "################################################################################" + tput_reset + echo + + echo "Installing XFCE packages..." + +fi + +if [[ "$SELECTED_DE" == "plasma" ]]; then + echo + tput_green + echo "################################################################################" + echo "################### Installing KDE Plasma 6" + echo "################################################################################" + tput_reset + echo + + echo "Installing Plasma packages..." +fi + +if [[ "$SELECTED_DE" == "gnome" ]]; then + echo + tput_green + echo "################################################################################" + echo "################### Installing Gnome 48" + echo "################################################################################" + tput_reset + echo + + echo "Installing Gnome packages..." +fi + +if [[ "$SELECTED_DE" == "none" ]]; then + echo + tput_green + echo "################################################################################" + echo "################### Installing no Desktop Environment" + echo "################################################################################" + tput_reset + echo + + echo "Installing no Desktop Environment packages..." +fi + + +if [[ "$SELECTED_TWM" == "chadwm" ]]; then + echo + tput_green + echo "################################################################################" + echo "################### Installing Chadwm" + echo "################################################################################" + tput_reset + echo + + echo "Installing CHADWM..." +fi + +if [[ "$SELECTED_TWM" == "hyprland" ]]; then + echo + tput_green + echo "################################################################################" + echo "################### Installing Hyprland" + echo "################################################################################" + tput_reset + echo + + echo "Installing Hyperland..." +fi + +if [[ "$SELECTED_TWM" == "none" ]]; then + echo + tput_green + echo "################################################################################" + echo "################### Installing no Tiling Window Manager" + echo "################################################################################" + tput_reset + echo + + echo "Installing no Tiling Window Manager packages..." +fi