├── .editorconfig ├── .envrc ├── .github ├── ISSUE_TEMPLATE │ ├── bug.yml │ ├── config.yml │ ├── enhancement.yml │ └── meta.yml └── workflows │ ├── build.yml │ ├── docker.yml │ └── release.yml ├── .gitignore ├── .gitmodules ├── .release-please-manifest.json ├── LICENSE ├── README.md ├── assets └── res.webp ├── build.py ├── docker ├── Dockerfile ├── build.sh └── push.sh ├── docs ├── ARCHITECTURE.md ├── CHANGELOG.md └── CONTRIBUTING.md ├── flake.lock ├── flake.nix ├── install.py ├── release-please-config.json ├── renovate.json ├── requirements.txt ├── shell.nix └── sources ├── build ├── __init__.py ├── args.py ├── context.py ├── logger.py ├── patches.py ├── theme.py └── utils.py └── patches ├── colloid ├── alt-tab-background-color.patch ├── palette.tera ├── plank-dark.patch ├── plank-light.patch ├── sass-palette-frappe.patch ├── sass-palette-latte.patch ├── sass-palette-macchiato.patch ├── sass-palette-mocha.patch └── theme-func.patch └── xfwm4 ├── .gitignore ├── assets-dark-normal.svg ├── assets-dark.svg ├── assets-light-normal.svg ├── assets-light.svg └── generate_assets.py /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # EditorConfig is awesome: https://EditorConfig.org 4 | 5 | root = true 6 | 7 | [*] 8 | charset = utf-8 9 | indent_size = 2 10 | indent_style = space 11 | end_of_line = lf 12 | insert_final_newline = true 13 | trim_trailing_whitespace = true 14 | 15 | # go 16 | [*.go] 17 | indent_style = tab 18 | indent_size = 4 19 | 20 | # python 21 | [*.{ini,py,py.tpl,rst}] 22 | indent_size = 4 23 | 24 | # rust 25 | [*.rs] 26 | indent_size = 4 27 | 28 | # documentation, utils 29 | [*.{md,mdx,diff}] 30 | trim_trailing_whitespace = false 31 | 32 | # windows shell scripts 33 | [*.{cmd,bat,ps1}] 34 | end_of_line = crlf 35 | -------------------------------------------------------------------------------- /.envrc: -------------------------------------------------------------------------------- 1 | use flake 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug.yml: -------------------------------------------------------------------------------- 1 | name: Bug Report 2 | description: Report your bugs with the theme here! 3 | labels: [bug] 4 | body: 5 | - type: checkboxes 6 | attributes: 7 | label: Is there an existing issue outlining your problem? 8 | description: Please search to see if an issue already exists for your problem. 9 | options: 10 | - label: I have searched the existing issues and they do not solve my problem. 11 | required: true 12 | - type: textarea 13 | attributes: 14 | label: Describe the bug. 15 | description: Also tell us, what do you expect to see? 16 | placeholder: The tabs are darker than they should be... 17 | validations: 18 | required: true 19 | - type: textarea 20 | attributes: 21 | label: Attach screenshots. 22 | description: If applicable, attach screenshots which clearly highlight the bug. 23 | - type: dropdown 24 | id: installation_method 25 | attributes: 26 | label: How did you install the theme? 27 | options: 28 | - From release (install.py) 29 | - From release (manual installation) 30 | - From source (build.py) 31 | - Nix (nixpkgs / catppuccin/nix) 32 | - AUR package 33 | validations: 34 | required: true 35 | - type: checkboxes 36 | attributes: 37 | label: Are you running the latest release, and if not does the issue persist there? 38 | description: "Our latest release can be found under the [GitHub releases](https://github.com/catppuccin/gtk/releases/latest)" 39 | options: 40 | - label: I am running on the latest release & the issue persists there 41 | required: true 42 | - type: checkboxes 43 | attributes: 44 | label: If using GTK4, have you symlinked the "gtk-4.0" folder? 45 | description: "The instructions for symlinking are described at the bottom of the [Manual Installation guide](https://github.com/catppuccin/gtk/tree/663f6c61f8cf1fcbbeb72110bf6b0a0214755245?tab=readme-ov-file#manual-installation)." 46 | options: 47 | - label: I have symlinked the `gtk-4.0` folder. 48 | required: false 49 | - type: input 50 | attributes: 51 | label: What GNOME version are you seeing the bug on? 52 | description: "Follow [GNOME's instructions](https://help.gnome.org/users/gnome-help/stable/gnome-version.html.en) to find out what version you are running." 53 | placeholder: "GNOME Version 42.9" 54 | validations: 55 | required: true 56 | - type: textarea 57 | attributes: 58 | label: Any additional comments? 59 | description: Add any information that hasn't been covered in the previous sections! 60 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Community Discord 4 | url: https://discord.com/servers/catppuccin-907385605422448742 5 | about: Chat to other community members! 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/enhancement.yml: -------------------------------------------------------------------------------- 1 | name: Enhancement Issue 2 | description: Request improvements to the theme here! 3 | labels: [enhancement] 4 | body: 5 | - type: checkboxes 6 | attributes: 7 | label: Is there an existing issue outlining your improvement? 8 | description: Please search to see if your improvement has already been raised as an issue. 9 | options: 10 | - label: I have searched the existing issues and my improvement has not been raised yet. 11 | required: true 12 | - type: textarea 13 | attributes: 14 | label: What would you like to see added and/or changed? 15 | description: Make sure to mention why you think this is an improvement! 16 | placeholder: I'd like to have an extra configuration option for... 17 | validations: 18 | required: true 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/meta.yml: -------------------------------------------------------------------------------- 1 | name: Meta Issue 2 | description: Raise any issue regarding the repository here! 3 | labels: [meta] 4 | body: 5 | - type: checkboxes 6 | attributes: 7 | label: Is there an existing issue outlining your problem? 8 | description: Please search to see if an issue already exists for your problem. 9 | options: 10 | - label: I have searched the existing issues and they do not solve my problem. 11 | required: true 12 | - type: textarea 13 | attributes: 14 | label: Describe the issue. 15 | description: Bugs should be raised under a [Bug Report](https://github.com/catppuccin/gtk/issues/new?assignees=&labels=bug&template=bug.yml). 16 | placeholder: The README is missing crucial information such as... 17 | validations: 18 | required: true 19 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: "Generate test artifacts" 2 | 3 | on: 4 | pull_request: 5 | types: [opened, reopened, synchronize] 6 | 7 | # env: 8 | # TAG: latest 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | 14 | # container: 15 | # image: ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:${{ env.TAG }} 16 | # 17 | # # is this really necessary? 18 | # credentials: 19 | # username: ${{ github.actor }} 20 | # password: ${{ secrets.GITHUB_TOKEN }} 21 | 22 | steps: 23 | 24 | - name: Checkout 25 | uses: actions/checkout@v4 26 | with: 27 | submodules: true 28 | 29 | - uses: actions/setup-python@v5 30 | with: 31 | python-version: "3.11" 32 | cache: "pip" 33 | 34 | - name: Install dependencies 35 | run: | 36 | sudo apt update && sudo apt install -y sassc inkscape optipng 37 | pip install -r requirements.txt 38 | 39 | - name: Generate themes 40 | run: | 41 | set -eu pipefile 42 | 43 | python sources/patches/xfwm4/generate_assets.py 44 | 45 | python ./build.py mocha --all-accents --zip -d $PWD/releases > mocha.log 2>&1 & 46 | python ./build.py macchiato --all-accents --zip -d $PWD/releases > macchiato.log 2>&1 & 47 | python ./build.py frappe --all-accents --zip -d $PWD/releases > frappe.log 2>&1 & 48 | python ./build.py latte --all-accents --zip -d $PWD/releases > latte.log 2>&1 & 49 | 50 | declare -i err=0 werr=0 51 | while wait -fn || werr=$?; ((werr != 127)); do 52 | err=$werr 53 | if [[ $err -ne 0 ]]; then 54 | echo "Build failure, abort" 55 | cat *.log 56 | exit 1 57 | fi 58 | done 59 | 60 | cat *.log 61 | 62 | - name: Upload artifacts 63 | uses: actions/upload-artifact@v4 64 | with: 65 | name: '${{ github.sha }}-artifacts' 66 | path: ./releases/*.zip -------------------------------------------------------------------------------- /.github/workflows/docker.yml: -------------------------------------------------------------------------------- 1 | name: "Publish containers for build" 2 | 3 | on: 4 | workflow_dispatch: 5 | pull_request: 6 | # types: [opened, reopened, synchronize] 7 | types: [synchronize] 8 | 9 | permissions: write-all 10 | 11 | jobs: 12 | build: 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v4 18 | with: 19 | submodules: true 20 | 21 | - name: Generate and push image to ghcr 22 | run: | 23 | # build docker image for the ci 24 | sh docker/build.sh -v no 25 | 26 | # push the image to the registry 27 | sh docker/push.sh -u "${{ github.actor }}" -p "${{ secrets.GITHUB_TOKEN }}" 28 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: release 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: [main] 7 | 8 | permissions: 9 | contents: write 10 | pull-requests: write 11 | 12 | jobs: 13 | release-please: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: googleapis/release-please-action@v4 17 | id: release 18 | outputs: 19 | release_created: ${{ steps.release.outputs.release_created }} 20 | tag_name: ${{ steps.release.outputs.tag_name }} 21 | 22 | release: 23 | runs-on: ubuntu-latest 24 | needs: release-please 25 | if: ${{ needs.release-please.outputs.release_created }} 26 | steps: 27 | - name: Checkout 28 | uses: actions/checkout@v4 29 | with: 30 | submodules: true 31 | 32 | - uses: actions/setup-python@v5 33 | with: 34 | python-version: "3.11" 35 | cache: "pip" 36 | 37 | - name: Install dependencies 38 | run: pip install -r requirements.txt 39 | 40 | - name: Install colloid specific dependencies 41 | run: sudo apt update && sudo apt install -y sassc inkscape optipng 42 | 43 | - name: Generate themes 44 | run: | 45 | set -eu pipefile 46 | 47 | python sources/patches/xfwm4/generate_assets.py 48 | 49 | python ./build.py mocha --all-accents --zip -d $PWD/releases > mocha.log 2>&1 & 50 | python ./build.py macchiato --all-accents --zip -d $PWD/releases > macchiato.log 2>&1 & 51 | python ./build.py frappe --all-accents --zip -d $PWD/releases > frappe.log 2>&1 & 52 | python ./build.py latte --all-accents --zip -d $PWD/releases > latte.log 2>&1 & 53 | declare -i err=0 werr=0 54 | while wait -fn || werr=$?; ((werr != 127)); do 55 | err=$werr 56 | if [[ $err -ne 0 ]]; then 57 | echo "Build failure, abort" 58 | cat *.log 59 | exit 1 60 | fi 61 | done 62 | 63 | cat *.log 64 | 65 | - name: Add zips to release 66 | run: gh release upload ${{ needs.release-please.outputs.tag_name }} releases/*.zip 67 | env: 68 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 69 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | pkgs/ 2 | *-temp.scss 3 | __pycache__ 4 | venv/ 5 | .venv 6 | bin/ 7 | lib*/ 8 | *.cfg 9 | .direnv 10 | build/ 11 | *.log 12 | .ruff-cache 13 | .tmp 14 | 15 | # Releases folder 16 | releases 17 | chrome 18 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "colloid"] 2 | path = sources/colloid 3 | url = https://github.com/vinceliuice/Colloid-gtk-theme.git 4 | -------------------------------------------------------------------------------- /.release-please-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | ".": "1.0.2" 3 | } 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | Logo
3 | 4 | Catppuccin for GTK 5 | 6 |

7 | 8 |

9 | 10 | 11 | 12 |

13 | 14 |

15 | 16 |

17 | 18 | This GTK theme is based on the [Colloid](https://github.com/vinceliuice/Colloid-gtk-theme) theme made by [vinceliuice](https://github.com/vinceliuice) 19 | 20 | ## Installation 21 | 22 | This GTK theme requires: 23 | 24 | - GTK `>=3.20` 25 | - Python 3+ 26 | 27 | ### Automated script 28 | 29 | We provide a Python script to automate the process of installing the theme: 30 | 31 | 32 | 33 | ```bash 34 | curl -LsSO "https://raw.githubusercontent.com/catppuccin/gtk/v1.0.2/install.py" 35 | python3 install.py 36 | [catppuccin-gtk] [INFO] - Installation info: 37 | flavor: mocha 38 | accent: blue 39 | dest: /home//.local/share/themes 40 | link: False 41 | 42 | remote_url: https://github.com/catppuccin/gtk/releases/download/v1.0.2/catppuccin-mocha-blue-standard+default.zip 43 | [catppuccin-gtk] [INFO] - Starting download... 44 | [catppuccin-gtk] [INFO] - Response status: 200 45 | [catppuccin-gtk] [INFO] - Download finished, zip is valid 46 | [catppuccin-gtk] [INFO] - Verifying download.. 47 | [catppuccin-gtk] [INFO] - Download verified 48 | [catppuccin-gtk] [INFO] - Extracting... 49 | [catppuccin-gtk] [INFO] - Extraction complete 50 | [catppuccin-gtk] [INFO] - Theme installation complete! 51 | ``` 52 | 53 | ### Arch Linux 54 | 55 | With your favourite AUR helper, you can install your flavor of choice: 56 | 57 | ```bash 58 | yay -S catppuccin-gtk-theme- 59 | paru -S catppuccin-gtk-theme- 60 | ``` 61 | 62 | ### Nix 63 | 64 | We have created a Nix module ([catppuccin/nix](https://github.com/catppuccin/nix)) for theming apps under Nix, and recommend that you use it. 65 | You can set up our Nix module for GTK with the following config: 66 | 67 | ```nix 68 | {inputs, ...}: { 69 | imports = [inputs.catppuccin.homeManagerModules.catppuccin]; 70 | gtk = { 71 | enable = true; 72 | catppuccin = { 73 | enable = true; 74 | flavor = "mocha"; 75 | accent = "pink"; 76 | size = "standard"; 77 | tweaks = [ "normal" ]; 78 | }; 79 | }; 80 | } 81 | ``` 82 | 83 | > [!TIP] 84 | > For further information on the options available with our module, see the [full documentation](https://github.com/catppuccin/nix/blob/main/docs/home-manager-options.md#gtkcatppuccinenable). 85 | 86 | Alternatively, if you are not using our Nix module, you can grab the theme from [nixpkgs/catppuccin-gtk](https://github.com/NixOS/nixpkgs/blob/master/pkgs/data/themes/catppuccin-gtk/default.nix) 87 | 88 | ## Flatpak 89 | Flatpak by default restricts access to themes, to allow access, use the following: 90 | ```bash 91 | sudo flatpak override --filesystem=$HOME/.local/share/themes 92 | ``` 93 | 94 | After you've allowed access, set the theme, using the following: 95 | ```bash 96 | # Change to suite your flavor / accent combination 97 | export FLAVOR="mocha" 98 | export ACCENT="mauve" 99 | 100 | # Set the theme 101 | sudo flatpak override --env=GTK_THEME="catppuccin-${FLAVOR}-${ACCENT}-standard+default" 102 | ``` 103 | 104 | ### Manual installation 105 | 106 | If your distro does not package our theme, and the installation script will not work for your use case, you can pull down releases and extract them yourself. You can find the [latest release on GitHub](https://github.com/catppuccin/gtk/releases/tag/v1.0.2). 107 | 108 | ```bash 109 | cd ~/.local/share/themes 110 | 111 | # Set the root URL 112 | export ROOT_URL="https://https://github.com/catppuccin/gtk/releases/download" 113 | 114 | # Change to the tag you want to download 115 | export RELEASE="v1.0.2" 116 | 117 | # Change to suite your flavor / accent combination 118 | export FLAVOR="mocha" 119 | export ACCENT="mauve" 120 | curl -LsS "${ROOT_URL}/${RELEASE}/catppuccin-${FLAVOR}-${ACCENT}-standard+default.zip" 121 | 122 | # Extract the catppuccin zip file 123 | unzip catppuccin-${FLAVOR}-${ACCENT}-standard+default.zip 124 | 125 | # Set the catppuccin theme directory 126 | export THEME_DIR="$HOME/.local/share/themes/catppuccin-${FLAVOR}-${ACCENT}-standard+default" 127 | 128 | # Optionally, add support for libadwaita 129 | mkdir -p "${HOME}/.config/gtk-4.0" && 130 | ln -sf "${THEME_DIR}/gtk-4.0/assets" "${HOME}/.config/gtk-4.0/assets" && 131 | ln -sf "${THEME_DIR}/gtk-4.0/gtk.css" "${HOME}/.config/gtk-4.0/gtk.css" && 132 | ln -sf "${THEME_DIR}/gtk-4.0/gtk-dark.css" "${HOME}/.config/gtk-4.0/gtk-dark.css" 133 | ``` 134 | 135 | 136 | 137 | ## Building 138 | 139 | If our prebuilt offerings do not match your requirements, you will have to build the theme from source. 140 | 141 | ### Requirements 142 | 143 | - Python 3+ 144 | - `sassc`, the Sass compiler 145 | - `inkscape`, `optipng`, for rendering PNGs 146 | 147 | > [!WARNING] 148 | > We use a submodule to bring in colloid, the theme this theme is based on. You will need to clone 149 | > with `git clone --recurse-submodules` to bring in the submodule. 150 | 151 | To build the theme, simply invoke `build.py`: 152 | 153 | ```bash 154 | python3 build.py mocha --dest ./build -a rosewater --tweaks rimless 155 | [catppuccin-gtk] [INFO] - Patches seem to be applied, remove "colloid/.patched" to force application (this may fail) 156 | [catppuccin-gtk] [INFO] - Building temp tweaks file 157 | [catppuccin-gtk] [INFO] - Inserting gnome-shell imports 158 | [catppuccin-gtk] [INFO] - Building main theme 159 | [catppuccin-gtk] [INFO] - Build info: 160 | build_root: ./build 161 | theme_name: catppuccin 162 | flavor: mocha 163 | accent: rosewater 164 | size: standard 165 | tweaks: Tweaks(tweaks=['rimless']) 166 | [catppuccin-gtk] [INFO] - Building into './build/catppuccin-mocha-rosewater-standard+rimless'... 167 | [catppuccin-gtk] [INFO] - Main build complete 168 | [catppuccin-gtk] [INFO] - Bundling assets... 169 | [catppuccin-gtk] [INFO] - Asset bundling done 170 | [catppuccin-gtk] [INFO] - Done! 171 | ``` 172 | 173 | You can now find the built theme under `./build`. If you want to package the theme up as a zip instead, pass `--zip` to the build script. 174 | 175 | ## 💝 Thanks to 176 | 177 | **Current maintainers** 178 | 179 | - [nullishamy](https://github.com/nullishamy) 180 | - [npv12](https://github.com/npv12) 181 | - [ghostx31](https://github.com/ghostx31) 182 | - [Syndrizzle](https://github.com/Syndrizzle) 183 | 184 | **Contributions** 185 | 186 | - [rubyowo](https://github.com/rubyowo) - CI and docs 187 | - [braheezy](https://github.com/braheezy) - Instructions for the GDM theme 188 | 189 | **Previous maintainer(s)** 190 | 191 | - [sadrach-cl](https://github.com/sadrach-cl) 192 | 193 |   194 | 195 |

196 |

Copyright © 2021-present Catppuccin Org 197 |

198 | -------------------------------------------------------------------------------- /assets/res.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iruzo/gtk/4fadf584c912d98173d030f662bac33a7f1a2d61/assets/res.webp -------------------------------------------------------------------------------- /build.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | import time 4 | import os 5 | 6 | from sources.build import execute_build 7 | from sources.build.args import parse_args 8 | from sources.build.logger import logger 9 | 10 | if __name__ == "__main__": 11 | git_root = os.path.dirname(os.path.realpath(__file__)) 12 | args = parse_args() 13 | 14 | try: 15 | start = time.time() 16 | execute_build(git_root, args) 17 | end = time.time() - start 18 | 19 | logger.info("") 20 | logger.info(f"Built in {round(end, 3)}s") 21 | except Exception as e: 22 | logger.error("Something went wrong when building the theme:", exc_info=e) 23 | -------------------------------------------------------------------------------- /docker/Dockerfile: -------------------------------------------------------------------------------- 1 | # This dockerfile generates a container with the needed dependencies to build the theme 2 | 3 | FROM python:alpine 4 | 5 | RUN apk add sassc inkscape optipng 6 | 7 | WORKDIR /app 8 | 9 | COPY requirements.txt . 10 | 11 | RUN pip install --no-cache-dir -r requirements.txt && rm requirements.txt 12 | 13 | # The reason for this is to allow the GH Actions Workflow execute commands within the container 14 | CMD ["sleep", "infinity"] 15 | -------------------------------------------------------------------------------- /docker/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Default value for custom_version 4 | VERSION="no" 5 | 6 | while getopts v:h opt 2>/dev/null; do 7 | case "$opt" in 8 | v) 9 | VERSION=$OPTARG 10 | ;; 11 | h) 12 | echo "\ 13 | Usage: $0 [-v ] 14 | 15 | Push script for Catppuccin's GTK docker build image 16 | 17 | -v Custom version to build the image (:) 18 | If you only want to generate the image with tag 'latest' use '-v no' 19 | -h Print this help text" >&2 20 | exit 0 21 | ;; 22 | ?) 23 | echo "Usage: $0 [-h]" >&2 24 | exit 1 25 | ;; 26 | esac 27 | done 28 | if [ $# -eq 0 ] 29 | then 30 | echo "Usage: $0 [-h]" 31 | exit 1 32 | fi 33 | 34 | # Resolve the absolute path of the script without readlink 35 | SCRIPT_PATH="$0" 36 | 37 | # Check if SCRIPT_PATH is a symbolic link 38 | while [ -h "$SCRIPT_PATH" ]; do 39 | LS=$(ls -ld "$SCRIPT_PATH") 40 | LINK=$(expr "$LS" : '.*-> \(.*\)$') 41 | if expr "$LINK" : '/.*' > /dev/null; then 42 | SCRIPT_PATH="$LINK" 43 | else 44 | SCRIPT_PATH=$(dirname "$SCRIPT_PATH")/"$LINK" 45 | fi 46 | done 47 | 48 | # Ensure we have an absolute path 49 | case "$SCRIPT_PATH" in 50 | /*) ;; 51 | *) SCRIPT_PATH="$(pwd)/$SCRIPT_PATH" ;; 52 | esac 53 | 54 | # Path to script' dir 55 | SCRIPT_DIR=$(cd "$(dirname "$SCRIPT_PATH")" && pwd) 56 | 57 | # Path to the Dockerfile 58 | DOCKERFILE_PATH="$SCRIPT_DIR/Dockerfile" 59 | 60 | # Docker variables 61 | IMAGE_NAME="ghcr.io/catppuccin/gtk" 62 | 63 | # Detect podman 64 | if command -v podman > /dev/null 2>&1; then 65 | CONTAINER_TOOL="podman" 66 | elif command -v docker > /dev/null 2>&1; then 67 | CONTAINER_TOOL="docker" 68 | else 69 | echo "Error: Neither podman nor docker is installed." 70 | exit 1 71 | fi 72 | 73 | # Clean previous generated images 74 | $CONTAINER_TOOL image rm "$IMAGE_NAME:latest" 2> /dev/null 75 | $CONTAINER_TOOL image rm "$IMAGE_NAME:$VERSION" 2> /dev/null 76 | 77 | # Build the Docker image with latest tag 78 | $CONTAINER_TOOL build -t "$IMAGE_NAME:latest" -f "$DOCKERFILE_PATH" "$SCRIPT_DIR/.." 79 | 80 | # Execute docker tag command if VERSION is not "no" 81 | if [ "$VERSION" != "no" ]; then 82 | $CONTAINER_TOOL tag "$IMAGE_NAME:latest" "$IMAGE_NAME:$VERSION" 83 | fi 84 | -------------------------------------------------------------------------------- /docker/push.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Default value for parameters 4 | VERSION="no" 5 | USERNAME="no" 6 | PASSWORD="no" 7 | 8 | while getopts u:p:v:h opt 2>/dev/null; do 9 | case "$opt" in 10 | v) 11 | VERSION=$OPTARG 12 | ;; 13 | u) 14 | USERNAME=$OPTARG 15 | ;; 16 | p) 17 | PASSWORD=$OPTARG 18 | ;; 19 | h) 20 | echo "\ 21 | Usage: $0 [-v | -u [your-github-username] | -p [your-github-password]] 22 | 23 | Push script for Catppuccin's GTK docker build image 24 | 25 | -v Custom version to push the image (:) 26 | -u Your GitHub username that will be used to log into GHCR 27 | -p Your GitHub password that will be used to log into GHCR 28 | -h Print this help text" >&2 29 | exit 0 30 | ;; 31 | ?) 32 | echo "Usage: $0 [-h]" >&2 33 | exit 1 34 | ;; 35 | esac 36 | done 37 | if [ $# -eq 0 ] 38 | then 39 | echo "Usage: $0 [-h]" 40 | exit 1 41 | fi 42 | 43 | 44 | # Detect podman 45 | if command -v podman > /dev/null 2>&1; then 46 | CONTAINER_TOOL="podman" 47 | elif command -v docker > /dev/null 2>&1; then 48 | CONTAINER_TOOL="docker" 49 | else 50 | echo "Error: Neither podman nor docker is installed." 51 | exit 1 52 | fi 53 | 54 | # Docker variables 55 | IMAGE_NAME="ghcr.io/catppuccin/gtk" 56 | 57 | # Log into ghcr 58 | $CONTAINER_TOOL login ghcr.io -u $USERNAME --password $PASSWORD 59 | 60 | # Push docker image with latest tag 61 | $CONTAINER_TOOL push "$IMAGE_NAME:latest" 62 | 63 | # Execute docker push for specific version if VERSION is not "no" 64 | if [ "$VERSION" != "no" ]; then 65 | $CONTAINER_TOOL push "$IMAGE_NAME:$VERSION" 66 | fi 67 | -------------------------------------------------------------------------------- /docs/ARCHITECTURE.md: -------------------------------------------------------------------------------- 1 | ## Build pipeline 2 | 3 | The GTK port has a fairly complicated build pipeline / system, chiefly stemming from our use of Colloid as a base theme. 4 | We use Colloid as a base to reduce development overhead of creating our own theme from scratch, we look to replace this in the future 5 | to give us more flexibility and control over the theme (see https://github.com/catppuccin/gtk/issues/164). 6 | 7 | We have reimplemented Colloid's build system (previously implemented in Shell) in Python to make it easier to maintain, extend, and iterate on. 8 | With this re-implementation, we have several distinct components in the system, described below: 9 | 1) Patching 10 | 2) SCSS 11 | 2) Assets 12 | 13 | ## Patching 14 | 15 | We patch our colloid submodule to add additional functionality and (temporarily) fix bugs found in Colloid. 16 | We do this through `.patch` files, applied with `git apply` when the build script boots up. 17 | The build script will store some state in the submodule to ensure it does not get needlessly patched. 18 | 19 | The patches are stored in `patches/colloid`, and currently have our palette, the Plank theme, and a modification to Colloid 20 | to allow all of our accents to load. When we find issues in Colloid, they will be patched through this system before being submitted upstream. 21 | 22 | ## SCSS 23 | 24 | [This section assumes the directory root is at `colliod/src/sass`] 25 | 26 | The bulk of the theme is implemented here, in SCSS. This is by far the most modular part of Colloid out of the box, requiring minimal patching from our end to function. 27 | To start, we move the Colloid submodule into its own temporary copy. This is to allow us to run multiple builds in parallel, which would be otherwise impossible due to the 28 | file changes necessitated by each build, described below. 29 | 30 | With our temporary copy established, we generate the 'tweaks' for the build. This sets up a file (`_tweaks-temp.scss`) which describes the various knobs and dials for the build: 31 | ```scss 32 | @import 'color-palette-catppuccin-mocha'; 33 | 34 | $colorscheme: 'catppuccin'; 35 | $colortype: 'system'; 36 | $opacity: 'default'; 37 | $theme: 'mauve'; 38 | $compact: 'false'; 39 | $translucent: 'false'; 40 | $panel_opacity: 1.0; 41 | $blackness: 'false'; 42 | $rimless: 'false'; 43 | $window_button: 'mac'; 44 | $float: 'false'; 45 | ``` 46 | We edit in the correct palette import for the flavour we're building, and set the other variables based on user / build state input. 47 | 48 | With the tweaks setup, we can now invoke `sassc` (the SCSS compiler) to build all of our CSS files. We run all of the SCSS builds in parallel, for performance. 49 | With the SCSS complete, we have now finished most of the work required for the build. 50 | 51 | 52 | ## Assets 53 | 54 | We build our own assets to ship with the theme, based on the processes used in Colloid. 55 | 56 | We build assets for GTK, to include UI elements such as buttons, checkboxes, 57 | etc. This is done through standard find-and-replace, as these assets are just SVGs. We do not support GTK2, so do not have to support the older PNG assets used there. 58 | 59 | We also build assets for Xfce's Xfwm4, which are first patched from a source SVG, and then rendered through the `inkscape` CLI. 60 | This operation is done once, at the start of a build process (e.g CI, to be reused for every subsequent build), or once until they change in the future for local development. 61 | The script to generate these assets can be found at [`patches/xfwm4/generate_assets.py`](./patches/xfwm4/generate_assets.py) 62 | 63 | 64 | ## CI integration 65 | 66 | The CI system utilizes the build system, as described above, but with some unique parallelization elements to improve performance. 67 | We have chosen to only build a limited subset of possible tweaks in CI, to constrain the time it takes to run. 68 | 69 | Currently, we build a matrix of: 70 | - Flavor 71 | - Accent 72 | 73 | The CI will run all 4 flavours in parallel (see above for precautions taken to ensure this functions correctly), and build each accent serially. 74 | We collate the logs for these runs into files so that they can be shown neatly at the end of the run. -------------------------------------------------------------------------------- /docs/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [1.0.2](https://github.com/catppuccin/gtk/compare/v1.0.1...v1.0.2) (2024-05-27) 4 | 5 | 6 | ### Bug Fixes 7 | 8 | * alt tab menu ([#209](https://github.com/catppuccin/gtk/issues/209)) ([cae57c8](https://github.com/catppuccin/gtk/commit/cae57c80f81fd1cc40fab2655109b09fa97103b9)) 9 | 10 | ## [1.0.1](https://github.com/catppuccin/gtk/compare/v1.0.0...v1.0.1) (2024-05-27) 11 | 12 | 13 | ### Bug Fixes 14 | 15 | * alt tab menu ([#209](https://github.com/catppuccin/gtk/issues/209)) ([cae57c8](https://github.com/catppuccin/gtk/commit/cae57c80f81fd1cc40fab2655109b09fa97103b9)) 16 | -------------------------------------------------------------------------------- /docs/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Development 2 | 3 | Information regarding the architecture of the project can be found [in the ARCHITECTURE.md](./ARCHITECTURE.md) document. 4 | 5 | ### Requirements 6 | - All the [requirements for building](#building) 7 | - `whiskers`, optionally, from [catppuccin/toolbox](https://github.com/catppuccin/toolbox/tree/main/whiskers#installation) 8 | 9 | ### Project structure 10 | 11 | `sources/` contains all of the source files needed for the project to build, including the Colloid submodule. 12 | It also contains our patches for Colloid, alongside the core build system implemented by us to replace the one from Colloid. 13 | 14 | `build.py` is the entrypoint to the build system, placed at the root for convenience. The plumbing this utilizes is in 15 | `sources/build`. 16 | 17 | `install.py` is our officially supported install script, which will automate the process of pulling the release, extracting it, 18 | and optionally adding symlinks for GTK-4.0 support. This script intentionally has no dependencies other than Python 3 itself. 19 | This keeps the end user experience simple and reproducible. Do not add external dependencies to this script. 20 | 21 | ### Patching colloid 22 | > [!TIP] 23 | > If you need to change the patches, reset the submodule and rerun the build script. 24 | 25 | We patch upstream colloid through a series of `.patch` files, applied through `git apply` once when the build begins. 26 | The patches are located in `./patches/colloid/`. 27 | 28 | Once the build script patches the submodule, it will write a file into 29 | `colloid/.patched`, to signal to future invocations that the patches have already been applied. 30 | 31 | The palette patches are generated through `whiskers`, 32 | so if you're changing them, they will need regenerated. Simply run `whiskers palette.tera` to rebuild them. 33 | 34 | The process for building the theme is [documented in the README](./README.md#building). 35 | 36 | ### Upstreaming procedure 37 | 38 | Now and again, Colloid will have bugs upstream that impacts our theme. With our patching system we can easily fix these problems, 39 | but we still want to contribute the fixes upstream to benefit all users & forks of Colloid. 40 | 41 | To avoid stalling unnecessarily, our procedure for the above is as follows: 42 | 1) Open a PR to fix the issue, by adding a patch file to our theme, add `upstream:intended` 43 | to signal these changes are to be sent to Colloid eventually. 44 | 2) Merge the PR & close the issue in our theme pertaining to the issue, once reviewed and approved 45 | 3) Open a PR in Colloid with the patch 46 | 4) Open a new issue in our theme, with these details: 47 | - The initial issue in our theme 48 | - The PR in Colloid that fixes the issue there 49 | - The PR that fixed the issue in our theme 50 | 51 | Add the `upstream:open` label 52 | 5) Once the PR is merged in Colloid: 53 | 1) Test that the issue no longer persists, without our patch 54 | 2) Open a PR to remove the patch file in our theme, with these details: 55 | - The tracking issue 56 | - The commit that fixed the issue in Colloid 57 | 3) Close the tracking issue & merge the PR to remove the patch file 58 | 59 | 60 | ### Running test builds 61 | We support building and publishing test builds from PRs. When you open PRs, the CI will automatically build with your changes and push an artifact 62 | which bundles all of the produced themes. 63 | 64 | You can then download the artifacts as a zip (result should look similar to 7bff2448a81e36bf3b0e03bfbd649bebe6973ec7-artifacts.zip) and 65 | pass the path into `install.py` under the `--from-artifact` option: 66 | ```bash 67 | python3 install.py mocha blue --dest ./build --from-artifact ~/downloads/7bff2448a81e36bf3b0e03bfbd649bebe6973ec7-artifacts.zip 68 | ``` 69 | 70 | This will take the target flavor / accent out of the zip, and install it using the regular install process. 71 | 72 | It is advised to pass a `--dest` when running in this mode, because the released zips follow the exact same naming scheme as regular builds. 73 | This wil cause conflicts when you install, if you already had that theme installed. Passing a different destination allows you to move the 74 | extracted folders to `~/.local/share/themes` yourself, adding a suffix as appropriate to avoid conflicts. 75 | 76 | > [!WARNING] 77 | > If you pass `--link` to the install script when working from a PR, it will forcibly overwrite your `~/.config/gtk-4.0/` symlinks. 78 | > You will have to reinstall / relink to revert this. 79 | 80 | ### Useful resources 81 | - GNOME-shell sources: https://gitlab.gnome.org/GNOME/gnome-shell/-/tree/gnome-46/data/theme 82 | - GTK inspector guide: https://developer.gnome.org/documentation/tools/inspector.html 83 | -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "nixpkgs": { 4 | "locked": { 5 | "lastModified": 1715961556, 6 | "narHash": "sha256-+NpbZRCRisUHKQJZF3CT+xn14ZZQO+KjxIIanH3Pvn4=", 7 | "owner": "nixos", 8 | "repo": "nixpkgs", 9 | "rev": "4a6b83b05df1a8bd7d99095ec4b4d271f2956b64", 10 | "type": "github" 11 | }, 12 | "original": { 13 | "owner": "nixos", 14 | "ref": "nixos-unstable", 15 | "repo": "nixpkgs", 16 | "type": "github" 17 | } 18 | }, 19 | "root": { 20 | "inputs": { 21 | "nixpkgs": "nixpkgs" 22 | } 23 | } 24 | }, 25 | "root": "root", 26 | "version": 7 27 | } 28 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; 3 | 4 | outputs = 5 | { nixpkgs, ... }: 6 | let 7 | forAllSystems = 8 | function: 9 | nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed ( 10 | system: function nixpkgs.legacyPackages.${system} 11 | ); 12 | in 13 | { 14 | devShells = forAllSystems (pkgs: { 15 | default = pkgs.callPackage ./shell.nix { }; 16 | }); 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /install.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import zipfile 5 | import argparse 6 | import logging 7 | import io 8 | 9 | from typing import Optional 10 | from pathlib import Path 11 | from dataclasses import dataclass 12 | from urllib.request import urlopen, Request 13 | 14 | logger = logging.getLogger("catppuccin-gtk") 15 | logger.setLevel(logging.DEBUG) 16 | ch = logging.StreamHandler() 17 | formatter = logging.Formatter("[%(name)s] [%(levelname)s] - %(message)s") 18 | ch.setFormatter(formatter) 19 | logger.addHandler(ch) 20 | 21 | 22 | @dataclass 23 | class InstallContext: 24 | flavor: str 25 | accent: str 26 | dest: Path 27 | link: bool 28 | 29 | def build_info(self, include_url=True) -> str: 30 | url = build_release_url(self) 31 | info = f"""Installation info: 32 | flavor: {self.flavor} 33 | accent: {self.accent} 34 | dest: {self.dest.absolute()} 35 | link: {self.link}""" 36 | if include_url: 37 | info += f"\nremote_url: {url}" 38 | return info 39 | 40 | 41 | def parse_args(): 42 | parser = argparse.ArgumentParser() 43 | parser.add_argument( 44 | "flavor", 45 | type=str, 46 | choices=["mocha", "frappe", "macchiato", "latte"], 47 | help="Flavor of the theme to apply.", 48 | ) 49 | 50 | parser.add_argument( 51 | "accent", 52 | type=str, 53 | default="mauve", 54 | choices=[ 55 | "rosewater", 56 | "flamingo", 57 | "pink", 58 | "mauve", 59 | "red", 60 | "maroon", 61 | "peach", 62 | "yellow", 63 | "green", 64 | "teal", 65 | "sky", 66 | "sapphire", 67 | "blue", 68 | "lavender", 69 | ], 70 | help="Accent of the theme.", 71 | ) 72 | 73 | parser.add_argument( 74 | "--from-artifact", 75 | type=Path, 76 | dest="from_artifact", 77 | help="Install from an artifact instead of a mainline release, pass the artifact path (e.g 7bff2448a81e36bf3b0e03bfbd649bebe6973ec7-artifacts.zip)", 78 | ) 79 | 80 | parser.add_argument( 81 | "--dest", 82 | "-d", 83 | type=str, 84 | dest="dest", 85 | help="Destination of the files.", 86 | ) 87 | 88 | parser.add_argument( 89 | "--link", 90 | help="Whether to add symlinks for libadwaita", 91 | type=bool, 92 | default=False, 93 | action=argparse.BooleanOptionalAction, 94 | ) 95 | 96 | return parser.parse_args() 97 | 98 | 99 | def build_release_url(ctx: InstallContext) -> str: 100 | repo_root = "https://github.com/catppuccin/gtk/releases/download" 101 | release = "v1.0.2" # x-release-please-version 102 | zip_name = f"catppuccin-{ctx.flavor}-{ctx.accent}-standard+default.zip" 103 | 104 | return f"{repo_root}/{release}/{zip_name}" 105 | 106 | 107 | def fetch_zip(url: str) -> Optional[zipfile.ZipFile]: 108 | req = Request(url) 109 | 110 | zip_file = None 111 | logger.info("Starting download...") 112 | with urlopen(req) as response: 113 | logger.info(f"Response status: {response.status}") 114 | zip_file = zipfile.ZipFile(io.BytesIO(response.read())) 115 | logger.info("Download finished, zip is valid") 116 | 117 | logger.info("Verifying download..") 118 | first_bad_file = zip_file.testzip() 119 | if first_bad_file is not None: 120 | logger.error(f'Zip appears to be corrupt, first bad file is "{first_bad_file}"') 121 | return None 122 | logger.info("Download verified") 123 | return zip_file 124 | 125 | 126 | def add_libadwaita_links(ctx: InstallContext, rewrite: bool = False): 127 | suffix = "light" 128 | if ctx.flavor != "latte": 129 | suffix = "dark" 130 | dir_name = ( 131 | ctx.dest / f"catppuccin-{ctx.flavor}-{ctx.accent}-standard+default-{suffix}" / "gtk-4.0" 132 | ).absolute() 133 | gtk4_dir = (Path(os.path.expanduser("~")) / ".config" / "gtk-4.0").absolute() 134 | os.makedirs(gtk4_dir, exist_ok=True) 135 | 136 | logger.info("Adding symlinks for libadwaita") 137 | logger.info(f"Root: {dir_name}") 138 | logger.info(f"Target: {gtk4_dir}") 139 | try: 140 | if rewrite: 141 | os.remove(gtk4_dir / "assets") 142 | os.remove(gtk4_dir / "gtk.css") 143 | os.remove(gtk4_dir / "gtk-dark.css") 144 | except FileNotFoundError: 145 | logger.debug("Ignoring FileNotFound in symlink rewrite") 146 | 147 | os.symlink(dir_name / "assets", gtk4_dir / "assets") 148 | os.symlink(dir_name / "gtk.css", gtk4_dir / "gtk.css") 149 | os.symlink(dir_name / "gtk-dark.css", gtk4_dir / "gtk-dark.css") 150 | 151 | 152 | def install(ctx: InstallContext): 153 | url = build_release_url(ctx) 154 | logger.info(ctx.build_info()) 155 | 156 | zip_file = fetch_zip(url) 157 | if zip_file is None: 158 | return 159 | 160 | logger.info("Extracting...") 161 | zip_file.extractall(ctx.dest) 162 | logger.info("Extraction complete") 163 | 164 | if ctx.link: 165 | add_libadwaita_links(ctx) 166 | 167 | 168 | def install_from_artifact(ctx: InstallContext, artifact_path: Path): 169 | # Working from a pull request, special case it 170 | logger.info(f"Extracting artifact from '{artifact_path}'") 171 | artifacts = zipfile.ZipFile(artifact_path) 172 | 173 | logger.info("Verifying artifact...") 174 | first_bad_file = artifacts.testzip() 175 | if first_bad_file is not None: 176 | logger.error(f'Zip appears to be corrupt, first bad file is "{first_bad_file}"') 177 | return None 178 | logger.info("Artifact verified") 179 | 180 | logger.info(ctx.build_info(False)) 181 | 182 | # The zip, inside the artifacts, that we want to pull out 183 | zip_name = f"catppuccin-{ctx.flavor}-{ctx.accent}-standard+default.zip" 184 | logger.info(f"Pulling '{zip_name}' from the artifacts") 185 | info = artifacts.getinfo(zip_name) 186 | 187 | logger.info("Extracting the artifact...") 188 | artifact = zipfile.ZipFile(io.BytesIO(artifacts.read(info))) 189 | artifact.extractall(ctx.dest) 190 | logger.info("Extraction complete") 191 | 192 | if ctx.link: 193 | logger.info("Adding links (with rewrite)") 194 | add_libadwaita_links(ctx, True) 195 | logger.info("Links added") 196 | 197 | 198 | def main(): 199 | args = parse_args() 200 | 201 | dest = Path(os.path.expanduser("~")) / ".local" / "share" / "themes" 202 | os.makedirs(dest, exist_ok=True) 203 | 204 | if args.dest: 205 | dest = Path(args.dest) 206 | 207 | ctx = InstallContext( 208 | flavor=args.flavor, accent=args.accent, dest=dest, link=args.link 209 | ) 210 | 211 | if args.from_artifact: 212 | install_from_artifact(ctx, args.from_artifact) 213 | return 214 | 215 | install(ctx) 216 | logger.info("Theme installation complete!") 217 | 218 | 219 | try: 220 | main() 221 | except Exception as e: 222 | logger.error("Something went wrong when installing the theme:", exc_info=e) 223 | -------------------------------------------------------------------------------- /release-please-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "last-release-sha": "8b54c05ff5de6c7fabc68fab410cfd093a91193c", 3 | "draft": true, 4 | "packages": { 5 | ".": { 6 | "package-name": "", 7 | "release-type": "simple", 8 | "extra-files": [ 9 | { "type": "generic", "path": "README.md" }, 10 | { "type": "generic", "path": "install.py" } 11 | ] 12 | } 13 | }, 14 | "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" 15 | } 16 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "config:recommended" 5 | ], 6 | "git-submodules": { 7 | "enabled": true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | catppuccin>=2.0.0 2 | -------------------------------------------------------------------------------- /shell.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs ? import { }, 3 | }: 4 | pkgs.mkShell { 5 | name = "dev-shell"; 6 | buildInputs = with pkgs; [ 7 | python311 8 | python311Packages.catppuccin 9 | sassc 10 | inkscape 11 | optipng 12 | ruff 13 | ]; 14 | } 15 | -------------------------------------------------------------------------------- /sources/build/__init__.py: -------------------------------------------------------------------------------- 1 | from argparse import Namespace 2 | import shutil 3 | 4 | from .patches import apply_colloid_patches 5 | from .theme import build_with_context, gnome_shell_version 6 | from .utils import init_tweaks_temp 7 | from .context import Tweaks, BuildContext 8 | from .logger import logger 9 | from catppuccin import PALETTE 10 | 11 | 12 | def execute_build(git_root: str, args: Namespace): 13 | 14 | colloid_dir = f"{git_root}/sources/colloid" 15 | colloid_tmp_dir = f"{git_root}/.tmp/colloid-tmp-{args.flavor}" 16 | shutil.copytree(colloid_dir, colloid_tmp_dir) 17 | src_dir = colloid_tmp_dir + "/src" 18 | 19 | tweaks = Tweaks(tweaks=args.tweaks) 20 | palette = getattr(PALETTE, args.flavor) 21 | output_format = "zip" if args.zip else "dir" 22 | 23 | if args.patch: 24 | patch_dir = git_root + "/sources/patches/colloid/" 25 | apply_colloid_patches(colloid_tmp_dir, patch_dir) 26 | 27 | accents = args.accents 28 | if args.all_accents: 29 | accents = [ 30 | "rosewater", 31 | "flamingo", 32 | "pink", 33 | "mauve", 34 | "red", 35 | "maroon", 36 | "peach", 37 | "yellow", 38 | "green", 39 | "teal", 40 | "sky", 41 | "sapphire", 42 | "blue", 43 | "lavender", 44 | ] 45 | 46 | for accent in accents: 47 | accent = getattr(palette.colors, accent) 48 | 49 | ctx = BuildContext( 50 | output_root=args.dest, 51 | colloid_src_dir=src_dir, 52 | git_root=git_root, 53 | theme_name=args.name, 54 | flavor=palette, 55 | accent=accent, 56 | size=args.size, 57 | tweaks=tweaks, 58 | output_format=output_format, 59 | ) 60 | 61 | logger.info("Building temp tweaks file") 62 | init_tweaks_temp(src_dir) 63 | 64 | logger.info("Inserting gnome-shell imports") 65 | gnome_shell_version(src_dir) 66 | 67 | logger.info("Building main theme") 68 | build_with_context(ctx) 69 | 70 | logger.info(f"Completed {palette.identifier} with {accent.identifier}") 71 | print() 72 | 73 | shutil.rmtree(colloid_tmp_dir) 74 | logger.info("Done!") 75 | -------------------------------------------------------------------------------- /sources/build/args.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | 3 | 4 | def parse_args(): 5 | parser = argparse.ArgumentParser() 6 | parser.add_argument( 7 | "flavor", 8 | type=str, 9 | choices=["mocha", "frappe", "macchiato", "latte"], 10 | help="Flavor of the theme to apply.", 11 | ) 12 | 13 | parser.add_argument( 14 | "--name", 15 | "-n", 16 | type=str, 17 | default="catppuccin", 18 | dest="name", 19 | help="Name of the theme to apply.", 20 | ) 21 | 22 | parser.add_argument( 23 | "--dest", 24 | "-d", 25 | type=str, 26 | required=True, 27 | dest="dest", 28 | help="Destination of the files.", 29 | ) 30 | 31 | parser.add_argument( 32 | "--accent", 33 | "-a", 34 | type=str, 35 | default="mauve", 36 | nargs="+", 37 | dest="accents", 38 | choices=[ 39 | "rosewater", 40 | "flamingo", 41 | "pink", 42 | "mauve", 43 | "red", 44 | "maroon", 45 | "peach", 46 | "yellow", 47 | "green", 48 | "teal", 49 | "sky", 50 | "sapphire", 51 | "blue", 52 | "lavender", 53 | ], 54 | help="Accent of the theme.", 55 | ) 56 | 57 | parser.add_argument( 58 | "--all-accents", 59 | help="Whether to build all accents", 60 | dest="all_accents", 61 | action="store_true", 62 | ) 63 | 64 | parser.add_argument( 65 | "--size", 66 | "-s", 67 | type=str, 68 | default="standard", 69 | dest="size", 70 | choices=["standard", "compact"], 71 | help="Size variant of the theme.", 72 | ) 73 | 74 | parser.add_argument( 75 | "--tweaks", 76 | type=str, 77 | default=[], 78 | nargs="+", 79 | dest="tweaks", 80 | choices=["black", "rimless", "normal", "float"], 81 | help="Tweaks to apply to the build.", 82 | ) 83 | 84 | parser.add_argument( 85 | "--zip", 86 | help="Whether to bundle the theme into a zip", 87 | type=bool, 88 | default=False, 89 | action=argparse.BooleanOptionalAction, 90 | ) 91 | 92 | parser.add_argument( 93 | "--patch", 94 | help="Whether to patch the colloid submodule", 95 | type=bool, 96 | default=True, 97 | action=argparse.BooleanOptionalAction, 98 | ) 99 | 100 | return parser.parse_args() 101 | -------------------------------------------------------------------------------- /sources/build/context.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass 2 | from typing import Any, Literal, List 3 | from catppuccin.models import Flavor, Color 4 | from .utils import find_and_replace, Subsitution 5 | 6 | 7 | @dataclass 8 | class Tweaks: 9 | tweaks: List[str] 10 | 11 | def has(self, tweak: str) -> bool: 12 | return tweak in self.tweaks 13 | 14 | def id(self) -> str: 15 | return ",".join(self.tweaks) 16 | 17 | 18 | @dataclass 19 | class Suffix: 20 | true_value: str 21 | test: Any 22 | false_value: str = "" 23 | 24 | 25 | @dataclass 26 | class BuildContext: 27 | # The src dir of the Colloid copy to operate on 28 | colloid_src_dir: str 29 | 30 | # The root of the project 31 | git_root: str 32 | 33 | # The root of the output dir (as specified by --dest if given) 34 | output_root: str 35 | 36 | output_format: Literal["zip"] | Literal["dir"] 37 | 38 | theme_name: str 39 | flavor: Flavor 40 | accent: Color 41 | size: Literal["standard"] | Literal["compact"] 42 | tweaks: Tweaks 43 | 44 | def output_dir(self) -> str: 45 | return f"{self.output_root}/{self.build_id()}" 46 | 47 | def build_id(self) -> str: 48 | return f"{self.theme_name}-{self.flavor.identifier}-{self.accent.identifier}-{self.size}+{self.tweaks.id() or 'default'}" 49 | 50 | def apply_suffix(self, suffix: Suffix) -> str: 51 | if suffix.test(self): 52 | return suffix.true_value 53 | else: 54 | return suffix.false_value 55 | 56 | def apply_tweak(self, key, default, value): 57 | find_and_replace( 58 | f"{self.colloid_src_dir}/sass/_tweaks-temp.scss", 59 | Subsitution(find=f"\\${key}: {default}", replace=f"${key}: {value}"), 60 | ) 61 | 62 | IS_DARK = Suffix(true_value="-Dark", test=lambda ctx: ctx.flavor.dark) 63 | IS_LIGHT = Suffix(true_value="-Light", test=lambda ctx: not ctx.flavor.dark) 64 | IS_WINDOW_NORMAL = Suffix( 65 | true_value="-Normal", test=lambda ctx: ctx.tweaks.has("normal") 66 | ) 67 | DARK_LIGHT = Suffix( 68 | true_value="-Dark", false_value="-Light", test=lambda ctx: ctx.flavor.dark 69 | ) 70 | -------------------------------------------------------------------------------- /sources/build/logger.py: -------------------------------------------------------------------------------- 1 | import logging 2 | 3 | logger = logging.getLogger("catppuccin-gtk") 4 | 5 | logger.setLevel(logging.DEBUG) 6 | ch = logging.StreamHandler() 7 | formatter = logging.Formatter("[%(name)s] [%(levelname)s] - %(message)s") 8 | ch.setFormatter(formatter) 9 | logger.addHandler(ch) 10 | -------------------------------------------------------------------------------- /sources/build/patches.py: -------------------------------------------------------------------------------- 1 | import os 2 | import subprocess 3 | from pathlib import Path 4 | from .logger import logger 5 | 6 | 7 | def apply_colloid_patches(colloid_dir, patch_dir): 8 | colloid_dir = Path(colloid_dir).relative_to(os.getcwd()) 9 | if os.path.isfile(colloid_dir / ".patched"): 10 | logger.info( 11 | f'Patches seem to be applied, remove "{colloid_dir}/.patched" to force application (this may fail)' 12 | ) 13 | return 14 | 15 | logger.info("Applying patches...") 16 | # Change into colloid 17 | for patch in [ 18 | "plank-dark.patch", 19 | "plank-light.patch", 20 | "sass-palette-frappe.patch", 21 | "sass-palette-mocha.patch", 22 | "sass-palette-latte.patch", 23 | "sass-palette-macchiato.patch", 24 | "theme-func.patch", 25 | ]: 26 | path = (Path(patch_dir) / patch).relative_to(os.getcwd()) 27 | logger.info(f"Applying patch '{patch}', located at '{path}'") 28 | subprocess.check_call( 29 | ["git", "apply", str(path), "--directory", str(colloid_dir)] 30 | ) 31 | 32 | with open(colloid_dir / ".patched", "w") as f: 33 | f.write("true") 34 | 35 | logger.info("Patching finished.") 36 | -------------------------------------------------------------------------------- /sources/build/theme.py: -------------------------------------------------------------------------------- 1 | import os 2 | import shutil 3 | import subprocess 4 | import glob 5 | import zipfile 6 | from .logger import logger 7 | from .utils import find_and_replace, Subsitution 8 | from .context import BuildContext, IS_DARK, IS_LIGHT, IS_WINDOW_NORMAL, DARK_LIGHT 9 | 10 | 11 | def apply_tweaks(ctx: BuildContext): 12 | ctx.apply_tweak("theme", "'default'", f"'{ctx.accent.identifier}'") 13 | 14 | if ctx.size == "compact": 15 | ctx.apply_tweak("compact", "'false'", "'true'") 16 | 17 | find_and_replace( 18 | f"{ctx.colloid_src_dir}/sass/_tweaks-temp.scss", 19 | Subsitution( 20 | find="@import 'color-palette-default';", 21 | replace=f"@import 'color-palette-catppuccin-{ctx.flavor.identifier}';", 22 | ), 23 | ) 24 | ctx.apply_tweak("colorscheme", "'default'", "'catppuccin'") 25 | 26 | if ctx.tweaks.has("black"): 27 | ctx.apply_tweak("blackness", "'false'", "'true'") 28 | 29 | if ctx.tweaks.has("rimless"): 30 | ctx.apply_tweak("rimless", "'false'", "'true'") 31 | 32 | if ctx.tweaks.has("normal"): 33 | ctx.apply_tweak("window_button", "'mac'", "'normal'") 34 | 35 | if ctx.tweaks.has("float"): 36 | ctx.apply_tweak("float", "'false'", "'true'") 37 | 38 | 39 | SASSC_OPT = ["-M", "-t", "expanded"] 40 | 41 | 42 | def compile_sass(src: str, dest: str) -> subprocess.Popen: 43 | return subprocess.Popen(["sassc", *SASSC_OPT, src, dest]) 44 | 45 | 46 | def execute_build(ctx: BuildContext): 47 | src_dir = ctx.colloid_src_dir 48 | output_dir = ctx.output_dir() 49 | 50 | logger.info(f"Building into '{output_dir}'...") 51 | 52 | apply_tweaks(ctx) 53 | 54 | os.makedirs(output_dir, exist_ok=True) 55 | with open(f"{output_dir}/index.theme", "w") as file: 56 | file.write("[Desktop Entry]\n") 57 | file.write("Type=X-GNOME-Metatheme\n") 58 | file.write(f"Name={ctx.build_id()}\n") 59 | file.write("Comment=An Flat Gtk+ theme based on Elegant Design\n") 60 | file.write("Encoding=UTF-8\n") 61 | file.write("\n") 62 | file.write("[X-GNOME-Metatheme]\n") 63 | file.write(f"GtkTheme={ctx.build_id()}\n") 64 | file.write(f"MetacityTheme={ctx.build_id()}\n") 65 | file.write(f"IconTheme=Tela-circle{ctx.apply_suffix(IS_DARK)}\n") 66 | file.write(f"CursorTheme={ctx.flavor.name}-cursors\n") 67 | file.write("ButtonLayout=close,minimize,maximize:menu\n") 68 | 69 | sassc_tasks = [] 70 | 71 | os.makedirs(f"{output_dir}/gnome-shell", exist_ok=True) 72 | shutil.copyfile( 73 | f"{src_dir}/main/gnome-shell/pad-osd.css", 74 | f"{output_dir}/gnome-shell/pad-osd.css", 75 | ) 76 | 77 | sassc_tasks.append( 78 | compile_sass( 79 | f"{src_dir}/main/gnome-shell/gnome-shell{ctx.apply_suffix(DARK_LIGHT)}.scss", 80 | f"{output_dir}/gnome-shell/gnome-shell.css", 81 | ) 82 | ) 83 | 84 | os.makedirs(f"{output_dir}/gtk-3.0", exist_ok=True) 85 | sassc_tasks.append( 86 | compile_sass( 87 | f"{src_dir}/main/gtk-3.0/gtk{ctx.apply_suffix(DARK_LIGHT)}.scss", 88 | f"{output_dir}/gtk-3.0/gtk.css", 89 | ) 90 | ) 91 | sassc_tasks.append( 92 | compile_sass( 93 | f"{src_dir}/main/gtk-3.0/gtk-Dark.scss", 94 | f"{output_dir}/gtk-3.0/gtk-dark.css", 95 | ) 96 | ) 97 | 98 | os.makedirs(f"{output_dir}/gtk-4.0", exist_ok=True) 99 | sassc_tasks.append( 100 | compile_sass( 101 | f"{src_dir}/main/gtk-4.0/gtk{ctx.apply_suffix(DARK_LIGHT)}.scss", 102 | f"{output_dir}/gtk-4.0/gtk.css", 103 | ) 104 | ) 105 | sassc_tasks.append( 106 | compile_sass( 107 | f"{src_dir}/main/gtk-4.0/gtk-Dark.scss", 108 | f"{output_dir}/gtk-4.0/gtk-dark.css", 109 | ) 110 | ) 111 | 112 | os.makedirs(f"{output_dir}/cinnamon", exist_ok=True) 113 | sassc_tasks.append( 114 | compile_sass( 115 | f"{src_dir}/main/cinnamon/cinnamon{ctx.apply_suffix(DARK_LIGHT)}.scss", 116 | f"{output_dir}/cinnamon/cinnamon.css", 117 | ) 118 | ) 119 | 120 | for task in sassc_tasks: 121 | task.wait() 122 | 123 | os.makedirs(f"{output_dir}/metacity-1", exist_ok=True) 124 | shutil.copyfile( 125 | f"{src_dir}/main/metacity-1/metacity-theme-3{ctx.apply_suffix(IS_WINDOW_NORMAL)}.xml", 126 | f"{output_dir}/metacity-1/metacity-theme-3.xml", 127 | ) 128 | 129 | os.makedirs(f"{output_dir}/xfwm4", exist_ok=True) 130 | shutil.copyfile( 131 | f"{src_dir}/main/xfwm4/themerc{ctx.apply_suffix(IS_LIGHT)}", 132 | f"{output_dir}/xfwm4/themerc", 133 | ) 134 | 135 | os.makedirs(f"{output_dir}-hdpi/xfwm4", exist_ok=True) 136 | shutil.copyfile( 137 | f"{src_dir}/main/xfwm4/themerc{ctx.apply_suffix(IS_LIGHT)}", 138 | f"{output_dir}-hdpi/xfwm4/themerc", 139 | ) 140 | find_and_replace( 141 | f"{output_dir}-hdpi/xfwm4/themerc", 142 | Subsitution(find="button_offset=6", replace="button_offset=9"), 143 | ) 144 | 145 | os.makedirs(f"{output_dir}-xhdpi/xfwm4", exist_ok=True) 146 | shutil.copyfile( 147 | f"{src_dir}/main/xfwm4/themerc{ctx.apply_suffix(IS_LIGHT)}", 148 | f"{output_dir}-xhdpi/xfwm4/themerc", 149 | ) 150 | 151 | find_and_replace( 152 | f"{output_dir}-xhdpi/xfwm4/themerc", 153 | Subsitution(find="button_offset=6", replace="button_offset=12"), 154 | ) 155 | 156 | if not ctx.flavor.dark: 157 | shutil.copytree( 158 | f"{src_dir}/main/plank/theme-Light-Catppuccin/", 159 | f"{output_dir}/plank", 160 | dirs_exist_ok=True, 161 | ) 162 | else: 163 | shutil.copytree( 164 | f"{src_dir}/main/plank/theme-Dark-Catppuccin/", 165 | f"{output_dir}/plank", 166 | dirs_exist_ok=True, 167 | ) 168 | 169 | 170 | def make_assets(ctx: BuildContext): 171 | output_dir = ctx.output_dir() 172 | src_dir = ctx.colloid_src_dir 173 | 174 | os.makedirs(f"{output_dir}/cinnamon/assets", exist_ok=True) 175 | for file in glob.glob(f"{src_dir}/assets/cinnamon/theme/*.svg"): 176 | shutil.copy(file, f"{output_dir}/cinnamon/assets") 177 | shutil.copy( 178 | f"{src_dir}/assets/cinnamon/thumbnail{ctx.apply_suffix(DARK_LIGHT)}.svg", 179 | f"{output_dir}/cinnamon/thumbnail.png", 180 | ) 181 | 182 | os.makedirs(f"{output_dir}/gnome-shell/assets", exist_ok=True) 183 | for file in glob.glob(f"{src_dir}/assets/gnome-shell/theme/*.svg"): 184 | shutil.copy(file, f"{output_dir}/gnome-shell/assets") 185 | 186 | shutil.copytree( 187 | f"{src_dir}/assets/gtk/assets", 188 | f"{output_dir}/gtk-3.0/assets", 189 | dirs_exist_ok=True, 190 | ) 191 | shutil.copytree( 192 | f"{src_dir}/assets/gtk/assets", 193 | f"{output_dir}/gtk-4.0/assets", 194 | dirs_exist_ok=True, 195 | ) 196 | shutil.copyfile( 197 | f"{src_dir}/assets/gtk/thumbnail{ctx.apply_suffix(IS_DARK)}.svg", 198 | f"{output_dir}/gtk-3.0/thumbnail.png", 199 | ) 200 | shutil.copyfile( 201 | f"{src_dir}/assets/gtk/thumbnail{ctx.apply_suffix(IS_DARK)}.svg", 202 | f"{output_dir}/gtk-4.0/thumbnail.png", 203 | ) 204 | 205 | theme_color = ctx.accent.hex 206 | 207 | palette = ctx.flavor.colors 208 | background = palette.base.hex 209 | background_alt = palette.mantle.hex 210 | titlebar = palette.overlay0.hex 211 | 212 | for file in glob.glob(f"{output_dir}/cinnamon/assets/*.svg"): 213 | find_and_replace( 214 | file, 215 | Subsitution(find="#5b9bf8", replace=theme_color), 216 | Subsitution(find="#3c84f7", replace=theme_color), 217 | ) 218 | 219 | for file in glob.glob(f"{output_dir}/gnome-shell/assets/*.svg"): 220 | find_and_replace( 221 | file, 222 | Subsitution(find="#5b9bf8", replace=theme_color), 223 | Subsitution(find="#3c84f7", replace=theme_color), 224 | ) 225 | 226 | for file in glob.glob(f"{output_dir}/gtk-3.0/assets/*.svg"): 227 | find_and_replace( 228 | file, 229 | Subsitution(find="#5b9bf8", replace=theme_color), 230 | Subsitution(find="#3c84f7", replace=theme_color), 231 | Subsitution(find="#ffffff", replace=background), 232 | Subsitution(find="#2c2c2c", replace=background), 233 | Subsitution(find="#3c3c3c", replace=background_alt), 234 | ) 235 | 236 | for file in glob.glob(f"{output_dir}/gtk-4.0/assets/*.svg"): 237 | find_and_replace( 238 | file, 239 | Subsitution(find="#5b9bf8", replace=theme_color), 240 | Subsitution(find="#3c84f7", replace=theme_color), 241 | Subsitution(find="#ffffff", replace=background), 242 | Subsitution(find="#2c2c2c", replace=background), 243 | Subsitution(find="#3c3c3c", replace=background_alt), 244 | ) 245 | 246 | if ctx.flavor.dark: 247 | find_and_replace( 248 | f"{output_dir}/cinnamon/thumbnail.png", 249 | Subsitution(find="#2c2c2c", replace=background), 250 | Subsitution(find="#5b9bf8", replace=theme_color), 251 | ) 252 | 253 | find_and_replace( 254 | f"{output_dir}/gtk-3.0/thumbnail.png", 255 | Subsitution(find="#5b9bf8", replace=theme_color), 256 | Subsitution(find="#2c2c2c", replace=background), 257 | ) 258 | 259 | find_and_replace( 260 | f"{output_dir}/gtk-4.0/thumbnail.png", 261 | Subsitution(find="#5b9bf8", replace=theme_color), 262 | Subsitution(find="#2c2c2c", replace=background), 263 | ) 264 | else: 265 | find_and_replace( 266 | f"{output_dir}/cinnamon/thumbnail.png", 267 | Subsitution(find="#ffffff", replace=background), 268 | Subsitution(find="#f2f2f2", replace=titlebar), 269 | Subsitution(find="#3c84f7", replace=theme_color), 270 | ) 271 | 272 | find_and_replace( 273 | f"{output_dir}/gtk-3.0/thumbnail.png", 274 | Subsitution(find="#f2f2f2", replace=titlebar), 275 | Subsitution(find="#3c84f7", replace=theme_color), 276 | ) 277 | 278 | find_and_replace( 279 | f"{output_dir}/gtk-4.0/thumbnail.png", 280 | Subsitution(find="#f2f2f2", replace=titlebar), 281 | Subsitution(find="#3c84f7", replace=theme_color), 282 | ) 283 | 284 | for file in glob.glob(f"{src_dir}/assets/cinnamon/common-assets/*.svg"): 285 | shutil.copy(file, f"{output_dir}/cinnamon/assets") 286 | 287 | for file in glob.glob( 288 | f"{src_dir}/assets/cinnamon/assets{ctx.apply_suffix(IS_DARK)}/*.svg" 289 | ): 290 | shutil.copy(file, f"{output_dir}/cinnamon/assets") 291 | 292 | for file in glob.glob(f"{src_dir}/assets/gnome-shell/common-assets/*.svg"): 293 | shutil.copy(file, f"{output_dir}/gnome-shell/assets") 294 | 295 | for file in glob.glob( 296 | f"{src_dir}/assets/gnome-shell/assets{ctx.apply_suffix(IS_DARK)}/*.svg" 297 | ): 298 | shutil.copy(file, f"{output_dir}/gnome-shell/assets") 299 | 300 | for file in glob.glob(f"{src_dir}/assets/gtk/symbolics/*.svg"): 301 | shutil.copy(file, f"{output_dir}/gtk-3.0/assets") 302 | shutil.copy(file, f"{output_dir}/gtk-4.0/assets") 303 | 304 | for file in glob.glob( 305 | f"{src_dir}/assets/metacity-1/assets{ctx.apply_suffix(IS_WINDOW_NORMAL)}/*.svg" 306 | ): 307 | shutil.copy(file, f"{output_dir}/metacity-1/assets") 308 | shutil.copy( 309 | f"{src_dir}/assets/metacity-1/thumbnail{ctx.apply_suffix(IS_DARK)}.png", 310 | f"{output_dir}/metacity-1/thumbnail.png", 311 | ) 312 | 313 | xfwm4_assets = f"{ctx.git_root}/patches/xfwm4/generated/assets-catppuccin-{ctx.flavor.identifier}" 314 | for file in glob.glob(xfwm4_assets + "/*"): 315 | shutil.copy(file, f"{output_dir}/xfwm4") 316 | 317 | xfwm4_assets = xfwm4_assets + "-hdpi/*" 318 | for file in glob.glob(xfwm4_assets): 319 | shutil.copy(file, f"{output_dir}-hdpi/xfwm4") 320 | 321 | xfwm4_assets = xfwm4_assets + "-xhdpi/*" 322 | for file in glob.glob(xfwm4_assets): 323 | shutil.copy(file, f"{output_dir}-xhdpi/xfwm4") 324 | 325 | 326 | def zip_dir(path, zip_file): 327 | for root, _, files in os.walk(path): 328 | for file in files: 329 | zip_file.write( 330 | os.path.join(root, file), 331 | os.path.relpath(os.path.join(root, file), os.path.join(path, "..")), 332 | ) 333 | 334 | 335 | def zip_artifacts(dir_list, zip_name, remove=True): 336 | with zipfile.ZipFile(zip_name, "w", zipfile.ZIP_DEFLATED) as zipf: 337 | for dir in dir_list: 338 | zip_dir(dir, zipf) 339 | 340 | if remove: 341 | for dir in dir_list: 342 | shutil.rmtree(dir) 343 | 344 | 345 | def build_with_context(ctx: BuildContext): 346 | build_info = f"""Build info: 347 | build_root: {ctx.output_root} 348 | src_root: {ctx.colloid_src_dir} 349 | theme_name: {ctx.theme_name} 350 | flavor: {ctx.flavor.identifier} 351 | accent: {ctx.accent.identifier} 352 | size: {ctx.size} 353 | tweaks: {ctx.tweaks}""" 354 | logger.info(build_info) 355 | 356 | execute_build(ctx) 357 | logger.info("Main build complete") 358 | 359 | logger.info("Bundling assets...") 360 | make_assets(ctx) 361 | logger.info("Asset bundling done") 362 | 363 | if ctx.output_format == "zip": 364 | zip_artifacts( 365 | [ 366 | ctx.output_dir(), 367 | f"{ctx.output_dir()}-hdpi", 368 | f"{ctx.output_dir()}-xhdpi", 369 | ], 370 | f"{ctx.output_root}/{ctx.build_id()}.zip", 371 | True, 372 | ) 373 | 374 | 375 | def gnome_shell_version(src_dir): 376 | # Hardcoded here, Colloid checks for this on end user machines 377 | # but we cannot do that. Old build system would've resulted in this too. 378 | gs_version = "46-0" 379 | 380 | shutil.copyfile( 381 | f"{src_dir}/sass/gnome-shell/_common.scss", 382 | f"{src_dir}/sass/gnome-shell/_common-temp.scss", 383 | ) 384 | find_and_replace( 385 | f"{src_dir}/sass/gnome-shell/_common-temp.scss", 386 | Subsitution( 387 | find="@import 'widgets-40-0';", 388 | replace=f"@import 'widgets-{gs_version}';", 389 | ), 390 | ) 391 | -------------------------------------------------------------------------------- /sources/build/utils.py: -------------------------------------------------------------------------------- 1 | import re 2 | import shutil 3 | from dataclasses import dataclass 4 | 5 | 6 | @dataclass 7 | class Subsitution: 8 | find: str 9 | replace: str 10 | 11 | 12 | def find_and_replace(path: str, *subs: Subsitution): 13 | with open(path, "r+") as f: 14 | content = f.read() 15 | f.seek(0) 16 | f.truncate() 17 | for sub in subs: 18 | content = re.sub(sub.find, sub.replace, content) 19 | f.write(content) 20 | 21 | 22 | def init_tweaks_temp(src_dir): 23 | shutil.copyfile(f"{src_dir}/sass/_tweaks.scss", f"{src_dir}/sass/_tweaks-temp.scss") 24 | -------------------------------------------------------------------------------- /sources/patches/colloid/alt-tab-background-color.patch: -------------------------------------------------------------------------------- 1 | diff --git a/src/sass/gnome-shell/common/_switcher-popup.scss b/src/sass/gnome-shell/common/_switcher-popup.scss 2 | index 90b51ab4..408662fb 100644 3 | --- a/src/sass/gnome-shell/common/_switcher-popup.scss 4 | +++ b/src/sass/gnome-shell/common/_switcher-popup.scss 5 | @@ -14,6 +14,8 @@ 6 | border-radius: $base_radius; 7 | border: 1px solid transparent; 8 | 9 | + background-color: $osd; 10 | + 11 | &:outlined { 12 | background-color: $divider; 13 | color: $text; // for Ubuntu session 14 | -------------------------------------------------------------------------------- /sources/patches/colloid/palette.tera: -------------------------------------------------------------------------------- 1 | --- 2 | whiskers: 3 | version: 2.1.0 4 | matrix: 5 | - flavor 6 | filename: 'sass-palette-{{ flavor.identifier }}.patch' 7 | --- 8 | {%- set palette = flavor.colors -%} 9 | diff --git a/src/sass/_color-palette-catppuccin-{{ flavor.identifier }}.scss b/src/sass/_color-palette-catppuccin-{{ flavor.identifier }}.scss 10 | new file mode 100644 11 | index 00000000..4ff0da0d 12 | --- /dev/null 13 | +++ b/src/sass/_color-palette-catppuccin-{{ flavor.identifier }}.scss 14 | @@ -0,0 +1,87 @@ 15 | + // Our accents 16 | + $rosewater: #{{ palette.rosewater.hex }}; 17 | + $flamingo: #{{ palette.flamingo.hex }}; 18 | + $pink: #{{ palette.pink.hex }}; 19 | + $mauve: #{{ palette.mauve.hex }}; 20 | + $red: #{{ palette.red.hex }}; 21 | + $maroon: #{{ palette.maroon.hex }}; 22 | + $peach: #{{ palette.peach.hex }}; 23 | + $yellow: #{{ palette.yellow.hex }}; 24 | + $green: #{{ palette.green.hex }}; 25 | + $teal: #{{ palette.teal.hex }}; 26 | + $sky: #{{ palette.sky.hex }}; 27 | + $sapphire: #{{ palette.sapphire.hex }}; 28 | + $blue: #{{ palette.blue.hex }}; 29 | + $lavender: #{{ palette.lavender.hex }}; 30 | +// Default Theme Color Palette 31 | + 32 | +// Red 33 | +$red-light: #{{ palette.red.hex }}; 34 | +$red-dark: #{{ palette.red.hex }}; 35 | + 36 | +// Pink 37 | +$pink-light: #{{ palette.pink.hex }}; 38 | +$pink-dark: #{{ palette.pink.hex }}; 39 | + 40 | +// Purple 41 | +$purple-light: #{{ palette.mauve.hex }}; 42 | +$purple-dark: #{{ palette.mauve.hex }}; 43 | + 44 | +// Blue 45 | +$blue-light: #{{ palette.blue.hex }}; 46 | +$blue-dark: #{{ palette.blue.hex }}; 47 | + 48 | +// Teal 49 | +$teal-light: #{{ palette.teal.hex }}; 50 | +$teal-dark: #{{ palette.teal.hex }}; 51 | + 52 | +// Green 53 | +$green-light: #{{ palette.green.hex }}; 54 | +$green-dark: #{{ palette.green.hex }}; 55 | + 56 | +// Yellow 57 | +$yellow-light: #{{ palette.yellow.hex }}; 58 | +$yellow-dark: #{{ palette.yellow.hex }}; 59 | + 60 | +// Orange 61 | +$orange-light: #{{ palette.peach.hex }}; 62 | +$orange-dark: #{{ palette.peach.hex }}; 63 | + 64 | +// Grey 65 | {% if flavor.dark -%} {#- https://github.com/catppuccin/gtk/blob/0c3e8817da94769887c690b2211e006b287b27b1/scripts/recolor.py#L153-L176 -#} 66 | +$grey-050: #{{ palette.overlay2.hex }}; 67 | +$grey-100: #{{ palette.overlay1.hex }}; 68 | +$grey-150: #{{ palette.overlay0.hex }}; 69 | +$grey-200: #{{ palette.surface2.hex }}; 70 | +$grey-250: #{{ palette.surface1.hex }}; 71 | +$grey-300: red; 72 | +$grey-350: red; 73 | +$grey-400: red; 74 | +$grey-450: red; 75 | +$grey-500: red; 76 | +$grey-550: red; 77 | +$grey-600: red; 78 | +$grey-650: #{{ palette.surface0.hex }}; 79 | +$grey-700: #{{ palette.base.hex }}; 80 | +$grey-750: #{{ palette.mantle.hex }}; 81 | +$grey-800: #{{ palette.crust.hex }}; 82 | +$grey-850: #020202; 83 | +$grey-900: #010101; 84 | +$grey-950: #000000; 85 | {%- else -%} {#- Light mode https://github.com/catppuccin/gtk/blob/0c3e8817da94769887c690b2211e006b287b27b1/scripts/recolor.py#L128-L151 -#} 86 | +$grey-050: #{{ palette.crust.hex }}; 87 | +$grey-100: #{{ palette.mantle.hex }}; 88 | +$grey-150: #{{ palette.base.hex }}; 89 | +$grey-200: #{{ palette.surface0.hex }}; 90 | +$grey-250: #{{ palette.surface1.hex }}; 91 | +$grey-300: red; 92 | +$grey-350: red; 93 | +$grey-400: red; 94 | +$grey-450: red; 95 | +$grey-500: red; 96 | +$grey-550: red; 97 | +$grey-600: red; 98 | +$grey-650: #{{ palette.base.hex }}; 99 | +$grey-700: #{{ palette.base.hex }}; 100 | +$grey-750: #{{ palette.mantle.hex }}; 101 | +$grey-800: #{{ palette.text.hex }}; 102 | +$grey-850: #020202; 103 | +$grey-900: #010101; 104 | +$grey-950: #000000; 105 | {%- endif %} 106 | + 107 | +// White 108 | +$white: #eff1f5; 109 | + 110 | +// Black 111 | +$black: #11111b; 112 | + 113 | +// Button 114 | +$button-close: #{{ palette.red.hex }}; 115 | +$button-max: #{{ palette.green.hex }}; 116 | +$button-min: #{{ palette.yellow.hex }}; 117 | + 118 | +// Link 119 | +$links: #{{ palette.sky.hex }}; 120 | + 121 | +// Theme 122 | +$default-light: $purple-light; 123 | +$default-dark: $purple-dark; 124 | -------------------------------------------------------------------------------- /sources/patches/colloid/plank-dark.patch: -------------------------------------------------------------------------------- 1 | diff --git a/src/main/plank/theme-Dark-Catppuccin/dock.theme b/src/main/plank/theme-Dark-Catppuccin/dock.theme 2 | new file mode 100644 3 | index 00000000..26a6a747 4 | --- /dev/null 5 | +++ b/src/main/plank/theme-Dark-Catppuccin/dock.theme 6 | @@ -0,0 +1,64 @@ 7 | +#This file based on: 8 | +#https://git.launchpad.net/plank/tree/data/themes/Default/dock.theme 9 | + 10 | +[PlankTheme] 11 | +#The roundness of the top corners. 12 | +TopRoundness=16 13 | +#The roundness of the bottom corners. 14 | +BottomRoundness=0 15 | +#The thickness (in pixels) of lines drawn. 16 | +LineWidth=0 17 | +#The color (RGBA) of the outer stroke. 18 | +OuterStrokeColor=0;;0;;0;;0 19 | +#The starting color (RGBA) of the fill gradient. 20 | +FillStartColor=33;;33;;33;;255 21 | +#The ending color (RGBA) of the fill gradient. 22 | +FillEndColor=33;;33;;33;;255 23 | +#The color (RGBA) of the inner stroke. 24 | +InnerStrokeColor=33;;33;;33;;255 25 | + 26 | +[PlankDockTheme] 27 | +#The padding on the left/right dock edges, in tenths of a percent of IconSize. 28 | +HorizPadding=2 29 | +#The padding on the top dock edge, in tenths of a percent of IconSize. 30 | +TopPadding=2 31 | +#The padding on the bottom dock edge, in tenths of a percent of IconSize. 32 | +BottomPadding=1 33 | +#The padding between items on the dock, in tenths of a percent of IconSize. 34 | +ItemPadding=2 35 | +#The size of item indicators, in tenths of a percent of IconSize. 36 | +IndicatorSize=5 37 | +#The size of the icon-shadow behind every item, in tenths of a percent of IconSize. 38 | +IconShadowSize=0 39 | +#The height (in percent of IconSize) to bounce an icon when the application sets urgent. 40 | +UrgentBounceHeight=1.6666666666666667 41 | +#The height (in percent of IconSize) to bounce an icon when launching an application. 42 | +LaunchBounceHeight=0.625 43 | +#The opacity value (0 to 1) to fade the dock to when hiding it. 44 | +FadeOpacity=1 45 | +#The amount of time (in ms) for click animations. 46 | +ClickTime=0 47 | +#The amount of time (in ms) to bounce an urgent icon. 48 | +UrgentBounceTime=600 49 | +#The amount of time (in ms) to bounce an icon when launching an application. 50 | +LaunchBounceTime=600 51 | +#The amount of time (in ms) for active window indicator animations. 52 | +ActiveTime=150 53 | +#The amount of time (in ms) to slide icons into/out of the dock. 54 | +SlideTime=300 55 | +#The time (in ms) to fade the dock in/out on a hide (if FadeOpacity is < 1). 56 | +FadeTime=250 57 | +#The time (in ms) to slide the dock in/out on a hide (if FadeOpacity is 1). 58 | +HideTime=250 59 | +#The size of the urgent glow (shown when dock is hidden), in tenths of a percent of IconSize. 60 | +GlowSize=30 61 | +#The total time (in ms) to show the hidden-dock urgent glow. 62 | +GlowTime=10000 63 | +#The time (in ms) of each pulse of the hidden-dock urgent glow. 64 | +GlowPulseTime=2000 65 | +#The hue-shift (-180 to 180) of the urgent indicator color. 66 | +UrgentHueShift=150 67 | +#The time (in ms) to move an item to its new position or its addition/removal to/from the dock. 68 | +ItemMoveTime=450 69 | +#Whether background and icons will unhide/hide with different speeds. The top-border of both will leave/hit the screen-edge at the same time. 70 | +CascadeHide=true 71 | -------------------------------------------------------------------------------- /sources/patches/colloid/plank-light.patch: -------------------------------------------------------------------------------- 1 | diff --git a/src/main/plank/theme-Light-Catppuccin/dock.theme b/src/main/plank/theme-Light-Catppuccin/dock.theme 2 | new file mode 100644 3 | index 00000000..a4029c96 4 | --- /dev/null 5 | +++ b/src/main/plank/theme-Light-Catppuccin/dock.theme 6 | @@ -0,0 +1,64 @@ 7 | +#This file based on: 8 | +#https://git.launchpad.net/plank/tree/data/themes/Default/dock.theme 9 | + 10 | +[PlankTheme] 11 | +#The roundness of the top corners. 12 | +TopRoundness=16 13 | +#The roundness of the bottom corners. 14 | +BottomRoundness=0 15 | +#The thickness (in pixels) of lines drawn. 16 | +LineWidth=0 17 | +#The color (RGBA) of the outer stroke. 18 | +OuterStrokeColor=0;;0;;0;;0 19 | +#The starting color (RGBA) of the fill gradient. 20 | +FillStartColor=242;;242;;242;;255 21 | +#The ending color (RGBA) of the fill gradient. 22 | +FillEndColor=242;;242;;242;;255 23 | +#The color (RGBA) of the inner stroke. 24 | +InnerStrokeColor=242;;242;;242;;255 25 | + 26 | +[PlankDockTheme] 27 | +#The padding on the left/right dock edges, in tenths of a percent of IconSize. 28 | +HorizPadding=2 29 | +#The padding on the top dock edge, in tenths of a percent of IconSize. 30 | +TopPadding=2 31 | +#The padding on the bottom dock edge, in tenths of a percent of IconSize. 32 | +BottomPadding=1 33 | +#The padding between items on the dock, in tenths of a percent of IconSize. 34 | +ItemPadding=2 35 | +#The size of item indicators, in tenths of a percent of IconSize. 36 | +IndicatorSize=5 37 | +#The size of the icon-shadow behind every item, in tenths of a percent of IconSize. 38 | +IconShadowSize=0 39 | +#The height (in percent of IconSize) to bounce an icon when the application sets urgent. 40 | +UrgentBounceHeight=1.6666666666666667 41 | +#The height (in percent of IconSize) to bounce an icon when launching an application. 42 | +LaunchBounceHeight=0.625 43 | +#The opacity value (0 to 1) to fade the dock to when hiding it. 44 | +FadeOpacity=1 45 | +#The amount of time (in ms) for click animations. 46 | +ClickTime=0 47 | +#The amount of time (in ms) to bounce an urgent icon. 48 | +UrgentBounceTime=600 49 | +#The amount of time (in ms) to bounce an icon when launching an application. 50 | +LaunchBounceTime=600 51 | +#The amount of time (in ms) for active window indicator animations. 52 | +ActiveTime=150 53 | +#The amount of time (in ms) to slide icons into/out of the dock. 54 | +SlideTime=300 55 | +#The time (in ms) to fade the dock in/out on a hide (if FadeOpacity is < 1). 56 | +FadeTime=250 57 | +#The time (in ms) to slide the dock in/out on a hide (if FadeOpacity is 1). 58 | +HideTime=250 59 | +#The size of the urgent glow (shown when dock is hidden), in tenths of a percent of IconSize. 60 | +GlowSize=30 61 | +#The total time (in ms) to show the hidden-dock urgent glow. 62 | +GlowTime=10000 63 | +#The time (in ms) of each pulse of the hidden-dock urgent glow. 64 | +GlowPulseTime=2000 65 | +#The hue-shift (-180 to 180) of the urgent indicator color. 66 | +UrgentHueShift=150 67 | +#The time (in ms) to move an item to its new position or its addition/removal to/from the dock. 68 | +ItemMoveTime=450 69 | +#Whether background and icons will unhide/hide with different speeds. The top-border of both will leave/hit the screen-edge at the same time. 70 | +CascadeHide=true 71 | -------------------------------------------------------------------------------- /sources/patches/colloid/sass-palette-frappe.patch: -------------------------------------------------------------------------------- 1 | diff --git a/src/sass/_color-palette-catppuccin-frappe.scss b/src/sass/_color-palette-catppuccin-frappe.scss 2 | new file mode 100644 3 | index 00000000..4ff0da0d 4 | --- /dev/null 5 | +++ b/src/sass/_color-palette-catppuccin-frappe.scss 6 | @@ -0,0 +1,87 @@ 7 | + // Our accents 8 | + $rosewater: #f2d5cf; 9 | + $flamingo: #eebebe; 10 | + $pink: #f4b8e4; 11 | + $mauve: #ca9ee6; 12 | + $red: #e78284; 13 | + $maroon: #ea999c; 14 | + $peach: #ef9f76; 15 | + $yellow: #e5c890; 16 | + $green: #a6d189; 17 | + $teal: #81c8be; 18 | + $sky: #99d1db; 19 | + $sapphire: #85c1dc; 20 | + $blue: #8caaee; 21 | + $lavender: #babbf1; 22 | +// Default Theme Color Palette 23 | + 24 | +// Red 25 | +$red-light: #e78284; 26 | +$red-dark: #e78284; 27 | + 28 | +// Pink 29 | +$pink-light: #f4b8e4; 30 | +$pink-dark: #f4b8e4; 31 | + 32 | +// Purple 33 | +$purple-light: #ca9ee6; 34 | +$purple-dark: #ca9ee6; 35 | + 36 | +// Blue 37 | +$blue-light: #8caaee; 38 | +$blue-dark: #8caaee; 39 | + 40 | +// Teal 41 | +$teal-light: #81c8be; 42 | +$teal-dark: #81c8be; 43 | + 44 | +// Green 45 | +$green-light: #a6d189; 46 | +$green-dark: #a6d189; 47 | + 48 | +// Yellow 49 | +$yellow-light: #e5c890; 50 | +$yellow-dark: #e5c890; 51 | + 52 | +// Orange 53 | +$orange-light: #ef9f76; 54 | +$orange-dark: #ef9f76; 55 | + 56 | +// Grey 57 | +$grey-050: #949cbb; 58 | +$grey-100: #838ba7; 59 | +$grey-150: #737994; 60 | +$grey-200: #626880; 61 | +$grey-250: #51576d; 62 | +$grey-300: red; 63 | +$grey-350: red; 64 | +$grey-400: red; 65 | +$grey-450: red; 66 | +$grey-500: red; 67 | +$grey-550: red; 68 | +$grey-600: red; 69 | +$grey-650: #414559; 70 | +$grey-700: #303446; 71 | +$grey-750: #292c3c; 72 | +$grey-800: #232634; 73 | +$grey-850: #020202; 74 | +$grey-900: #010101; 75 | +$grey-950: #000000; 76 | + 77 | +// White 78 | +$white: #eff1f5; 79 | + 80 | +// Black 81 | +$black: #11111b; 82 | + 83 | +// Button 84 | +$button-close: #e78284; 85 | +$button-max: #a6d189; 86 | +$button-min: #e5c890; 87 | + 88 | +// Link 89 | +$links: #99d1db; 90 | + 91 | +// Theme 92 | +$default-light: $purple-light; 93 | +$default-dark: $purple-dark; 94 | -------------------------------------------------------------------------------- /sources/patches/colloid/sass-palette-latte.patch: -------------------------------------------------------------------------------- 1 | diff --git a/src/sass/_color-palette-catppuccin-latte.scss b/src/sass/_color-palette-catppuccin-latte.scss 2 | new file mode 100644 3 | index 00000000..4ff0da0d 4 | --- /dev/null 5 | +++ b/src/sass/_color-palette-catppuccin-latte.scss 6 | @@ -0,0 +1,87 @@ 7 | + // Our accents 8 | + $rosewater: #dc8a78; 9 | + $flamingo: #dd7878; 10 | + $pink: #ea76cb; 11 | + $mauve: #8839ef; 12 | + $red: #d20f39; 13 | + $maroon: #e64553; 14 | + $peach: #fe640b; 15 | + $yellow: #df8e1d; 16 | + $green: #40a02b; 17 | + $teal: #179299; 18 | + $sky: #04a5e5; 19 | + $sapphire: #209fb5; 20 | + $blue: #1e66f5; 21 | + $lavender: #7287fd; 22 | +// Default Theme Color Palette 23 | + 24 | +// Red 25 | +$red-light: #d20f39; 26 | +$red-dark: #d20f39; 27 | + 28 | +// Pink 29 | +$pink-light: #ea76cb; 30 | +$pink-dark: #ea76cb; 31 | + 32 | +// Purple 33 | +$purple-light: #8839ef; 34 | +$purple-dark: #8839ef; 35 | + 36 | +// Blue 37 | +$blue-light: #1e66f5; 38 | +$blue-dark: #1e66f5; 39 | + 40 | +// Teal 41 | +$teal-light: #179299; 42 | +$teal-dark: #179299; 43 | + 44 | +// Green 45 | +$green-light: #40a02b; 46 | +$green-dark: #40a02b; 47 | + 48 | +// Yellow 49 | +$yellow-light: #df8e1d; 50 | +$yellow-dark: #df8e1d; 51 | + 52 | +// Orange 53 | +$orange-light: #fe640b; 54 | +$orange-dark: #fe640b; 55 | + 56 | +// Grey 57 | +$grey-050: #dce0e8; 58 | +$grey-100: #e6e9ef; 59 | +$grey-150: #eff1f5; 60 | +$grey-200: #ccd0da; 61 | +$grey-250: #bcc0cc; 62 | +$grey-300: red; 63 | +$grey-350: red; 64 | +$grey-400: red; 65 | +$grey-450: red; 66 | +$grey-500: red; 67 | +$grey-550: red; 68 | +$grey-600: red; 69 | +$grey-650: #eff1f5; 70 | +$grey-700: #eff1f5; 71 | +$grey-750: #e6e9ef; 72 | +$grey-800: #4c4f69; 73 | +$grey-850: #020202; 74 | +$grey-900: #010101; 75 | +$grey-950: #000000; 76 | + 77 | +// White 78 | +$white: #eff1f5; 79 | + 80 | +// Black 81 | +$black: #11111b; 82 | + 83 | +// Button 84 | +$button-close: #d20f39; 85 | +$button-max: #40a02b; 86 | +$button-min: #df8e1d; 87 | + 88 | +// Link 89 | +$links: #04a5e5; 90 | + 91 | +// Theme 92 | +$default-light: $purple-light; 93 | +$default-dark: $purple-dark; 94 | -------------------------------------------------------------------------------- /sources/patches/colloid/sass-palette-macchiato.patch: -------------------------------------------------------------------------------- 1 | diff --git a/src/sass/_color-palette-catppuccin-macchiato.scss b/src/sass/_color-palette-catppuccin-macchiato.scss 2 | new file mode 100644 3 | index 00000000..4ff0da0d 4 | --- /dev/null 5 | +++ b/src/sass/_color-palette-catppuccin-macchiato.scss 6 | @@ -0,0 +1,87 @@ 7 | + // Our accents 8 | + $rosewater: #f4dbd6; 9 | + $flamingo: #f0c6c6; 10 | + $pink: #f5bde6; 11 | + $mauve: #c6a0f6; 12 | + $red: #ed8796; 13 | + $maroon: #ee99a0; 14 | + $peach: #f5a97f; 15 | + $yellow: #eed49f; 16 | + $green: #a6da95; 17 | + $teal: #8bd5ca; 18 | + $sky: #91d7e3; 19 | + $sapphire: #7dc4e4; 20 | + $blue: #8aadf4; 21 | + $lavender: #b7bdf8; 22 | +// Default Theme Color Palette 23 | + 24 | +// Red 25 | +$red-light: #ed8796; 26 | +$red-dark: #ed8796; 27 | + 28 | +// Pink 29 | +$pink-light: #f5bde6; 30 | +$pink-dark: #f5bde6; 31 | + 32 | +// Purple 33 | +$purple-light: #c6a0f6; 34 | +$purple-dark: #c6a0f6; 35 | + 36 | +// Blue 37 | +$blue-light: #8aadf4; 38 | +$blue-dark: #8aadf4; 39 | + 40 | +// Teal 41 | +$teal-light: #8bd5ca; 42 | +$teal-dark: #8bd5ca; 43 | + 44 | +// Green 45 | +$green-light: #a6da95; 46 | +$green-dark: #a6da95; 47 | + 48 | +// Yellow 49 | +$yellow-light: #eed49f; 50 | +$yellow-dark: #eed49f; 51 | + 52 | +// Orange 53 | +$orange-light: #f5a97f; 54 | +$orange-dark: #f5a97f; 55 | + 56 | +// Grey 57 | +$grey-050: #939ab7; 58 | +$grey-100: #8087a2; 59 | +$grey-150: #6e738d; 60 | +$grey-200: #5b6078; 61 | +$grey-250: #494d64; 62 | +$grey-300: red; 63 | +$grey-350: red; 64 | +$grey-400: red; 65 | +$grey-450: red; 66 | +$grey-500: red; 67 | +$grey-550: red; 68 | +$grey-600: red; 69 | +$grey-650: #363a4f; 70 | +$grey-700: #24273a; 71 | +$grey-750: #1e2030; 72 | +$grey-800: #181926; 73 | +$grey-850: #020202; 74 | +$grey-900: #010101; 75 | +$grey-950: #000000; 76 | + 77 | +// White 78 | +$white: #eff1f5; 79 | + 80 | +// Black 81 | +$black: #11111b; 82 | + 83 | +// Button 84 | +$button-close: #ed8796; 85 | +$button-max: #a6da95; 86 | +$button-min: #eed49f; 87 | + 88 | +// Link 89 | +$links: #91d7e3; 90 | + 91 | +// Theme 92 | +$default-light: $purple-light; 93 | +$default-dark: $purple-dark; 94 | -------------------------------------------------------------------------------- /sources/patches/colloid/sass-palette-mocha.patch: -------------------------------------------------------------------------------- 1 | diff --git a/src/sass/_color-palette-catppuccin-mocha.scss b/src/sass/_color-palette-catppuccin-mocha.scss 2 | new file mode 100644 3 | index 00000000..4ff0da0d 4 | --- /dev/null 5 | +++ b/src/sass/_color-palette-catppuccin-mocha.scss 6 | @@ -0,0 +1,87 @@ 7 | + // Our accents 8 | + $rosewater: #f5e0dc; 9 | + $flamingo: #f2cdcd; 10 | + $pink: #f5c2e7; 11 | + $mauve: #cba6f7; 12 | + $red: #f38ba8; 13 | + $maroon: #eba0ac; 14 | + $peach: #fab387; 15 | + $yellow: #f9e2af; 16 | + $green: #a6e3a1; 17 | + $teal: #94e2d5; 18 | + $sky: #89dceb; 19 | + $sapphire: #74c7ec; 20 | + $blue: #89b4fa; 21 | + $lavender: #b4befe; 22 | +// Default Theme Color Palette 23 | + 24 | +// Red 25 | +$red-light: #f38ba8; 26 | +$red-dark: #f38ba8; 27 | + 28 | +// Pink 29 | +$pink-light: #f5c2e7; 30 | +$pink-dark: #f5c2e7; 31 | + 32 | +// Purple 33 | +$purple-light: #cba6f7; 34 | +$purple-dark: #cba6f7; 35 | + 36 | +// Blue 37 | +$blue-light: #89b4fa; 38 | +$blue-dark: #89b4fa; 39 | + 40 | +// Teal 41 | +$teal-light: #94e2d5; 42 | +$teal-dark: #94e2d5; 43 | + 44 | +// Green 45 | +$green-light: #a6e3a1; 46 | +$green-dark: #a6e3a1; 47 | + 48 | +// Yellow 49 | +$yellow-light: #f9e2af; 50 | +$yellow-dark: #f9e2af; 51 | + 52 | +// Orange 53 | +$orange-light: #fab387; 54 | +$orange-dark: #fab387; 55 | + 56 | +// Grey 57 | +$grey-050: #9399b2; 58 | +$grey-100: #7f849c; 59 | +$grey-150: #6c7086; 60 | +$grey-200: #585b70; 61 | +$grey-250: #45475a; 62 | +$grey-300: red; 63 | +$grey-350: red; 64 | +$grey-400: red; 65 | +$grey-450: red; 66 | +$grey-500: red; 67 | +$grey-550: red; 68 | +$grey-600: red; 69 | +$grey-650: #313244; 70 | +$grey-700: #1e1e2e; 71 | +$grey-750: #181825; 72 | +$grey-800: #11111b; 73 | +$grey-850: #020202; 74 | +$grey-900: #010101; 75 | +$grey-950: #000000; 76 | + 77 | +// White 78 | +$white: #eff1f5; 79 | + 80 | +// Black 81 | +$black: #11111b; 82 | + 83 | +// Button 84 | +$button-close: #f38ba8; 85 | +$button-max: #a6e3a1; 86 | +$button-min: #f9e2af; 87 | + 88 | +// Link 89 | +$links: #89dceb; 90 | + 91 | +// Theme 92 | +$default-light: $purple-light; 93 | +$default-dark: $purple-dark; 94 | -------------------------------------------------------------------------------- /sources/patches/colloid/theme-func.patch: -------------------------------------------------------------------------------- 1 | diff --git a/src/sass/_colors.scss b/src/sass/_colors.scss 2 | index 8738bf37..71797c6d 100644 3 | --- a/src/sass/_colors.scss 4 | +++ b/src/sass/_colors.scss 5 | @@ -58,27 +58,20 @@ 6 | } 7 | 8 | @function theme($color) { 9 | - @if ($variant == 'light') { 10 | - @if ($theme == 'default') { @return $default-dark; } 11 | - @if ($theme == 'purple') { @return $purple-dark; } 12 | - @if ($theme == 'pink') { @return $pink-dark; } 13 | - @if ($theme == 'red') { @return $red-dark; } 14 | - @if ($theme == 'orange') { @return $orange-dark; } 15 | - @if ($theme == 'yellow') { @return $yellow-dark; } 16 | - @if ($theme == 'green') { @return $green-dark; } 17 | - @if ($theme == 'teal') { @return $teal-dark; } 18 | - @if ($theme == 'grey') { @return $grey-600; } 19 | - } @else { 20 | - @if ($theme == 'default') { @return $default-light; } 21 | - @if ($theme == 'purple') { @return $purple-light; } 22 | - @if ($theme == 'pink') { @return $pink-light; } 23 | - @if ($theme == 'red') { @return $red-light; } 24 | - @if ($theme == 'orange') { @return $orange-light; } 25 | - @if ($theme == 'yellow') { @return $yellow-light; } 26 | - @if ($theme == 'green') { @return $green-light; } 27 | - @if ($theme == 'teal') { @return $teal-light; } 28 | - @if ($theme == 'grey') { @return $grey-200; } 29 | - } 30 | + @if ($theme == 'rosewater') { @return $rosewater; } 31 | + @if ($theme == 'flamingo') { @return $flamingo; } 32 | + @if ($theme == 'pink') { @return $pink; } 33 | + @if ($theme == 'mauve') { @return $mauve; } 34 | + @if ($theme == 'red') { @return $red; } 35 | + @if ($theme == 'maroon') { @return $maroon; } 36 | + @if ($theme == 'peach') { @return $peach; } 37 | + @if ($theme == 'yellow') { @return $yellow; } 38 | + @if ($theme == 'green') { @return $green; } 39 | + @if ($theme == 'teal') { @return $teal; } 40 | + @if ($theme == 'sky') { @return $sky; } 41 | + @if ($theme == 'sapphire') { @return $sapphire; } 42 | + @if ($theme == 'blue') { @return $blue; } 43 | + @if ($theme == 'lavender') { @return $lavender; } 44 | } 45 | 46 | @function background($type) { 47 | -------------------------------------------------------------------------------- /sources/patches/xfwm4/.gitignore: -------------------------------------------------------------------------------- 1 | generated/ 2 | patched/ -------------------------------------------------------------------------------- /sources/patches/xfwm4/assets-light.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 56 | 61 | 62 | 64 | 65 | 67 | image/svg+xml 68 | 70 | 71 | 72 | 73 | 78 | 80 | 82 | 89 | 96 | 97 | 103 | 104 | 106 | 109 | 116 | 123 | 124 | 130 | 131 | 133 | 141 | 147 | 148 | 150 | 158 | 164 | 165 | 167 | 175 | 181 | 182 | 184 | 192 | 198 | 199 | 201 | 209 | 215 | 216 | 218 | 226 | 232 | 233 | 235 | 243 | 249 | 257 | 258 | 260 | 268 | 274 | 282 | 283 | 285 | 293 | 299 | 312 | 313 | 315 | 323 | 329 | 333 | 341 | 350 | 351 | 352 | 354 | 362 | 368 | 374 | 382 | 383 | 385 | 393 | 399 | 405 | 413 | 414 | 416 | 424 | 430 | 436 | 449 | 450 | 452 | 460 | 466 | 472 | 476 | 484 | 493 | 494 | 495 | 497 | 505 | 511 | 512 | 514 | 522 | 532 | 533 | 535 | 543 | 553 | 554 | 556 | 564 | 568 | 569 | 571 | 579 | 583 | 584 | 586 | 594 | 600 | 606 | 607 | 609 | 617 | 623 | 633 | 634 | 636 | 644 | 650 | 660 | 661 | 663 | 671 | 677 | 681 | 682 | 684 | 692 | 698 | 702 | 703 | 705 | 713 | 719 | 725 | 726 | 728 | 736 | 742 | 752 | 753 | 755 | 763 | 769 | 779 | 780 | 782 | 790 | 796 | 800 | 801 | 803 | 811 | 817 | 821 | 822 | 824 | 832 | 838 | 839 | 841 | 849 | 859 | 860 | 862 | 870 | 880 | 881 | 883 | 891 | 895 | 896 | 898 | 906 | 910 | 911 | 915 | 924 | 933 | 934 | 938 | 947 | 956 | 957 | 961 | 970 | 979 | 980 | 984 | 993 | 1002 | 1003 | 1007 | 1013 | 1019 | 1020 | 1024 | 1030 | 1036 | 1037 | 1041 | 1047 | 1053 | 1054 | 1058 | 1064 | 1070 | 1071 | 1075 | 1084 | 1093 | 1094 | 1098 | 1107 | 1116 | 1117 | 1125 | 1133 | 1141 | 1149 | 1157 | 1165 | 1173 | 1181 | 1189 | 1197 | 1200 | 1203 | 1209 | 1210 | 1216 | 1217 | 1226 | 1229 | 1232 | 1238 | 1239 | 1245 | 1246 | 1249 | 1252 | 1258 | 1259 | 1265 | 1274 | 1283 | 1292 | 1301 | 1310 | 1319 | 1320 | 1321 | 1322 | -------------------------------------------------------------------------------- /sources/patches/xfwm4/generate_assets.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | from catppuccin import PALETTE 3 | from catppuccin.models import Flavor 4 | 5 | import re 6 | import os 7 | import shutil 8 | import subprocess 9 | import time 10 | from dataclasses import dataclass 11 | 12 | THIS_DIR = os.path.dirname(os.path.realpath(__file__)) 13 | 14 | INDEX = [ 15 | "close-active", 16 | "close-inactive", 17 | "close-prelight", 18 | "close-pressed", 19 | "hide-active", 20 | "hide-inactive", 21 | "hide-prelight", 22 | "hide-pressed", 23 | "maximize-active", 24 | "maximize-inactive", 25 | "maximize-prelight", 26 | "maximize-pressed", 27 | "maximize-toggled-active", 28 | "maximize-toggled-inactive", 29 | "maximize-toggled-prelight", 30 | "maximize-toggled-pressed", 31 | "menu-active", 32 | "menu-inactive", 33 | "menu-prelight", 34 | "menu-pressed", 35 | "shade-active", 36 | "shade-inactive", 37 | "shade-prelight", 38 | "shade-pressed", 39 | "shade-toggled-active", 40 | "shade-toggled-inactive", 41 | "shade-toggled-prelight", 42 | "shade-toggled-pressed", 43 | "stick-active", 44 | "stick-inactive", 45 | "stick-prelight", 46 | "stick-pressed", 47 | "stick-toggled-active", 48 | "stick-toggled-inactive", 49 | "stick-toggled-prelight", 50 | "stick-toggled-pressed", 51 | "title-1-active", 52 | "title-1-inactive", 53 | "title-2-active", 54 | "title-2-inactive", 55 | "title-3-active", 56 | "title-3-inactive", 57 | "title-4-active", 58 | "title-4-inactive", 59 | "title-5-active", 60 | "title-5-inactive", 61 | "top-left-active", 62 | "top-left-inactive", 63 | "top-right-active", 64 | "top-right-inactive", 65 | "left-active", 66 | "left-inactive", 67 | "right-active", 68 | "right-inactive", 69 | "bottom-active", 70 | "bottom-inactive", 71 | "bottom-left-active", 72 | "bottom-left-inactive", 73 | "bottom-right-active", 74 | "bottom-right-inactive", 75 | ] 76 | 77 | 78 | def subst_text(path, _from, to): 79 | with open(path, "r+") as f: 80 | content = f.read() 81 | f.seek(0) 82 | f.truncate() 83 | f.write(re.sub(_from, to, content)) 84 | 85 | 86 | def generate_for_flavor(flavor: Flavor): 87 | # Setup the palette 88 | palette = flavor.colors 89 | 90 | close_color = f"#{palette.red.hex}" 91 | max_color = f"#{palette.green.hex}" 92 | min_color = f"#{palette.yellow.hex}" 93 | 94 | # We expand the source assets into the 4 flavors, but need to map between 95 | # Their definition of dark and ours. This means that latte will get the -light assets 96 | # and the rest get the -dark assets to work from 97 | color = "-dark" 98 | if not flavor.dark: 99 | color = "-light" 100 | 101 | # Make a directory for our patched SVGs to live in before compilation 102 | odir = f"{THIS_DIR}/patched" 103 | os.makedirs(odir, exist_ok=True) 104 | 105 | # Copy the base assets into the output 106 | shutil.copy( 107 | f"{THIS_DIR}/assets{color}.svg", 108 | f"{odir}/assets-catppuccin-{flavor.identifier}.svg", 109 | ) 110 | shutil.copy( 111 | f"{THIS_DIR}/assets{color}-normal.svg", 112 | f"{odir}/assets-catppuccin-{flavor.identifier}-normal.svg", 113 | ) 114 | 115 | # Patch all the SVGs 116 | path = f"{odir}/assets-catppuccin-{flavor.identifier}-normal.svg" 117 | subst_text(path, "#fd5f51", close_color) 118 | subst_text(path, "#38c76a", max_color) 119 | subst_text(path, "#fdbe04", min_color) 120 | 121 | headerbar = palette.base.hex 122 | headerbar_backdrop = palette.mantle.hex 123 | 124 | if flavor.dark: 125 | path = f"{odir}/assets-catppuccin-{flavor.identifier}.svg" 126 | subst_text(path, "#242424", headerbar) 127 | subst_text(path, "#2c2c2c", headerbar_backdrop) 128 | 129 | path = f"{odir}/assets-catppuccin-{flavor.identifier}-normal.svg" 130 | subst_text(path, "#242424", headerbar) 131 | subst_text(path, "#2c2c2c", headerbar_backdrop) 132 | else: 133 | path = f"{odir}/assets-catppuccin-{flavor.identifier}.svg" 134 | subst_text(path, "#f2f2f2", headerbar) 135 | subst_text(path, "#fafafa", headerbar_backdrop) 136 | 137 | path = f"{odir}/assets-catppuccin-{flavor.identifier}-normal.svg" 138 | subst_text(path, "#f2f2f2", headerbar) 139 | subst_text(path, "#fafafa", headerbar_backdrop) 140 | 141 | 142 | @dataclass 143 | class WorkerInput: 144 | output_path: str 145 | output_dir: str 146 | input_path: str 147 | dpi: str 148 | ident: str 149 | 150 | 151 | def call_subprocesses(inp: WorkerInput): 152 | inkscape = "inkscape" 153 | optipng = "optipng" 154 | 155 | return [ 156 | subprocess.Popen( 157 | [ 158 | # FIXME: https://gitlab.com/inkscape/inkscape/-/issues/4716#note_1882967469Z 159 | "unshare", 160 | "--user", 161 | inkscape, 162 | "--export-id", 163 | inp.ident, 164 | "--export-id-only", 165 | "--export-dpi", 166 | inp.dpi, 167 | "--export-filename", 168 | inp.output_path, 169 | inp.input_path, 170 | ], 171 | stdout=subprocess.DEVNULL, 172 | stderr=subprocess.STDOUT, 173 | ), 174 | subprocess.Popen( 175 | [optipng, "-o7", "--quiet", inp.output_path], 176 | stdout=subprocess.DEVNULL, 177 | stderr=subprocess.STDOUT, 178 | ), 179 | ] 180 | 181 | 182 | @dataclass 183 | class RenderState: 184 | tasks: List[subprocess.Popen] 185 | input_root: str 186 | output_root: str 187 | 188 | 189 | screen_to_dpi = { 190 | "-hdpi": "144", 191 | "-xhdpi": "192", 192 | } 193 | 194 | 195 | def render_for_screen(state: RenderState, flavor: Flavor, screen: str, ident: str): 196 | # NOTE: We do not generate for the -normal variant currently, that would just be 197 | # a stupid amount of compute and time for little benefit 198 | src_file = f"{state.input_root}/assets-catppuccin-{flavor.identifier}.svg" 199 | 200 | output_dir = f"{state.output_root}/assets-catppuccin-{flavor.identifier}{screen}" 201 | output_path = f"{output_dir}/{ident}.png" 202 | 203 | dpi = screen_to_dpi.get(screen, "96") 204 | 205 | os.makedirs(output_dir, exist_ok=True) 206 | 207 | if os.path.exists(output_path): 208 | print(f"Skipping '{output_path}', already generated") 209 | else: 210 | new_tasks = call_subprocesses( 211 | WorkerInput( 212 | output_path=output_path, 213 | output_dir=output_dir, 214 | input_path=src_file, 215 | dpi=dpi, 216 | ident=ident, 217 | ) 218 | ) 219 | state.tasks.extend(new_tasks) 220 | 221 | 222 | def render_for_flavor(flavor: Flavor, state: RenderState): 223 | print(f"Starting render tasks for {flavor.identifier}") 224 | for ident in INDEX: 225 | render_for_screen(state=state, flavor=flavor, screen="", ident=ident) 226 | render_for_screen(state=state, flavor=flavor, screen="-hdpi", ident=ident) 227 | render_for_screen(state=state, flavor=flavor, screen="-xhdpi", ident=ident) 228 | 229 | 230 | generate_for_flavor(PALETTE.mocha) 231 | generate_for_flavor(PALETTE.latte) 232 | generate_for_flavor(PALETTE.macchiato) 233 | generate_for_flavor(PALETTE.frappe) 234 | 235 | state = RenderState( 236 | tasks=[], input_root=f"{THIS_DIR}/patched", output_root=f"{THIS_DIR}/generated" 237 | ) 238 | start_time = time.time() 239 | 240 | render_for_flavor(PALETTE.mocha, state) 241 | render_for_flavor(PALETTE.latte, state) 242 | render_for_flavor(PALETTE.macchiato, state) 243 | render_for_flavor(PALETTE.frappe, state) 244 | 245 | for task in state.tasks: 246 | task.wait() 247 | 248 | end_time = time.time() - start_time 249 | print(f"Generation complete in {end_time} seconds") 250 | shutil.rmtree(state.input_root) 251 | --------------------------------------------------------------------------------