diff --git a/.gitignore b/.gitignore index 3a67ed7..91c10b9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,10 @@ +# SPDX-FileCopyrightText: 2023 Qusal contributors +# +# SPDX-License-Identifier: CC0-1.0 + qusal/qubesos-github-io qusal/sys-audio qusal/sys-wireguard +qusal/sys-syncthing +qusal/sys-rsync +qusal/sys-ssh diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 89e3da9..8a4ddfc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,9 +1,18 @@ +# SPDX-FileCopyrightText: 2023 Qusal contributors +# +# SPDX-License-Identifier: GPL-3.0-or-later + --- repos: -- repo: local - hooks: - - id: salt-lint - name: salt-lint - entry: scripts/salt-lint.sh - language: script - pass_filenames: false + - repo: local + hooks: + - id: salt-lint + name: salt-lint + entry: scripts/salt-lint.sh + language: script + pass_filenames: false + - id: shellcheck + name: shellcheck + entry: scripts/shell-lint.sh + language: script + pass_filenames: false diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml new file mode 100644 index 0000000..ab4dd47 --- /dev/null +++ b/.pre-commit-hooks.yaml @@ -0,0 +1,12 @@ +# SPDX-FileCopyrightText: 2020 Liferay, Inc. +# +# SPDX-License-Identifier: GPL-3.0-or-later + +--- +- id: reuse + name: reuse + entry: reuse + args: ["lint"] + language: python + pass_filenames: false + description: "Lint the project for compliance with the REUSE Specification" diff --git a/.reuse/dep5 b/.reuse/dep5 index 4d62fa0..0e67b67 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -3,20 +3,12 @@ Upstream-Name: qusal Upstream-Contact: Benjamin Grande Miranda de Sousa Source: https://github.com/ben-grande/qusal -Files: * -Copyright: 2023 Qusal contributors -License: GPL-3.0-or-later - -Files: .gitignore .pre-commit-config.yaml .salt-lint README.md minion.d/qusal.conf -Copyright: 2023 Qusal contributors -License: GPL-3.0-or-later - Files: */README.md Copyright: 2023 Qusal contributors -License: GPL-3.0-or-later +License: CC-BY-SA-4.0 Files: qusal/ansible/files/repo/* -Copyright: 2014 Launchpad PPA for Ansible, Inc. +Copyright: 2014 Ansible, Inc. License: CC0-1.0 Files: qusal/browser/files/repo/* diff --git a/.salt-lint b/.salt-lint index b1fdea3..a340f27 100644 --- a/.salt-lint +++ b/.salt-lint @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2023 Qusal contributors +# +# SPDX-License-Identifier: GPL-3.0-or-later + --- skip_list: - 205 # use '.sls' as a Salt State file extension diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..e64a88d --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,75 @@ + + +# Contributing to Qusal + +## Table of Contents + +* [Format](#format) + * [File naming](#file-naming) + * [Readme](#readme) + * [Qube naming](#qube-naming) + * [Qrexec](#qrexec) + +## Format + +### File naming + +1. Every State file `.sls` must have a Top file `.top`. This ensures that + every state can be applied with top. +2. Every project must have a `init.top`, it facilitates applying every state + by enabling a single top file. +3. State file naming should be common between the projects, it helps + understand the project as if it was any other. +5. Files names and state IDs should use `-` as separator, not `_`. + +### Readme + +1. Every project should have a README.md with at least the following sections: + Table of Contents, Description, Installation, Access Control (if changed + Qrexec policy), Usage. + +### Qube naming + +1. Qube name format: + + - TemplateVM: `tpl-NAME` + - StandaloneVM: `NAME` + - AppVM: `NAME` + - DispVM: `disp-NAME` + - DispVM Template (AppVM): `dvm-NAME` + - Service qubes (not a class): `sys-NAME` + +2. Label/Color: + + - *Black* (Ultimately trusted): You must trust Dom0, Templates, Vaults, + Management qubes, these qubes control your system and hold valuable + information. Examples: dom0, tpl-ssh, vault, default-mgmt-dvm. + - *Gray* (Fully trusted): Trusted storage with extra RPC services that allow + certain operations to be made by the client and executed on the server or + may build components for other qubes. Examples: sys-cacher, sys-git, + sys-pgp, sys-ssh-agent, qubes-builder. + - *Purple* (Much trust): Has the ability to manager remote servers via + encrypted connections and depend on authorization provided by another qube. + Examples: ansible, dev, ssh, terraform. + - *Blue* (Very trusted): TODO + - *Green* (Trusted): TODO + - *Yellow* (Relatively trusted): TODO + - *Orange* (Slightly trusted): Controls the network flow of data to the + client, normally a firewall. Examples: sys-firewall, sys-vpn, sys-pihole. + - *Red* (Untrusted): Holds untrusted data (PCI devices, untrusted programs, + disposables for opening untrusted files or web pages). Examples: sys-net, + sys-usb, dvm-browser. + +### Qrexec + +1. Don't use `*` for source and destination, use `@anyvm` instead +2. Target qube for policies must be `@default`. It allows for the real target + to be set by Dom0 via the `target=` redirection parameter, instead of + having to modify the client to target a different server via + `qrexec-client-vm`. +3. Target qube for client script must default to `@default`, but other targets + must be allowed via parameters. diff --git a/LICENSES/CC-BY-SA-3.0.txt b/LICENSES/CC-BY-SA-3.0.txt new file mode 100644 index 0000000..39a8591 --- /dev/null +++ b/LICENSES/CC-BY-SA-3.0.txt @@ -0,0 +1,99 @@ +Creative Commons Attribution-ShareAlike 3.0 Unported + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. + +License + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. + +1. Definitions + + a. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License. + + b. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined below) for the purposes of this License. + + c. "Creative Commons Compatible License" means a license that is listed at http://creativecommons.org/compatiblelicenses that has been approved by Creative Commons as being essentially equivalent to this License, including, at a minimum, because that license: (i) contains terms that have the same purpose, meaning and effect as the License Elements of this License; and, (ii) explicitly permits the relicensing of adaptations of works made available under that license under this License or a Creative Commons jurisdiction license with the same License Elements as this License. + + d. "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership. + + e. "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike. + + f. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License. + + g. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast. + + h. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work. + + i. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. + + j. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. + + k. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium. + +2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: + + a. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; + + b. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified."; + + c. to Distribute and Publicly Perform the Work including as incorporated in Collections; and, + + d. to Distribute and Publicly Perform Adaptations. + + e. For the avoidance of doubt: + + i. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; + + ii. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and, + + iii. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License. + +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved. + +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: + + a. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(c), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(c), as requested. + + b. You may Distribute or Publicly Perform an Adaptation only under the terms of: (i) this License; (ii) a later version of this License with the same License Elements as this License; (iii) a Creative Commons jurisdiction license (either this or a later license version) that contains the same License Elements as this License (e.g., Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible License. If you license the Adaptation under one of the licenses mentioned in (iv), you must comply with the terms of that license. If you license the Adaptation under the terms of any of the licenses mentioned in (i), (ii) or (iii) (the "Applicable License"), you must comply with the terms of the Applicable License generally and the following provisions: (I) You must include a copy of, or the URI for, the Applicable License with every copy of each Adaptation You Distribute or Publicly Perform; (II) You may not offer or impose any terms on the Adaptation that restrict the terms of the Applicable License or the ability of the recipient of the Adaptation to exercise the rights granted to that recipient under the terms of the Applicable License; (III) You must keep intact all notices that refer to the Applicable License and to the disclaimer of warranties with every copy of the Work as included in the Adaptation You Distribute or Publicly Perform; (IV) when You Distribute or Publicly Perform the Adaptation, You may not impose any effective technological measures on the Adaptation that restrict the ability of a recipient of the Adaptation from You to exercise the rights granted to that recipient under the terms of the Applicable License. This Section 4(b) applies to the Adaptation as incorporated in a Collection, but this does not require the Collection apart from the Adaptation itself to be made subject to the terms of the Applicable License. + + c. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with Ssection 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4(c) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties. + + d. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise. + +5. Representations, Warranties and Disclaimer + +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination + + a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. + + b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. + +8. Miscellaneous + + a. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. + + b. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. + + c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + + d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. + + e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. + + f. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law. + +Creative Commons Notice + +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. + +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, Creative Commons does not authorize the use by either party of the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. For the avoidance of doubt, this trademark restriction does not form part of the License. + +Creative Commons may be contacted at http://creativecommons.org/. diff --git a/LICENSES/CC-BY-SA-4.0.txt b/LICENSES/CC-BY-SA-4.0.txt new file mode 100644 index 0000000..835a683 --- /dev/null +++ b/LICENSES/CC-BY-SA-4.0.txt @@ -0,0 +1,170 @@ +Creative Commons Attribution-ShareAlike 4.0 International + + Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. + +Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. More considerations for licensors. + +Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. + +Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public. + +Creative Commons Attribution-ShareAlike 4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. + +Section 1 – Definitions. + + a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. + + c. BY-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License. + + d. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. + + e. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. + + f. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. + + g. License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike. + + h. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. + + i. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. + + j. Licensor means the individual(s) or entity(ies) granting rights under this Public License. + + k. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. + + l. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. + + m. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. + +Section 2 – Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: + + A. reproduce and Share the Licensed Material, in whole or in part; and + + B. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. + + 3. Term. The term of this Public License is specified in Section 6(a). + + 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. + + 5. Downstream recipients. + + A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. + + B. Additional offer from the Licensor – Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply. + + C. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. + + 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this Public License. + + 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. + +Section 3 – License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified form), You must: + + A. retain the following if it is supplied by the Licensor with the Licensed Material: + + i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of warranties; + + v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; + + B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and + + C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. + + 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. + + b. ShareAlike.In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply. + + 1. The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License. + + 2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material. + + 3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply. + +Section 4 – Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; + + b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and + + c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. +For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. + +Section 5 – Disclaimer of Warranties and Limitation of Liability. + + a. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You. + + b. To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You. + + c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. + +Section 6 – Term and Termination. + + a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or + + 2. upon express reinstatement by the Licensor. + + c. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. + + d. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. + + e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. + +Section 7 – Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. + +Section 8 – Interpretation. + + a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. + + c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. + + d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. + +Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. + +Creative Commons may be contacted at creativecommons.org. diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt new file mode 100644 index 0000000..2071b23 --- /dev/null +++ b/LICENSES/MIT.txt @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 496c2a7..473a898 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,29 @@ + + # qusal ## Table of Contents * [Description](#description) * [Installation](#installation) + * [Requirements](#requirements) * [DomU](#domu) * [Dom0](#dom0) * [Usage](#usage) -* [Format](#format) - * [File naming](#file-naming) - * [Readme](#readme) - * [Qube naming](#qube-naming) - * [Qrexec](#qrexec) * [Legal](#legal) - * [Copyright](#copyright) - * [License](#license) ## Description Qusal - Salt Formulas for Qubes OS. Qusal providers a Free and Open Source solution to customizing various tasks -in Qubes OS, from switching PCI handlers to be disposables or app qubes to -installing different pieces of software on dedicated minimal templates. +in Qubes OS, from switching PCI handlers to be disposables or app qubes, +installing different pieces of software on dedicated minimal templates for +split agent operations for separating the key store from the client. Each project is in a separate directory, but they may interact with other projects. @@ -66,7 +67,7 @@ qvm-run -p dev tar -cC /home/user qusal | tar -xvC ~/QubesIncoming/dev qusal Copy the files to the Salt directories: ```sh cd qusal -./setup.sh +./scripts/setup.sh ``` The RPM Spec is not ready, don't try it unless for development. @@ -79,72 +80,33 @@ information on how to install the desired package. Qubes global settings (qubes-prefs) that will be managed: - **clockvm**: disp-sys-net, sys-net -- **default_audiovm**: dom0 # TODO - **default_dispvm**: reader -- **default_guivm**: dom0 # TODO - **default_netvm**: sys-pihole, sys-firewall or disp-sys-firewall - **management_dispvm**: dvm-mgmt - **updatevm**: sys-pihole, sys-firewall or disp-sys-firewall -## Format +To be implemented: +- **default_audiovm**: sys-audio +- **default_guivm**: sys-gui -### File naming +## Legal -1. Every State file `.sls` must have a Top file `.top`. This ensures that - every state can be applied with top. -2. Every project must have a `init.top`, it facilitates applying every state - by enabling a single top file. -3. State file naming should be common between the projects, it helps - understand the project as if it was any other. -5. Files names and state IDs should use `-` as separator, not `_`. +This project is [REUSE-compliant](https://reuse.software). It is difficult to +list all licenses and copyrights and keep them up-to-date here. -### Readme +The easiest way to get the copyright and license of the project with the reuse +tool: +```sh +reuse spdx +``` -1. Every project should have a README.md with at least the following sections: - Table of Contents, Description, Installation, Access Control (if changed - Qrexec policy), Usage. +You can also check these information manually by checking in the file header, +a companion `.license` or in `.reuse/dep5`. -### Qube naming +Here is a brief summary as of October 2023: -1. Qube name format: - - - TemplateVM: `tpl-NAME` - - StandaloneVM: `NAME` - - AppVM: `NAME` - - DispVM: `disp-NAME` - - DispVM Template (AppVM): `dvm-NAME` - - Service qubes (not a class): `sys-NAME` - -2. Label: - - - Black (Ultimately trusted): You must trust Dom0, Templates, Vaults, - Management qubes, these qubes control your system and hold valuable - information. Examples: dom0, tpl-ssh, vault, default-mgmt-dvm. - - Gray (Fully trusted): Trusted storage with extra RPC services that allow - certain operations to be made by the client and executed on the server. - Examples: sys-cacher, sys-git, sys-pgp, sys-ssh-agent. - - Purple, Blue, Green, Yellow (Relatively trusted per domain): Can be set - per user discretion, normally separated per domain (work, clients, - personal). - - Orange (Slightly trusted) Controls the flow of data to the client, - normally a firewall. Examples: sys-firewall, sys-vpn, sys-pihole. - - Red (Untrusted): Holds untrusted data (PCI devices, untrusted programs, - disposables for opening untrusted files or web pages). Examples: sys-net, - sys-usb, disp-sys-usb, disp-browser. - -### Qrexec - -1. Don't use `*` for source and destination, use `@anyvm` instead -2. Target qube for policies must be `@default`. It allows for the real target - to be set by Dom0 via the `target=` redirection parameter, instead of - having to modify the client to target a different server via - `qrexec-client-vm`. -3. Target qube for client script must default to `@default`, but other targets - must be allowed via parameters. - -## License - -All original source code is licensed under GPL-3.0-or-later. - -For more accurate information, check the individual files for license and -copyright ownership. +- All original source code is licensed under GPL-3.0-or-later. +- All documentation is licensed under CC-BY-SA-4.0. +- Some configuration and data files are licensed under CC0-1.0. +- Some borrowed code (`qusal/dotfiles/`) is licenses under BSD-2-Clause, + CC-BY-SA-4.0, GPL-2.0-only, GPL-3.0-only, MIT, Vim. diff --git a/copyright.txt b/copyright.txt deleted file mode 100644 index e16858a..0000000 --- a/copyright.txt +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2023 Qusal contributors - -SPDX-License-Identifier: GPL-3.0-or-later diff --git a/minion.d/qusal.conf b/minion.d/qusal.conf index 393d5fd..0485936 100644 --- a/minion.d/qusal.conf +++ b/minion.d/qusal.conf @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2023 Qusal contributors +# +# SPDX-License-Identifier: CC0-1.0 + --- file_roots: base: diff --git a/qusal/ansible/create.sls b/qusal/ansible/create.sls index fed725f..9f9b49f 100644 --- a/qusal/ansible/create.sls +++ b/qusal/ansible/create.sls @@ -7,66 +7,71 @@ SPDX-License-Identifier: GPL-3.0-or-later include: - .clone -"tpl-{{ slsdotpath }}": - qvm.vm: - - require: - - sls: {{ slsdotpath }}.clone - - name: tpl-{{ slsdotpath }} - - prefs: - - memory: 300 - - maxmem: 400 - - features: - - set: - - default-menu-items: "qubes-run-terminal.desktop qubes-start.desktop" - - menu-items: "qubes-run-terminal.desktop qubes-start.desktop" +{% load_yaml as defaults -%} +name: tpl-{{ slsdotpath }} +force: True +require: +- sls: {{ slsdotpath }}.clone +prefs: +- memory: 300 +- maxmem: 400 +features: +- set: + - default-menu-items: "qubes-run-terminal.desktop qubes-start.desktop" + - menu-items: "qubes-run-terminal.desktop qubes-start.desktop" +{%- endload %} +{{ load(defaults) }} -"{{ slsdotpath }}": - qvm.vm: - - name: {{ slsdotpath }} - - require: - - sls: {{ slsdotpath }}.clone - - present: - - template: tpl-{{ slsdotpath }} - - label: blue - - prefs: - - template: tpl-{{ slsdotpath }} - - label: blue - - netvm: "" - - vpus: 1 - - memory: 400 - - maxmem: 500 - - autostart: False - - include_in_backups: True - - features: - - set: - - menu-items: "qubes-run-terminal.desktop qubes-start.desktop" - - disable: - - service.cups - - service.cups-browsed +name: {{ slsdotpath }} +force: True +require: +- sls: {{ slsdotpath }}.clone +present: +- template: tpl-{{ slsdotpath }} +- label: purple +prefs: +- template: tpl-{{ slsdotpath }} +- label: purple +- netvm: "" +- vpus: 1 +- memory: 400 +- maxmem: 500 +- autostart: False +- include_in_backups: True +features: +- set: + - menu-items: "qubes-run-terminal.desktop qubes-start.desktop" +- disable: + - service.cups + - service.cups-browsed +{%- endload %} +{{ load(defaults) }} -"{{ slsdotpath }}-minion": - qvm.vm: - - name: {{ slsdotpath }}-minion - - require: - - sls: {{ slsdotpath }}.clone - - present: - - template: tpl-{{ slsdotpath }} - - label: blue - - prefs: - - template: tpl-{{ slsdotpath }} - - label: blue - - netvm: "" - - vpus: 1 - - memory: 400 - - maxmem: 500 - - autostart: False - - include_in_backups: True - - features: - - set: - - menu-items: "qubes-run-terminal.desktop qubes-start.desktop" - - disable: - - service.cups - - service.cups-browsed +{% load_yaml as defaults -%} +name: {{ slsdotpath }}-minion +force: True +require: +- sls: {{ slsdotpath }}.clone +present: +- template: tpl-{{ slsdotpath }} +- label: purple +prefs: +- template: tpl-{{ slsdotpath }} +- label: purple +- netvm: "" +- vpus: 1 +- memory: 400 +- maxmem: 500 +- autostart: False +- include_in_backups: True +features: +- set: + - menu-items: "qubes-run-terminal.desktop qubes-start.desktop" +- disable: + - service.cups + - service.cups-browsed +{%- endload %} +{{ load(defaults) }} {% from 'utils/macros/policy.sls' import policy_set with context -%} {{ policy_set(sls_path, '80') }} diff --git a/qusal/ansible/install.sls b/qusal/ansible/install.sls index 7ec6da0..ec27c6f 100644 --- a/qusal/ansible/install.sls +++ b/qusal/ansible/install.sls @@ -8,6 +8,7 @@ SPDX-License-Identifier: GPL-3.0-or-later include: - utils.tools.zsh + - ssh.install "{{ slsdotpath }}-updated": pkg.uptodate: @@ -20,18 +21,6 @@ include: - skip_suggestions: True - pkgs: - ansible - {% if grains['os_family']|lower == 'debian' -%} - - openssh-client - - vim-nox - - python3-selinux - {% elif grains['os_family']|lower == 'redhat' -%} - - openssh-clients - - vim-enhanced - - vim-ansible - {% else -%} - - openssh-client - - vim - {% endif -%} - python3-argcomplete - python3-jmespath - openssh-server @@ -39,6 +28,22 @@ include: - bash-completion - man-db +{% set pkg = { + 'Debian': { + 'pkg': ['vim-nox', 'python3-selinux'], + }, + 'RedHat': { + 'pkg': ['vim-enhanced', 'vim-ansible'], + }, +}.get(grains.os_family) -%} + +"{{ slsdotpath }}-installed-os-specific": + pkg.installed: + - refresh: True + - install_recommends: False + - skip_suggestions: True + - pkgs: {{ pkg.pkg|sequence|yaml }} + "{{ slsdotpath }}-ssh-config": file.managed: - name: /etc/ssh/ssh_config.d/99-ssh-ansible.conf diff --git a/qusal/browser/create.sls b/qusal/browser/create.sls index 548af2a..03bb51b 100644 --- a/qusal/browser/create.sls +++ b/qusal/browser/create.sls @@ -7,35 +7,40 @@ SPDX-License-Identifier: GPL-3.0-or-later include: - .clone -"tpl-{{ slsdotpath }}": - qvm.vm: - - require: - - sls: {{ slsdotpath }}.clone - - name: tpl-{{ slsdotpath }} - - prefs: - - memory: 300 - - maxmem: 2000 - - features: - - set: - - default-menu-items: "firefox-esr.desktop chromium.desktop google-chrome.desktop qubes-run-terminal.desktop qubes-start.desktop" - - menu-items: "firefox-esr.desktop chromium.desktop google-chrome.desktop qubes-run-terminal.desktop qubes-start.desktop" +{% load_yaml as defaults -%} +name: tpl-{{ slsdotpath }} +force: True +require: +- sls: {{ slsdotpath }}.clone +prefs: +- memory: 300 +- maxmem: 2000 +features: +- set: + - default-menu-items: "firefox-esr.desktop chromium.desktop google-chrome.desktop qubes-run-terminal.desktop qubes-start.desktop" + - menu-items: "firefox-esr.desktop chromium.desktop google-chrome.desktop qubes-run-terminal.desktop qubes-start.desktop" +{%- endload %} +{{ load(defaults) }} -"dvm-{{ slsdotpath }}": - qvm.vm: - - require: - - qvm: tpl-{{ slsdotpath }} - - name: dvm-{{ slsdotpath }} - - present: - - template: tpl-{{ slsdotpath }} - - label: red - - prefs: - - memory: 300 - - maxmem: 2000 - - vcpus: 1 - - template_for_dispvms: True - - include_in_backups: False - - features: - - enable: - - appmenus-dispvm - - set: - - menu-items: "firefox-esr.desktop chromium.desktop google-chrome.desktop qubes-run-terminal.desktop qubes-start.desktop" +{% load_yaml as defaults -%} +name: dvm-{{ slsdotpath }} +force: True +require: +- qvm: tpl-{{ slsdotpath }} +present: +- template: tpl-{{ slsdotpath }} +- label: red +prefs: +- label: red +- memory: 300 +- maxmem: 2000 +- vcpus: 1 +- template_for_dispvms: True +- include_in_backups: False +features: +- enable: + - appmenus-dispvm +- set: + - menu-items: "firefox-esr.desktop chromium.desktop google-chrome.desktop qubes-run-terminal.desktop qubes-start.desktop" +{%- endload %} +{{ load(defaults) }} diff --git a/qusal/debian-minimal/create.sls b/qusal/debian-minimal/create.sls index f889d49..555ec8b 100644 --- a/qusal/debian-minimal/create.sls +++ b/qusal/debian-minimal/create.sls @@ -9,24 +9,6 @@ SPDX-License-Identifier: GPL-3.0-or-later include: - .clone -"{{ template.template_clean }}": - qvm.vm: - - name: {{ template.template_clean }} - - require: - - sls: {{ template.template_clean }}.clone - - present: - - label: black - - prefs: - - label: black - - memory: 300 - - maxmem: 600 - - vcpus: 1 - - include_in_backups: False - - features: - - set: - - menu-items: "qubes-open-file-manager.desktop qubes-run-terminal.desktop qubes-start.desktop" - - default-menu-items: "qubes-open-file-manager.desktop qubes-run-terminal.desktop qubes-start.desktop" - "dvm-{{ template.template }}-absent": qvm.absent: - names: @@ -34,27 +16,49 @@ include: - {{ template.template_clean }}-dvm - {{ template.template }}-dvm -"dvm-{{ template.template_clean }}": - qvm.vm: - - name: dvm-{{ template.template_clean }} - - require: - - sls: {{ template.template_clean }}.clone - - present: - - template: {{ template.template }} - - label: red - - prefs: - - template: {{ template.template }} - - label: red - - memory: 300 - - maxmem: 400 - - vcpus: 1 - - template_for_dispvms: True - - include_in_backups: False - - features: - - enable: - - appmenus-dispvm - - set: - - menu-items: "qubes-open-file-manager.desktop qubes-run-terminal.desktop qubes-start.desktop" +{% load_yaml as defaults -%} +name: dvm-{{ template.template_clean }} +force: True +require: +- sls: {{ template.template_clean }}.clone +present: +- template: {{ template.template }} +- label: red +prefs: +- template: {{ template.template }} +- label: red +- memory: 300 +- maxmem: 400 +- vcpus: 1 +- template_for_dispvms: True +- include_in_backups: False +features: +- enable: + - appmenus-dispvm +- set: + - menu-items: "qubes-open-file-manager.desktop qubes-run-terminal.desktop qubes-start.desktop" +{%- endload %} +{{ load(defaults) }} + +{% load_yaml as defaults -%} +name: {{ template.template_clean }} +force: True +require: +- sls: {{ template.template_clean }}.clone +present: +- label: black +prefs: +- label: black +- memory: 300 +- maxmem: 600 +- vcpus: 1 +- include_in_backups: False +features: +- set: + - menu-items: "qubes-open-file-manager.desktop qubes-run-terminal.desktop qubes-start.desktop" + - default-menu-items: "qubes-open-file-manager.desktop qubes-run-terminal.desktop qubes-start.desktop" +{%- endload %} +{{ load(defaults) }} "{{ slsdotpath }}-set-default_template": cmd.run: diff --git a/qusal/debian/create.sls b/qusal/debian/create.sls index 0b7f3a4..41ba109 100644 --- a/qusal/debian/create.sls +++ b/qusal/debian/create.sls @@ -9,24 +9,6 @@ SPDX-License-Identifier: GPL-3.0-or-later include: - .clone -"{{ template.template_clean }}": - qvm.vm: - - name: {{ template.template_clean }} - - require: - - sls: {{ slsdotpath }}.clone - - present: - - label: black - - prefs: - - label: black - - memory: 300 - - maxmem: 600 - - vcpus: 1 - - include_in_backups: False - - features: - - set: - - menu-items: "qubes-open-file-manager.desktop qubes-run-terminal.desktop qubes-start.desktop" - - default-menu-items: "qubes-open-file-manager.desktop qubes-run-terminal.desktop qubes-start.desktop" - "dvm-{{ template.template }}-absent": qvm.absent: - names: @@ -34,24 +16,46 @@ include: - {{ template.template_clean }}-dvm - {{ template.template }}-dvm -"dvm-{{ template.template_clean }}": - qvm.vm: - - name: dvm-{{ template.template_clean }} - - require: - - sls: {{ slsdotpath }}.clone - - present: - - template: {{ template.template }} - - label: red - - prefs: - - template: {{ template.template }} - - label: red - - memory: 300 - - maxmem: 800 - - vcpus: 1 - - template_for_dispvms: True - - include_in_backups: False - - features: - - enable: - - appmenus-dispvm - - set: - - menu-items: "qubes-open-file-manager.desktop qubes-run-terminal.desktop qubes-start.desktop" +{% load_yaml as defaults -%} +name: dvm-{{ template.template_clean }} +force: True +require: +- sls: {{ slsdotpath }}.clone +present: +- template: {{ template.template }} +- label: red +prefs: +- template: {{ template.template }} +- label: red +- memory: 300 +- maxmem: 800 +- vcpus: 1 +- template_for_dispvms: True +- include_in_backups: False +features: +- enable: + - appmenus-dispvm +- set: + - menu-items: "qubes-open-file-manager.desktop qubes-run-terminal.desktop qubes-start.desktop" +{%- endload %} +{{ load(defaults) }} + +{% load_yaml as defaults -%} +name: {{ template.template_clean }} +force: True +require: +- sls: {{ slsdotpath }}.clone +present: +- label: black +prefs: +- label: black +- memory: 300 +- maxmem: 600 +- vcpus: 1 +- include_in_backups: False +features: +- set: + - menu-items: "qubes-open-file-manager.desktop qubes-run-terminal.desktop qubes-start.desktop" + - default-menu-items: "qubes-open-file-manager.desktop qubes-run-terminal.desktop qubes-start.desktop" +{%- endload %} +{{ load(defaults) }} diff --git a/qusal/dev/create.sls b/qusal/dev/create.sls index 4ec5635..3d91734 100644 --- a/qusal/dev/create.sls +++ b/qusal/dev/create.sls @@ -7,75 +7,83 @@ SPDX-License-Identifier: GPL-3.0-or-later include: - .clone -"{{ slsdotpath }}": - qvm.vm: - - name: {{ slsdotpath }} - - require: - - sls: {{ slsdotpath }}.clone - - present: - - template: tpl-{{ slsdotpath }} - - label: blue - - prefs: - - template: tpl-{{ slsdotpath }} - - label: blue - - netvm: "" - - vpus: 1 - - memory: 400 - - maxmem: 600 - - autostart: False - - include_in_backups: True - - features: - - enable: - - service.split-gpg2-client - - service.crond - - disable: - - service.cups - - service.cups-browsed +{%- from "qvm/template.jinja" import load -%} -"dvm-{{ slsdotpath }}": - qvm.vm: - - name: dvm-{{ slsdotpath }} - - require: - - sls: {{ slsdotpath }}.clone - - present: - - template: tpl-{{ slsdotpath }} - - label: red - - prefs: - - template: tpl-{{ slsdotpath }} - - label: red - - netvm: "" - - vpus: 1 - - memory: 400 - - maxmem: 600 - - autostart: False - - template_for_dispvms: True - - include_in_backups: False - - features: - - enable: - - appmenus-dispvm - - disable: - - service.cups - - service.cups-browsed +{% load_yaml as defaults -%} +name: {{ slsdotpath }} +force: True +require: +- sls: {{ slsdotpath }}.clone +present: +- template: tpl-{{ slsdotpath }} +- label: purple +prefs: +- template: tpl-{{ slsdotpath }} +- label: purple +- netvm: "" +- vpus: 1 +- memory: 400 +- maxmem: 600 +- autostart: False +- include_in_backups: True +features: +- enable: + - service.split-gpg2-client + - service.crond +- disable: + - service.cups + - service.cups-browsed +{%- endload %} +{{ load(defaults) }} -"disp-{{ slsdotpath }}": - qvm.vm: - - name: disp-{{ slsdotpath }} - - require: - - qvm: dvm-{{ slsdotpath }} - - present: - - template: dvm-{{ slsdotpath }} - - label: red - - class: DispVM - - prefs: - - template: dvm-{{ slsdotpath }} - - label: red - - vpus: 1 - - memory: 400 - - maxmem: 600 - - autostart: False - - include_in_backups: False - - features: - - disable: - - appmenus-dispvm - - service.cups - - service.cups-browsed +{% load_yaml as defaults -%} +name: dvm-{{ slsdotpath }} +force: True +require: +- sls: {{ slsdotpath }}.clone +present: +- template: tpl-{{ slsdotpath }} +- label: red +prefs: +- template: tpl-{{ slsdotpath }} +- label: red +- netvm: "" +- vpus: 1 +- memory: 400 +- maxmem: 600 +- autostart: False +- template_for_dispvms: True +- include_in_backups: False +features: +- enable: + - appmenus-dispvm +- disable: + - service.cups + - service.cups-browsed +{%- endload %} +{{ load(defaults) }} + +{% load_yaml as defaults -%} +name: disp-{{ slsdotpath }} +force: True +require: +- qvm: dvm-{{ slsdotpath }} +present: +- template: dvm-{{ slsdotpath }} +- label: red +- class: DispVM +prefs: +- template: dvm-{{ slsdotpath }} +- label: red +- vpus: 1 +- memory: 400 +- maxmem: 600 +- autostart: False +- include_in_backups: False +features: +- disable: + - appmenus-dispvm + - service.cups + - service.cups-browsed +{%- endload %} +{{ load(defaults) }} diff --git a/qusal/dev/install-salt-tools.sls b/qusal/dev/install-salt-tools.sls index 457b452..5e5a56d 100644 --- a/qusal/dev/install-salt-tools.sls +++ b/qusal/dev/install-salt-tools.sls @@ -19,14 +19,30 @@ SPDX-License-Identifier: GPL-3.0-or-later - python3-pip - yamllint - ansible-lint - {% if grains['os_family']|lower == 'redhat' -%} - - salt-lint - {% endif -%} -# {% if grains['os_family']|lower != 'redhat' -%} -# pip-installed-salt-tools: -# cmd.run: -# - name: python3 -m pip install salt-lint -# {% endif -%} +{% set pkg = { + 'Debian': { + 'pkg': [], + }, + 'RedHat': { + 'pkg': ['salt-lint'], + }, +}.get(grains.os_family) -%} + +"{{ slsdotpath }}-installed-salt-tools-os-specific": + pkg.installed: + - refresh: True + - install_recommends: False + - skip_suggestions: True + - pkgs: {{ pkg.pkg|sequence|yaml }} + +# Fails because of cacher +{# +{% if grains['os_family']|lower != 'redhat' -%} +pip-installed-salt-tools: + cmd.run: + - name: python3 -m pip install --break-system-packages salt-lint +{% endif -%} +#} {% endif %} diff --git a/qusal/dev/install.sls b/qusal/dev/install.sls index c8a431b..18836fd 100644 --- a/qusal/dev/install.sls +++ b/qusal/dev/install.sls @@ -38,23 +38,26 @@ include: - texinfo - file - tree + - reuse - pre-commit - gitlint - ripgrep - fzf - {% if grains['os_family']|lower == 'debian' -%} - - shellcheck - - vim-nox - - fd-find - {% elif grains['os_family']|lower == 'redhat' -%} - - passwd - - fd-find - - ShellCheck - - vim-enhanced - {% else -%} - - fd - - shellcheck - - vim - {% endif -%} + +{% set pkg = { + 'Debian': { + 'pkg': ['shellcheck', 'vim-nox', 'fd-find'], + }, + 'RedHat': { + 'pkg': ['passwd', 'fd-find', 'ShellCheck', 'vim-enhanced'], + }, +}.get(grains.os_family) -%} + +"{{ slsdotpath }}-installed-os-specific": + pkg.installed: + - refresh: True + - install_recommends: False + - skip_suggestions: True + - pkgs: {{ pkg.pkg|sequence|yaml }} {% endif -%} diff --git a/qusal/docker/install.sls b/qusal/docker/install.sls index e4fca2f..d92bd4a 100644 --- a/qusal/docker/install.sls +++ b/qusal/docker/install.sls @@ -13,29 +13,24 @@ SPDX-License-Identifier: GPL-3.0-or-later pkg.uptodate: - refresh: True +{% set pkg = { + 'Debian': { + 'pkg_removed': ['docker.io', 'docker-doc', 'docker-compose', + 'podman-docker', 'containerd', 'runc'], + }, + 'RedHat': { + 'pkg_removed': ['docker', 'docker-client', 'docker-client-latest', + 'docker-common', 'docker-latest', + 'docker-latest-logrotate', 'docker-logrotate', + 'docker-selinux', 'docker-engine-selinux', + 'docker-engine'], + }, +}.get(grains.os_family) -%} + {# -"{{ slsdotpath }}-removed": +"{{ slsdotpath }}-removed-os-specific": pkg.removed: - - pkgs: - {% if grains['os_family']|lower == 'debian' -%} - - docker.io - - docker-doc - - docker-compose - - podman-docker - - containerd - - runc - {% elif grains['os_family']|lower == 'redhat' -%} - - docker - - docker-client - - docker-client-latest - - docker-common - - docker-latest - - docker-latest-logrotate - - docker-logrotate - - docker-selinux - - docker-engine-selinux - - docker-engine - {% endif -%} + - pkgs: {{ pkg.pkg_removed|sequence|yaml }} #} "{{ slsdotpath }}-installed": diff --git a/qusal/dom0/files/autostart-scripts/kde-activity-changed-notifier b/qusal/dom0/files/autostart-scripts/kde-activity-changed-notifier index 9c91d81..76c0469 100755 --- a/qusal/dom0/files/autostart-scripts/kde-activity-changed-notifier +++ b/qusal/dom0/files/autostart-scripts/kde-activity-changed-notifier @@ -1,9 +1,12 @@ #!/bin/sh +# SPDX-FileCopyrightText: 2018 Oded Arbel # SPDX-FileCopyrightText: 2023 Qusal contributors # # SPDX-License-Identifier: GPL-3.0-or-later +## Credits: https://geek.co.il/2018/07/30/script-day-different-default-browser-per-kde-activity + set -eu if ! command -v notify-send >/dev/null && @@ -17,7 +20,6 @@ case "${XDG_SESSION_DESKTOP:-}" in *) exit 1;; esac -## https://geek.co.il/2018/07/30/script-day-different-default-browser-per-kde-activity service="org.kde.ActivityManager" interface="$service.Activities" path="/ActivityManager/Activities" diff --git a/qusal/dom0/files/bin/kde-write-rules b/qusal/dom0/files/bin/kde-write-rules deleted file mode 100755 index 5e2960f..0000000 --- a/qusal/dom0/files/bin/kde-write-rules +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh - -# SPDX-FileCopyrightText: 2023 Qusal contributors -# -# SPDX-License-Identifier: GPL-3.0-or-later - -# shellcheck disable=SC1090,SC2317 -## Wrapper around kwriteconfig to write key=values to specific groups. -## TODO: finish -set -eu -echo "Unfinished work" >&2 -exit 2 - -# shellcheck disable=SC1091 -test -r "$HOME/.profile" && . "$HOME/.profile" -: "${XDG_CONFIG_HOME:=$HOME/.config}" -file="$XDG_CONFIG_HOME/kwinrulesrc" - -writeconf(){ - group="$1" - key="$2" - value="$3" - - kwriteconfig \ - --file "$file" \ - --group "rules-$group" \ - --key "$key" "$value" -} - -writeconf_group(){ - chosen_group="$1" - chosen_activity="$2" - writeconf "$chosen_group" Description "$chosen_group" - if test -n "$chosen_activity"; then - chosen_activity_id="$(kactivities-cli --list-activities | - cut -d " " -f 2,3 | grep -F " $chosen_activity" | cut -d " " -f 1)" - if test -z "$chosen_activity_id"; then - printf '%s\n' "Invalid activity name: $chosen_activity" - exit 1 - fi - writeconf "$chosen_group" activity "$chosen_activity_id" - writeconf "$chosen_group" activityrule 2 - fi - writeconf "$chosen_group" title "^\\[$chosen_group\\] .*" - writeconf "$chosen_group" titlematch 3 - writeconf "$chosen_group" wmclass "$chosen_group" - writeconf "$chosen_group" wmclasscomplete false - writeconf "$chosen_group" wmclassmatch 2 -} - -#writeconf_group dev -#writeconf_group disp -#writeconf disp title "^\\[disp[0-9]{4}\\] .*" diff --git a/qusal/dom0/files/bin/qubes-kde-win-rules b/qusal/dom0/files/bin/qubes-kde-win-rules new file mode 100755 index 0000000..68d0ff1 --- /dev/null +++ b/qusal/dom0/files/bin/qubes-kde-win-rules @@ -0,0 +1,72 @@ +#!/bin/sh + +# SPDX-FileCopyrightText: 2023 Qusal contributors +# +# SPDX-License-Identifier: GPL-3.0-or-later + +## Write KWin rules for window of specific domain to be in specific activity. +# shellcheck disable=SC1090,SC2317 +set -eu + +file="${XDG_CONFIG_HOME:=$HOME/.config}/kwinrulesrc" + +usage(){ + echo "Usage: ${0##*/} +Example: ${0##*/} personal personal +Example: ${0##*/} fun personal +Example: ${0##*/} work work +If domain is work, dvm-work, disp-work and work-something will all be present +in the work activity" >&2 + exit 1 +} + +writeconf(){ + group="$1" + key="$2" + value="$3" + + group_id="$(grep -B1 -- "^Description=$group$" "$file" | head -1 | tr -d "[" | tr -d "]")" + if test -z "${group_id}"; then + highest_id="$(grep -- "\[[0-9]\+\]" "$file" | tr -d "[" | tr -d "]" | sort | tail -1)" + if test -n "${highest_id}"; then + group_id="$((highest_id+1))" + else + group_id="0" + fi + fi + + kwriteconfig --file "$file" --group "$group_id" --key "$key" "$value" +} + +writeconf_group(){ + chosen_group="$1" + chosen_activity="$2" + writeconf "$chosen_group" Description "$chosen_group" + if test -n "$chosen_activity"; then + chosen_activity_id="$(kactivities-cli --list-activities | + awk -v activity="$chosen_activity" '$3 ~ activity {print $2}')" + if test -z "$chosen_activity_id"; then + printf '%s\n' "Invalid activity name: $chosen_activity" + exit 1 + fi + writeconf "$chosen_group" activity "$chosen_activity_id" + writeconf "$chosen_group" activityrule 2 + fi + + ## Regex: https://doc.qt.io/qt-6/qregularexpression.html + writeconf "$chosen_group" title "^\\[(disp-|dvm-)?$chosen_group(-\\S+)?\\] .*" + writeconf "$chosen_group" titlematch 3 + writeconf "$chosen_group" wmclass "$chosen_group" + writeconf "$chosen_group" wmclasscomplete false + writeconf "$chosen_group" wmclassmatch 2 +} + +case "${1-}" in + ""|-h|--?help) usage +esac +case "${2-}" in + "") usage +esac + +writeconf_group "${1}" "${2}" +dbus-send --type=signal /KWin org.kde.KWin.reloadConfig diff --git a/qusal/dom0/kde.sls b/qusal/dom0/kde.sls index 7edbf1f..29c0e8d 100644 --- a/qusal/dom0/kde.sls +++ b/qusal/dom0/kde.sls @@ -54,4 +54,13 @@ SPDX-License-Identifier: GPL-3.0-or-later - mode: '0755' - makedirs: True +"{{ slsdotpath }}-qubes-kde-win-rules": + file.managed: + - name: /home/user/.local/bin/qubes-kde-win-rules + - source: salt://{{ slsdotpath }}/files/bin/qubes-kde-win-rules + - user: user + - group: user + - mode: '0755' + - makedirs: True + {% endif -%} diff --git a/qusal/dotfiles/README.md b/qusal/dotfiles/README.md deleted file mode 100644 index eecf082..0000000 --- a/qusal/dotfiles/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# dotfiles - -## Table of Contents - -* [Description](#description) -* [Installation](#installation) -* [Usage](#usage) - -## Description - -Ben Grande's Dotfiles. - -Configuration and scripts targeting: - -- Usability: - - Vi keybindings for application movement - - Emacs keybindings for command-line editing - - XDG Specification to not clutter $HOME -- Portability: - - POSIX compliant code - - Drop-in configuration files - - Tested on Qubes OS Dom0, Debian, Fedora -- Tasks: - - GUI: x11, gtk - - SCM: git, tig, git-shell - - Keys: gpg, ssh - - Networking: curl, urlview, wget, w3m - - Productivity: tmux, vim - - Shell: sh, bash, zsh, less, dircolors - -## Installation - -You can simply deploy all configurations with: -```sh -./files/setup.sh -``` -Or target specific ones by specifying the directory name: -```sh -./files/setup.sh sh bash -``` -Note that some files might depend on other directories, specially `sh` which -is a base for `bash` and `zsh` but might also have environment variables for -`net` and `vim`. It also adds `$HOME/.local/bin` and -`$HOME/.local/bin/$HOSTNAME` to the `$PATH` variable, so if the project has -scripts, install the `sh` directory. - -Reload your shell: -```sh -exec $SHELL -``` - -Reload you X server: -```sh -. ~/.config/x11/xprofile -``` - -You need to logout and login again for some changes to take effect. - -## Usage - -The deployment replaces existing files and that is the goal, to make sure that -we have the same configuration of every machine. Support for local -configuration is implemented by including a local file per application. - -Supported programs and the expected file names in `$HOME`: - -- **bash**: .bashrc.local -- **git**: .gitconfig.local -- **sh**: .profile.local, .shrc.local -- **ssh**: .ssh/config.d/*.conf, .ssh/known_hosts.d/*.host -- **tmux**: .tmux.conf.local -- **vim**: .vimrc.local -- **x11**: .xprofile.local -- **zsh**: .zshrc.local diff --git a/qusal/dotfiles/copy-all.sls b/qusal/dotfiles/copy-all.sls deleted file mode 100644 index 2a95f98..0000000 --- a/qusal/dotfiles/copy-all.sls +++ /dev/null @@ -1,52 +0,0 @@ -{# -SPDX-FileCopyrightText: 2023 Qusal contributors - -SPDX-License-Identifier: GPL-3.0-or-later -#} - -include: - - .copy-git - - .copy-gtk - - .copy-net - - .copy-pgp - - .copy-sh - - .copy-ssh - - .copy-tmux - - .copy-vim - - .copy-x11 - -{# -Unfortunately salt.states.file does not keep permissions when using salt-ssh. -Best option is 'file.managed mode: keep' or 'file.recurse file_mode: keep'. -https://docs.saltproject.io/en/latest/ref/states/all/salt.states.file.html -#} -{# -"{{ slsdotpath }}-absent-dotfiles-client": - file.absent: - - name: /tmp/dotfiles - -"{{ slsdotpath }}-copy-dotfiles-client": - file.recurse: - - source: salt://{{ slsdotpath }}/files - - name: /tmp/dotfiles - - file_mode: '0644' - - dir_mode: '0700' - - user: user - - group: user - -"{{ slsdotpath }}-apply-dotfiles-client": - cmd.run: - - name: sh /tmp/dotfiles/setup.sh - - runas: user - -"{{ slsdotpath }}-fix-executables-permission": - file.directory: - - name: /home/user/.local/bin - - mode: '0755' - - recurse: - - mode - -"{{ slsdotpath }}-absent-end-dotfiles-client": - file.absent: - - name: /tmp/dotfiles -#} diff --git a/qusal/dotfiles/copy-git.sls b/qusal/dotfiles/copy-git.sls deleted file mode 100644 index 398c660..0000000 --- a/qusal/dotfiles/copy-git.sls +++ /dev/null @@ -1,65 +0,0 @@ -{# -SPDX-FileCopyrightText: 2023 Qusal contributors - -SPDX-License-Identifier: GPL-3.0-or-later -#} - -"{{ slsdotpath }}-copy-git-home": - file.recurse: - - name: /home/user - - source: salt://{{ slsdotpath }}/files/git - - file_mode: '0644' - - dir_mode: '0700' - - user: user - - group: user - -"{{ slsdotpath }}-fix-executables-git-template-dir-home": - file.directory: - - name: /home/user/.config/git/template/hooks - - mode: '0755' - - recurse: - - mode - -"{{ slsdotpath }}-fix-executables-git-shell-dir-home": - file.directory: - - name: /home/user/.config/git/shell - - mode: '0755' - - recurse: - - mode - -"{{ slsdotpath }}-fix-executables-git-bin-dir-home": - file.directory: - - name: /home/user/.local/bin - - mode: '0755' - - recurse: - - mode - -"{{ slsdotpath }}-copy-git-skel": - file.recurse: - - name: /etc/skel - - source: salt://{{ slsdotpath }}/files/git - - file_mode: '0644' - - dir_mode: '0700' - - user: root - - group: root - -"{{ slsdotpath }}-fix-executables-git-template-dir-skel": - file.directory: - - name: /etc/skel/.config/git/template/hooks - - mode: '0755' - - recurse: - - mode - -"{{ slsdotpath }}-fix-executables-git-shell-dir-skel": - file.directory: - - name: /home/user/.config/git/shell - - mode: '0755' - - recurse: - - mode - -"{{ slsdotpath }}-fix-executables-git-bin-dir-skel": - file.directory: - - name: /home/user/.local/bin - - mode: '0755' - - recurse: - - mode diff --git a/qusal/dotfiles/copy-gtk.sls b/qusal/dotfiles/copy-gtk.sls deleted file mode 100644 index 7bd49a0..0000000 --- a/qusal/dotfiles/copy-gtk.sls +++ /dev/null @@ -1,23 +0,0 @@ -{# -SPDX-FileCopyrightText: 2023 Qusal contributors - -SPDX-License-Identifier: GPL-3.0-or-later -#} - -"{{ slsdotpath }}-copy-gtk-home": - file.recurse: - - name: /home/user/ - - source: salt://{{ slsdotpath }}/files/gtk/ - - file_mode: '0644' - - dir_mode: '0700' - - user: user - - group: user - -"{{ slsdotpath }}-copy-gtk-skel": - file.recurse: - - name: /etc/skel - - source: salt://{{ slsdotpath }}/files/gtk/ - - file_mode: '0644' - - dir_mode: '0700' - - user: root - - group: root diff --git a/qusal/dotfiles/copy-net.sls b/qusal/dotfiles/copy-net.sls deleted file mode 100644 index d806809..0000000 --- a/qusal/dotfiles/copy-net.sls +++ /dev/null @@ -1,27 +0,0 @@ -{# -SPDX-FileCopyrightText: 2023 Qusal contributors - -SPDX-License-Identifier: GPL-3.0-or-later -#} - -"{{ slsdotpath }}-copy-net-home": - file.recurse: - - name: /home/user/ - - source: salt://{{ slsdotpath }}/files/net/ - - file_mode: '0644' - - dir_mode: '0700' - - user: user - - group: user - - keep_symlinks: True - - force_symlinks: True - -"{{ slsdotpath }}-copy-net-skel": - file.recurse: - - name: /etc/skel - - source: salt://{{ slsdotpath }}/files/net/ - - file_mode: '0644' - - dir_mode: '0700' - - user: root - - group: root - - keep_symlinks: True - - force_symlinks: True diff --git a/qusal/dotfiles/copy-pgp.sls b/qusal/dotfiles/copy-pgp.sls deleted file mode 100644 index e870404..0000000 --- a/qusal/dotfiles/copy-pgp.sls +++ /dev/null @@ -1,23 +0,0 @@ -{# -SPDX-FileCopyrightText: 2023 Qusal contributors - -SPDX-License-Identifier: GPL-3.0-or-later -#} - -"{{ slsdotpath }}-copy-pgp-home": - file.recurse: - - name: /home/user/ - - source: salt://{{ slsdotpath }}/files/pgp/ - - file_mode: '0600' - - dir_mode: '0700' - - user: user - - group: user - -"{{ slsdotpath }}-copy-pgp-skel": - file.recurse: - - name: /etc/skel/ - - source: salt://{{ slsdotpath }}/files/pgp/ - - file_mode: '0600' - - dir_mode: '0700' - - user: root - - group: root diff --git a/qusal/dotfiles/copy-pgp.top b/qusal/dotfiles/copy-pgp.top deleted file mode 100644 index d5226b8..0000000 --- a/qusal/dotfiles/copy-pgp.top +++ /dev/null @@ -1,9 +0,0 @@ -{# -SPDX-FileCopyrightText: 2023 Qusal contributors - -SPDX-License-Identifier: GPL-3.0-or-later -#} - -base: - '*': - - dotfiles.copy-pgp diff --git a/qusal/dotfiles/copy-sh.sls b/qusal/dotfiles/copy-sh.sls deleted file mode 100644 index e3cbc27..0000000 --- a/qusal/dotfiles/copy-sh.sls +++ /dev/null @@ -1,43 +0,0 @@ -{# -SPDX-FileCopyrightText: 2023 Qusal contributors - -SPDX-License-Identifier: GPL-3.0-or-later -#} - -"{{ slsdotpath }}-copy-sh-home": - file.recurse: - - name: /home/user/ - - source: salt://{{ slsdotpath }}/files/sh - - file_mode: '0644' - - dir_mode: '0700' - - user: user - - group: user - - keep_symlinks: True - - force_symlinks: True - -"{{ slsdotpath }}-fix-executables-sh-dir-home": - file.directory: - - name: /home/user/.local/bin - - file_mode: '0755' - - dir_mode: '0755' - - recurse: - - mode - -"{{ slsdotpath }}-copy-sh-skel": - file.recurse: - - name: /etc/skel - - source: salt://{{ slsdotpath }}/files/sh - - file_mode: '0644' - - dir_mode: '0700' - - user: root - - group: root - - keep_symlinks: True - - force_symlinks: True - -"{{ slsdotpath }}-fix-executables-sh-dir-skel": - file.directory: - - name: /etc/skel/.local/bin - - file_mode: '0755' - - dir_mode: '0755' - - recurse: - - mode diff --git a/qusal/dotfiles/copy-sh.top b/qusal/dotfiles/copy-sh.top deleted file mode 100644 index 7c1a8f6..0000000 --- a/qusal/dotfiles/copy-sh.top +++ /dev/null @@ -1,9 +0,0 @@ -{# -SPDX-FileCopyrightText: 2023 Qusal contributors - -SPDX-License-Identifier: GPL-3.0-or-later -#} - -base: - '*': - - dotfiles.copy-sh diff --git a/qusal/dotfiles/copy-ssh.sls b/qusal/dotfiles/copy-ssh.sls deleted file mode 100644 index 1a0acb1..0000000 --- a/qusal/dotfiles/copy-ssh.sls +++ /dev/null @@ -1,24 +0,0 @@ -{# -SPDX-FileCopyrightText: 2023 Qusal contributors - -SPDX-License-Identifier: GPL-3.0-or-later -#} - -"{{ slsdotpath }}-copy-ssh-home": - file.recurse: - - name: /home/user/ - - source: salt://{{ slsdotpath }}/files/ssh/ - - file_mode: '0600' - - dir_mode: '0700' - - user: user - - group: user - - backup: minion - -"{{ slsdotpath }}-copy-ssh-skel": - file.recurse: - - name: /etc/skel/ - - source: salt://{{ slsdotpath }}/files/ssh/ - - file_mode: '0600' - - dir_mode: '0700' - - user: root - - group: root diff --git a/qusal/dotfiles/copy-ssh.top b/qusal/dotfiles/copy-ssh.top deleted file mode 100644 index c7679aa..0000000 --- a/qusal/dotfiles/copy-ssh.top +++ /dev/null @@ -1,9 +0,0 @@ -{# -SPDX-FileCopyrightText: 2023 Qusal contributors - -SPDX-License-Identifier: GPL-3.0-or-later -#} - -base: - '*': - - dotfiles.copy-ssh diff --git a/qusal/dotfiles/copy-tmux.sls b/qusal/dotfiles/copy-tmux.sls deleted file mode 100644 index 1f9deae..0000000 --- a/qusal/dotfiles/copy-tmux.sls +++ /dev/null @@ -1,37 +0,0 @@ -{# -SPDX-FileCopyrightText: 2023 Qusal contributors - -SPDX-License-Identifier: GPL-3.0-or-later -#} - -"{{ slsdotpath }}-copy-tmux-home": - file.recurse: - - name: /home/user/ - - source: salt://{{ slsdotpath }}/files/tmux/ - - file_mode: '0644' - - dir_mode: '0700' - - user: user - - group: user - -"{{ slsdotpath }}-fix-executables-tmux-home": - file.directory: - - name: /home/user/.local/bin - - mode: '0755' - - recurse: - - mode - -"{{ slsdotpath }}-copy-tmux-skel": - file.recurse: - - name: /etc/skel - - source: salt://{{ slsdotpath }}/files/tmux/ - - file_mode: '0644' - - dir_mode: '0700' - - user: root - - group: root - -"{{ slsdotpath }}-fix-executables-tmux-skel": - file.directory: - - name: /home/user/.local/bin - - mode: '0755' - - recurse: - - mode diff --git a/qusal/dotfiles/copy-tmux.top b/qusal/dotfiles/copy-tmux.top deleted file mode 100644 index d577c25..0000000 --- a/qusal/dotfiles/copy-tmux.top +++ /dev/null @@ -1,9 +0,0 @@ -{# -SPDX-FileCopyrightText: 2023 Qusal contributors - -SPDX-License-Identifier: GPL-3.0-or-later -#} - -base: - '*': - - dotfiles.copy-tmux diff --git a/qusal/dotfiles/copy-vim.sls b/qusal/dotfiles/copy-vim.sls deleted file mode 100644 index c3fd379..0000000 --- a/qusal/dotfiles/copy-vim.sls +++ /dev/null @@ -1,23 +0,0 @@ -{# -SPDX-FileCopyrightText: 2023 Qusal contributors - -SPDX-License-Identifier: GPL-3.0-or-later -#} - -"{{ slsdotpath }}-copy-vim-home": - file.recurse: - - name: /home/user/ - - source: salt://{{ slsdotpath }}/files/vim/ - - file_mode: '0644' - - dir_mode: '0700' - - user: user - - group: user - -"{{ slsdotpath }}-copy-vim-skel": - file.recurse: - - name: /etc/skel - - source: salt://{{ slsdotpath }}/files/vim/ - - file_mode: '0644' - - dir_mode: '0700' - - user: root - - group: root diff --git a/qusal/dotfiles/copy-vim.top b/qusal/dotfiles/copy-vim.top deleted file mode 100644 index e61271b..0000000 --- a/qusal/dotfiles/copy-vim.top +++ /dev/null @@ -1,9 +0,0 @@ -{# -SPDX-FileCopyrightText: 2023 Qusal contributors - -SPDX-License-Identifier: GPL-3.0-or-later -#} - -base: - '*': - - dotfiles.copy-vim diff --git a/qusal/dotfiles/copy-x11.sls b/qusal/dotfiles/copy-x11.sls deleted file mode 100644 index 041f18b..0000000 --- a/qusal/dotfiles/copy-x11.sls +++ /dev/null @@ -1,27 +0,0 @@ -{# -SPDX-FileCopyrightText: 2023 Qusal contributors - -SPDX-License-Identifier: GPL-3.0-or-later -#} - -"{{ slsdotpath }}-copy-x11-home": - file.recurse: - - name: /home/user/ - - source: salt://{{ slsdotpath }}/files/x11 - - file_mode: '0755' - - dir_mode: '0755' - - user: user - - group: user - - keep_symlinks: True - - force_symlinks: True - -"{{ slsdotpath }}-copy-x11-skel": - file.recurse: - - name: /etc/skel/ - - source: salt://{{ slsdotpath }}/files/x11 - - file_mode: '0755' - - dir_mode: '0755' - - user: root - - group: root - - keep_symlinks: True - - force_symlinks: True diff --git a/qusal/dotfiles/copy-x11.top b/qusal/dotfiles/copy-x11.top deleted file mode 100644 index bf06c4b..0000000 --- a/qusal/dotfiles/copy-x11.top +++ /dev/null @@ -1,9 +0,0 @@ -{# -SPDX-FileCopyrightText: 2023 Qusal contributors - -SPDX-License-Identifier: GPL-3.0-or-later -#} - -base: - '*': - - dotfiles.copy-x11 diff --git a/qusal/dotfiles/files/dom0/The Qubes Project/qubes-qube-manager.conf b/qusal/dotfiles/files/dom0/The Qubes Project/qubes-qube-manager.conf deleted file mode 100644 index 9b159da..0000000 --- a/qusal/dotfiles/files/dom0/The Qubes Project/qubes-qube-manager.conf +++ /dev/null @@ -1,37 +0,0 @@ -# SPDX-FileCopyrightText: 2023 Qusal contributors -# -# SPDX-License-Identifier: GPL-3.0-or-later - -[General] -window_size=@Size(824 500) - -[columns] -Backup=true -Default%20DispVM=true -Disk%20Usage=true -IP=true -Internal=false -Is%20DVM%20Template=false -Label=true -Last%20backup=true -Name=true -NetVM=true -State=true -Template=true -Type=false -Virt%20Mode=false - -[show] -all=true -halted=true -network=true -running=true -standalone=true -templates=true - -[view] -compactview=true -sort_column=3 -sort_order=0 - -# vim: ft=toml diff --git a/qusal/dotfiles/files/git/.config/git/config b/qusal/dotfiles/files/git/.config/git/config deleted file mode 100644 index 32e016a..0000000 --- a/qusal/dotfiles/files/git/.config/git/config +++ /dev/null @@ -1,154 +0,0 @@ -; Global Git Config - -; SPDX-FileCopyrightText: 2010 - 2017 Tim Pope -; SPDX-FileCopyrightText: 2016 The Qubes OS Project -; SPDX-FileCopyrightText: 2023 Qusal contributors -; -; SPDX-License-Identifier: GPL-2.0-only -; - -[alias] - ; https://git.wiki.kernel.org/index.php/Aliases - ; https://github.com/schacon/gitscm/tree/master - ; Abbreviations - co = checkout - br = branch - sw = switch - ci = commit - cm = commit - st = status - df = diff - dc = diff --cached - gi = init - gib = init --bare - cu = rev-parse --abbrev-ref --symbolic-full-name @{upstream} - lg = !sh -c 'git log --color \"$@\"|fmt -s -w 79|less -FRSX' _ - lgg = log --graph --pretty='format:%C(yellow)%h%C(reset) %C(magenta)%G?%C(reset) -%C(red)%d%C(reset) %C(reset)%s %C(green)(%cs)%C(reset) %C(blue)%aN%C(reset)' - r = remote - rl = remote -v - cf = config --file "$HOME/.gitconfig.local" - ; Helpers - aliases = "!sh -c 'if test -n \"$1\"; then git config --get alias.$1; else git config --get-regexp \"alias.*\" | colrm 1 6 | sed \"s/[ ]/ = /\"; fi'" - - ; Patch with subject prefix containing repository name and output - ; directory has the child directories the repository and branch name. - fp = "!sh -c '\ - git rev-parse --show-toplevel 2>&1 >/dev/null || return; \ - repo=\"$(basename $(git rev-parse --show-toplevel) | \ - sed s/^qubes-//)\"; \ - outdir=\"$(git config format.outputDirectory)\"; \ - ref=\"$(git symbolic-ref --short HEAD)\"; \ - git format-patch \ - --output-directory \"${outdir%*/}/${repo}/${ref}\" \ - --subject-prefix=\"PATCH ${repo}\" \"${@}\" \ - --diff-algorithm=histogram \ - '" - - last = log -1 HEAD - unstage = reset HEAD -- - undo = reset --soft HEAD^ - changes = diff --name-status -r - diffstat = diff --stat -r - who = shortlog -s -- - ; whois - whois = log -i -1 --pretty='format:%an <%ae>' --author - ; whatis - whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short - ; See what commits have been created by the last command, eg: git pull - new = !sh -c 'git log $1@{1}..$1@{0} "$@"' - ; List commits with the same the abbreviated hash. - abbr = "!sh -c 'git rev-list --all | grep ^$1 | while read commit; do git --no-pager log -n1 --pretty=format:\"%H %ci %an %s%n\" $commit; done' -" - ; Solve merge conflicts - edit-unmerged = "!f() { git diff --name-status --diff-filter=U | cut -f2 ; }; vim $(f)" - add-unmerged = "!f() { git diff --name-status --diff-filter=U | cut -f2 ; }; git add $(f)" - ; List tips of branches that are not in the first arg. - ; git tips origin/master ^origin/alternate | git oneline - oneline ="!_() { $(test $# -eq 0 && echo xargs -L1) git log --no-walk --decorate --oneline \"$@\"; }; _" - tips = "!_() { t=$(git rev-list --no-merges --max-count=1 \"$@\"); if test -n \"$t\"; then echo $t; _ \"$@\" ^$t; fi; }; _" - ; Submodules. - sub-update-recurse = !sh -c 'git checkout $1 && git submodule update --recursive' - ; Signed tags and commits - stag = "!sh -c '\ - commit_id=\"$(git rev-parse --verify HEAD)\"; \ - tag_name=\"signed_tag_for_$(echo $commit_id | head -c 8)\"; \ - git tag -s \"$tag_name\" -m \"Tag for commit $commit_id\"; \ - echo \"$tag_name\"'" - ptag = !git push $(git config branch.$(git branch --show-current).remote) $(git describe) - vtag = !git verify-tag -v $(git describe) - vhead = !git verify-commit -v $(git rev-parse HEAD) -[blame] - coloring = repeatedLines -[branch] - autoSetupMerge = always -[color] - ui = auto - diff = auto - status = auto - branch = auto - interactive = auto - grep = auto -[commit] - gpgSign = true - verbose = true - template = ~/.config/git/message -[core] - excludesFile = ~/.config/git/ignore - pager = git-pager -[delta] - navigate = true - light = false -[diff] - algorithm = histogram - colorMoved = default -[diff "image"] - textConv = identify -[format] - coverLetter = auto - coverFromDescription = auto - thread = shallow - signOff = true - signatureFile = ~/.signature - outputDirectory = /tmp/patch -[gpg] - program = gpgw - minTrustLevel = fully -[grep] - extendedRegexp = true - lineNumber = true -[init] - defaultbranch = main - templatedir = ~/.config/git/template -[interactive] - diffFilter = delta --color-only -[mailinfo] - scissors = true -[merge] - verifySignatures = true - tool = vimdiff - conflictStyle = diff3 - summary = true -[pull] - ; Rebase does not verify signatures. Does not prevent manual rebase. - rebase = false -[push] - autoSetupRemote = true - default = nothing - followTags = true -[rebase] - autoSquash = true -[sendemail] - annotate = true - multiEdit = true - confirm = always - thread = shallow - chainReplyTo = true - xmailer = false -[tag] - forceSignAnnotated = true - gpgSign = true -[user] - hideTimezone = true -[includeIf "gitdir:~/**/qubes-*/**"] - path = ~/.config/git/config.d/qubes-devel -[include] - path = ~/.gitconfig.local - -; vim: ft=gitconfig diff --git a/qusal/dotfiles/files/git/.config/git/config.d/qubes-devel b/qusal/dotfiles/files/git/.config/git/config.d/qubes-devel deleted file mode 100644 index feecb96..0000000 --- a/qusal/dotfiles/files/git/.config/git/config.d/qubes-devel +++ /dev/null @@ -1,10 +0,0 @@ -; SPDX-FileCopyrightText: 2023 Qusal contributors -; -; SPDX-License-Identifier: GPL-3.0-or-later - -[format] - to = qubes-devel@googlegroups.com -[sendemail] - to = qubes-devel@googlegroups.com - -; vim: ft=gitconfig diff --git a/qusal/dotfiles/files/git/.config/git/ignore b/qusal/dotfiles/files/git/.config/git/ignore deleted file mode 100644 index 19fe1b9..0000000 --- a/qusal/dotfiles/files/git/.config/git/ignore +++ /dev/null @@ -1,35 +0,0 @@ -# SPDX-FileCopyrightText: 2023 Qusal contributors -# -# SPDX-License-Identifier: GPL-3.0-or-later - -# Local -*.local -!.local/ -!rc.local - -# Code -*.patch -*.diff - -# Editor -.*.sw? -.*.tmp -*~ -.#* -[#]*# -Session.vim -/tags -/doc/tags - -## Debian build artifacts -**/debhelper-build-stamp -**/debian/files -**/debian/*.debhelper* -debian/*.postinst.debhelper -debian/*.postrm.debhelper -debian/*.preinst.debhelper -debian/*.prerm.debhelper -debian/*.substvars -*-build-deps_*.deb -*-build-deps_*.buildinfo -*-build-deps_*.changes diff --git a/qusal/dotfiles/files/git/.config/git/message b/qusal/dotfiles/files/git/.config/git/message deleted file mode 100644 index 780b832..0000000 --- a/qusal/dotfiles/files/git/.config/git/message +++ /dev/null @@ -1,3 +0,0 @@ - -# Title: 50c, summary, imperative, start uppercase, end without period -# Body: 72c, explain 'what' and 'why' vs. 'how', include task ID diff --git a/qusal/dotfiles/files/git/.config/git/sample/gitconfig.local.sample b/qusal/dotfiles/files/git/.config/git/sample/gitconfig.local.sample deleted file mode 100644 index 14e4743..0000000 --- a/qusal/dotfiles/files/git/.config/git/sample/gitconfig.local.sample +++ /dev/null @@ -1,12 +0,0 @@ -; ~/.gitconfig.local - -; SPDX-FileCopyrightText: 2023 Qusal contributors -; -; SPDX-License-Identifier: GPL-3.0-or-later - -[user] - email = your-mail@your-provider.domain - name = Your Name - signingKey = 0x012345678ABC - -; vim: ft=gitconfig diff --git a/qusal/dotfiles/files/git/.config/git/shell/.git-shell-lib b/qusal/dotfiles/files/git/.config/git/shell/.git-shell-lib deleted file mode 100644 index 08c5b07..0000000 --- a/qusal/dotfiles/files/git/.config/git/shell/.git-shell-lib +++ /dev/null @@ -1,28 +0,0 @@ -# SPDX-FileCopyrightText: 2023 Qusal contributors -# -# SPDX-License-Identifier: GPL-3.0-or-later - -## guarantee commands are run from $HOME -cd - -base="src" - -fail_invalid_name(){ - printf '%s\n' "error: invalid $1 name" - exit 1 -} - -test_name(){ - name="$1" - if ! (echo "$name" | grep -q "^[A-Za-z0-9][A-Za-z0-9_.-]\+[A-Za-z0-9]$") - then - fail_invalid_name repository - fi -} - -clean_repo_name(){ - case "${repo-}" in - *.git) repo="";; - *) repo="$repo.git";; - esac -} diff --git a/qusal/dotfiles/files/git/.config/git/shell/description b/qusal/dotfiles/files/git/.config/git/shell/description deleted file mode 100755 index 589ff4f..0000000 --- a/qusal/dotfiles/files/git/.config/git/shell/description +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -## SPDX-FileCopyrightText: 2023 Qusal contributors -## -## SPDX-License-Identifier: GPL-3.0-or-later - -set -eu - -# shellcheck disable=SC1090 -. ~/git-shell-commands/.git-shell-lib - -usage(){ - printf '%s\n' "usage: ${0##*/} SECTION REPOSITORY" - printf '%s\n' "regex: ^[A-Za-z0-9][A-Za-z0-9_.-]\+[A-Za-z0-9]$" - exit 1 -} - -test -n "${2-}" || usage -section="$2" -test_name "$section" -repo="$2" -test_name "$repo" -clean_repo_name - -# shellcheck disable=SC2154 -cat | cut -c 1-80 | tee "$base/$section/$repo/description" diff --git a/qusal/dotfiles/files/git/.config/git/shell/help b/qusal/dotfiles/files/git/.config/git/shell/help deleted file mode 100755 index 9468a26..0000000 --- a/qusal/dotfiles/files/git/.config/git/shell/help +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -## SPDX-FileCopyrightText: 2023 Qusal contributors -## -## SPDX-License-Identifier: GPL-3.0-or-later - -set -eu - -ls ~/git-shell-commands diff --git a/qusal/dotfiles/files/git/.config/git/shell/init b/qusal/dotfiles/files/git/.config/git/shell/init deleted file mode 100755 index 08334a6..0000000 --- a/qusal/dotfiles/files/git/.config/git/shell/init +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -## SPDX-FileCopyrightText: 2023 Qusal contributors -## -## SPDX-License-Identifier: GPL-3.0-or-later - -set -eu - -# shellcheck disable=SC1090 -. ~/git-shell-commands/.git-shell-lib - -usage(){ - printf '%s\n' "usage: ${0##*/} SECTION REPOSITORY [BRANCH]" - printf '%s\n' "regex: ^[A-Za-z0-9][A-Za-z0-9_.-]\+[A-Za-z0-9]$" - exit 1 -} - -test -n "${1-}" || usage -section="$1" -test_name "$section" -repo="$2" -test_name "$repo" -clean_repo_name -branch="" -test -n "${3-}" && branch="$3" - -if test -n "${branch}"; then - test_name "$branch" -fi - -# shellcheck disable=SC2154 -git init \ - --bare \ - ${branch:+--initial-branch $branch} \ - -- "$base/$section/$repo" diff --git a/qusal/dotfiles/files/git/.config/git/shell/list b/qusal/dotfiles/files/git/.config/git/shell/list deleted file mode 100755 index 81ae39a..0000000 --- a/qusal/dotfiles/files/git/.config/git/shell/list +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -## SPDX-FileCopyrightText: 2023 Qusal contributors -## -## SPDX-License-Identifier: GPL-3.0-or-later - -set -eu - -# shellcheck disable=SC1090 -. ~/git-shell-commands/.git-shell-lib - -# shellcheck disable=SC2154 -if command -v tree >/dev/null; then - tree -L 1 "$base" -else - find "$base" -maxdepth 1 -type d -fi diff --git a/qusal/dotfiles/files/git/.config/git/shell/no-interactive-login b/qusal/dotfiles/files/git/.config/git/shell/no-interactive-login deleted file mode 100755 index d50bda7..0000000 --- a/qusal/dotfiles/files/git/.config/git/shell/no-interactive-login +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -## SPDX-FileCopyrightText: 2023 Qusal contributors -## -## SPDX-License-Identifier: GPL-3.0-or-later - -set -eu - -command -v git >/dev/null || exit 1 -printf '%s\n' "Hi $USER! You've successfully authenticated, but I do not" -printf '%s\n' "provide interactive shell access." -printf '%s\n' "You have access to these repositories:" - -for dir in ~/src/*.git; do - test -d "$dir" || continue - test git -C "$dir" rev-parse --is-bare-repository = "true" || continue - printf '%s\t\t' "${dir##*/}" - if grep -q "^Unnamed repository" "$dir"/description; then - printf '\n'; continue - fi - cat "$dir"/description -done -exit 128 diff --git a/qusal/dotfiles/files/git/.config/git/template/config b/qusal/dotfiles/files/git/.config/git/template/config deleted file mode 100644 index d02d7a7..0000000 --- a/qusal/dotfiles/files/git/.config/git/template/config +++ /dev/null @@ -1,17 +0,0 @@ -; SPDX-FileCopyrightText: 2023 Qusal contributors -; -; SPDX-License-Identifier: GPL-3.0-or-later - -[branch "main"] - remote = origin - merge = refs/heads/main - rebase = true -[core] - repositoryFormatVersion = 0 - fileMode = true - bare = false - logAllRefUpdates = true -[init] - defaultBranch = main - -; vim: ft=gitconfig diff --git a/qusal/dotfiles/files/git/.config/git/template/hooks/pre-receive b/qusal/dotfiles/files/git/.config/git/template/hooks/pre-receive deleted file mode 100755 index 075ccf3..0000000 --- a/qusal/dotfiles/files/git/.config/git/template/hooks/pre-receive +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - -# SPDX-FileCopyrightText: 2023 Qusal contributors -# -# SPDX-License-Identifier: GPL-3.0-or-later - -## TODO: unfinished -# shellcheck disable=SC2317 -exit 0 - -set -eu - -command -v git >/dev/null || exit 1 - -exit_code=0 -zero_commit="0000000000000000000000000000000000000000" - -while read -r oldrev newrev ref; do -#read -r oldrev newrev ref - echo "$oldrev $newrev $ref" - test "$newrev" = "$zero_commit" && continue - - if test "$oldrev" = "$zero_commit"; then - objects="$(git rev-list "$newrev")" - else - objects="$(git rev-list "$oldrev..$newrev")" - fi - - for commit in $objects; do - git verify-commit "$commit" >/dev/null 2>&1 && return - - ## WARNING: tag verification is not working as expected. - commit_tag="$(git tag --points-at="$commit")" - if test -z "$commit_tag"; then - echo "Commit couldn't be verified and no tag points to it: $commit" - exit_code=1 - continue - fi - - if git verify-tag "$commit_tag" >/dev/null 2>&1; then - echo "Tag verification succeeded for commit: $commit" - continue - fi - - echo "Commit verification failed: $commit" - exit_code=1 - done - if test "$exit_code" != "0"; then - exit "$exit_code" - fi -done diff --git a/qusal/dotfiles/files/git/.config/git/template/info/exclude b/qusal/dotfiles/files/git/.config/git/template/info/exclude deleted file mode 100644 index c7ee087..0000000 --- a/qusal/dotfiles/files/git/.config/git/template/info/exclude +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-FileCopyrightText: 2023 Qusal contributors -# -# SPDX-License-Identifier: GPL-3.0-or-later - -*.local diff --git a/qusal/dotfiles/files/git/.config/tig/config b/qusal/dotfiles/files/git/.config/tig/config deleted file mode 100644 index ad6afe5..0000000 --- a/qusal/dotfiles/files/git/.config/tig/config +++ /dev/null @@ -1,75 +0,0 @@ -# SPDX-FileCopyrightText: 2020 Jona Fonseca -# -# SPDX-License-Identifier: GPL-3.0-or-later - -# Credits: https://github.com/jonas/tig/blob/master/contrib/vim.tigrc - -bind generic h scroll-left -bind generic j move-down -bind generic k move-up -bind generic l scroll-right - -bind generic g none -bind generic gg move-first-line -bind generic gj next -bind generic gk previous -bind generic gp parent -bind generic gP back -bind generic gn view-next - -bind main G move-last-line -bind generic G move-last-line - -bind generic move-page-down -bind generic move-page-up - -bind generic v none -bind generic vm view-main -bind generic vd view-diff -bind generic vl view-log -bind generic vt view-tree -bind generic vb view-blob -bind generic vx view-blame -bind generic vr view-refs -bind generic vs view-status -bind generic vu view-stage -bind generic vy view-stash -bind generic vg view-grep -bind generic vp view-pager -bind generic vh view-help - -bind generic o none -bind generic oo :toggle sort-order -bind generic os :toggle sort-field -bind generic on :toggle line-number -bind generic od :toggle date -bind generic oa :toggle author -bind generic og :toggle line-graphics -bind generic of :toggle file-name -bind generic op :toggle ignore-space -bind generic oi :toggle id -bind generic ot :toggle commit-title-overflow -bind generic oF :toggle file-filter -bind generic or :toggle commit-title-refs - -bind generic @ none -bind generic @j :/^@@ -bind generic @k :?^@@ -bind generic @- :toggle diff-context -1 -bind generic @+ :toggle diff-context +1 - -bind status u none -bind stage u none -bind generic uu status-update -bind generic ur status-revert -bind generic um status-merge -bind generic ul stage-update-line -# bind generic up stage-update-parte -bind generic us stage-split-chunk - -bind generic c none -bind generic cc !git commit -bind generic ca !?@git commit --amend --no-edit - -bind generic K view-help -bind generic view-next diff --git a/qusal/dotfiles/files/gtk/.config/gtk-2.0/bookmarks b/qusal/dotfiles/files/gtk/.config/gtk-2.0/bookmarks deleted file mode 100644 index 4ba6b95..0000000 --- a/qusal/dotfiles/files/gtk/.config/gtk-2.0/bookmarks +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-FileCopyrightText: 2023 The Qubes OS Project -# -# SPDX-License-Identifier: GPL-3.0-or-later - -file:///home/user/QubesIncoming diff --git a/qusal/dotfiles/files/gtk/.config/gtk-2.0/gtkrc-2.0 b/qusal/dotfiles/files/gtk/.config/gtk-2.0/gtkrc-2.0 deleted file mode 100644 index 54331fe..0000000 --- a/qusal/dotfiles/files/gtk/.config/gtk-2.0/gtkrc-2.0 +++ /dev/null @@ -1,19 +0,0 @@ -# SPDX-FileCopyrightText: 2023 Qusal contributors -# -# SPDX-License-Identifier: GPL-3.0-or-later - -gtk-theme-name=Adwaita-Dark -gtk-icon-theme-name=Adwaita -gtk-font-name="Sans 10" -gtk-cursor-theme-size=0 -gtk-toolbar-style=GTK_TOOLBAR_TEXT -gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR -gtk-button-images=0 -gtk-menu-images=1 -gtk-enable-event-sounds=1 -gtk-enable-input-feedback-sounds=1 -gtk-xft-antialias=1 -gtk-xft-hinting=1 -gtk-xft-hintstyle=hintfull -gtk-xft-rgba=rgb -gtk-cursor-theme-name=Adwaita diff --git a/qusal/dotfiles/files/gtk/.config/gtk-2.0/qubes-incoming-bookmark-created b/qusal/dotfiles/files/gtk/.config/gtk-2.0/qubes-incoming-bookmark-created deleted file mode 100644 index a513909..0000000 --- a/qusal/dotfiles/files/gtk/.config/gtk-2.0/qubes-incoming-bookmark-created +++ /dev/null @@ -1,3 +0,0 @@ -# SPDX-FileCopyrightText: 2023 The Qubes OS Project -# -# SPDX-License-Identifier: GPL-3.0-or-later diff --git a/qusal/dotfiles/files/gtk/.config/gtk-3.0/bookmarks b/qusal/dotfiles/files/gtk/.config/gtk-3.0/bookmarks deleted file mode 100644 index 4ba6b95..0000000 --- a/qusal/dotfiles/files/gtk/.config/gtk-3.0/bookmarks +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-FileCopyrightText: 2023 The Qubes OS Project -# -# SPDX-License-Identifier: GPL-3.0-or-later - -file:///home/user/QubesIncoming diff --git a/qusal/dotfiles/files/gtk/.config/gtk-3.0/qubes-incoming-bookmark-created b/qusal/dotfiles/files/gtk/.config/gtk-3.0/qubes-incoming-bookmark-created deleted file mode 100644 index a513909..0000000 --- a/qusal/dotfiles/files/gtk/.config/gtk-3.0/qubes-incoming-bookmark-created +++ /dev/null @@ -1,3 +0,0 @@ -# SPDX-FileCopyrightText: 2023 The Qubes OS Project -# -# SPDX-License-Identifier: GPL-3.0-or-later diff --git a/qusal/dotfiles/files/gtk/.config/gtk-3.0/settings.ini b/qusal/dotfiles/files/gtk/.config/gtk-3.0/settings.ini deleted file mode 100644 index 80ff3b1..0000000 --- a/qusal/dotfiles/files/gtk/.config/gtk-3.0/settings.ini +++ /dev/null @@ -1,20 +0,0 @@ -# SPDX-FileCopyrightText: 2023 Qusal contributors -# -# SPDX-License-Identifier: GPL-3.0-or-later - -[Settings] -gtk-theme-name=Adwaita-Dark -gtk-icon-theme-name=Adwaita -gtk-font-name=Sans 10 -gtk-cursor-theme-size=0 -gtk-toolbar-style=GTK_TOOLBAR_TEXT -gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR -gtk-button-images=0 -gtk-menu-images=1 -gtk-enable-event-sounds=1 -gtk-enable-input-feedback-sounds=1 -gtk-xft-antialias=1 -gtk-xft-hinting=1 -gtk-xft-hintstyle=hintfull -gtk-xft-rgba=rgb -gtk-cursor-theme-name=Adwaita diff --git a/qusal/dotfiles/files/gtk/.config/gtk-4.0/bookmarks b/qusal/dotfiles/files/gtk/.config/gtk-4.0/bookmarks deleted file mode 100644 index 4ba6b95..0000000 --- a/qusal/dotfiles/files/gtk/.config/gtk-4.0/bookmarks +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-FileCopyrightText: 2023 The Qubes OS Project -# -# SPDX-License-Identifier: GPL-3.0-or-later - -file:///home/user/QubesIncoming diff --git a/qusal/dotfiles/files/gtk/.config/gtk-4.0/settings.ini b/qusal/dotfiles/files/gtk/.config/gtk-4.0/settings.ini deleted file mode 100644 index 80ff3b1..0000000 --- a/qusal/dotfiles/files/gtk/.config/gtk-4.0/settings.ini +++ /dev/null @@ -1,20 +0,0 @@ -# SPDX-FileCopyrightText: 2023 Qusal contributors -# -# SPDX-License-Identifier: GPL-3.0-or-later - -[Settings] -gtk-theme-name=Adwaita-Dark -gtk-icon-theme-name=Adwaita -gtk-font-name=Sans 10 -gtk-cursor-theme-size=0 -gtk-toolbar-style=GTK_TOOLBAR_TEXT -gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR -gtk-button-images=0 -gtk-menu-images=1 -gtk-enable-event-sounds=1 -gtk-enable-input-feedback-sounds=1 -gtk-xft-antialias=1 -gtk-xft-hinting=1 -gtk-xft-hintstyle=hintfull -gtk-xft-rgba=rgb -gtk-cursor-theme-name=Adwaita diff --git a/qusal/dotfiles/files/net/.config/curl/.curlrc b/qusal/dotfiles/files/net/.config/curl/.curlrc deleted file mode 120000 index 402ec5c..0000000 --- a/qusal/dotfiles/files/net/.config/curl/.curlrc +++ /dev/null @@ -1 +0,0 @@ -curlrc \ No newline at end of file diff --git a/qusal/dotfiles/files/net/.config/curl/curlrc b/qusal/dotfiles/files/net/.config/curl/curlrc deleted file mode 100644 index 1a3b3f4..0000000 --- a/qusal/dotfiles/files/net/.config/curl/curlrc +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-FileCopyrightText: 2023 Qusal contributors -# -# SPDX-License-Identifier: GPL-3.0-or-later - -show-error diff --git a/qusal/dotfiles/files/net/.config/urlview/urlview b/qusal/dotfiles/files/net/.config/urlview/urlview deleted file mode 100644 index 1f65147..0000000 --- a/qusal/dotfiles/files/net/.config/urlview/urlview +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-FileCopyrightText: 2023 Qusal contributors -# -# SPDX-License-Identifier: GPL-3.0-or-later - -REGEXP \b(((https?|ftp|gopher)|mailto):(//)?[^ <>"\t]*|(www|ftp)[0-9]?\.[-a-z0-9.]+)[^ .,;\t\n\r<">\):]?[^, <>"\t]*[^] .,;\t\n\r<">\):] diff --git a/qusal/dotfiles/files/net/.config/wget/wgetrc b/qusal/dotfiles/files/net/.config/wget/wgetrc deleted file mode 100644 index c85b464..0000000 --- a/qusal/dotfiles/files/net/.config/wget/wgetrc +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-FileCopyrightText: 2023 Qusal contributors -# -# SPDX-License-Identifier: GPL-3.0-or-later - -hsts-file=~/.cache/wget-hsts diff --git a/qusal/dotfiles/files/net/.urlview b/qusal/dotfiles/files/net/.urlview deleted file mode 120000 index 8f575f3..0000000 --- a/qusal/dotfiles/files/net/.urlview +++ /dev/null @@ -1 +0,0 @@ -.config/urlview/urlview \ No newline at end of file diff --git a/qusal/dotfiles/files/net/.w3m/keymap b/qusal/dotfiles/files/net/.w3m/keymap deleted file mode 100644 index 137aa69..0000000 --- a/qusal/dotfiles/files/net/.w3m/keymap +++ /dev/null @@ -1,256 +0,0 @@ -## SPDX-FileCopyrightText: 2023 Qusal contributors -## -## SPDX-License-Identifier: GPL-3.0-only - -## w3m vim-like keymap file -## Credits: https://github.com/sansna/keymap.w3m/blob/master/keymap.w3m - -########## invalidate defaults ########## -keymap K NULL -keymap J NULL -keymap SPC NULL -keymap - NULL -keymap + NULL -keymap C-v NULL -keymap ESC-v NULL -keymap C-f NULL -keymap C-b NULL -keymap C-n NULL -keymap C-p NULL -keymap < NULL -keymap > NULL -keymap . NULL -keymap , NULL -keymap ^ NULL -keymap C-a NULL -keymap W NULL -keymap ^[[6~ NULL -keymap ^[[5~ NULL -keymap g NULL -keymap ^[[1~ NULL -keymap ^[[4~ NULL -keymap ESC-< NULL -keymap ESC-> NULL -keymap [ NULL -keymap ] NULL -keymap ^[[Z NULL -keymap ESC-m NULL -keymap ( NULL -keymap ) NULL -keymap C-j NULL -keymap C-m NULL -keymap ESC-C-j NULL -keymap ESC-C-m NULL -keymap ESC-w NULL -keymap ESC-W NULL -keymap C-s NULL -keymap = NULL -keymap ESC-l NULL -keymap U NULL -keymap V NULL -keymap v NULL -keymap R NULL -keymap ESC-s NULL -keymap : NULL -keymap C-q NULL -keymap T NULL -keymap } NULL -keymap { NULL -keymap ESC-a NULL -keymap ESC-b NULL -keymap c NULL -keymap ESC-: NULL -keymap C-h NULL -keymap q NULL -keymap Q NULL -keymap C-w NULL -keymap C-d NULL -keymap C-u NULL -keymap RIGHT NULL -keymap l NULL -keymap LEFT NULL -keymap h NULL -keymap j NULL -keymap DOWN NULL -keymap k NULL -keymap UP NULL -keymap C-e NULL -keymap C-y NULL -keymap 0 NULL -keymap $ NULL -keymap Z NULL -keymap z NULL -keymap ESC-g NULL -keymap gg NULL -keymap G NULL -keymap w NULL -keymap b NULL -keymap C-n NULL -keymap C-p NULL -keymap ESC-TAB NULL -keymap f NULL -keymap C-o NULL -keymap TAB NULL -keymap C-j NULL -keymap C-] NULL -keymap I NULL -keymap ESC-I NULL -keymap ESC-C-j NULL -keymap y NULL -keymap u NULL -keymap i NULL -keymap gC-g NULL -keymap C-g NULL -keymap ";" NULL -keymap M NULL -keymap ESC-M NULL -keymap F NULL -keymap ESC-u NULL -keymap t NULL -keymap @ NULL -keymap "#" NULL -keymap | NULL -keymap B NULL -keymap L NULL -keymap H NULL -keymap s NULL -keymap gf NULL -keymap S NULL -keymap E NULL -keymap ESC-e NULL -keymap C-r NULL -keymap r NULL -keymap C-l NULL -keymap C-t NULL -keymap d NULL -keymap gt NULL -keymap gT NULL -keymap ESC-t NULL -keymap C-wL NULL -keymap C-wH NULL -keymap a NULL -keymap n NULL -keymap N NULL -keymap / NULL -keymap ? NULL -keymap C-@ NULL -keymap ESC-n NULL -keymap ESC-p NULL -keymap \" NULL -keymap ^[[2~ NULL -keymap ^[[28~ NULL -keymap ^[[E NULL -keymap ^[[L NULL -keymap o NULL -keymap C-k NULL -keymap D NULL -keymap m NULL -keymap ESC-c NULL -keymap ESC-o NULL -keymap ESC-k NULL -keymap \\ NULL -keymap ! NULL -keymap C-z NULL -keymap ZZ NULL -keymap ZQ NULL - - -########## command ########## -keymap :: COMMAND -keymap :H HELP -keymap :O OPTIONS -keymap :d DOWNLOAD_LIST - -########## history navigation ########## -keymap L NEXT -keymap H PREV -keymap :p SELECT_MENU -keymap :h HISTORY - -########## scrolling ########## -keymap C-e UP -keymap C-y DOWN -keymap gg BEGIN -keymap G END -keymap C-f NEXT_PAGE -keymap C-d NEXT_PAGE -keymap d NEXT_PAGE -keymap C-b PREV_PAGE -keymap C-u PREV_PAGE -keymap u PREV_PAGE -keymap zz CENTER_V -########## cursor ########## -#keymap l MOVE_RIGHT -keymap l NEXT_TAB -#keymap h MOVE_LEFT -keymap h PREV_TAB -#keymap j MOVE_DOWN1 -keymap j UP -#keymap k MOVE_UP1 -keymap k DOWN -keymap RIGHT MOVE_RIGHT -keymap LEFT MOVE_LEFT -keymap DOWN MOVE_DOWN1 -keymap UP MOVE_UP1 -keymap 0 LINE_BEGIN -keymap $ LINE_END -keymap w NEXT_WORD -keymap b PREV_WORD -########## cursor history ########## -keymap C-i REDO -keymap C-o UNDO -########## navigation ########## -keymap f MOVE_LIST_MENU -keymap F LIST_MENU -keymap C-n NEXT_LINK -keymap C-p PREV_LINK -keymap :l PEEK_LINK - -# reload -keymap r RELOAD -keymap C-r RELOAD - -# save/load -keymap :w SAVE -keymap :W PRINT -keymap :o GOTO -keymap :e LOAD - -# jump -keymap ESC-C-j SUBMIT -keymap C-] TAB_LINK -keymap C-j GOTO_LINK - -########## info ########## -keymap y PEEK -keymap gC-g INFO -keymap C-g LINE_INFO -keymap gf VIEW - -########## search ########## -keymap / ISEARCH -keymap ? ISEARCH_BACK -keymap n SEARCH_NEXT -keymap N SEARCH_PREV - -########## bookmarks ########## -keymap a ADD_BOOKMARK -keymap :b VIEW_BOOKMARK - -########## tab ########## -keymap x CLOSE_TAB -keymap gh GOTO http://www.google.com/en -keymap gH TAB_GOTO http://www.google.com/en -keymap C-t NEW_TAB -keymap gt NEXT_TAB -keymap gT PREV_TAB -keymap C-wL TAB_RIGHT -keymap C-wH TAB_LEFT -keymap t TAB_GOTO -keymap T TAB_MENU - -########## quit ########## -keymap ZZ EXIT -keymap C-Q EXIT -keymap ZQ QUIT -keymap :q QUIT diff --git a/qusal/dotfiles/files/pgp/.gnupg/gpg.conf b/qusal/dotfiles/files/pgp/.gnupg/gpg.conf deleted file mode 100644 index e6e268e..0000000 --- a/qusal/dotfiles/files/pgp/.gnupg/gpg.conf +++ /dev/null @@ -1,23 +0,0 @@ -## SPDX-FileCopyrightText: 2012 - 2013 Jacob Appelbaum -## SPDX-FileCopyrightText: 2012 - 2013 Sukhbir Singh -## SPDX-FileCopyrightText: 2023 Qusal contributors -## -## SPDX-License-Identifier: BSD-2-Clause - -## Credits: https://github.com/ioerror/torbirdy/blob/master/gpg.conf - -## Algo -personal-digest-preferences SHA512 -cert-digest-algo SHA512 -default-preference-list SHA512 SHA384 SHA256 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed - -## Show -display-charset utf-8 -keyid-format long -list-options show-uid-validity -no-comments -verify-options show-uid-validity -with-fingerprint -with-subkey-fingerprint - -## vim: ft=gpg diff --git a/qusal/dotfiles/files/qvm-copy-dotfiles b/qusal/dotfiles/files/qvm-copy-dotfiles deleted file mode 100755 index 626f9b1..0000000 --- a/qusal/dotfiles/files/qvm-copy-dotfiles +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -## -## SPDX-FileCopyrightText: 2023 Qusal contributors -## -## SPDX-License-Identifier: GPL-3.0-or-later -## -## Benefits of this method: -## - faster than salt, no need for a dispvm. -## - preserve permisions, salt-ssh doesnt. -## Disadvantages: -## - files need be copied to dom0 preserving permissions or setting again. -## -## Commands to run: -## sudo ./qvm-copy-dotfiles QUBE -set -eu - -test -n "${1:-}" || { echo "usage: ${0##*/} QUBE"; exit 1; } -test "$(id -u)" = "0" || { echo "Program requires root."; exit 1; } - -vm="$1" -qvm-check "$vm" >/dev/null 2>&1 || { echo "VM doesn't exist: '$vm'"; exit 1; } -test -f ./setup.sh || { echo "File doesn't exist: './setup.sh'"; exit 1; } - -if test "$vm" = "dom0"; then - sh ./dotfiles/setup.sh - sudo -u user mkdir -pv /home/user/.cache - tmpdir="$(sudo -u user mktemp -d /home/user/.cache/XXXXXX)" - trap 'rm -rf -- "$tmpdir"' EXIT INT HUP QUIT ABRT - cp -r ./dotfiles "$tmpdir" - chown -R user:user "$tmpdir" - sudo -u user "$tmpdir/dotfiles/setup.sh" - exit -fi - -qvm-run -q "$vm" -- "rm -rf ~/QubesIncoming/dom0/files" -qvm-copy-to-vm "$vm" ../files -qvm-run -q "$vm" -- "sh ~/QubesIncoming/dom0/files/setup.sh" -qvm-run -q "$vm" -- "rm -rf ~/QubesIncoming/dom0/files" diff --git a/qusal/dotfiles/files/setup.sh b/qusal/dotfiles/files/setup.sh deleted file mode 100755 index 13e8b99..0000000 --- a/qusal/dotfiles/files/setup.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -## SPDX-FileCopyrightText: 2023 Qusal contributors -## -## SPDX-License-Identifier: GPL-3.0-or-later - -set -eu - -prg="$0" -if ! test -e "$prg"; then - case "$prg" in - (*/*) exit 1;; - (*) prg=$(command -v -- "$prg") || exit;; - esac -fi -dir="$(cd -P -- "$(dirname -- "$prg")" && pwd -P)" || exit 1 -prg="$dir/$(basename -- "$prg")" || exit 1 -cd -- "$dir" || exit 1 - -usage(){ - printf '%s\n' "Usage: ${0##*/} [-h|--help] DIR [DIR2...]" - printf '%s\n' "Example: ${0##*/} # deploy all" - printf '%s\n' "Example: ${0##*/} sh vim ... # deploy specific dirs" -} - -case "${1-}" in - -h|--help) usage; exit 1;; - ""|--all) args="$(find . -maxdepth 1 -type d)";; - *) args="${*}";; -esac - -for dir in $args; do - case "${dir##*/}" in "."|"..") continue;; esac - dir="${dir%*/}" - test -f "$dir" && continue - if ! test -d "$dir"; then - printf '%s\n' "Directory doesn't exist: '$dir'." >&2 - exit 1 - fi - for file in "$dir"/.*; do - test -e "$file" || continue - case "${file##*/}" in "."|"..") continue;; esac - cp -rv "$file" "$HOME" - done -done diff --git a/qusal/dotfiles/files/sh/.bash_env b/qusal/dotfiles/files/sh/.bash_env deleted file mode 120000 index 0897744..0000000 --- a/qusal/dotfiles/files/sh/.bash_env +++ /dev/null @@ -1 +0,0 @@ -.config/bash/bash_env \ No newline at end of file diff --git a/qusal/dotfiles/files/sh/.bash_logout b/qusal/dotfiles/files/sh/.bash_logout deleted file mode 120000 index ae553ad..0000000 --- a/qusal/dotfiles/files/sh/.bash_logout +++ /dev/null @@ -1 +0,0 @@ -.config/bash/bash_logout \ No newline at end of file diff --git a/qusal/dotfiles/files/sh/.bash_profile b/qusal/dotfiles/files/sh/.bash_profile deleted file mode 120000 index e03d784..0000000 --- a/qusal/dotfiles/files/sh/.bash_profile +++ /dev/null @@ -1 +0,0 @@ -.config/bash/bash_profile \ No newline at end of file diff --git a/qusal/dotfiles/files/sh/.bashrc b/qusal/dotfiles/files/sh/.bashrc deleted file mode 120000 index 6d5541f..0000000 --- a/qusal/dotfiles/files/sh/.bashrc +++ /dev/null @@ -1 +0,0 @@ -.config/bash/bashrc \ No newline at end of file diff --git a/qusal/dotfiles/files/sh/.config/bash/bash_env b/qusal/dotfiles/files/sh/.config/bash/bash_env deleted file mode 100644 index 159e87c..0000000 --- a/qusal/dotfiles/files/sh/.config/bash/bash_env +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -## SPDX-FileCopyrightText: 2004 - 2022 Tim Pope -## SPDX-FileCopyrightText: 2023 Qusal contributors -## -## SPDX-License-Identifier: GPL-3.0-or-later - -# shellcheck disable=SC1090,SC1091 - -if test -z "$ENV" && test -n "$PATH"; then - case $- in - *l*) ;; - *) . "$HOME/.bash_profile" >/dev/null ;; - esac -fi diff --git a/qusal/dotfiles/files/sh/.config/bash/bash_logout b/qusal/dotfiles/files/sh/.config/bash/bash_logout deleted file mode 100644 index 3d1b800..0000000 --- a/qusal/dotfiles/files/sh/.config/bash/bash_logout +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -## SPDX-FileCopyrightText: 2004 - 2022 Tim Pope -## SPDX-FileCopyrightText: 2023 Qusal contributors -## -## SPDX-License-Identifier: GPL-3.0-or-later - -test "0${SHLVL-}" -le 1 && test -z "${SSH_TTY-}" && - test "${TERM-}" = linux && clear diff --git a/qusal/dotfiles/files/sh/.config/bash/bash_profile b/qusal/dotfiles/files/sh/.config/bash/bash_profile deleted file mode 100644 index dc18d17..0000000 --- a/qusal/dotfiles/files/sh/.config/bash/bash_profile +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -## SPDX-FileCopyrightText: 2023 Qusal contributors -## -## SPDX-License-Identifier: GPL-3.0-or-later - -# shellcheck disable=SC1090,1091 - -. "$HOME/.profile" -case $- in *i*) . "$HOME/.bashrc";; esac diff --git a/qusal/dotfiles/files/sh/.config/bash/bashrc b/qusal/dotfiles/files/sh/.config/bash/bashrc deleted file mode 100644 index 99440ca..0000000 --- a/qusal/dotfiles/files/sh/.config/bash/bashrc +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/env bash - -## SPDX-FileCopyrightText: 2023 Qusal contributors -## -## SPDX-License-Identifier: GPL-3.0-or-later - -## {{{ Requirements -## If not running interactively, return. -case $- in - *i*) ;; - *) return;; -esac - -## Source default files. -# shellcheck disable=SC1090,SC1091 -source "$HOME/.profile" -# shellcheck disable=SC1090 -source "$ENV" -## }}} -## {{{ Options -HISTCONTROL=ignoredups -shopt -s autocd -shopt -s direxpand -shopt -s cdspell -shopt -s dirspell -shopt -s histappend -shopt -s checkwinsize -shopt -s extglob -shopt -s globstar -## }}} -## {{{ Alias -alias reload="exec bash" -## }}} -## {{{ Prompt -if test -z "${debian_chroot:-}" && test -r /etc/debian_chroot; then - debian_chroot="$(cat /etc/debian_chroot)" -fi - -_reset_line() { - ## Credit: Can't find the source, posted on StackExchange or alike. - ## Does not work well on Bash 5.0 and older. - test "$(echo "${BASH_VERSION%.*}" | tr -d ".")" -lt 51 && return - - local termios cur_y - ## Ask the terminal for any pending (line buffered) input. - termios=$(stty --save) && stty -icanon && stty "$termios" - ## On pending input, assume it's been echoed and we're not in first column. - ## Otherwise ask the terminal for current column and read it from input. - if read -t 0 || { - IFS='[;' read -s -r -d'R' -p$'\033[6n' _ _ cur_y && [[ $cur_y != 1 ]] - } - then - ## Print line ending char with reversed video and end with newline. - printf '%b' "\033[41m\033[0m\033[7m%\033[m\n\r" - fi -} - -_print_ec(){ - test "${_ec_ps1}" = "0" && return - if test "${color_prompt:-}" = "yes"; then - printf %s"(\001\033[31m\002${_ec_ps1}\001\033[0m\002)" - else - printf '%s' "(${_ec_ps1})" - fi -} - -_save_ec() { _ec_ps1=$?; } -PROMPT_COMMAND=(_save_ec) -newline=$'\n' - -if test "${color_prompt:-}" = "yes"; then - # shellcheck disable=SC2154 - PS1="\$(_reset_line)\[\033[35m\][\[${reset_color}\]${debian_chroot:+($debian_chroot)}\[${usercolor}\]\u@\h \[${dircolor}\]\w\[${reset_color}\]\$(_git_prompt_info)\[\033[35m\]]\[${reset_color}\]${newline-}\$(_print_ec)${ps1_symbol} " -else - PS1="\$(_reset_line)[${debian_chroot:+($debian_chroot)}\u@\h:\w\$(_git_prompt_info)]${newline-}\$(_print_ec)${ps1_symbol} " -fi - -## If this is an xterm set the title to user@host:dir -case "$TERM" in - xterm*|rxvt*) - PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" - ;; -esac - -## Reset cursor to steady block after command input and before execution. -# shellcheck disable=SC2034 -PS0="\e[2 q\2" - -if ! shopt -oq posix; then - source_readable /usr/share/bash-completion/bash_completion -fi - -unset newline ps1_symbol -## }}} -## {{{ Plugins -if has zoxide; then - eval "$(zoxide init bash)" -fi - -source_readable /usr/share/doc/fzf/examples/key-bindings.bash -source_readable /usr/share/doc/fzf/examples/completion.bash -## }}} -## {{{ End -## Source local bash configuration. -source_readable "$HOME/.bashrc.local" -## }}} diff --git a/qusal/dotfiles/files/sh/.config/bash/inputrc b/qusal/dotfiles/files/sh/.config/bash/inputrc deleted file mode 100644 index a232e7e..0000000 --- a/qusal/dotfiles/files/sh/.config/bash/inputrc +++ /dev/null @@ -1,136 +0,0 @@ -# inputrc - -## SPDX-FileCopyrightText: 2023 Qusal contributors -## -## SPDX-License-Identifier: GPL-3.0-or-later - -$include /etc/inputrc - -## Options -set bell-style none -set show-all-if-ambiguous on -set colored-stats on -set visible-stats on -set mark-symlinked-directories on -set colored-completion-prefix on -set menu-complete-display-prefix on -set skip-completed-text -set editing-mode emacs -set show-mode-in-prompt on - -$if term=linux - set emacs-mode-string "\1\e[?0c\2" - set vi-ins-mode-string "\1\e[?0c\2" - set vi-cmd-mode-string "\1\e[?8c\2" -$else - set emacs-mode-string "\1\e[6 q\2" - set vi-ins-mode-string "\1\e[6 q\2" - set vi-cmd-mode-string "\1\e[2 q\2" -$endif - -## Mode -$if mode=emacs - - set keymap emacs-ctlx - v: vi-editing-mode - Control-v: "\C-xv\e" - Esc: "\C-xv\e" - set keymap emacs - -$else - - set keymap vi-insert - Control-a: beginning-of-line - Control-b: backward-char - Control-d: delete-char - Control-e: end-of-line - Control-f: forward-char - Control-j: accept-line - Control-k: kill-line - Control-l: clear-screen - Control-m: accept-line - Control-n: next-history - Control-p: previous-history - Control-r: reverse-search-history - Control-s: forward-search-history - Control-t: transpose-chars - Control-u: unix-line-discard - Control-v: quoted-insert - Control-w: backward-kill-word - Control-y: yank - Control-[: vi-movement-mode - Control-_: undo - Control-?: backward-delete-char - Space: self-insert - - set keymap vi-command - Control-d: vi-eof-maybe - Control-h: backward-char - Control-j: accept-line - Control-k: kill-line - Control-l: clear-screen - Control-m: accept-line - Control-n: next-history - Control-p: previous-history - Control-q: quoted-insert - Control-r: vi-redo - Control-t: transpose-chars - Control-u: unix-line-discard - Control-v: quoted-insert - Control-w: backward-kill-word - Control-y: yank - Control-u: vi-undo - Control-?: backward-delete-char - Space: forward-char -$endif - -## Application -$if Bash - Control-w: backward-kill-word -$endif - - -## Home -"\e[1~": beginning-of-line -"\e[H": beginning-of-line -"\eOH": beginning-of-line - -## End -"\e[4~": end-of-line -"\e[F": end-of-line -"\eOF": end-of-line - -## Delete -"\e[3~": delete-char -"\e[P": delete-char -"\eOP": delete-char - -## Insert -"\e[2~": quoted-insert -"\e[L": quoted-insert - -## PgUp -"\e[5~": beginning-of-history -"\e[I": beginning-of-history - -## PgDown -"\e[6~": end-of-history -"\e[G": end-of-history - -## Ctrl+RighArrow -"\e[1;5C": forward-word -"\e[5C": forward-word -"\e\e[C": forward-word - -## Ctrl+LeftArrow -"\e[1;5D": backward-word -"\e[5D": backward-word -"\e\e[D": backward-word - -## Terminal -$if term=rxvt - "\e[7~": beginning-of-line - "\e[8~": end-of-line - "\eOc": forward-word - "\eOd": backward-word -$endif diff --git a/qusal/dotfiles/files/sh/.config/dircolors/dircolors b/qusal/dotfiles/files/sh/.config/dircolors/dircolors deleted file mode 100644 index f4f010f..0000000 --- a/qusal/dotfiles/files/sh/.config/dircolors/dircolors +++ /dev/null @@ -1,174 +0,0 @@ -# dircolors - -## SPDX-FileCopyrightText: 2004 - 2022 Tim Pope -## SPDX-FileCopyrightText: 2023 Qusal contributors -## -## SPDX-License-Identifier: GPL-3.0-or-later - -# Credits: https://github.com/tpope/dotfiles/blob/master/.dir_colors -# vim: set ft=dircolors - -# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the -# slackware version of dircolors) are recognized but ignored. -# Below are TERM entries, which can be a glob patterns, to match -# against the TERM environment variable to determine if it is colorizable. -TERM Eterm -TERM ansi -TERM *color* -TERM con[0-9]*x[0-9]* -TERM cons25 -TERM console -TERM cygwin -TERM dtterm -TERM gnome -TERM hurd -TERM jfbterm -TERM konsole -TERM kterm -TERM linux -TERM linux-c -TERM mlterm -TERM putty -TERM rxvt* -TERM screen* -TERM st -TERM terminator -TERM tmux* -TERM vt100 -TERM xterm* - -# Below are the color init strings for the basic file types. -# One can use codes for 256 or more colors supported by modern terminals. -# The default color codes use the capabilities of an 8 color terminal -# with some additional attributes as per the following codes: -# Attribute codes: -# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed -# Text color codes: -# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white -# Background color codes: -# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white -#NORMAL 00 # no color code at all -#FILE 00 # regular file: use no color at all -#RESET 0 # reset to "normal" color -DIR 01;34 # directory -LINK 01;36 # symbolic link. (If you set this to 'target' instead of a - # numerical value, the color is as for the file pointed to.) -# MULTIHARDLINK 00 # regular file with more than one link -FIFO 33 # pipe -SOCK 01;35 # socket -# DOOR 01;44 # door -BLK 00;35 # block device driver -CHR 01;33 # character device driver -ORPHAN 00;41 # symlink to nonexistent file -MISSING 00;45 # said nonexistent file - -SETUID 37;41 # file that is setuid (u+s) -SETGID 30;43 # file that is setgid (g+s) -#CAPABILITY 30;41 # file with capability -STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w) -OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky -STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable -# This is for files with execute permission: -EXEC 01;32 - -# List any file extensions like '.gz' or '.tar' that you would like ls -# to colorize below. Put the extension, a space, and the color init string. -# (and any comments you want to add after a '#') -# If you use DOS-style suffixes, you may want to uncomment the following: -.cmd 00;32 -.exe 00;32 -.com 00;32 -.btm 00;32 -.bat 00;32 -# Or if you want to colorize scripts even if they do not have the -# executable bit actually set. -#.sh 01;32 -#.csh 01;32 - -# archives or compressed (bright red) -.tar 01;31 -.tgz 01;31 -.arc 01;31 -.arj 01;31 -.taz 01;31 -.lha 01;31 -.lz4 01;31 -.lzh 01;31 -.lzma 01;31 -.tlz 01;31 -.txz 01;31 -.tzo 01;31 -.t7z 01;31 -.zip 01;31 -.ZIP 01;31 -.z 01;31 -.Z 01;31 -.dz 01;31 -.gz 01;31 -.lrz 01;31 -.lz 01;31 -.lzo 01;31 -.xz 01;31 -.zst 01;31 -.tzst 01;31 -.bz2 01;31 -.bz 01;31 -.tbz 01;31 -.tbz2 01;31 -.tz 01;31 -.deb 01;31 -.rpm 01;31 -.jar 01;31 -.war 01;31 -.ear 01;31 -.sar 01;31 -.rar 01;31 -.alz 01;31 -.ace 01;31 -.zoo 01;31 -.cpio 01;31 -.7z 01;31 -.rz 01;31 -.cab 01;31 -.wim 01;31 -.swm 01;31 -.dwm 01;31 -.esd 01;31 - -# backup and temporary files -*~ 01;30 -*- 01;30 -.old 01;30 -.OLD 01;30 -.bak 01;30 -.BAK 01;30 -.back 01;30 -.dpkg-old 01;30 -.swp 01;30 -.swo 01;30 -.aux 01;30 -.bbl 01;30 -.glo 01;30 -.gls 01;30 -.ind 01;30 -.idx 01;30 -.blg 01;30 - -# system libraries, etc. -.so 00;33 -.o 00;33 -.a 00;33 -.dll 00;33 -.rbc 00;33 -.pyc 00;33 -.class 00;33 - -# patches -.diff 00;31 -.patch 00;31 - -# misc. -.dpkg-dist 01;37 -*core 01;37 -.lnk 01;36 -.url 01;36 diff --git a/qusal/dotfiles/files/sh/.config/less/lessfilter b/qusal/dotfiles/files/sh/.config/less/lessfilter deleted file mode 100755 index f8fa6b4..0000000 --- a/qusal/dotfiles/files/sh/.config/less/lessfilter +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -## SPDX-FileCopyrightText: 2004 - 2022 Tim Pope -## SPDX-FileCopyrightText: 2023 Qusal contributors -## -## SPDX-License-Identifier: GPL-3.0-or-later - -## Credits: https://github.com/tpope/dotfiles/blob/master/.lessfilter - -set -eu - -if test -d "$1"; then - exec ls -lF "$1" -else - case $1 in - *.json) command -v jq >/dev/null && exec jq -C . "$1";; - esac -fi - -exit 1 diff --git a/qusal/dotfiles/files/sh/.config/less/lesskey b/qusal/dotfiles/files/sh/.config/less/lesskey deleted file mode 100644 index 11c0191..0000000 --- a/qusal/dotfiles/files/sh/.config/less/lesskey +++ /dev/null @@ -1,21 +0,0 @@ -## SPDX-FileCopyrightText: 2013 - 2016 Tim Pope -## -## SPDX-License-Identifier: GPL-3.0-or-later - -## Credits: https://github.com/tpope/dotfiles/blob/master/.lesskey -#command -h left-scroll -l right-scroll -i toggle-option i -\b back-screen -^H back-screen -^? back-screen -\\ quit -#line-edit -^A home -^B left -^E end -^F right -^N down -^P up -\ef word-right diff --git a/qusal/dotfiles/files/sh/.config/less/lesskey-old b/qusal/dotfiles/files/sh/.config/less/lesskey-old deleted file mode 100644 index 5e2a428..0000000 Binary files a/qusal/dotfiles/files/sh/.config/less/lesskey-old and /dev/null differ diff --git a/qusal/dotfiles/files/sh/.config/sh/profile b/qusal/dotfiles/files/sh/.config/sh/profile deleted file mode 100644 index 3365751..0000000 --- a/qusal/dotfiles/files/sh/.config/sh/profile +++ /dev/null @@ -1,133 +0,0 @@ -#!/bin/sh - -## SPDX-FileCopyrightText: 2023 Qusal contributors -## -## SPDX-License-Identifier: GPL-3.0-or-later - -## Not so invasive because it only assigns a value if it is empty. -: "${HOME:=$(cd ~ && pwd)}" -: "${USER:=$(id -un || printf %s "${HOME##*/}")}" -: "${UID:=$(id -u || awk -F':' -v user="$USER" '/^user:/{print $3}' /etc/passwd)}" -: "${HOSTNAME:=$(hostname)}" -export HOME USER UID HOSTNAME - -## Set XDG_*_HOME variables. -XDG_CONFIG_HOME="$HOME/.config" -XDG_CACHE_HOME="$HOME/.cache" -XDG_DATA_HOME="$HOME/.local/share" -XDG_STATE_HOME="$HOME/.local/state" -export XDG_CONFIG_HOME XDG_CACHE_HOME XDG_DATA_HOME XDG_STATE_HOME -mkdir -p "$XDG_CONFIG_HOME" "$XDG_CACHE_HOME" "$XDG_DATA_HOME" "$XDG_STATE_HOME" -## Set XDG_*_DIR variables. -eval "$(grep "^[ ]*XDG_[A-Z].*_DIR=" "$XDG_CONFIG_HOME/user-dirs.dirs" | - sed "s/^/export /")" - -## Set directory to be used for coding. -CODEDIR="$HOME/src" -export CODEDIR - -## Set shell configuration directories. -SHDIR="$XDG_CONFIG_HOME/sh" -BASHDIR="$XDG_CONFIG_HOME/bash" -ZDOTDIR="$XDG_CONFIG_HOME/zsh" -export SHDIR BASHDIR ZDOTDIR - -## Set general variables. -PATH="$HOME/bin:$HOME/.local/bin/$HOSTNAME:$HOME/.local/bin" -PATH="$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" -PATH="$PATH:/usr/local/games:/usr/games" -# INFOPATH="/usr/local/share/info:/usr/local/info:/usr/share/info:/usr/info" -# MANPATH="/usr/local/man:/usr/local/share/man:/usr/share/man:/usr/man" -ENV="$SHDIR/shrc" -BASH_ENV="$BASHDIR/bash_env" -TMPDIR="/tmp" -LANG="en_US.UTF-8" -LANGUAGE="${LANG%.*}" -LC_ALL="$LANG" -GNUPGHOME="$HOME/.gnupg" -export PATH INFOPATH MANPATH ENV TMPDIR LANG LANGUAGE LC_ALL GNUPGHOME - -## Set interactive shell variables. -HISTSIZE=10000 -EDITOR="$(has -s vim vim.tiny vi)" -test -n "$EDITOR" && VISUAL="$EDITOR" -TERMINAL="xterm" -BROWSER="chromium" -PAGER="less" -LESS="FRq#10" -GPG_TTY="$(tty)" -BLOCKSIZE="K" -RSYNC_RSH="ssh -ax" -SYSTEMD_PAGER="" -if test -s /rw/config/gpg-split-domain; then - QUBES_GPG_DOMAIN="$(cat /rw/config/gpg-split-domain)" -else - QUBES_GPG_DOMAIN="@default" -fi -export HISTSIZE EDITOR VISUAL TERMINAL BROWSER PAGER LESS GPG_TTY BLOCKSIZE -export RSYNC_RSH SYSTEMD_PAGER QUBES_GPG_DOMAIN - -if has fd; then - FZF_DEFAULT_COMMAND='fd --type=f --hidden --exclude=.git' -elif has fdind; then - FZF_DEFAULT_COMMAND='fdfind --type=f --hidden --exclude=.git' -fi -FZF_DEFAULT_OPTS="--layout=reverse --height 40%" -FZF_TMUX=1 -export FZF_DEFAULT_COMMAND FZF_DEFAULT_OPTS FZF_TMUX - -## 'vim.tiny' and 'vi' fails if VIMINIT is set to our vimrc. -if has vim; then - if test -f "$XDG_CONFIG_HOME/vim/vimrc"; then - # shellcheck disable=SC2016,SC2089 - VIMINIT='let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" | so $MYVIMRC' - # shellcheck disable=SC2090 - export VIMINIT - fi -fi - -## XDG_CONFIG_HOME: user-specific configuration files -GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc-2.0" -KDEHOME="$XDG_CONFIG_HOME/kde" -#KDEROOTHOME="/root/.config/kde" -CURL_HOME="$XDG_CONFIG_HOME/curl" -WGETRC="$XDG_CONFIG_HOME/wget/wgetrc" -INPUTRC="$BASHDIR/inputrc" -XINITRC="$XDG_CONFIG_HOME/x11/xinitrc" -if has less; then - if test "$(less -V | head -1 | cut -d " " -f2)" -ge 590; then - LESSKEY="$XDG_CONFIG_HOME/less/lesskey" - else - LESSKEY="$XDG_CONFIG_HOME/less/lesskey-old" - fi -fi -export GTK2_RC_FILES KDEHOME KDEROOTHOME CURL_HOME WGETRC INPUTRC XINITRC -export LESSKEY - -## XDG_DATA_HOME: user-specific data files -RUSTUP_HOME="$XDG_DATA_HOME/rustup" -CARGO_HOME="$XDG_DATA_HOME/cargo" -GOPATH="$XDG_DATA_HOME/go" -WORKON_HOME="$XDG_DATA_HOME/virtualenvs" -ELECTRUMDIR="$XDG_DATA_HOME/electrum" -TERMINFO="$XDG_DATA_HOME/terminfo" -export RUSTUP_HOME CARGO_HOME GOPATH WORKON_HOME ELECTRUMDIR TERMINFO - -## XDG_STATE_HOME: user-specific state files, persists application restarts -LESSHISTFILE="$XDG_STATE_HOME/history-less" -HISTFILE="$XDG_STATE_HOME/history-shell" -export LESSHISTFILE HISTFILE - -## XDG_CACHE_HOME: user-specific non-essential data files -GOCACHE="$XDG_CACHE_HOME/go-build" -GOMODCACHE="$XDG_CACHE_HOME/go/mod" -export GOCACHE GOMODCACHE - -## Start agents -if test -z "${SSH_AUTH_SOCK-}" && has ssh-agent; then - eval "$(ssh-agent -s)" >/dev/null -fi - -## Source local profile. -# shellcheck disable=SC1090,SC1091 -! test -r "$HOME/.profile.local" || . "$HOME/.profile.local" diff --git a/qusal/dotfiles/files/sh/.config/sh/shrc b/qusal/dotfiles/files/sh/.config/sh/shrc deleted file mode 100644 index 1adffff..0000000 --- a/qusal/dotfiles/files/sh/.config/sh/shrc +++ /dev/null @@ -1,284 +0,0 @@ -#!/bin/sh - -## SPDX-FileCopyrightText: 2004 - 2022 Tim Pope -## SPDX-FileCopyrightText: 2023 Qusal contributors -## -## SPDX-License-Identifier: GPL-3.0-or-later - -## Credits: https://github.com/tpope/dotfiles/blob/master/.shrc - -## {{{ Requirements -## If not running interactively, return. -case $- in - *i*) ;; - *) return;; -esac - -## Source profile. -# shellcheck disable=SC1091 -. "$HOME/.profile" -## }}} -## {{{ Options -stty -ixon -set -o noclobber -set -o notify -## Vi-mode does not work on Debian Bullseye with Dash 5.11 (2020). -## Debian Boowkworm has Dash >5.11 (2021) with adds libedit to the shell. -## https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=561663 -#set -o vi -#stty quit undef -stty werase undef -## }}} -## {{{ Alias -## Standard commands. -test -n "$VISUAL" && alias vi='$VISUAL' -alias du="du -h" -alias df="df -h" -alias cp="cp -i" -alias mv="mv -i" -alias ls="ls -hF --group-directories-first --color=auto" -if has lsblk; then - _lsblk_options="NAME,FSTYPE,LABEL,SIZE,FSAVAIL,FSUSE%,MOUNTPOINT" - alias lsblk='lsblk -o $_lsblk_options' - alias lsblku='lsblk -o $_lsblk_options,UUID,PARTUUID' -fi -if ! grep --color 2>&1 | grep -q "unrecognized option"; then - alias grep="grep --exclude='.*.swp' --exclude='*~' --color=auto" -fi -alias fgrep="grep -F" -alias egrep="grep -E" -alias diff="diff --color=auto" -has dir && alias dir="dir --color=auto" -has vdir && alias vdir="vdir --color=auto" -alias ip="ip -color=auto" -has highlight && alias highlight="highlight --out-format=ansi" -has pygmentize && alias pygmentize="pygmentize -f terminal" - -## Helpers. -alias reload='. $ENV' r="reload" -alias reload-xprofile='. $XDG_CONFIG_HOME/x11/xprofile' rx="reload-xprofile" -## POSIX cd does not allow '--' and other shells breaks when not using it. -alias -- -="cd -" 2>/dev/null || true -test -n "$EDITOR" && alias e='$EDITOR' -test -n "$VISUAL" && alias v='$VISUAL' -alias j="jobs" -alias h="history" -alias l="ls -CF" -alias ll="ls -Fl" -alias la="ls -Fa" -alias lla="ls -Fla" -alias laa='ls -Fd .* 2>/dev/null' -alias llaa='ls -Fdl .* 2>/dev/null' -alias lr='ls -R' -alias lx='ll -BX' -alias lz='ll -rS' -alias lt='ll -rt' -alias lm='la | more' -alias now="date +%a\ %Y-%m-%d\ %T" -alias mkd="mkdir -pv" -mkcd(){ mkd "$1" && cd "$1" || return; } - -## Non-standard programs. -has info && alias info="info --vi-keys" -has htop && alias top="htop" -has yt-dlp && alias yt="yt-dlp --add-metadata -ic" -has fdfind && alias fd="fdfind" -has lynx && alias lynx="lynx -vikeys" -has qubesctl && alias qubesctl="sudo qubesctl --show-output" qctl="qubesctl" -has gpg && alias gpgs="gpg --show-keys" -has gpg2 && alias gpg="gpg2" -if has qubes-gpg-client-wrapper; then - alias qubes-gpg="qubes-gpg-client-wrapper" - alias qgpg="qubes-gpg" -fi -## {{{ Tmux -has tmux && { - alias t="tmux" - alias td="t detach" - alias tls="t list-sessions" tl="tls" - alias tlw="t list-windows" - alias tlp="t list-panes" - alias tcl="clear && t clear-history" # clear buffer cus memory - tcla(){ - ## Clear all the panes of the current session. - for _t_pane in $(tmux list-panes -s -F '#{pane_id}'); do - tmux clear-history -t "$_t_pane" - done - } -} -## }}} -## {{{ Mutt -if has mutt; then - alias m="mutt" - alias mp="mutt -e 'unset signature' -e 'set pgp_autoinline=yes crypt_autosign=yes' -H" -fi -## }}} -## {{{ Git -if has git; then - alias g="git" - alias gcd='cd "$(git rev-parse --show-toplevel)"' - ## Use git aliases with 'g' prefix. - g_alias="$(git config --get-regexp 'alias.*' | sed 's/^alias\.//;s/ .*//')" - for key in $(printf '%s\n' "${g_alias}"); do - # shellcheck disable=SC2139,SC2140 - alias "g$key"="git $key" - done - unset g_alias -fi -## }}} -## }}} -## {{{ Colors -## Colorise "ls" output. -if has dircolors; then - ## Use dircolors if available. - if test -r "$XDG_CONFIG_HOME/dircolors/dircolors"; then - eval "$(dircolors -b "$XDG_CONFIG_HOME/dircolors/dircolors")" - else - eval "$(dircolors -b)" - fi - ## Fix bold on some terminals. - case "$TERM" in - xterm*|screen*) - LS_COLORS="$(echo "$LS_COLORS" | sed -e 's/01;3/00;9/g')" - ;; - esac - export LS_COLORS -else - ## BSD - CLICOLOR=1 CLICOLOR_FORCE=1 LSCOLORS=ExGxFxdxCxfxDxxbadacad ls -hF - export CLICOLOR CLICOLOR_FORCE LSCOLORS -fi - -## Set gcc colors. -GCC_COLORS="error=00;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01" -export GCC_COLORS - -## Colors for programs that uses less such as 'man'. -GROFF_NO_SGR=1 -LESS_TERMCAP_mb="$(tput bold; tput setaf 2)" # begin blink -LESS_TERMCAP_md="$(tput bold; tput setaf 6)" # begin bold -LESS_TERMCAP_me="$(tput sgr0)" # reset bold/blink -LESS_TERMCAP_so="$(tput bold; tput setaf 7; tput setab 4)" # begin reverse video -LESS_TERMCAP_se="$(tput rmso; tput sgr0)" # reset reverse video -LESS_TERMCAP_us="$(tput smul; tput bold; tput setaf 2)" # begin underline -LESS_TERMCAP_ue="$(tput rmul; tput sgr0)" # reset underline -LESS_TERMCAP_mr="$(tput rev)" # revert -LESS_TERMCAP_mh="$(tput dim)" # dimerize -export GROFF_NO_SGR -export LESS_TERMCAP_mb LESS_TERMCAP_md LESS_TERMCAP_me -export LESS_TERMCAP_so LESS_TERMCAP_se LESS_TERMCAP_us -export LESS_TERMCAP_ue LESS_TERMCAP_mr LESS_TERMCAP_mh - -## }}} -## {{{ Prompt -## Set ability to color terminal. -color_prompt="" -# shellcheck disable=2034 -case "$TERM" in - iterm|*-truecolor) - export COLORTERM=truecolor; color_prompt=yes - ;; - *-color|*-256color) - color_prompt=yes - ;; - vte*) ;; -esac - -# shellcheck disable=SC3028 -_get_prompt_time(){ - test -n "${SECONDS:-}" || return - # shellcheck disable=SC2154 - _ptime="$((SECONDS-_saved_prompt_time))" - printf "%02d:%02d:%02d" \ - "$((_ptime/3600))" "$(((_ptime%3600)/60))" "$((_ptime%60))" -} - -_git_prompt_info(){ - has git || return - ref="$(git symbolic-ref HEAD 2>/dev/null | cut -d '/' -f3)" - test "${ref-}" || ref="$(git describe --tags --exact-match HEAD 2>/dev/null)" - test "${ref-}" || ref="$(git rev-parse HEAD 2>/dev/null | head -c 7)" - test "${ref-}" || return - # shellcheck disable=2039,3003 - case "$TERM" in - *-256color|xterm-kitty) branchcolor=$'\e[38;5;31m' ;; - *-88color|rxvt-unicode) branchcolor=$'\e[38;5;22m' ;; - *) branchcolor=$'\e[00;94m' ;; - esac - if test -n "${ZSH_VERSION-}"; then - # shellcheck disable=2016 - print -Pn '(%%{$branchcolor%%}%20>...>$ref%<<%%{\e[00m%%})' - else - printf '%s' "($branchcolor$ref$reset_color)" - fi -} - -# shellcheck disable=SC2034 -usercolor="$(printf '%b' "\e[00;93m")" -dircolor="$(printf '%b' "\e[01;34m")" -# shellcheck disable=SC2034 -## Use echotc Co? Only available by default for zsh, not bash. -case "$TERM" in - *-256color|xterm-kitty) - usercolor="$(printf '%b' "\e[38;5;184m")" - dircolor="$(printf '%b' "\e[38;5;27m")" - ;; - *-88color|rxvt-unicode) - usercolor="$(printf '%b' "\e[38;5;56m")" - dircolor="$(printf '%b' "\e[38;5;23m")" - ;; -esac -# shellcheck disable=SC2034 -test "$(id -u)" -eq 0 && usercolor="$(printf '%b' "\e[00;97m")" -# shellcheck disable=SC2034 -reset_color="$(printf '%b' '\e[00m')" - -case "${ZSH_VERSION-}" in - "") ps1_symbol="$";; - *) ps1_symbol="%%";; -esac -test "$(id -u)" = "0" && ps1_symbol="#" - -## Do not colorize this prompt, Sh fails to count the correct number of -## characters on the prompt leading to problems. -PS1="$(id -un)@$(hostname -s)${ps1_symbol} " -## }}} -## {{{ External Functions - -## Source file if it is readable. -## Usage: source_readable FILE -source_readable(){ - for _file in "$@"; do - # shellcheck disable=SC1090 - ! test -r "${_file}" || . "${_file}" - done -} - -_fzf_comprun() { - _fzf_command="$1" - shift - - case "$_fzf_command" in - cd) if has tree; then - fzf --preview 'tree -C {} | head -200' "$@" - else - fzf "$@" - fi - ;; - export|unset) - fzf --preview "eval 'echo \$'{}" "$@" - ;; - ssh) - fzf --preview 'dig {}' "$@" - ;; - *) - fzf --preview 'test -d {} || cat {}' "$@" - ;; - esac -} - -## }}} -## {{{ End -## Source local shell configuration file. -source_readable "$HOME/.shrc.local" -## }}} diff --git a/qusal/dotfiles/files/sh/.config/user-dirs.dirs b/qusal/dotfiles/files/sh/.config/user-dirs.dirs deleted file mode 100644 index 426a08b..0000000 --- a/qusal/dotfiles/files/sh/.config/user-dirs.dirs +++ /dev/null @@ -1,19 +0,0 @@ -## SPDX-FileCopyrightText: 2023 Qusal contributors -## -## SPDX-License-Identifier: GPL-3.0-or-later - -# This file is written by xdg-user-dirs-update -# If you want to change or add directories, just edit the line you're -# interested in. All local changes will be retained on the next run. -# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped -# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an -# absolute path. No other format is supported. -# -XDG_DESKTOP_DIR="$HOME/" -XDG_DOWNLOAD_DIR="$HOME/" -XDG_TEMPLATES_DIR="$HOME/" -XDG_PUBLICSHARE_DIR="$HOME/" -XDG_DOCUMENTS_DIR="$HOME/" -XDG_MUSIC_DIR="$HOME/" -XDG_PICTURES_DIR="$HOME/" -XDG_VIDEOS_DIR="$HOME/" diff --git a/qusal/dotfiles/files/sh/.config/user-dirs.locale b/qusal/dotfiles/files/sh/.config/user-dirs.locale deleted file mode 100644 index 1ee4843..0000000 --- a/qusal/dotfiles/files/sh/.config/user-dirs.locale +++ /dev/null @@ -1,5 +0,0 @@ -## SPDX-FileCopyrightText: 2023 Qusal contributors -## -## SPDX-License-Identifier: GPL-3.0-or-later - -en_US diff --git a/qusal/dotfiles/files/sh/.config/zsh/.zlogout b/qusal/dotfiles/files/sh/.config/zsh/.zlogout deleted file mode 120000 index 4a52f7a..0000000 --- a/qusal/dotfiles/files/sh/.config/zsh/.zlogout +++ /dev/null @@ -1 +0,0 @@ -zlogout \ No newline at end of file diff --git a/qusal/dotfiles/files/sh/.config/zsh/.zprofile b/qusal/dotfiles/files/sh/.config/zsh/.zprofile deleted file mode 120000 index 018fc86..0000000 --- a/qusal/dotfiles/files/sh/.config/zsh/.zprofile +++ /dev/null @@ -1 +0,0 @@ -zprofile \ No newline at end of file diff --git a/qusal/dotfiles/files/sh/.config/zsh/.zshenv b/qusal/dotfiles/files/sh/.config/zsh/.zshenv deleted file mode 120000 index 65979f5..0000000 --- a/qusal/dotfiles/files/sh/.config/zsh/.zshenv +++ /dev/null @@ -1 +0,0 @@ -zshenv \ No newline at end of file diff --git a/qusal/dotfiles/files/sh/.config/zsh/.zshrc b/qusal/dotfiles/files/sh/.config/zsh/.zshrc deleted file mode 120000 index c8b42f4..0000000 --- a/qusal/dotfiles/files/sh/.config/zsh/.zshrc +++ /dev/null @@ -1 +0,0 @@ -zshrc \ No newline at end of file diff --git a/qusal/dotfiles/files/sh/.config/zsh/zlogout b/qusal/dotfiles/files/sh/.config/zsh/zlogout deleted file mode 100644 index e2c2f9f..0000000 --- a/qusal/dotfiles/files/sh/.config/zsh/zlogout +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env zsh - -## SPDX-FileCopyrightText: 2004 - 2022 Tim Pope -## SPDX-FileCopyrightText: 2023 Qusal contributors -## -## SPDX-License-Identifier: GPL-3.0-or-later - -test "0${SHLVL-}" -le 1 && test -z "${SSH_TTY-}" && - test "${TERM-}" = linux && clear diff --git a/qusal/dotfiles/files/sh/.config/zsh/zprofile b/qusal/dotfiles/files/sh/.config/zsh/zprofile deleted file mode 100644 index f768762..0000000 --- a/qusal/dotfiles/files/sh/.config/zsh/zprofile +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env zsh - -## SPDX-FileCopyrightText: 2023 Qusal contributors -## -## SPDX-License-Identifier: GPL-3.0-or-later - -## Zsh does not source /etc/profile as it is not a Bourne based Shell, but -## some distributions such as Qubes, Whonix, Debian, Gentoo ship files to -## /etc/profile.d. - -emulate sh -c "source /etc/profile" -. "$HOME/.profile" diff --git a/qusal/dotfiles/files/sh/.config/zsh/zshenv b/qusal/dotfiles/files/sh/.config/zsh/zshenv deleted file mode 100644 index 0d5f3e2..0000000 --- a/qusal/dotfiles/files/sh/.config/zsh/zshenv +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env zsh - -## SPDX-FileCopyrightText: 2023 Qusal contributors -## -## SPDX-License-Identifier: GPL-3.0-or-later - -if test -z "$ENV" && test -n "$PATH"; then - case $- in - *l*) ;; - *) . "$HOME/.zprofile" >/dev/null ;; - esac -fi diff --git a/qusal/dotfiles/files/sh/.config/zsh/zshrc b/qusal/dotfiles/files/sh/.config/zsh/zshrc deleted file mode 100644 index 37fdf00..0000000 --- a/qusal/dotfiles/files/sh/.config/zsh/zshrc +++ /dev/null @@ -1,462 +0,0 @@ -#!/usr/bin/env zsh - -## SPDX-FileCopyrightText: 2004 - 2022 Tim Pope -## SPDX-FileCopyrightText: 2023 Qusal contributors -## -## SPDX-License-Identifier: GPL-3.0-or-later - -## Credits: https://github.com/tpope/dotfiles/blob/master/.zshrc - -## {{{ Requirements -## If not running interactively, return. -case $- in - *i*) ;; - *) return;; -esac - -## Source default files. -# shellcheck disable=SC1090 -source "$HOME/.zprofile" -source "$ENV" -## }}} -## {{{ Options -## - Quiet -setopt no_beep -## - Words -setopt interactive_comments -## - History -SAVEHIST="$HISTSIZE" -setopt hist_expire_dups_first # purge dups first -setopt hist_ignore_dups # ignore dups in history list -setopt hist_verify # if command has hist expansion, show it before executing -## - Expansion -setopt auto_cd -setopt no_no_match # if a pattern has no matches print an error -setopt numeric_glob_sort # sort file names numerically when relevant -setopt magic_equal_subst # filename expansion for opt=arg -setopt no_equals # don't interpret =string as a command -## - Prompt -setopt prompt_subst -setopt transient_rprompt -setopt print_exit_value - -set zle_bracketed_paste -autoload -Uz bracketed-paste-magic -zle -N bracketed-paste bracketed-paste-magic -autoload -Uz url-quote-magic -zle -N self-insert url-quote-magic - -pasteinit() { - OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]} - zle -N self-insert url-quote-magic -} -pastefinish() { - zle -N self-insert $OLD_SELF_INSERT -} -zstyle :bracketed-paste-magic paste-init pasteinit -zstyle :bracketed-paste-magic paste-finish pastefinish -## }}} -## {{{ Alias -alias reload="exec zsh" -## }}} -## {{{ Prompt -autoload -U colors && colors -[[ "${COLORTERM-}" == (24bit|truecolor) || "${terminfo[colors]}" -eq '16777216' ]] || zmodload zsh/nearcolor - -newline=$'\n' -if test "$color_prompt" = "yes"; then - PS1="%F{magenta}[%{$usercolor%}%n@%M%F{reset_color%} %{$dircolor%}%50<...<%~%<<%F{reset_color%}\$(_git_prompt_info)%F{magenta}]%F{reset_color}${newline-}${ps1_symbol} " - RPS1="%(?..(%{"$'\e[31m'"%}%?%{$reset_color%}%)%<<)" -else - PS1="[%n@%M %~\$(_git_prompt_info)]${newline}${ps1_symbol} " - RPS1="%(?..(%?%)%<<)" -fi - -## Set window title -_set_title() { - case "${1:-}" in - *install*) - hash -r ;; - esac - print -Pn '\e]1;%l@%m${1+*}\a' - print -Pn '\e]2;%n@%m:%~' - if test -n "${1:-}"; then - print -Pnr ' (%24>..>$1%>>)' | tr '\0-\037' '?' - fi - print -Pn " [%l]\a" -} - -case $TERM in - screen*) - precmd() { - _set_title "$@" - if [ "${STY:-}" -o "${TMUX:-}" ]; then - # print -Pn "\e]1;\a\e]1;@%m\a" - print -Pn '\ek@\e\\' - else - print -Pn '\ek@%m\e\\' - fi - } - preexec() { - _set_title "$@" - print -n "\ek" - print -Pnr '%10>..>$1' | tr '\0-\037' '?' - if [ "${STY:-}" -o "${TMUX:-}" ]; then - print -Pn '@\e\\' - else - print -Pn '@%m\e\\' - fi - } - ;; - - xterm*|rxvt*|Eterm*|kterm*|putty*|dtterm*|ansi*|cygwin*) - precmd () { _set_title "$@" } - preexec() { _set_title "$@" } - ;; - - linux*|vt220*) ;; - - *) - PS1="%n@%m:%~%# " - RPS1="%(?..(%?%)%<<)" - ;; -esac - -unset hostcolor hostletter hostcode dircolor usercolor usercode reset_color -unset newline -## }}} -## {{{ Completions - -## Enable completion. -zstyle ':completion:*' use-cache on -zstyle ':completion:*' cache-path $XDG_CACHE_HOME/zsh/zcompcache -zstyle ':completion:*' auto-description 'Specify: %d' -zstyle ':completion:*' completer _expand _complete _ignored _approximate -zstyle ':completion:*' expand prefix suffix -zstyle ':completion:*' file-sort name -zstyle ':completion:*' group-name '' -zstyle ':completion:*' ignore-parents parent pwd .. -zstyle ':completion:*' insert-unambiguous true -zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s -zstyle ':completion:*' list-suffixes true -zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=** r:|=**' 'l:|=* r:|=*' -zstyle ':completion:*' menu select=1 -zstyle ':completion:*' original true -zstyle ':completion:*' preserve-prefix '//[^/]##/' -zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s -zstyle ':completion:*' special-dirs true -zstyle ':completion:*' squeeze-slashes true -zstyle ':completion:*' use-compctl true -zstyle ':completion:*' verbose true -zstyle ':completion:*:*:-command-:*:*' file-patterns \ - '*(#q-*):executables:Executables *(-/):directories:Directories' -zstyle -e ':completion:*:*:-command-:*:*' tag-order ' - reply=(" - executables:Executables:Executables - builtins:Builtins:Builtins - commands:Commands:Commands - aliases:Aliases:Aliases - functions:Functions:Functions - parameters:Variables:Variables - reserved-words:Keywords:Keywords - directories:Directories - " - - )' - -## Completion per utility. -zstyle ':completion:*:sudo::' environ \ - HOME="/root" \ - PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" -zstyle ':completion:*:doas::' environ \ - HOME="/root" \ - PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - -## Colored completions. -# zstyle ':completion:*' format 'Completing %d' -zstyle ':completion:*:*:*:*:descriptions' format '%B%F{blue}-- %d --%b%f' -zstyle ':completion:*:messages' format ' %B%F{purple} -- %d --%f%b' -zstyle ':completion:*:warnings' format ' %B%F{red}-- no matches found --%f%b' - -zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} -zstyle ':completion:*:*:kill:*' list-colors '=(#b) #([0-9]#)*( *[a-z])*=94=91=93' - -## Load completions. -autoload -Uz compinit -zmodload zsh/complist -mkdir -p $XDG_CACHE_HOME/zsh -compinit -u -d $XDG_CACHE_HOME/zsh/zcompdump -# _comp_options+=(globdots) -if has zoxide; then - eval "$(zoxide init zsh)" -fi -## }}} -## {{{ Plugins -source_readable /usr/share/doc/fzf/examples/key-bindings.zsh -source_readable /usr/share/doc/fzf/examples/completion.zsh - -if test "$color_prompt" = "yes"; then - ## Enable auto-suggestions based on the history - if test -f /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh; then - ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=30 - ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=7,bg=8,underline" - typeset -a ZSH_AUTOSUGGEST_CLEAR_WIDGETS - ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(bracketed-paste) - source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh - fi - ## Highlight commands as you type - if test -f /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh; then - ## https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters - ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern regexp) - typeset -A ZSH_HIGHLIGHT_STYLES - ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=red' - ZSH_HIGHLIGHT_STYLES[default]='fg=white' - ZSH_HIGHLIGHT_STYLES[alias]='fg=cyan' - ZSH_HIGHLIGHT_STYLES[function]='fg=cyan' - ZSH_HIGHLIGHT_STYLES[builtin]='fg=green' - ZSH_HIGHLIGHT_STYLES[command]='fg=green' - ZSH_HIGHLIGHT_STYLES[precommand]='fg=green' - ZSH_HIGHLIGHT_STYLES[comment]='fg=black,bold' - ZSH_HIGHLIGHT_STYLES[globbing]='fg=cyan' - typeset -A ZSH_HIGHLIGHT_REGEXP - ZSH_HIGHLIGHT_REGEXP+=('^sudo' 'fg=magenta') - ZSH_HIGHLIGHT_REGEXP+=('^doas' 'fg=magenta') - source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh - fi -fi -## }}} -## {{{ Bindkeys - -## Widgets -## -function bindkey-multi () { - ## Usage: bindkey-multi mode Nmode -- bind nbind terminfoname -- widgetname - local i j widget nomap - local -a maps sequences - - test "$1" = "--" && nomap=1 - - while [[ "$1" != "--" ]]; do - maps+=( "$1" ) - shift - done - shift - - while [[ "$1" != "--" ]]; do - sequences+=( "$1" ) - shift - done - shift - - widget="$1" - test -z "$widget" && return 1 - - if test -n "$nomap"; then - for j in "${sequences[@]}"; do - test "$j" || continue - bindkey -- "$j" "$widget" - done - return 0 - fi - - for i in "${maps[@]}"; do - test "$i" || continue - for j in "${sequences[@]}"; do - test "$j" || continue - bindkey -M "$i" -- "$j" "$widget" - done - done - return 0 -} - -function clear-screen-and-scrollback() { - test -n "${TTY-}" || return - echoti civis >"$TTY" - printf '%b' "\e[H\e[2J" >"$TTY" - zle .reset-prompt - zle -R - printf '%b' "\e[3J" >"$TTY" - echoti cnorm >"$TTY" -} -zle -N clear-screen-and-scrollback - -fg-widget() { - if [[ $#BUFFER -eq 0 ]]; then - if jobs %- >/dev/null 2>&1; then - BUFFER='fg %-' - else - BUFFER='fg' - fi - zle accept-line - else - zle push-input - zle clear-screen - fi -} -zle -N fg-widget - -change-first-word(){ - zle beginning-of-line -N - zle kill-word -} -zle -N change-first-word - -new-screen() { - test -z "$STY" || screen < "$TTY" - test -z "$TMUX" || tmux new-window -} -zle -N new-screen - -zle-keymap-select zle-line-init() { - case $KEYMAP in - vicmd) print -n -- "\e[2 q";; - viins|main) print -n -- "\e[5 q";; - esac - - zle reset-prompt - zle -R -} -zle-line-finish() { - print -n -- "\e[2 q" -} -zle -N zle-line-init -zle -N zle-line-finish -zle -N zle-keymap-select - -set-keymap-vi(){ - export KEYTIMEOUT=1 - bindkey -v -} - -set-keymap-emacs(){ - bindkey -e - bindkey -r "^Q" -} - -## Keymap mode -set-keymap-emacs - -autoload -Uz select-word-style -select-word-style bash - -## Viins -bindkey -M viins "^A" beginning-of-line -bindkey -M viins "^B" backward-char -bindkey -M viins "^D" delete-char-or-list -bindkey -M viins "^E" end-of-line -bindkey -M viins "^F" forward-char -bindkey-multi emacs viins vicmd -- "^G" -- which-command -bindkey -M viins "^J" accept-search -bindkey -M viins "^K" kill-line -bindkey -M viins "^L" clear-screen-and-scrollback -bindkey -M viins "^M" accept-line -bindkey -M viins "^N" down-line-or-history -bindkey -M viins "^P" up-line-or-history -bindkey -M viins "^R" history-incremental-search-backward -bindkey -M viins "^S" history-incremental-search-forward -bindkey -M viins "^T" transpose-chars -bindkey-multi emacs viins -- "^W" -- vi-backward-kill-word -bindkey -M viins "^U" backward-kill-line -bindkey -M emacs "^U" backward-kill-line -bindkey -M viins "^Y" yank -bindkey-multi emacs viins vicmd -- "^Z" -- fg-widget -bindkey -M viins "^_" undo -bindkey -M viins "^@" redo -bindkey -M viins " " magic-space -bindkey -M emacs " " magic-space -bindkey -M emacs "^X^[" vi-cmd-mode -## Viins alt -bindkey -M viins "^[u" undo -bindkey -M viins "^[r" redo -bindkey -M viins "^[m" copy-prev-shell-word - -## Misc -bindkey -M isearch "^J" accept-search 2>/dev/null -bindkey -M menuselect "h" vi-backward-char -bindkey -M menuselect "k" vi-up-line-or-history -bindkey -M menuselect "l" vi-forward-char -bindkey -M menuselect "j" vi-down-line-or-history -bindkey -M menuselect "^C" send-break -bindkey -M menuselect "^J" accept-and-infer-next-history # accept-search -bindkey -M menuselect "^M" accept-line - -## Keys for multiple modes and multiple bindings. -## https://invisible-island.net/xterm/xterm-function-keys.html -## -## Shit+Tab -bindkey-multi viins menuselect -- "\E[Z" "${terminfo[kcbt]}" \ - -- reverse-menu-complete -## Backspace -bindkey-multi viins vicmd menuselect -- "^H" "^?" "${terminfo[kbs]}" \ - -- backward-delete-char -## Home -bindkey-multi viins vicmd -- "\E[1~" "\E[7~" "\E[H" "\EOH" \ - "${terminfo[khome]}" \ - -- beginning-of-line -## Insert -bindkey-multi viins vicmd -- "\E[2~" "\E[L" "${terminfo[kich1]}" \ - -- overwrite-mode -## Delete -bindkey-multi viins vicmd -- "\E[3~" "\E[P" "\EOP" "${terminfo[kdch1]}" \ - -- vi-delete-char -## End -bindkey-multi viins vicmd -- "\E[4~" "\E[8~" "\E[F" "\EOF" \ - "${terminfo[kend]}" \ - -- end-of-line -## PgUp -bindkey-multi viins -- "\E[5~" "\E[I" "${terminfo[kpp]}" \ - -- beginning-of-buffer-or-history -## PgDown -bindkey-multi viins -- "\E[6~" "\E[G" "${terminfo[knp]}" \ - -- end-of-buffer-or-history -## Up arrow -bindkey-multi viins vicmd -- "\E[A" "\EOA" "${terminfo[kcuu1]}" \ - -- up-line-or-history -## Down arrow -bindkey-multi viins vicmd -- "\E[B" "\EOB" "${terminfo[kcud1]}" \ - -- down-line-or-history -## Right arrow -bindkey-multi viins vicmd -- "\E[C" "\EOC" "${terminfo[kcuf1]}" \ - -- forward-char -## Left arrow -bindkey-multi viins vicmd -- "\E[D" "\EOD" "${terminfo[kcub1]}" \ - -- backward-char -## Ctrl-Delete -bindkey-multi viins vicmd -- "\E[3;5~" "\E[3\^" "${terminfo[kDC5]}" \ - -- kill-word -## Ctrl-RightArrow -bindkey-multi viins vicmd -- "\E[1;5C" "\E0c" "${terminfo[kRIT5]}" \ - -- forward-word -## Ctrl-LeftArrow -bindkey-multi viins vicmd -- "\E[1;5D" "\E0d" "${terminfo[kLFT5]}" \ - -- backward-word -## F11 -bindkey-multi viins -- "\E[23~" "${terminfo[kf11]}" -- new-screen - -autoload -Uz edit-command-line -zle -N edit-command-line -bindkey -M emacs "^[e" edit-command-line -bindkey -M emacs "^X^E" edit-command-line -bindkey -M vicmd "^E" edit-command-line - -bindkey -M emacs "\ea" change-first-word -bindkey -M emacs "^XD" describe-key-briefly - -for binding in ${(f)$(bindkey -M emacs|grep '^"\^X')}; do - bindkey -M viins "${(@Qz)binding}" -done -unset binding - -## Make sure the terminal is in application mode, when zle is active. -## Only then are the values from $terminfo valid. -if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then - autoload -Uz add-zle-hook-widget - function zle_application_mode_start { echoti smkx } - function zle_application_mode_stop { echoti rmkx } - add-zle-hook-widget -Uz zle-line-init zle_application_mode_start - add-zle-hook-widget -Uz zle-line-finish zle_application_mode_stop -fi -## }}} -## {{{ End -## Source local zsh configuration. -source_readable "$HOME/.zshrc.local" -## }}} diff --git a/qusal/dotfiles/files/sh/.profile b/qusal/dotfiles/files/sh/.profile deleted file mode 120000 index c8f95a8..0000000 --- a/qusal/dotfiles/files/sh/.profile +++ /dev/null @@ -1 +0,0 @@ -.config/sh/profile \ No newline at end of file diff --git a/qusal/dotfiles/files/sh/.zprofile b/qusal/dotfiles/files/sh/.zprofile deleted file mode 120000 index 9975264..0000000 --- a/qusal/dotfiles/files/sh/.zprofile +++ /dev/null @@ -1 +0,0 @@ -.config/zsh/zprofile \ No newline at end of file diff --git a/qusal/dotfiles/files/ssh/.ssh/config b/qusal/dotfiles/files/ssh/.ssh/config deleted file mode 100644 index f915448..0000000 --- a/qusal/dotfiles/files/ssh/.ssh/config +++ /dev/null @@ -1,24 +0,0 @@ -# SPDX-FileCopyrightText: 2023 Qusal contributors -# -# SPDX-License-Identifier: GPL-3.0-or-later - -Host * - ## Distrust the remote - ForwardX11 no - ForwardX11Trusted no - ForwardAgent no - ## Authentication - UpdateHostKeys ask - PreferredAuthentications publickey,keyboard-interactive,password - HostbasedAuthentication no - StrictHostKeyChecking yes - ## Encryption - HostKeyAlgorithms ssh-ed25519,sk-ssh-ed25519@openssh.com - PubkeyAcceptedAlgorithms ssh-ed25519,sk-ssh-ed25519@openssh.com - KexAlgorithms sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sha256@libssh.org - Ciphers aes256-gcm@openssh.com - MACs hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com - -UserKnownHostsFile ~/.ssh/known_hosts.d/%k.host ~/.ssh/known_hosts.d/%h.host -Include ~/.ssh/config.d/*.conf -# vim: ft=sshconfig diff --git a/qusal/dotfiles/files/ssh/.ssh/config.d/.gitignore b/qusal/dotfiles/files/ssh/.ssh/config.d/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/qusal/dotfiles/files/ssh/.ssh/known_hosts.d/.gitignore b/qusal/dotfiles/files/ssh/.ssh/known_hosts.d/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/qusal/dotfiles/files/tmux/.config/tmux/tmux.conf b/qusal/dotfiles/files/tmux/.config/tmux/tmux.conf deleted file mode 100644 index 5653a76..0000000 --- a/qusal/dotfiles/files/tmux/.config/tmux/tmux.conf +++ /dev/null @@ -1,142 +0,0 @@ -## tmux.conf - -## SPDX-FileCopyrightText: 2023 Qusal contributors -## -## SPDX-License-Identifier: GPL-3.0-or-later - -#! {{{ Options -## Usage -set-window-option -g wrap-search off -set-window-option -g aggressive-resize on -set-window-option -g pane-base-index 1 -set-option -g base-index 1 -set-option -g status-keys emacs -set-option -g mode-keys vi -set-option -g mouse on -set-option -g history-limit 10000 -set-option -g repeat-time 2000 -set-option -g escape-time 50 -set-option -g status-position top -set-option -g default-terminal screen-256color -# set-option -g default-terminal tmux-256color # on newer ncurses -set-option -g display-panes-time 2000 -set-option -g display-time 2000 -set-option -g focus-events on -set-option -g status-interval 5 -set-option -g set-titles on - -## Visual -set-option -g display-panes-active-colour 'red' -set-option -g display-panes-colour 'white' -set-option -g message-command-style 'default' -set-option -g message-style 'default' -set-option -g clock-mode-colour 'red' -set-option -g clock-mode-style '24' -set-option -g mode-style 'bg=brightred' -set-option -g pane-active-border-style 'fg=brightcyan' -set-option -g pane-border-style 'default' -set-option -g window-status-activity-style 'fg=brightyellow,bg=black' -set-option -g window-status-current-format ' #I:#W#F ' -set-option -g window-status-current-style 'fg=black,bg=brightred' -set-option -g window-status-format ' #I:#W#F ' -set-option -g window-status-separator '' - -## Status -set-option -g status-interval '1' -set-option -g status-justify 'centre' -set-option -g status-style 'fg=brightcyan,bg=black' -set-option -g status-left '#{?client_prefix,#[bg=brightred]#[fg=black]+#[bg=black] , }#[bg=black]#[fg=brightgreen]#S #[fg=brightyellow]#I #[fg=brightcyan]#P' -set-option -g status-left-length '40' -set-option -g status-left-style 'fg=green,bg=black' -set-option -g status-right '#{tmux_mode_indicator} #[fg=brightcyan]#H #[fg=brightyellow]%H:%M:%S' -set-option -g status-right-length '40' -set-option -g status-right-style 'fg=brightcyan,bg=black' - -## Terminal capabilities and update environment -set-option -g terminal-overrides '*256color:Tc,xterm*:XT:Cc=\E]12;%p1%s\007:Cr=\E]112\007:Cs=\E[%p1%d q,rxvt-unicode*:XT:sitm@:ritm@' -set-option -g update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PI +D SSH_CONNECTION WINDOWID XAUTHORITY XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP" -set-environment -gu DBUS_SESSION_BUS_ADDRESS - -## }}} -#! {{{ Bindings -## Prefix -set-option -g prefix C-s -unbind-key C-b -bind-key C-s send-prefix -bind-key C-s last-window -## Prompt -unbind-key \; -bind-key \; command-prompt -## Window -bind-key | split-window -h -bind-key - split-window -v -unbind-key '"' -unbind-key % -bind-key C-c new-window -bind-key ` select-window -t 0 -bind-key -r C-p select-window -t :- # equiv: previous-window -bind-key -r C-n select-window -t :+ # equiv: next-window -## Pane -bind-key h select-pane -L -bind-key j select-pane -D -bind-key k select-pane -U -bind-key l select-pane -R -bind-key -r C-h resize-pane -L 5 -bind-key -r C-j resize-pane -D 5 -bind-key -r C-k resize-pane -U 5 -bind-key -r C-l resize-pane -R 5 -bind-key _ resize-pane -Z -bind-key H join-pane -b -h -t ! -bind-key J join-pane -t ! -bind-key @ join-pane -t ! -bind-key K kill-pane -bind-key -r "<" swap-window -d -t -1 -bind-key -r ">" swap-window -d -t +1 -## Copy mode -bind-key Escape copy-mode -unbind-key p -bind-key p paste-buffer -bind-key -T copy-mode-vi 'v' send -X begin-selection -bind-key -T copy-mode-vi 'y' send -X copy-selection -bind-key -T copy-mode-vi 'Space' send -X halfpage-down -bind-key -T copy-mode-vi 'Bspace' send -X halfpage-up -# bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xsel -i -p && xsel -o -p | xsel -i -b" -# bind p run "xsel -o | tmux load-buffer - ; tmux paste-buffer" -bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -i -sel clip > /dev/null" -bind-key p run "xclip -o -sel clip | tmux load-buffer - ; tmux paste-buffer" -## Miscellaneous -bind-key C attach-session -t . -c '#{pane_current_path}' \; display-message "Session directory set to #{pane_current_path}" -bind-key E set-option mouse \; display-message "Mouse #{?mouse,on,off}" -bind-key X set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized,on,off}" -bind-key u capture-pane \; save-buffer /tmp/tmux-buffer \; new-window -n "urlview" '$SHELL -c "urlview < /tmp/tmux-buffer"' -bind-key R run-shell '\ -: "${XDG_CONFIG_HOME:=$HOME/.config}"; \ -if test -f "$XDG_CONFIG_HOME/tmux/tmux.conf"; then \ - tmux source "$XDG_CONFIG_HOME/tmux/tmux.conf"; \ - tmux display-message "Reloaded configuration: $XDG_CONFIG_HOME/tmux/tmux.conf"; \ -elif test -f "$HOME/.tmux/tmux.conf"; then \ - tmux source "$HOME/.tmux/tmux.conf"; \ - tmux display-message "Reloaded configuration: $HOME/.tmux/tmux.conf"; \ -elif test -f "$HOME/.tmux.conf"; then \ - tmux source "$HOME/.tmux.conf"; \ - tmux display-message "Reloaded configuration: $HOME/.tmux.conf"; \ -fi' -## }}} - -#! {{{ Plugins -## 'tmux-plugins/tmux-resurrect' -set -g @resurrect-capture-pane-contents 'on' -set -g @resurrect-save 'M-S' -set -g @resurrect-restore 'M-R' -## 'tmux-plugins/tmux-continuum', dep tmux-resurrect -set -g @continuum-restore 'on' -## 'MunifTanjim/tmux-suspend' -set -g @suspend_key 'F12' -## }}} - -#! {{{ End -if-shell 'test -f "$HOME/.tmux.conf.local"' 'tmux source "$HOME/.tmux.conf.local"' -run-shell 'command -v tmux-sorcerer >/dev/null && tmux-sorcerer ~/.config/tmux/plugins ~/src/tmux/plugins' -## }}} - -## vim:set foldmethod=expr foldexpr=getline(v\:lnum)=~'^#!'?'>1'\:'=': diff --git a/qusal/dotfiles/files/vim/.config/vim/after/autoload/pathogen.vim b/qusal/dotfiles/files/vim/.config/vim/after/autoload/pathogen.vim deleted file mode 100644 index 0744105..0000000 --- a/qusal/dotfiles/files/vim/.config/vim/after/autoload/pathogen.vim +++ /dev/null @@ -1,355 +0,0 @@ -" pathogen.vim - path option manipulation -" Maintainer: Tim Pope -" Version: 2.4 -" SPDX-FileCopyrightText: 2022 Tim Pope -" SPDX-License-Identifier: Vim - -" Install in ~/.vim/autoload (or ~\vimfiles\autoload). -" -" For management of individually installed plugins in ~/.vim/bundle (or -" ~\vimfiles\bundle), adding `execute pathogen#infect()` to the top of your -" .vimrc is the only other setup necessary. -" -" The API is documented inline below. - -if exists("g:loaded_pathogen") || &cp - finish -endif -let g:loaded_pathogen = 1 - -" Point of entry for basic default usage. Give a relative path to invoke -" pathogen#interpose() (defaults to "bundle/{}"), or an absolute path to invoke -" pathogen#surround(). Curly braces are expanded with pathogen#expand(): -" "bundle/{}" finds all subdirectories inside "bundle" inside all directories -" in the runtime path. -function! pathogen#infect(...) abort - for path in a:0 ? filter(reverse(copy(a:000)), 'type(v:val) == type("")') : ['bundle/{}'] - if path =~# '^\%({\=[$~\\/]\|{\=\w:[\\/]\).*[{}*]' - call pathogen#surround(path) - elseif path =~# '^\%([$~\\/]\|\w:[\\/]\)' - call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') - call pathogen#surround(path . '/{}') - elseif path =~# '[{}*]' - call pathogen#interpose(path) - else - call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') - call pathogen#interpose(path . '/{}') - endif - endfor - call pathogen#cycle_filetype() - if pathogen#is_disabled($MYVIMRC) - return 'finish' - endif - return '' -endfunction - -" Split a path into a list. -function! pathogen#split(path) abort - if type(a:path) == type([]) | return a:path | endif - if empty(a:path) | return [] | endif - let split = split(a:path,'\\\@]','\\&','') - endif -endfunction - -" Like findfile(), but hardcoded to use the runtimepath. -function! pathogen#runtime_findfile(file,count) abort - let rtp = pathogen#join(1,pathogen#split(&rtp)) - let file = findfile(a:file,rtp,a:count) - if file ==# '' - return '' - else - return fnamemodify(file,':p') - endif -endfunction - -" Section: Deprecated - -function! s:warn(msg) abort - echohl WarningMsg - echomsg a:msg - echohl NONE -endfunction - -" Prepend all subdirectories of path to the rtp, and append all 'after' -" directories in those subdirectories. Deprecated. -function! pathogen#runtime_prepend_subdirectories(path) abort - call s:warn('Change pathogen#runtime_prepend_subdirectories('.string(a:path).') to pathogen#infect('.string(a:path.'/{}').')') - return pathogen#surround(a:path . pathogen#slash() . '{}') -endfunction - -function! pathogen#incubate(...) abort - let name = a:0 ? a:1 : 'bundle/{}' - call s:warn('Change pathogen#incubate('.(a:0 ? string(a:1) : '').') to pathogen#infect('.string(name).')') - return pathogen#interpose(name) -endfunction - -" Deprecated alias for pathogen#interpose(). -function! pathogen#runtime_append_all_bundles(...) abort - if a:0 - call s:warn('Change pathogen#runtime_append_all_bundles('.string(a:1).') to pathogen#infect('.string(a:1.'/{}').')') - else - call s:warn('Change pathogen#runtime_append_all_bundles() to pathogen#infect()') - endif - return pathogen#interpose(a:0 ? a:1 . '/{}' : 'bundle/{}') -endfunction - -if exists(':Vedit') - finish -endif - -let s:vopen_warning = 0 - -function! s:find(count,cmd,file,lcd) - let rtp = pathogen#join(1,pathogen#split(&runtimepath)) - let file = pathogen#runtime_findfile(a:file,a:count) - if file ==# '' - return "echoerr 'E345: Can''t find file \"".a:file."\" in runtimepath'" - endif - if !s:vopen_warning - let s:vopen_warning = 1 - let warning = '|echohl WarningMsg|echo "Install scriptease.vim to continue using :V'.a:cmd.'"|echohl NONE' - else - let warning = '' - endif - if a:lcd - let path = file[0:-strlen(a:file)-2] - execute 'lcd `=path`' - return a:cmd.' '.pathogen#fnameescape(a:file) . warning - else - return a:cmd.' '.pathogen#fnameescape(file) . warning - endif -endfunction - -function! s:Findcomplete(A,L,P) - let sep = pathogen#slash() - let cheats = { - \'a': 'autoload', - \'d': 'doc', - \'f': 'ftplugin', - \'i': 'indent', - \'p': 'plugin', - \'s': 'syntax'} - if a:A =~# '^\w[\\/]' && has_key(cheats,a:A[0]) - let request = cheats[a:A[0]].a:A[1:-1] - else - let request = a:A - endif - let pattern = substitute(request,'/\|\'.sep,'*'.sep,'g').'*' - let found = {} - for path in pathogen#split(&runtimepath) - let path = expand(path, ':p') - let matches = split(glob(path.sep.pattern),"\n") - call map(matches,'isdirectory(v:val) ? v:val.sep : v:val') - call map(matches,'expand(v:val, ":p")[strlen(path)+1:-1]') - for match in matches - let found[match] = 1 - endfor - endfor - return sort(keys(found)) -endfunction - -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Ve :execute s:find(,'edit',,0) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(,'edit',,0) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(,'edit',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(,'split',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(,'vsplit',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(,'tabedit',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(,'pedit',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(,'read',,1) - -" vim:set et sw=2 foldmethod=expr foldexpr=getline(v\:lnum)=~'^\"\ Section\:'?'>1'\:getline(v\:lnum)=~#'^fu'?'a1'\:getline(v\:lnum)=~#'^endf'?'s1'\:'=': diff --git a/qusal/dotfiles/files/vim/.config/vim/after/colors/tango2.vim b/qusal/dotfiles/files/vim/.config/vim/after/colors/tango2.vim deleted file mode 100644 index be745ed..0000000 --- a/qusal/dotfiles/files/vim/.config/vim/after/colors/tango2.vim +++ /dev/null @@ -1,64 +0,0 @@ -" ============================================================================= -" Name: Tango2 -" Purpose: Another colour scheme using the Tango colour palette -" Maintainer: Pranesh Srinivasan -" Last Modified: Saturday 04 October 2008 02:06:26 AM IST -" SPDX-FileCopyrightText: 2008 Pranesh Srinivasan -" SPDX-License-Identifier: Vim -" ============================================================================= - -" Inspired from some Gnome renditions of the Tango colour scheme. - -" ============================================================================= -" Preamble -" ============================================================================= - -set background=dark - -hi clear - -if exists("syntax-on") -syntax reset -endif - -let colors_name = "tango2" - -" ============================================================================= -" Vim >= 7.0 specific colours -" ============================================================================= - -if version >= 700 -" No support for cursor line yet -" hi CursorLine term=underline cterm=underline guibg=#111133 -" hi CursorColoumn -" hi MatchParen -" hi Pmenu -" hi PmenuSel -endif - -" ============================================================================= -" General colours -" ============================================================================= - -hi Normal guibg=#2E3436 guifg=#eeeeec -hi Cursor gui=none guibg=White guifg=Black - -hi Folded guibg=#4D585B guibg=#d2d2d2 -" No fold column support yet -" hi FoldColumn guifg=Orange guibg=DarkBlue -" ============================================================================= -" Syntax highlighting -" ============================================================================= - -hi Comment gui=italic guifg=#6d7e8a ctermfg=Grey -hi Todo term=bold guifg=#EBC450 -hi Constant guifg=#8ae234 -hi Type guifg=#8AE234 -hi Function gui=bold guifg=#9BCF8D -hi Statement guifg=#729FCF -hi Identifier guifg=#AD7FA8 -hi PreProc guifg=#e9ba6e -hi Special term=underline guifg=#5EAFE5 - -hi Search guibg=#81ABBD -" hi QtClass guifg=Orange ctermfg=LightBlue diff --git a/qusal/dotfiles/files/vim/.config/vim/after/colors/torte.vim b/qusal/dotfiles/files/vim/.config/vim/after/colors/torte.vim deleted file mode 100644 index 8ad281d..0000000 --- a/qusal/dotfiles/files/vim/.config/vim/after/colors/torte.vim +++ /dev/null @@ -1,52 +0,0 @@ -" Vim color file -" Maintainer: Thorsten Maerz -" Last Change: 2001 Jul 23 -" grey on black -" optimized for TFT panels -" $Revision: 1.1 $ -" SPDX-FileCopyrightText: 2001 Thorsten Maerz -" SPDX-License-Identifier: Vim - -set background=dark -hi clear -if exists("syntax_on") - syntax reset -endif -"colorscheme default -let g:colors_name = "torte" - -" hardcoded colors : -" GUI Comment : #80a0ff = Light blue - -" GUI -highlight Normal guifg=Grey80 guibg=Black -highlight Search guifg=Black guibg=Red gui=bold -highlight Visual guifg=Grey25 gui=bold -highlight Cursor guifg=Black guibg=Green gui=bold -highlight Special guifg=Orange -highlight Comment guifg=#80a0ff -highlight StatusLine guifg=blue guibg=white -highlight Statement guifg=Yellow gui=NONE -highlight Type gui=NONE - -" Console -highlight Normal ctermfg=LightGrey ctermbg=Black -highlight Search ctermfg=Black ctermbg=Red cterm=NONE -highlight Visual cterm=reverse -highlight Cursor ctermfg=Black ctermbg=Green cterm=bold -highlight Special ctermfg=Brown -highlight Comment ctermfg=Blue -highlight StatusLine ctermfg=blue ctermbg=white -highlight Statement ctermfg=Yellow cterm=NONE -highlight Type cterm=NONE - -" only for vim 5 -if has("unix") - if v:version<600 - highlight Normal ctermfg=Grey ctermbg=Black cterm=NONE guifg=Grey80 guibg=Black gui=NONE - highlight Search ctermfg=Black ctermbg=Red cterm=bold guifg=Black guibg=Red gui=bold - highlight Visual ctermfg=Black ctermbg=yellow cterm=bold guifg=Grey25 gui=bold - highlight Special ctermfg=LightBlue cterm=NONE guifg=LightBlue gui=NONE - highlight Comment ctermfg=Cyan cterm=NONE guifg=LightBlue gui=NONE - endif -endif diff --git a/qusal/dotfiles/files/vim/.config/vim/after/colors/vividchalk.vim b/qusal/dotfiles/files/vim/.config/vim/after/colors/vividchalk.vim deleted file mode 100644 index df92f27..0000000 --- a/qusal/dotfiles/files/vim/.config/vim/after/colors/vividchalk.vim +++ /dev/null @@ -1,193 +0,0 @@ -" Vim color scheme -" Name: vividchalk.vim -" Author: Tim Pope -" Version: 2.0 -" GetLatestVimScripts: 1891 1 :AutoInstall: vividchalk.vim -" SPDX-FileCopyrightText: 2023 Tim Pope -" SPDX-License-Identifier: Vim - -" Based on the Vibrank Ink theme for TextMate -" Distributable under the same terms as Vim itself (see :help license) - -if has("gui_running") - set background=dark -endif -hi clear -if exists("syntax_on") - syntax reset -endif - -let colors_name = "vividchalk" - -" First two functions adapted from inkpot.vim - -" map a urxvt cube number to an xterm-256 cube number -fun! s:M(a) - return strpart("0245", a:a, 1) + 0 -endfun - -" map a urxvt colour to an xterm-256 colour -fun! s:X(a) - if &t_Co == 88 - return a:a - else - if a:a == 8 - return 237 - elseif a:a < 16 - return a:a - elseif a:a > 79 - return 232 + (3 * (a:a - 80)) - else - let l:b = a:a - 16 - let l:x = l:b % 4 - let l:y = (l:b / 4) % 4 - let l:z = (l:b / 16) - return 16 + s:M(l:x) + (6 * s:M(l:y)) + (36 * s:M(l:z)) - endif - endif -endfun - -function! E2T(a) - return s:X(a:a) -endfunction - -function! s:choose(mediocre,good) - if &t_Co != 88 && &t_Co != 256 - return a:mediocre - else - return s:X(a:good) - endif -endfunction - -function! s:hifg(group,guifg,first,second,...) - if a:0 && &t_Co == 256 - let ctermfg = a:1 - else - let ctermfg = s:choose(a:first,a:second) - endif - exe "highlight ".a:group." guifg=".a:guifg." ctermfg=".ctermfg -endfunction - -function! s:hibg(group,guibg,first,second) - let ctermbg = s:choose(a:first,a:second) - exe "highlight ".a:group." guibg=".a:guibg." ctermbg=".ctermbg -endfunction - -hi link railsMethod PreProc -hi link rubyDefine Keyword -hi link rubySymbol Constant -hi link rubyAccess rubyMethod -hi link rubyAttribute rubyMethod -hi link rubyEval rubyMethod -hi link rubyException rubyMethod -hi link rubyInclude rubyMethod -hi link rubyStringDelimiter rubyString -hi link rubyRegexp Regexp -hi link rubyRegexpDelimiter rubyRegexp -"hi link rubyConstant Variable -"hi link rubyGlobalVariable Variable -"hi link rubyClassVariable Variable -"hi link rubyInstanceVariable Variable -hi link javascriptRegexpString Regexp -hi link javascriptNumber Number -hi link javascriptNull Constant -highlight link diffAdded String -highlight link diffRemoved Statement -highlight link diffLine PreProc -highlight link diffSubname Comment - -call s:hifg("Normal","#EEEEEE","White",87) -if &background == "light" || has("gui_running") - hi Normal guibg=Black ctermbg=Black -else - hi Normal guibg=Black ctermbg=NONE -endif -highlight StatusLine guifg=Black guibg=#aabbee gui=bold ctermfg=232 ctermbg=15 cterm=bold -highlight StatusLineNC guifg=#444444 guibg=#aaaaaa gui=none ctermfg=Black ctermbg=Grey cterm=none -"if &t_Co == 256 - "highlight StatusLine ctermbg=117 -"else - "highlight StatusLine ctermbg=43 -"endif - -highlight Ignore ctermfg=Black -highlight WildMenu guifg=Black guibg=#ffff00 gui=bold ctermfg=Black ctermbg=Yellow cterm=bold -highlight Cursor guifg=Black guibg=White ctermfg=Black ctermbg=White -highlight CursorLine guibg=#333333 guifg=NONE -highlight CursorColumn guibg=#333333 guifg=NONE -highlight NonText guifg=#404040 ctermfg=8 -highlight SpecialKey guifg=#404040 ctermfg=8 -highlight Directory none -high link Directory Identifier -highlight ErrorMsg guibg=Red ctermbg=DarkRed guifg=NONE ctermfg=NONE -highlight Search guifg=NONE ctermfg=NONE gui=none cterm=none -call s:hibg("Search" ,"#555555","DarkBlue",81) -highlight IncSearch guifg=White guibg=Black ctermfg=White ctermbg=Black -highlight MoreMsg guifg=#00AA00 ctermfg=Green -highlight LineNr guifg=#DDEEFF ctermfg=White -call s:hibg("LineNr" ,"#222222","DarkBlue",80) -highlight Question none -high link Question MoreMsg -highlight Title guifg=Magenta ctermfg=Magenta -highlight VisualNOS gui=none cterm=none -call s:hibg("Visual" ,"#555577","LightBlue",83) -call s:hibg("VisualNOS" ,"#444444","DarkBlue",81) -call s:hibg("MatchParen","#1100AA","DarkBlue",18) -highlight WarningMsg guifg=Red ctermfg=Red -highlight Error ctermbg=DarkRed -highlight SpellBad ctermbg=DarkRed -" FIXME: Comments -highlight SpellRare ctermbg=DarkMagenta -highlight SpellCap ctermbg=DarkBlue -highlight SpellLocal ctermbg=DarkCyan - -call s:hibg("Folded" ,"#110077","DarkBlue",17) -call s:hifg("Folded" ,"#aaddee","LightCyan",63) -highlight FoldColumn none -high link FoldColumn Folded -highlight DiffAdd ctermbg=4 guibg=DarkBlue -highlight DiffChange ctermbg=5 guibg=DarkMagenta -highlight DiffDelete ctermfg=12 ctermbg=6 gui=bold guifg=Blue guibg=DarkCyan -highlight DiffText ctermbg=DarkRed -highlight DiffText cterm=bold ctermbg=9 gui=bold guibg=Red - -highlight Pmenu guifg=White ctermfg=White gui=bold cterm=bold -highlight PmenuSel guifg=White ctermfg=White gui=bold cterm=bold -call s:hibg("Pmenu" ,"#000099","Blue",18) -call s:hibg("PmenuSel" ,"#5555ff","DarkCyan",39) -highlight PmenuSbar guibg=Grey ctermbg=Grey -highlight PmenuThumb guibg=White ctermbg=White -highlight TabLine gui=underline cterm=underline -call s:hifg("TabLine" ,"#bbbbbb","LightGrey",85) -call s:hibg("TabLine" ,"#333333","DarkGrey",80) -highlight TabLineSel guifg=White guibg=Black ctermfg=White ctermbg=Black -highlight TabLineFill gui=underline cterm=underline -call s:hifg("TabLineFill","#bbbbbb","LightGrey",85) -call s:hibg("TabLineFill","#808080","Grey",83) - -hi Type gui=none -hi Statement gui=none -if !has("gui_mac") - " Mac GUI degrades italics to ugly underlining. - hi Comment gui=italic - hi railsUserClass gui=italic - hi railsUserMethod gui=italic -endif -hi Identifier cterm=none -" Commented numbers at the end are *old* 256 color values -"highlight PreProc guifg=#EDF8F9 -call s:hifg("Comment" ,"#9933CC","DarkMagenta",34) " 92 -" 26 instead? -call s:hifg("Constant" ,"#339999","DarkCyan",21) " 30 -call s:hifg("rubyNumber" ,"#CCFF33","Yellow",60) " 190 -call s:hifg("String" ,"#66FF00","LightGreen",44,82) " 82 -call s:hifg("Identifier" ,"#FFCC00","Yellow",72) " 220 -call s:hifg("Statement" ,"#FF6600","Brown",68) " 202 -call s:hifg("PreProc" ,"#AAFFFF","LightCyan",47) " 213 -call s:hifg("railsUserMethod","#AACCFF","LightCyan",27) -call s:hifg("Type" ,"#AAAA77","Grey",57) " 101 -call s:hifg("railsUserClass" ,"#AAAAAA","Grey",7) " 101 -call s:hifg("Special" ,"#33AA00","DarkGreen",24) " 7 -call s:hifg("Regexp" ,"#44B4CC","DarkCyan",21) " 74 -call s:hifg("rubyMethod" ,"#DDE93D","Yellow",77) " 191 -"highlight railsMethod guifg=#EE1122 ctermfg=1 diff --git a/qusal/dotfiles/files/vim/.config/vim/after/ftdetect/.gitignore b/qusal/dotfiles/files/vim/.config/vim/after/ftdetect/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/qusal/dotfiles/files/vim/.config/vim/after/ftplugin/markdown.vim b/qusal/dotfiles/files/vim/.config/vim/after/ftplugin/markdown.vim deleted file mode 100644 index 5ae43a3..0000000 --- a/qusal/dotfiles/files/vim/.config/vim/after/ftplugin/markdown.vim +++ /dev/null @@ -1,36 +0,0 @@ -" Author: Maxim Kim -" Credits: https://vi.stackexchange.com/a/21689 -" SPDX-FileCopyrightText: 2021 Maxim Kim -" SPDX-License-Identifier: Vim - -function! MarkdownFold() - let line = getline(v:lnum) - - " Regular headers - let depth = match(line, '\(^#\+\)\@<=\( .*$\)\@=') - if depth > 0 - " check syntax, it should be markdownH1-6 - let syncode = synstack(v:lnum, 1) - if len(syncode) > 0 && synIDattr(syncode[0], 'name') =~ 'markdownH[1-6]' - return ">" . depth - endif - endif - - " Setext style headings - let prevline = getline(v:lnum - 1) - let nextline = getline(v:lnum + 1) - if (line =~ '^.\+$') && (nextline =~ '^=\+$') && (prevline =~ '^\s*$') - return ">1" - endif - - if (line =~ '^.\+$') && (nextline =~ '^-\+$') && (prevline =~ '^\s*$') - return ">2" - endif - - " frontmatter - if (v:lnum == 1) && (line =~ '^----*$') - return ">1" - endif - - return "=" -endfunction diff --git a/qusal/dotfiles/files/vim/.config/vim/after/indent/.gitignore b/qusal/dotfiles/files/vim/.config/vim/after/indent/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/qusal/dotfiles/files/vim/.config/vim/after/macros/less.vim b/qusal/dotfiles/files/vim/.config/vim/after/macros/less.vim deleted file mode 100644 index 70d91da..0000000 --- a/qusal/dotfiles/files/vim/.config/vim/after/macros/less.vim +++ /dev/null @@ -1,4 +0,0 @@ -" SPDX-FileCopyrightText: 2023 Tim Pope -" SPDX-License-Identifier: Vim -set cmdheight=1 -set laststatus=0 diff --git a/qusal/dotfiles/files/vim/.config/vim/after/plugin/cool.vim b/qusal/dotfiles/files/vim/.config/vim/after/plugin/cool.vim deleted file mode 100644 index 7326065..0000000 --- a/qusal/dotfiles/files/vim/.config/vim/after/plugin/cool.vim +++ /dev/null @@ -1,130 +0,0 @@ -" vim-cool - Disable hlsearch when you are done searching. -" Maintainer: romainl -" Version: 0.0.2 -" License: Vim -" Location: plugin/cool.vim -" Website: https://github.com/romainl/vim-cool -" SPDX-FileCopyrightText: 2023 romainl -" SPDX-License-Identifier: Vim - -if exists("g:loaded_cool") || v:version < 704 || &compatible - finish -endif -let g:loaded_cool = 1 - -let s:save_cpo = &cpo -set cpo&vim - -augroup Cool - autocmd! -augroup END - -if exists('##OptionSet') - if !exists('*execute') - autocmd Cool OptionSet highlight let saveh = &highlight - endif - " toggle coolness when hlsearch is toggled - autocmd Cool OptionSet hlsearch call PlayItCool(v:option_old, v:option_new) -endif - -function! s:StartHL() - if !v:hlsearch || mode() isnot 'n' - return - endif - let g:cool_is_searching = 1 - let [pos, rpos] = [winsaveview(), getpos('.')] - silent! exe "keepjumps go".(line2byte('.')+col('.')-(v:searchforward ? 2 : 0)) - try - silent keepjumps norm! n - if getpos('.') != rpos - throw 0 - endif - catch /^\%(0$\|Vim\%(\w\|:Interrupt$\)\@!\)/ - call StopHL() - return - finally - call winrestview(pos) - endtry - if !get(g:,'cool_total_matches') || !exists('*reltimestr') - return - endif - exe "silent! norm! :let g:cool_char=nr2char(screenchar(screenrow(),1))\" - let cool_char = remove(g:,'cool_char') - if cool_char !~ '[/?]' - return - endif - let [f, ws, now, noOf] = [0, &wrapscan, reltime(), [0,0]] - set nowrapscan - try - while f < 2 - if reltimestr(reltime(now))[:-6] =~ '[1-9]' - " time >= 100ms - return - endif - let noOf[v:searchforward ? f : !f] += 1 - try - silent exe "keepjumps norm! ".(f ? 'n' : 'N') - catch /^Vim[^)]\+):E38[45]\D/ - call setpos('.',rpos) - let f += 1 - endtry - endwhile - finally - call winrestview(pos) - let &wrapscan = ws - endtry - redraw|echo cool_char.@/ 'match' noOf[0] 'of' noOf[0] + noOf[1] - 1 -endfunction - -function! s:StopHL() - if !v:hlsearch || mode() isnot 'n' || &buftype == 'terminal' - return - else - let g:cool_is_searching = 0 - silent call feedkeys("\(StopHL)", 'm') - endif -endfunction - -if !exists('*execute') - let s:saveh = &highlight - " toggle highlighting, a workaround for :nohlsearch in autocmds - function! s:AuNohlsearch() - noautocmd set highlight+=l:- - autocmd Cool Insertleave * - \ noautocmd let &highlight = s:saveh | autocmd! Cool InsertLeave * - return '' - endfunction -endif - -function! s:PlayItCool(old, new) - if a:old == 0 && a:new == 1 - " nohls --> hls - " set up coolness - noremap (StopHL) :nohlsearch - if !exists('*execute') - noremap! (StopHL) AuNohlsearch() - else - noremap! (StopHL) execute('nohlsearch')[-1] - endif - - autocmd Cool CursorMoved * call StartHL() - autocmd Cool InsertEnter * call StopHL() - elseif a:old == 1 && a:new == 0 - " hls --> nohls - " tear down coolness - nunmap (StopHL) - unmap! (StopHL) - - autocmd! Cool CursorMoved - autocmd! Cool InsertEnter - else - " nohls --> nohls - " do nothing - return - endif -endfunction - -" play it cool -call PlayItCool(0, &hlsearch) - -let &cpo = s:save_cpo diff --git a/qusal/dotfiles/files/vim/.config/vim/after/plugin/lastplace.vim b/qusal/dotfiles/files/vim/.config/vim/after/plugin/lastplace.vim deleted file mode 100644 index 4a03e2d..0000000 --- a/qusal/dotfiles/files/vim/.config/vim/after/plugin/lastplace.vim +++ /dev/null @@ -1,51 +0,0 @@ -" ============================================================================ -" File: vim-lastplace.vim -" Description: Reopen files where you left off. Configurable. -" Author: Greg Dietsche -" Licence: MIT -" Website: http://www.gregd.org/ -" Version: 3.0.0 -" SPDX-FileCopyrightText: 2023 Greg Dietsche -" SPDX-License-Identifier: Vim -" ============================================================================ - -if exists("b:loaded_lastplace_plugin") || &cp - finish -endif -let b:loaded_lastplace_plugin = 1 - -scriptencoding utf-8 - -if !exists('g:lastplace_ignore') - let g:lastplace_ignore = "gitcommit,gitrebase,svn,hgcommit" -endif - -fu! s:lastplace() - if index(split(g:lastplace_ignore, ","), &filetype) == -1 - if line("'\"") > 0 && line("'\"") <= line("$") - if line("$") - line("'\"") > ((line("w$") - line("w0")) / 2) - 1 - "if we're not at the bottom of the file, center the - "cursor on the screen after we make the jump - execute "normal! g`\"zz" - else - "otherwise, show as much context as we can by jumping - "to the end of the file and then to the mark. If we - "pressed zz here, there would be blank lines at the - "bottom of the screen. We intentionally leave the - "last line blank by pressing so the user has a - "clue that they are near the end of the file. - " execute "normal! \G`\"\" - execute "normal! \G`\"" - endif - endif - if foldclosed(".") != -1 - "if we're in a fold, make the current line visible - execute "normal! zv" - endif - endif -endf - -augroup lastplace_plugin - autocmd! - autocmd BufReadPost * call s:lastplace() -augroup END diff --git a/qusal/dotfiles/files/vim/.config/vim/after/plugin/update-time.vim b/qusal/dotfiles/files/vim/.config/vim/after/plugin/update-time.vim deleted file mode 100644 index 8d9d984..0000000 --- a/qusal/dotfiles/files/vim/.config/vim/after/plugin/update-time.vim +++ /dev/null @@ -1,82 +0,0 @@ -" File: update-time.vim -" Author: QianChenglong -" Create Time: 2013-12-04 19:36:21 CST -" Last Change: 2023 Oct 21 -" Description: Automatic update Last Change time -" SPDX-FileCopyrightText: 2013 QianChenglong -" SPDX-License-Identifier: Vim - -if exists("g:loaded_update_time") - finish -endif -let g:loaded_update_time = 1 - -let s:save_cpo = &cpo -set cpo&vim - -if !exists('g:update_time_time_stamp_leader') - let s:time_stamp_leader = 'Last Change: ' -else - let s:time_stamp_leader = g:update_time_time_stamp_leader -endif - -if !exists('g:update_time_time_format') - let s:time_format = '%Y-%m-%d %H:%M:%S %Z' -else - let s:time_format = g:update_time_time_format -endif - -if !exists("g:update_time_begin_line") - let s:begin_line = 0 -else - let s:begin_line = g:update_time_begin_line -endif - -if !exists('g:update_time_end_line') - let s:end_line = 10 -else - let s:end_line = g:update_time_end_line -endif - -if !exists('g:update_time_enable') - let s:update_time_enable = 1 -else - let s:update_time_enable = g:update_time_enable -endif -"}}} -" SECTION: Funtions"{{{ -fun Update_time_update() - if ! &modifiable - return - endif - if ! s:update_time_enable - return - endif - let bufmodified = getbufvar('%', '&mod') - if ! bufmodified - return - endif - let pos = line('.').' | normal! '.virtcol('.').'|' - if pos == 1 - return - endif - exe s:begin_line - let line_num = search(s:time_stamp_leader, '', s:end_line) - if line_num > 0 - let line = getline(line_num) - let line = substitute(line, s:time_stamp_leader . '\zs.*', ' ' . strftime(s:time_format), '') - call setline(line_num, line) - endif - exe pos -endf - -fun Update_time_toggle() - let s:update_time_enable = !s:update_time_enable -endf - -com! -nargs=0 UpdateTimeToggle silent call Update_time_toggle() - -autocmd BufWritePre * silent call Update_time_update() - -let &cpo = s:save_cpo -unlet s:save_cpo diff --git a/qusal/dotfiles/files/vim/.config/vim/after/syntax/.gitignore b/qusal/dotfiles/files/vim/.config/vim/after/syntax/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/qusal/dotfiles/files/vim/.config/vim/bundle/vim-jinja/ftdetect/jinja.vim b/qusal/dotfiles/files/vim/.config/vim/bundle/vim-jinja/ftdetect/jinja.vim deleted file mode 100644 index 7ebeb10..0000000 --- a/qusal/dotfiles/files/vim/.config/vim/bundle/vim-jinja/ftdetect/jinja.vim +++ /dev/null @@ -1,22 +0,0 @@ -" Credits: https://github.com/lepture/vim-jinja/blob/master/ftdetect/jinja.vim -" SPDX-FileCopyrightText: 2020 Lepture -" SPDX-License-Identifier: Vim - -" Figure out which type of hilighting to use for html. -function! s:SelectHTML() - let n = 1 - while n < 50 && n <= line("$") - " check for jinja - if getline(n) =~ '{{.*}}\|{%-\?\s*\(end.*\|extends\|block\|macro\|set\|if\|for\|include\|trans\)\>' - setfiletype jinja.html - return - endif - let n = n + 1 - endwhile -endfunction - -autocmd BufNewFile,BufRead *.{html,htm,nunjucks,nunjs,njk} - \ call s:SelectHTML() - -autocmd BufNewFile,BufRead *.{jinja,jinja2,j2,tera} - \ setfiletype jinja diff --git a/qusal/dotfiles/files/vim/.config/vim/bundle/vim-jinja/ftplugin/jinja.vim b/qusal/dotfiles/files/vim/.config/vim/bundle/vim-jinja/ftplugin/jinja.vim deleted file mode 100644 index 8b46fce..0000000 --- a/qusal/dotfiles/files/vim/.config/vim/bundle/vim-jinja/ftplugin/jinja.vim +++ /dev/null @@ -1,22 +0,0 @@ -" Credits: https://github.com/Glench/Vim-Jinja2-Syntax/blob/master/ftplugin/jinja.vim -" SPDX-FileCopyrightText: 2020 Glench -" SPDX-License-Identifier: Vim - -if exists('b:did_ftplugin') - finish -endif - -" Setup matchit. -if exists('loaded_matchit') - let b:match_ignorecase = 1 - let b:match_skip = 's:Comment' - " From ftplugin/html.vim, plus block tag matching. - " With block tags the following is optional: - " - "+": disable the lstrip_blocks (only at start) - " - "-": the whitespaces before or after that block will be removed - let b:match_words = '<:>,' . - \ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' . - \ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' . - \ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>,' . - \ '{%[-+]\? *\%(end\)\@!\(\w\+\)\>.\{-}%}:{%-\? *end\1\>.\{-}%}' -endif diff --git a/qusal/dotfiles/files/vim/.config/vim/bundle/vim-jinja/syntax/jinja.vim b/qusal/dotfiles/files/vim/.config/vim/bundle/vim-jinja/syntax/jinja.vim deleted file mode 100644 index effee1e..0000000 --- a/qusal/dotfiles/files/vim/.config/vim/bundle/vim-jinja/syntax/jinja.vim +++ /dev/null @@ -1,126 +0,0 @@ -" Vim syntax file -" Language: Jinja template -" Maintainer: Armin Ronacher -" Last Change: 2023 Oct 21 -" Version: 1.1 -" Credits: https://github.com/Glench/Vim-Jinja2-Syntax/blob/master/syntax/jinja.vim -" SPDX-FileCopyrightText: 2020 Armin Ronacher -" SPDX-License-Identifier: Vim - -if exists("b:current_syntax") - finish -endif - -if !exists('g:jinja_syntax_html') - let g:jinja_syntax_html=1 -endif - -if !exists("main_syntax") - let main_syntax = 'jinja' -endif - -" Pull in the HTML syntax. -if g:jinja_syntax_html - let ext = expand('%:e') - if ext !~ 'htm\|nunj|jinja\|j2' && - \ findfile(ext . '.vim', $VIMRUNTIME . '/syntax') != '' - execute 'runtime! syntax/' . ext . '.vim' - else - runtime! syntax/html.vim - endif - unlet b:current_syntax -endif - -syn case match -syn sync minlines=10 - -" Jinja template built-in tags and parameters (without filter, macro, is and -" raw, they have special treatment) -syn keyword jinjaStatement containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained and if else in not or recursive as import - -syn keyword jinjaStatement containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained is filter skipwhite nextgroup=jinjaFilter -syn keyword jinjaStatement containedin=jinjaTagBlock contained macro skipwhite nextgroup=jinjaFunction -syn keyword jinjaStatement containedin=jinjaTagBlock contained block skipwhite nextgroup=jinjaBlockName - -" Variable Names -syn match jinjaVariable containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained /[a-zA-Z_][a-zA-Z0-9_]*/ -syn keyword jinjaSpecial containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained false true none False True None loop super caller varargs kwargs - -" Filters -syn match jinjaOperator "|" containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained skipwhite nextgroup=jinjaFilter -syn match jinjaFilter contained /[a-zA-Z_][a-zA-Z0-9_]*/ -syn match jinjaFunction contained /[a-zA-Z_][a-zA-Z0-9_]*/ -syn match jinjaBlockName contained /[a-zA-Z_][a-zA-Z0-9_]*/ - -" Jinja template constants -syn region jinjaString containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained start=/"/ skip=/\(\\\)\@\)*\\"/ end=/"/ -syn region jinjaString containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained start=/'/ skip=/\(\\\)\@\)*\\'/ end=/'/ -syn match jinjaNumber containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained /[0-9]\+\(\.[0-9]\+\)\?/ - -" Operators -syn match jinjaOperator containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained /[+\-*\/<>=!,:]/ -syn match jinjaPunctuation containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained /[()\[\]]/ -syn match jinjaOperator containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained /\./ nextgroup=jinjaAttribute -syn match jinjaAttribute contained /[a-zA-Z_][a-zA-Z0-9_]*/ - -" Jinja template tag and variable blocks -syn region jinjaNested matchgroup=jinjaOperator start="(" end=")" transparent display containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained -syn region jinjaNested matchgroup=jinjaOperator start="\[" end="\]" transparent display containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained -syn region jinjaNested matchgroup=jinjaOperator start="{" end="}" transparent display containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained -syn region jinjaTagBlock matchgroup=jinjaTagDelim start=/{%[-+]\?/ end=/[-+]\?%}/ containedin=ALLBUT,jinjaTagBlock,jinjaVarBlock,jinjaRaw,jinjaString,jinjaNested,jinjaComment - -syn region jinjaVarBlock matchgroup=jinjaVarDelim start=/{{-\?/ end=/-\?}}/ containedin=ALLBUT,yamlComment,jinjaTagBlock,jinjaVarBlock,jinjaRaw,jinjaString,jinjaNested,jinjaComment - -" Jinja template 'raw' tag -syn region jinjaRaw matchgroup=jinjaRawDelim start="{%\s*raw\s*%}" end="{%\s*endraw\s*%}" containedin=ALLBUT,jinjaTagBlock,jinjaVarBlock,jinjaString,jinjaComment - -" Mark illegal characters within tag and variables blocks -syn match jinjaTagError contained "#}\|{{\|[^%]}}\|[&#]" -syn match jinjaVarError contained "#}\|{%\|%}\|[<>!&#%]" - -" Block start keywords. A bit tricker. We only highlight at the start of a -" tag block and only if the name is not followed by a comma or equals sign -" which usually means that we have to deal with an assignment. -syn match jinjaStatement containedin=jinjaTagBlock contained /\({%[-+]\?\s*\)\@<=\<[a-zA-Z_][a-zA-Z0-9_]*\>\(\s*[,=]\)\@!/ - -" and context modifiers -syn match jinjaStatement containedin=jinjaTagBlock contained /\/ - -" Keywords to highlight within comments -syn keyword jinjaTodo contained TODO FIXME XXX -syn cluster jinjaBlocks add=jinjaTagBlock,jinjaVarBlock,jinjaCommentBlock - -" Jinja comments -syn region jinjaComment display oneline matchgroup=jinjaCommentDelim containedin=@jinjaCommentDelim start='\%\(^\|\s\)#' end='$' -syn region jinjaComment matchgroup=jinjaCommentDelim start="{#" end="#}" containedin=ALLBUT,jinjaTagBlock,jinjaVarBlock,jinjaString contains=jinjaComment keepend extend - -" Define the default highlighting. -hi def link jinjaPunctuation jinjaOperator -hi def link jinjaAttribute jinjaVariable -hi def link jinjaFunction jinjaFilter - -hi def link jinjaTagDelim jinjaTagBlock -hi def link jinjaVarDelim jinjaVarBlock -hi def link jinjaCommentDelim jinjaComment -hi def link jinjaCommentBlock jinjaComment -hi def link jinjaCommentLine jinjaComment -hi def link jinjaRawDelim jinja - -hi def link jinjaSpecial Special -hi def link jinjaOperator Normal -hi def link jinjaRaw Normal -hi def link jinjaTagBlock PreProc -hi def link jinjaVarBlock PreProc -hi def link jinjaStatement Statement -hi def link jinjaFilter Function -hi def link jinjaBlockName Function -hi def link jinjaVariable Identifier -hi def link jinjaString Constant -hi def link jinjaNumber Constant -hi def link jinjaComment Comment - -let b:current_syntax = "jinja" - -if main_syntax ==# 'jinja' - unlet main_syntax -endif diff --git a/qusal/dotfiles/files/vim/.config/vim/bundle/vim-salt/ftdetect/salt.vim b/qusal/dotfiles/files/vim/.config/vim/bundle/vim-salt/ftdetect/salt.vim deleted file mode 100644 index 8ec50cd..0000000 --- a/qusal/dotfiles/files/vim/.config/vim/bundle/vim-salt/ftdetect/salt.vim +++ /dev/null @@ -1,16 +0,0 @@ -" Credits: https://github.com/vmware-archive/salt-vim/blob/master/ftdetect/sls.vim -" SPDX-FileCopyrightText: 2020 Seth House -" SPDX-License-Identifier: Vim - -function! DetectSalt() - if !did_filetype() - if match(getline(1), '^#!py') > -1 - setfiletype python - else - setfiletype salt - endif - endif -endfunction - -autocmd BufNewFile,BufRead *.{sls,top},Saltfile,/etc/salt/* - \ call DetectSalt() diff --git a/qusal/dotfiles/files/vim/.config/vim/bundle/vim-salt/ftplugin/salt.vim b/qusal/dotfiles/files/vim/.config/vim/bundle/vim-salt/ftplugin/salt.vim deleted file mode 100644 index bbec2e2..0000000 --- a/qusal/dotfiles/files/vim/.config/vim/bundle/vim-salt/ftplugin/salt.vim +++ /dev/null @@ -1,29 +0,0 @@ -" Vim filetype plugin file -" Language: YAML (YAML Ain't Markup Language) -" Previous Maintainer: Nikolai Weibull (inactive) -" Last Change: 2023 Oct 21 -" SPDX-FileCopyrightText: 2020 Nikolai Weibull -" SPDX-License-Identifier: Vim - -if exists("b:did_ftplugin") - finish -endif -let b:did_ftplugin = 1 - -let s:cpo_save = &cpo -set cpo&vim - -let b:undo_ftplugin = "setl tw< com< cms< et< fo<" - -" https://salt-lint.readthedocs.io/en/latest/rules/formatting/#204 -setlocal textwidth=160 -setlocal comments=:# commentstring=#\ %s expandtab -setlocal formatoptions-=t formatoptions+=croql - -if !exists("g:yaml_recommended_style") || g:yaml_recommended_style != 0 - let b:undo_ftplugin ..= " sw< ts< sts<" - setlocal shiftwidth=2 tabstop=2 softtabstop=2 -endif - -let &cpo = s:cpo_save -unlet s:cpo_save diff --git a/qusal/dotfiles/files/vim/.config/vim/bundle/vim-salt/indent/salt.vim b/qusal/dotfiles/files/vim/.config/vim/bundle/vim-salt/indent/salt.vim deleted file mode 100644 index e0c2250..0000000 --- a/qusal/dotfiles/files/vim/.config/vim/bundle/vim-salt/indent/salt.vim +++ /dev/null @@ -1,158 +0,0 @@ -" Vim indent file -" Language: YAML -" Maintainer: Nikolai Pavlov -" Last Update: Lukas Reineke -" Last Change: 2021 Jan 19 -" SPDX-FileCopyrightText: 2021 Nikolai Pavlov -" SPDX-License-Identifier: Vim - -" Only load this indent file when no other was loaded. -if exists('b:did_indent') - finish -endif - -let b:did_indent = 1 - -setlocal indentexpr=GetYAMLIndent(v:lnum) -setlocal indentkeys=!^F,o,O,0#,0},0],<:>,0- -setlocal nosmartindent - -let b:undo_indent = 'setlocal indentexpr< indentkeys< smartindent<' - -" Only define the function once. -if exists('*GetYAMLIndent') - finish -endif - -let s:save_cpo = &cpo -set cpo&vim - -function s:FindPrevLessIndentedLine(lnum, ...) - let prevlnum = prevnonblank(a:lnum-1) - let curindent = a:0 ? a:1 : indent(a:lnum) - while prevlnum - \&& indent(prevlnum) >= curindent - \&& getline(prevlnum) !~# '^\s*#' - let prevlnum = prevnonblank(prevlnum-1) - endwhile - return prevlnum -endfunction - -function s:FindPrevLEIndentedLineMatchingRegex(lnum, regex) - let plilnum = s:FindPrevLessIndentedLine(a:lnum, indent(a:lnum)+1) - while plilnum && getline(plilnum) !~# a:regex - let plilnum = s:FindPrevLessIndentedLine(plilnum) - endwhile - return plilnum -endfunction - -let s:mapkeyregex='\v^\s*\#@!\S@=%(\''%([^'']|\''\'')*\'''. - \ '|\"%([^"\\]|\\.)*\"'. - \ '|%(%(\:\ )@!.)*)\:%(\ |$)' -let s:liststartregex='\v^\s*%(\-%(\ |$))' - -let s:c_ns_anchor_char = '\v%([\n\r\uFEFF \t,[\]{}]@!\p)' -let s:c_ns_anchor_name = s:c_ns_anchor_char.'+' -let s:c_ns_anchor_property = '\v\&'.s:c_ns_anchor_name - -let s:ns_word_char = '\v[[:alnum:]_\-]' -let s:ns_tag_char = '\v%('.s:ns_word_char.'|[#/;?:@&=+$.~*''()])' -let s:c_named_tag_handle = '\v\!'.s:ns_word_char.'+\!' -let s:c_secondary_tag_handle = '\v\!\!' -let s:c_primary_tag_handle = '\v\!' -let s:c_tag_handle = '\v%('.s:c_named_tag_handle. - \ '|'.s:c_secondary_tag_handle. - \ '|'.s:c_primary_tag_handle.')' -let s:c_ns_shorthand_tag = '\v'.s:c_tag_handle . s:ns_tag_char.'+' -let s:c_non_specific_tag = '\v\!' -let s:ns_uri_char = '\v%('.s:ns_word_char.'\v|[#/;?:@&=+$,.!~*''()[\]])' -let s:c_verbatim_tag = '\v\!\<'.s:ns_uri_char.'+\>' -let s:c_ns_tag_property = '\v'.s:c_verbatim_tag. - \ '\v|'.s:c_ns_shorthand_tag. - \ '\v|'.s:c_non_specific_tag - -let s:block_scalar_header = '\v[|>]%([+-]?[1-9]|[1-9]?[+-])?' - -function GetYAMLIndent(lnum) - if a:lnum == 1 || !prevnonblank(a:lnum-1) - return 0 - endif - - let prevlnum = prevnonblank(a:lnum-1) - let previndent = indent(prevlnum) - - let line = getline(a:lnum) - if line =~# '^\s*#' && getline(a:lnum-1) =~# '^\s*#' - " Comment blocks should have identical indent - return previndent - elseif line =~# '^\s*[\]}]' - " Lines containing only closing braces should have previous indent - return indent(s:FindPrevLessIndentedLine(a:lnum)) - endif - - " Ignore comment lines when calculating indent - while getline(prevlnum) =~# '^\s*#' - let prevlnum = prevnonblank(prevlnum-1) - if !prevlnum - return previndent - endif - endwhile - - let prevline = getline(prevlnum) - let previndent = indent(prevlnum) - - " Any examples below assume that shiftwidth=2 - if prevline =~# '\v[{[:]$|[:-]\ [|>][+\-]?%(\s+\#.*|\s*)$' - " Mapping key: - " nested mapping: ... - " - " - { - " key: [ - " list value - " ] - " } - " - " - |- - " Block scalar without indentation indicator - return previndent+shiftwidth() - elseif prevline =~# '\v[:-]\ [|>]%(\d+[+\-]?|[+\-]?\d+)%(\#.*|\s*)$' - " - |+2 - " block scalar with indentation indicator - "#^^ indent+2, not indent+shiftwidth - return previndent + str2nr(matchstr(prevline, - \'\v([:-]\ [|>])@<=[+\-]?\d+%([+\-]?%(\s+\#.*|\s*)$)@=')) - elseif prevline =~# '\v\"%([^"\\]|\\.)*\\$' - " "Multiline string \ - " with escaped end" - let qidx = match(prevline, '\v\"%([^"\\]|\\.)*\\') - return virtcol([prevlnum, qidx+1]) - elseif line =~# s:liststartregex - " List line should have indent equal to previous list line unless it was - " caught by one of the previous rules - return indent(s:FindPrevLEIndentedLineMatchingRegex(a:lnum, - \ s:liststartregex)) - elseif line =~# s:mapkeyregex - " Same for line containing mapping key - let prevmapline = s:FindPrevLEIndentedLineMatchingRegex(a:lnum, - \ s:mapkeyregex) - if getline(prevmapline) =~# '^\s*- ' - return indent(prevmapline) + 2 - else - return indent(prevmapline) - endif - elseif prevline =~# '^\s*- ' - " - List with - " multiline scalar - return previndent+2 - elseif prevline =~# s:mapkeyregex . '\v\s*%(%('.s:c_ns_tag_property. - \ '\v|'.s:c_ns_anchor_property. - \ '\v|'.s:block_scalar_header. - \ '\v)%(\s+|\s*%(\#.*)?$))*' - " Mapping with: value - " that is multiline scalar - return previndent+shiftwidth() - endif - return previndent -endfunction - -let &cpo = s:save_cpo diff --git a/qusal/dotfiles/files/vim/.config/vim/bundle/vim-salt/syntax/salt.vim b/qusal/dotfiles/files/vim/.config/vim/bundle/vim-salt/syntax/salt.vim deleted file mode 100644 index 288994b..0000000 --- a/qusal/dotfiles/files/vim/.config/vim/bundle/vim-salt/syntax/salt.vim +++ /dev/null @@ -1,55 +0,0 @@ -" Vim syntax file -" Language: Salt States template -" Maintainer: Seth House -" Last Change: 2023 Oct 21 -" Credits: https://github.com/vmware-archive/salt-vim/blob/master/syntax/sls.vim -" SPDX-FileCopyrightText: 2020 Seth House -" SPDX-License-Identifier: Vim - -if exists("b:current_syntax") - finish -endif - -if !exists("main_syntax") - let main_syntax = 'yaml' -endif - -if exists('b:current_syntax') - let s:current_syntax=b:current_syntax - unlet b:current_syntax -endif - -runtime! syntax/yaml.vim -unlet b:current_syntax - -let s:jinja_path = findfile("syntax/jinja.vim", &rtp, 1) -if s:jinja_path != "" - runtime! syntax/jinja.vim - unlet b:current_syntax -else - runtime! syntax/django.vim - unlet b:current_syntax -endif - -if exists('b:current_syntax') - let s:current_syntax=b:current_syntax - unlet b:current_syntax -endif - -" TODO: fix yamlBlockMappingKey not working with {{ jinja_variable }} -" Example key that fails: key {{ variable }}: -" Get its value: syn list yamlBlockMappingKey -" syn match yamlBlockMappingKey /\%#=1\s*\zs\%([^\-?:,[\]{}#&*!|>'"%@`\n\r\uFEFF \t]\|[?:\-]\%([^\n\r\uFEFF \t]\)\@=\)\%([^\n\r\uFEFF \t]#\|:[^\n\r\uFEFF \t]\|[^\n\r\uFEFF \t:#]\)*\%(\s\+\%([^\-?:,[\]{}#&*!|>'"%@`\n\r\uFEFF \t]\|[?:\-]\%([^\n\r\uFEFF \t]\)\@=\)\%([^\n\r\uFEFF \t]#\|:[^\n\r\uFEFF \t]\|[^\n\r\uFEFF \t:#]\)*\)*\ze\s*:\%(\s\|$\)/ contained nextgroup=yamlKeyValueDelimiter - -" TODO: improve: keyword is not great when the key contains it: include-ab: -syn keyword saltInclude include extend containedin=yamlBlockMappingKey nextgroup=yamlKeyValueDelimiter contained - -syn keyword saltSpecialArgs name names check_cmd listen listen_in onchanges onchanges_in onfail onfail_in onlyif prereq prereq_in require require_in unless use use_in watch watch_in containedin=yamlBlockMappingKey nextgroup=yamlKeyValueDelimiter contained - -syn keyword saltErrors requires requires_in watches watches_in includes extends containedin=yamlBlockMappingKey contained - -hi def link saltInclude Include -hi def link saltSpecialArgs Special -hi def link saltErrors Error - -let b:current_syntax = "salt" diff --git a/qusal/dotfiles/files/vim/.config/vim/bundle/vim-salt/test/file.sls b/qusal/dotfiles/files/vim/.config/vim/bundle/vim-salt/test/file.sls deleted file mode 100644 index 3ec2629..0000000 --- a/qusal/dotfiles/files/vim/.config/vim/bundle/vim-salt/test/file.sls +++ /dev/null @@ -1,28 +0,0 @@ -{# -SPDX-FileCopyrightText: 2023 Qusal contributors - -SPDX-License-Identifier: Vim -#} - -{%- import "path/to/file.jinja" as tpl -%} - -include: - - test.file - -this-is-not-include: - - name: include should not be highlighted - -test-{{ tpl }}-test: - module.here: - - name: the jinja variable in the directive does not allow the rest of the key to be highlighted - -directive here: - module.here: - - require: - - sls: test.file - - name: tpl-test - - prefs: - - netvm: "" - - vpus: 1 - - memory: 400 - - autostart: False diff --git a/qusal/dotfiles/files/vim/.config/vim/vimrc b/qusal/dotfiles/files/vim/.config/vim/vimrc deleted file mode 100644 index 55d6e2d..0000000 --- a/qusal/dotfiles/files/vim/.config/vim/vimrc +++ /dev/null @@ -1,737 +0,0 @@ -" SPDX-FileCopyrightText: 2004 - 2023 Tim Pope -" SPDX-FileCopyrightText: 2023 Qusal contributors -" -" SPDX-License-Identifier: Vim -" -" Credits: https://github.com/tpope/dotfiles/blob/master/.vimrc - -" Section: Bootstrap - - -if v:version < 600 | finish | endif - -" Useful for when this configuration is in non-standard locations. -if empty($MYVIMRC) | let $MYVIMRC = expand(':p') | endif - -if !get(v:, 'vim_did_enter', !has('vim_starting')) - if empty($CODE_HOME) - let $CODE_HOME = expand('$HOME/src') - endif - if empty($XDG_CONFIG_HOME) - let $XDG_CONFIG_HOME = expand('$HOME/.config') - endif - if empty($XDG_DATA_HOME) - let $XDG_DATA_HOME = expand('$HOME/.local/share') - endif - if empty($XDG_CACHE_HOME) - let $XDG_CACHE_HOME = expand('$HOME/.cache') - endif - if empty($XDG_STATE_HOME) - let $XDG_STATE_HOME = expand('$HOME/.local/state') - endif - filetype off - set runtimepath^=$XDG_CONFIG_HOME/vim - set runtimepath+=$XDG_CONFIG_HOME/vim/after - let g:netrw_home = $XDG_DATA_HOME . "/vim" - if has('packages') - let &packpath = &runtimepath - else - let s:rtp = [] - for s:dir in split(&runtimepath, ',') - if $VIMRUNTIME ==# s:dir - call add(s:rtp, s:dir) - elseif s:dir =~# 'after$' - call extend(s:rtp, [s:dir[0:-6] . 'pack/*/start/*/after', s:dir]) - else - call extend(s:rtp, [s:dir, s:dir . '/pack/*/start/*']) - endif - endfor - let &runtimepath = join(s:rtp, ',') - unlet! s:rtp s:dir - endif -endif - -if $VIM_BARE - setglobal noloadplugins - finish -endif - -setglobal nocompatible -setglobal pastetoggle= - -" Fix Vim on XTerm to avoid raw-terminal-mode -let &t_TI="" -let &t_TE="" - -filetype plugin indent on -" vint: -ProhibitAutocmdWithNoGroup -exe 'augroup my' -autocmd! - - -" Section: Moving around, searching, patterns, and tags - -setglobal startofline -setglobal shortmess-=S -setglobal cpoptions+=J -if has('vim_starting') - setglobal noignorecase -endif -setglobal smartcase -setglobal incsearch -setglobal hlsearch -setglobal tags=./tags; -setglobal include= -setglobal path=.,, - -autocmd FileType c,cpp setlocal path+=/usr/include include& -autocmd FileType sh,zsh,csh,tcsh - \ setlocal include=^\\s*\\%(\\.\\\|source\\)\\s | - \ let &l:path = $PATH . ',.' -autocmd FileType lua - \ if expand('%:p') =~# '/awesome/' | - \ let &l:path = expand('~/.config/awesome') . ',/etc/xdg/awesome,/usr/share/awesome/lib,' . &l:path | - \ endif -autocmd FileType ruby setlocal tags-=./tags; - - -" Section: Displaying text - -if has('vim_starting') && exists('+breakindent') - setglobal breakindent showbreak=\ + -endif -setglobal modelineexpr -setglobal display=lastline -setglobal scrolloff=1 -setglobal sidescrolloff=5 -setglobal lazyredraw -if (&termencoding ==# 'utf-8' || &encoding ==# 'utf-8') && v:version >= 700 - let &g:listchars = "tab:\u21e5\u00b7,trail:\u2423,extends:\u21c9,precedes:\u21c7,nbsp:\u00b7" - let &g:fillchars = "vert:\u250b,fold:\u00b7" -else - setglobal listchars=tab:>\ ,trail:-,extends:>,precedes:< -endif - - -" Section: Windows - -setglobal laststatus=2 -setglobal showtabline=2 - -if empty(&g:statusline) - setglobal statusline=[%n]\ %<%.99f - setglobal statusline+=\ %y%h%w%m%r - if exists('*FugitiveStatusline') - setglobal statusline+=%{FugitiveStatusline()} - endif - setglobal statusline+=%=%-14.(%l,%c%V%) - setglobal statusline+=\ %P -endif - -setglobal titlestring=%{v:progname}\ %{tolower(empty(v:servername)?'':'--servername\ '.v:servername.'\ ')}%{fnamemodify(getcwd(),':~')}%{exists('$SSH_TTY')?'\ <'.hostname().'>':''} -setglobal iconstring=%{tolower(empty(v:servername)?v:progname\ :\ v:servername)}%{exists('$SSH_TTY')?'@'.hostname():''} - -if has('vim_starting') - setglobal nohidden -endif - -autocmd SourcePre */macros/less.vim setglobal laststatus=0 showtabline=0 - - -" Section: GUI - -setglobal printoptions=paper:letter -setglobal mousemodel=popup -if $TERM =~# '^screen' - if exists('+ttymouse') && &ttymouse ==# '' - setglobal ttymouse=sgr - endif -endif - -if !has('gui_running') && empty($DISPLAY) || !has('gui') - " Mouse in insert mode puts some weird characters to the file. - setglobal mouse=nv -else - setglobal mouse=nvi -endif -if exists('+macmeta') - setglobal macmeta -endif -setglobal winaltkeys=no - -function! s:font() - if has('mac') - return 'Monaco:h14' - else - return 'Monospace 14' - endif -endfunction - -autocmd VimEnter * if !has('gui_running') | set noicon background=dark | endif -autocmd GUIEnter * set background=light icon guioptions-=T guioptions-=m guioptions-=e guioptions-=r guioptions-=L -autocmd GUIEnter * silent! colorscheme vividchalk -autocmd GUIEnter * let &g:guifont = substitute(&g:guifont, '^$', s:font(), '') -autocmd FocusLost * let s:confirm = &confirm | setglobal noconfirm | silent! wall | let &confirm = s:confirm - - -" Section: Messages and info - -setglobal confirm -setglobal showcmd -setglobal belloff=all - - -" Section: Editing text and indent - -setglobal backspace=2 -setglobal complete-=i " Searching includes can be slow -setglobal completeopt=menuone,noselect -setglobal formatoptions= -if v:version + has('patch541') >= 704 - setglobal formatoptions+=j -endif -setglobal dictionary+=/usr/share/dict/words -setglobal infercase -setglobal showmatch -setglobal virtualedit=block - -setglobal shiftround -setglobal smarttab -if has('vim_starting') - let mapleader="\\" - set autoindent - set smartindent - set smarttab - set expandtab - set splitbelow splitright - set tabstop=8 softtabstop=0 - if exists('*shiftwidth') - set shiftwidth=0 softtabstop=-1 - endif - set omnifunc=syntaxcomplete#Complete - set completefunc=syntaxcomplete#Complete -endif - - -" Section: Folding and Comments - -if has('vim_starting') - if has('folding') - set foldmethod=marker - set foldopen+=jump - endif - set commentstring=#\ %s -endif - -autocmd FileType sh,zsh,csh,tcsh,python,desktop setlocal commentstring=##\ %s -autocmd FileType sql setlocal commentstring=--\ %s -autocmd FileType xdefaults setlocal commentstring=!%s -autocmd FileType git,gitcommit setlocal foldmethod=syntax foldlevel=1 - - -" Section: Maps - -setglobal timeoutlen=1200 -setglobal ttimeoutlen=50 - -inoremap `^ -inoremap `^ -inoremap `^ - -noremap Q gq -noremap :exe "normal i".nr2char(getchar()) - -vnoremap . :normal . -vnoremap > >gv -vnoremap < ge !gpgw -aser -vnoremap gs !gpgw -a --clear-sign -vnoremap gd !gpgw -d - -nnoremap r "hyiw:%s/h//g -nnoremap s "hyiw/h -vnoremap r "hy:%s/h//g -vnoremap s "hy/h - -function! ReplayLastMacro() - try - normal @@ - catch /E748/ - normal @q - endtry -endfunction -nnoremap m :call ReplayLastMacro() -vnoremap m norm :call ReplayLastMacro() - -cnoremap W!! execute 'silent! write !sudo tee % >/dev/null' edit! - -inoremap -inoremap - -" Shortcut split navigation -nnoremap h -nnoremap j -nnoremap k -nnoremap l -nnoremap w -nnoremap W - -nnoremap o :setlocal spell! -nnoremap cd :cd %:p:h:pwd -nnoremap l :bnext -nnoremap h :bprevious -nnoremap tn :tabnew -nnoremap to :tabonly -nnoremap tc :tabclose -nnoremap tm :tabmove -nnoremap t :tabnext -" Let 'tl' toggle between this and the last accessed tab. -let g:lasttab = 1 -nnoremap tl :exe "tabnext ".g:lasttab -autocmd TabLeave * let g:lasttab = tabpagenr() -" Opens a new tab with the current buffer's path. -nnoremap te :tabedit =escape(expand("%:p:h"), " ")/ - -nnoremap z :wincmd zccloselclose -nnoremap Q :tabclose -nnoremap , :if exists(':Wcd')exe 'Wcd'elseif exists(':Lcd')exe 'Lcd'elseif exists(':Glcd')exe 'Glcd'elselcd %:hendif -nmap cd , - -" Paste last thing yanked -nnoremap ,p "0p -nnoremap ,P "0P -" Interaction (cut/copy/paste) from system clibpboard. -vnoremap "+x -vnoremap "+y -noremap