mirror of
https://github.com/obsqrbtz/clrsync.git
synced 2026-04-09 12:37:41 +03:00
Compare commits
126 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3277873d0c | |||
| 0db962db76 | |||
| 2d015c6fb7 | |||
| 4697f69dac | |||
| 3e798f1fb8 | |||
| 6fc80daaa1 | |||
| 4293421166 | |||
| 78daab7176 | |||
| 56a499502f | |||
| 2b1c6d59c4 | |||
| d852d58948 | |||
| 41939f4df4 | |||
| a813b7f6c9 | |||
| 9803f4948b | |||
| c17960d1e6 | |||
| 19291f35ee | |||
| 4d61ed3194 | |||
| d722499e80 | |||
| e3cd9cd362 | |||
| e256dcad2e | |||
| 5b0599a958 | |||
| afa7275e37 | |||
| fc5663839e | |||
| 997e7c3eae | |||
| 4229db457c | |||
| d17776b8e4 | |||
| 8112096647 | |||
| 4ada2c44ed | |||
| 82998d688c | |||
| 6ac9c03ec4 | |||
| 2a433483d7 | |||
| ece7c84371 | |||
| 5b641cdd02 | |||
| dff3e916fe | |||
| 2d653834a5 | |||
| 9be0a159ea | |||
| 0288773ccb | |||
| c68ca3dabe | |||
| 292a748ac4 | |||
| 7641846600 | |||
| 613c2c80f5 | |||
| 1a1747a472 | |||
| 57c3c55a94 | |||
| d4ff415f45 | |||
| 4c0502d8ee | |||
| 0acb36445f | |||
| b08ba4d754 | |||
| 231e9f0176 | |||
| b98761a172 | |||
| 92b06a9e0c | |||
| 019b0db522 | |||
| 58eff4d97e | |||
| b4ca5e1912 | |||
| 899a5d50c4 | |||
| 2813a8bd05 | |||
| e6bac8e220 | |||
| 5bb8a687ea | |||
| 10516212bf | |||
| 89888adf8d | |||
| c58ff17289 | |||
| ef0854aa39 | |||
| 1c2486d476 | |||
| d4c563f585 | |||
| f7c290110e | |||
| 659c5f28e5 | |||
| cd817446b0 | |||
| a5d6503305 | |||
| 8a2b224fd3 | |||
| 4b4af0f8fe | |||
| d40b436461 | |||
| 8d73df8fb8 | |||
| c4bab31e3b | |||
| 8e65c52adc | |||
| 164e6f9ac0 | |||
| d951f8d9c8 | |||
| 794193209b | |||
| 2a10aa0226 | |||
| 8caddbbb80 | |||
| c1474ccf0c | |||
| db4cc383d4 | |||
| 52a4b096a5 | |||
| 1e2c7faa38 | |||
| cc4d8f9dbd | |||
| ad92d366b2 | |||
| e44d441453 | |||
| bb1c14d566 | |||
| 2714ae51b7 | |||
| 881bc6e739 | |||
| 65e54f9c0b | |||
| 2c452cb395 | |||
| 2a81fa7b1b | |||
| cf8c93e31b | |||
| 8770dbcef8 | |||
| 236f948fcf | |||
| 3350c41ccc | |||
| 44a34eb216 | |||
| 7535bb51ce | |||
| 4c135edc95 | |||
| 813396920c | |||
| 0cee625e8b | |||
| dfbcdb6e1c | |||
| 23a6a9245d | |||
| 93ab7bef81 | |||
| 792aed7439 | |||
| 38318f0205 | |||
| 8a9695f3b8 | |||
| dd38d08914 | |||
| f55d224fab | |||
| 931277291b | |||
| d8baae2ae9 | |||
| 5dafb6ce8c | |||
| 6c0fffafd3 | |||
| ae5ce52d1d | |||
| f968e23541 | |||
| 6cc3de8e44 | |||
| dbaf693fee | |||
| 2220bfb5de | |||
| 264fc6ce54 | |||
| 33bca75990 | |||
| 1afb9428bd | |||
| f263e31d7d | |||
| 5d87e8df3c | |||
| f39d22b5e3 | |||
| 082d0db47b | |||
| 60d6992850 | |||
| 60d279a01f |
45
.github/workflows/Test PKGBUILD-git.yml
vendored
Normal file
45
.github/workflows/Test PKGBUILD-git.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
name: Test PKGBUILD-git
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: master
|
||||||
|
pull_request:
|
||||||
|
branches: master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: archlinux:latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Setup Arch
|
||||||
|
run: |
|
||||||
|
pacman -Sy --noconfirm --needed base-devel git sudo
|
||||||
|
useradd -m builder
|
||||||
|
echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set permissions
|
||||||
|
run: chown -R builder:builder .
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
sudo -u builder bash -c '
|
||||||
|
cd AUR
|
||||||
|
makepkg -p PKGBUILD-git -si --noconfirm
|
||||||
|
'
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: |
|
||||||
|
clrsync_cli --help
|
||||||
|
pacman -Ql clrsync-git
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: clrsync-git
|
||||||
|
path: AUR/*.pkg.tar.zst
|
||||||
33
.github/workflows/Test flake.yml
vendored
Normal file
33
.github/workflows/Test flake.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
name: Test flake.nix
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: master
|
||||||
|
pull_request:
|
||||||
|
branches: master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install Nix
|
||||||
|
uses: cachix/install-nix-action@v31
|
||||||
|
with:
|
||||||
|
extra_nix_config: |
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
|
||||||
|
- name: Build clrsync package
|
||||||
|
run: |
|
||||||
|
nix --extra-experimental-features "flakes nix-command" build .#packages.x86_64-linux.clrsync
|
||||||
|
|
||||||
|
- name: Enter devShell
|
||||||
|
run: |
|
||||||
|
nix --extra-experimental-features "flakes nix-command" develop .#default --command true
|
||||||
|
|
||||||
|
- name: Test clrsync CLI
|
||||||
|
run: |
|
||||||
|
nix --extra-experimental-features "flakes nix-command" run .#clrsync-cli -- --help
|
||||||
141
.github/workflows/publish-release.yml
vendored
Normal file
141
.github/workflows/publish-release.yml
vendored
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
name: Build and Release Packages
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-windows:
|
||||||
|
runs-on: windows-latest
|
||||||
|
outputs:
|
||||||
|
artifact-path: ${{ steps.upload.outputs.artifact-path }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: Install NSIS
|
||||||
|
run: choco install nsis --no-progress -y
|
||||||
|
|
||||||
|
- name: Setup MSVC
|
||||||
|
uses: microsoft/setup-msbuild@v2
|
||||||
|
|
||||||
|
- name: Configure project
|
||||||
|
run: cmake -B build -S . -A x64
|
||||||
|
|
||||||
|
- name: Build project
|
||||||
|
run: cmake --build build --config Release
|
||||||
|
|
||||||
|
- name: Generate NSIS installer
|
||||||
|
run: cd build && cpack -G NSIS
|
||||||
|
|
||||||
|
- name: Upload installer
|
||||||
|
id: upload
|
||||||
|
uses: actions/upload-artifact@v6
|
||||||
|
with:
|
||||||
|
name: windows-installer
|
||||||
|
path: build/*.exe
|
||||||
|
|
||||||
|
build-ubuntu:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
artifact-path: ${{ steps.upload.outputs.artifact-path }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y cmake build-essential git \
|
||||||
|
libglfw3-dev libfreetype6-dev libfontconfig1-dev \
|
||||||
|
zlib1g-dev libharfbuzz-dev \
|
||||||
|
libx11-dev libxrandr-dev libxi-dev libgtk-3-dev \
|
||||||
|
mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev \
|
||||||
|
libxinerama-dev libxcursor-dev libxkbcommon-dev
|
||||||
|
|
||||||
|
- name: Configure CMake
|
||||||
|
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DUSE_SYSTEM_GLFW=OFF
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build build --config Release
|
||||||
|
|
||||||
|
- name: Package DEB
|
||||||
|
run: cd build && cpack -G DEB
|
||||||
|
|
||||||
|
- name: Upload DEB
|
||||||
|
id: upload
|
||||||
|
uses: actions/upload-artifact@v6
|
||||||
|
with:
|
||||||
|
name: deb-package
|
||||||
|
path: build/*.deb
|
||||||
|
|
||||||
|
build-fedora:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: fedora:latest
|
||||||
|
outputs:
|
||||||
|
artifact-path: ${{ steps.upload.outputs.artifact-path }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
dnf install -y cmake gcc gcc-c++ make rpm-build git \
|
||||||
|
glfw-devel freetype-devel fontconfig-devel \
|
||||||
|
zlib-devel harfbuzz-devel \
|
||||||
|
libX11-devel libXrandr-devel libXi-devel \
|
||||||
|
mesa-libGL-devel mesa-libGLU-devel \
|
||||||
|
libXinerama-devel libXcursor-devel \
|
||||||
|
wayland-devel wayland-protocols-devel gtk3-devel
|
||||||
|
|
||||||
|
- name: Configure CMake
|
||||||
|
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DUSE_SYSTEM_GLFW=ON
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build build --config Release
|
||||||
|
|
||||||
|
- name: Package RPM
|
||||||
|
run: cd build && cpack -G RPM
|
||||||
|
|
||||||
|
- name: Upload RPM
|
||||||
|
id: upload
|
||||||
|
uses: actions/upload-artifact@v6
|
||||||
|
with:
|
||||||
|
name: rpm-package
|
||||||
|
path: build/*.rpm
|
||||||
|
|
||||||
|
release:
|
||||||
|
needs: [build-windows, build-ubuntu, build-fedora]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- name: Download Windows artifact
|
||||||
|
uses: actions/download-artifact@v6
|
||||||
|
with:
|
||||||
|
name: windows-installer
|
||||||
|
path: artifacts/
|
||||||
|
|
||||||
|
- name: Download DEB artifact
|
||||||
|
uses: actions/download-artifact@v6
|
||||||
|
with:
|
||||||
|
name: deb-package
|
||||||
|
path: artifacts/
|
||||||
|
|
||||||
|
- name: Download RPM artifact
|
||||||
|
uses: actions/download-artifact@v6
|
||||||
|
with:
|
||||||
|
name: rpm-package
|
||||||
|
path: artifacts/
|
||||||
|
|
||||||
|
- name: Create Release and Upload Assets
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
tag: ${{ github.ref_name }}
|
||||||
|
name: Release ${{ github.ref_name }}
|
||||||
|
artifacts: |
|
||||||
|
artifacts/*.exe
|
||||||
|
artifacts/*.deb
|
||||||
|
artifacts/*.rpm
|
||||||
36
.gitignore
vendored
36
.gitignore
vendored
@@ -3,16 +3,23 @@
|
|||||||
.vs
|
.vs
|
||||||
out
|
out
|
||||||
|
|
||||||
/build
|
.clangd
|
||||||
/builddir
|
|
||||||
/build-*
|
|
||||||
|
|
||||||
/subprojects/glfw-*
|
build/
|
||||||
/subprojects/imgui-*
|
build-msvc/
|
||||||
/subprojects/sdl2-*
|
CMakeCache.txt
|
||||||
/subprojects/freetype-*
|
CMakeFiles/
|
||||||
/subprojects/libpng-*
|
cmake_install.cmake
|
||||||
/subprojects/packagecache
|
Makefile
|
||||||
|
*.cmake
|
||||||
|
|
||||||
|
AUR/clrsync-git
|
||||||
|
AUR/pkg
|
||||||
|
AUR/src
|
||||||
|
|
||||||
|
result
|
||||||
|
result-*
|
||||||
|
.direnv/
|
||||||
|
|
||||||
*.log
|
*.log
|
||||||
*tar.zst
|
*tar.zst
|
||||||
@@ -21,4 +28,13 @@ out
|
|||||||
*.swp
|
*.swp
|
||||||
*.bak
|
*.bak
|
||||||
*.tmp
|
*.tmp
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
*~
|
||||||
|
|
||||||
|
*.o
|
||||||
|
*.a
|
||||||
|
*.so
|
||||||
|
*.dylib
|
||||||
|
|||||||
55
.vscode/launch.json
vendored
55
.vscode/launch.json
vendored
@@ -1,22 +1,14 @@
|
|||||||
{
|
{
|
||||||
// Use IntelliSense to learn about possible attributes.
|
|
||||||
// Hover to view descriptions of existing attributes.
|
|
||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "CLI",
|
"name": "Debug current target (GDB)",
|
||||||
"type": "cppdbg",
|
"type": "cppdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/builddir/clrsync_cli",
|
"program": "${command:cmake.launchTargetPath}",
|
||||||
"args": [
|
"args": [],
|
||||||
"--apply",
|
|
||||||
"--theme",
|
|
||||||
"dark"
|
|
||||||
],
|
|
||||||
"preLaunchTask": "Build (meson)",
|
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}/builddir",
|
"cwd": "${workspaceFolder}",
|
||||||
"environment": [],
|
"environment": [],
|
||||||
"externalConsole": false,
|
"externalConsole": false,
|
||||||
"MIMode": "gdb",
|
"MIMode": "gdb",
|
||||||
@@ -34,33 +26,28 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "GUI",
|
"name": "Debug current target (LLDB)",
|
||||||
"type": "cppdbg",
|
"type": "cppdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/builddir/clrsync_gui",
|
"program": "${command:cmake.launchTargetPath}",
|
||||||
"args": [
|
"args": [],
|
||||||
"--apply",
|
|
||||||
"--theme",
|
|
||||||
"dark"
|
|
||||||
],
|
|
||||||
"preLaunchTask": "Build (meson)",
|
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}/builddir",
|
"cwd": "${workspaceFolder}",
|
||||||
"environment": [],
|
"environment": [],
|
||||||
"externalConsole": false,
|
"externalConsole": false,
|
||||||
"MIMode": "gdb",
|
"MIMode": "lldb",
|
||||||
"setupCommands": [
|
"miDebuggerPath": "lldb"
|
||||||
{
|
},
|
||||||
"description": "Enable pretty-printing for gdb",
|
{
|
||||||
"text": "-enable-pretty-printing",
|
"name": "Debug current target (MSVC)",
|
||||||
"ignoreFailures": true
|
"type": "cppvsdbg",
|
||||||
},
|
"request": "launch",
|
||||||
{
|
"program": "${command:cmake.launchTargetPath}",
|
||||||
"description": "Set Disassembly Flavor to Intel",
|
"args": [],
|
||||||
"text": "-gdb-set disassembly-flavor intel",
|
"stopAtEntry": false,
|
||||||
"ignoreFailures": true
|
"cwd": "${workspaceFolder}",
|
||||||
}
|
"environment": [],
|
||||||
]
|
"console": "integratedTerminal"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
9
.vscode/settings.json
vendored
9
.vscode/settings.json
vendored
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"C_Cpp.default.compileCommands": "/home/dan/src/clrsync/builddir/compile_commands.json",
|
|
||||||
"C_Cpp.default.configurationProvider": "mesonbuild.mesonbuild",
|
|
||||||
"clangd.arguments": [
|
|
||||||
"--compile-commands-dir=${workspaceFolder}/builddir",
|
|
||||||
"--completion-style=detailed",
|
|
||||||
"--header-insertion=never"
|
|
||||||
],
|
|
||||||
}
|
|
||||||
3
.vscode/settnigs.json
vendored
Normal file
3
.vscode/settnigs.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"cmake.useCMakePresets": "always"
|
||||||
|
}
|
||||||
22
.vscode/tasks.json
vendored
22
.vscode/tasks.json
vendored
@@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
"tasks": [
|
|
||||||
{
|
|
||||||
"type": "cppbuild",
|
|
||||||
"label": "Build (meson)",
|
|
||||||
"command": "meson",
|
|
||||||
"args": [
|
|
||||||
"compile",
|
|
||||||
"-C",
|
|
||||||
"builddir"
|
|
||||||
],
|
|
||||||
"options": {
|
|
||||||
"cwd": "${workspaceFolder}"
|
|
||||||
},
|
|
||||||
"group": {
|
|
||||||
"kind": "build",
|
|
||||||
"isDefault": true
|
|
||||||
},
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"version": "2.0.0"
|
|
||||||
}
|
|
||||||
@@ -1,24 +1,35 @@
|
|||||||
# Maintainer: Daniel Dada <dan@binarygoose.dev>
|
# Maintainer: Daniel Dada <dan@binarygoose.dev>
|
||||||
pkgname=clrsync
|
pkgname=clrsync
|
||||||
pkgver=0.1.1
|
pkgver=1.1.0
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Color scheme manager"
|
pkgdesc="Color scheme manager"
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
url="https://github.com/obsqrbtz/clrsync"
|
url="https://github.com/obsqrbtz/clrsync"
|
||||||
license=('MIT')
|
license=('MIT')
|
||||||
|
|
||||||
depends=(
|
depends=(
|
||||||
glfw-x11
|
glfw
|
||||||
freetype2
|
freetype2
|
||||||
fontconfig
|
fontconfig
|
||||||
libx11
|
|
||||||
libxrandr
|
|
||||||
libxi
|
|
||||||
mesa
|
mesa
|
||||||
libglvnd
|
libglvnd
|
||||||
libxinerama
|
|
||||||
libxcursor
|
libxcursor
|
||||||
|
gtk3
|
||||||
)
|
)
|
||||||
makedepends=('cmake')
|
|
||||||
|
makedepends=(
|
||||||
|
cmake
|
||||||
|
glfw
|
||||||
|
libx11
|
||||||
|
libxrandr
|
||||||
|
libxi
|
||||||
|
libxinerama
|
||||||
|
libxcursor
|
||||||
|
wayland
|
||||||
|
wayland-protocols
|
||||||
|
gtk3
|
||||||
|
)
|
||||||
|
|
||||||
source=("$pkgname-$pkgver.tar.gz::https://github.com/obsqrbtz/clrsync/archive/refs/tags/v$pkgver.tar.gz")
|
source=("$pkgname-$pkgver.tar.gz::https://github.com/obsqrbtz/clrsync/archive/refs/tags/v$pkgver.tar.gz")
|
||||||
sha256sums=('SKIP')
|
sha256sums=('SKIP')
|
||||||
|
|
||||||
@@ -26,6 +37,7 @@ build() {
|
|||||||
cd "$pkgname-$pkgver"
|
cd "$pkgname-$pkgver"
|
||||||
cmake -B build -S . \
|
cmake -B build -S . \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DUSE_SYSTEM_GLFW=ON \
|
||||||
-DCMAKE_INSTALL_PREFIX=/usr
|
-DCMAKE_INSTALL_PREFIX=/usr
|
||||||
cmake --build build
|
cmake --build build
|
||||||
}
|
}
|
||||||
@@ -33,5 +45,5 @@ build() {
|
|||||||
package() {
|
package() {
|
||||||
cd "$pkgname-$pkgver"
|
cd "$pkgname-$pkgver"
|
||||||
DESTDIR="$pkgdir" cmake --install build
|
DESTDIR="$pkgdir" cmake --install build
|
||||||
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||||
}
|
}
|
||||||
57
AUR/PKGBUILD-git
Normal file
57
AUR/PKGBUILD-git
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
# Maintainer: Daniel Dada <dan@binarygoose.dev>
|
||||||
|
pkgname=clrsync-git
|
||||||
|
pkgver=r107.4229db4
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Color scheme manager (git version)"
|
||||||
|
arch=('x86_64')
|
||||||
|
url="https://github.com/obsqrbtz/clrsync"
|
||||||
|
license=('MIT')
|
||||||
|
depends=(
|
||||||
|
glfw
|
||||||
|
freetype2
|
||||||
|
fontconfig
|
||||||
|
zlib
|
||||||
|
harfbuzz
|
||||||
|
mesa
|
||||||
|
libglvnd
|
||||||
|
libxcursor
|
||||||
|
gtk3
|
||||||
|
)
|
||||||
|
|
||||||
|
makedepends=(
|
||||||
|
cmake
|
||||||
|
git
|
||||||
|
glfw
|
||||||
|
libx11
|
||||||
|
libxrandr
|
||||||
|
libxi
|
||||||
|
libxinerama
|
||||||
|
libxcursor
|
||||||
|
wayland
|
||||||
|
wayland-protocols
|
||||||
|
gtk3
|
||||||
|
)
|
||||||
|
provides=('clrsync')
|
||||||
|
conflicts=('clrsync')
|
||||||
|
source=("$pkgname::git+https://github.com/obsqrbtz/clrsync.git")
|
||||||
|
sha256sums=('SKIP')
|
||||||
|
|
||||||
|
pkgver() {
|
||||||
|
cd "$srcdir/$pkgname"
|
||||||
|
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "$srcdir/$pkgname"
|
||||||
|
cmake -B build -S . \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DUSE_SYSTEM_GLFW=ON \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=/usr
|
||||||
|
cmake --build build
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$srcdir/$pkgname"
|
||||||
|
DESTDIR="$pkgdir" cmake --install build
|
||||||
|
install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||||
|
}
|
||||||
@@ -6,19 +6,30 @@ pkgdesc="Color scheme manager"
|
|||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
url="https://github.com/obsqrbtz/clrsync"
|
url="https://github.com/obsqrbtz/clrsync"
|
||||||
license=('MIT')
|
license=('MIT')
|
||||||
|
|
||||||
depends=(
|
depends=(
|
||||||
glfw-x11
|
glfw
|
||||||
freetype2
|
freetype2
|
||||||
fontconfig
|
fontconfig
|
||||||
libx11
|
|
||||||
libxrandr
|
|
||||||
libxi
|
|
||||||
mesa
|
mesa
|
||||||
libglvnd
|
libglvnd
|
||||||
libxinerama
|
|
||||||
libxcursor
|
libxcursor
|
||||||
|
gtk3
|
||||||
)
|
)
|
||||||
makedepends=('cmake')
|
|
||||||
|
makedepends=(
|
||||||
|
cmake
|
||||||
|
glfw
|
||||||
|
libx11
|
||||||
|
libxrandr
|
||||||
|
libxi
|
||||||
|
libxinerama
|
||||||
|
libxcursor
|
||||||
|
wayland
|
||||||
|
wayland-protocols
|
||||||
|
gtk3
|
||||||
|
)
|
||||||
|
|
||||||
source=("$pkgname-$pkgver.tar.gz::https://github.com/obsqrbtz/clrsync/archive/refs/tags/v$pkgver.tar.gz")
|
source=("$pkgname-$pkgver.tar.gz::https://github.com/obsqrbtz/clrsync/archive/refs/tags/v$pkgver.tar.gz")
|
||||||
sha256sums=('SKIP')
|
sha256sums=('SKIP')
|
||||||
|
|
||||||
@@ -26,6 +37,7 @@ build() {
|
|||||||
cd "$pkgname-$pkgver"
|
cd "$pkgname-$pkgver"
|
||||||
cmake -B build -S . \
|
cmake -B build -S . \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DUSE_SYSTEM_GLFW=ON \
|
||||||
-DCMAKE_INSTALL_PREFIX=/usr
|
-DCMAKE_INSTALL_PREFIX=/usr
|
||||||
cmake --build build
|
cmake --build build
|
||||||
}
|
}
|
||||||
@@ -33,5 +45,5 @@ build() {
|
|||||||
package() {
|
package() {
|
||||||
cd "$pkgname-$pkgver"
|
cd "$pkgname-$pkgver"
|
||||||
DESTDIR="$pkgdir" cmake --install build
|
DESTDIR="$pkgdir" cmake --install build
|
||||||
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||||
}
|
}
|
||||||
192
CMakeLists.txt
192
CMakeLists.txt
@@ -1,149 +1,95 @@
|
|||||||
cmake_minimum_required(VERSION 3.25)
|
cmake_minimum_required(VERSION 3.25)
|
||||||
project(clrsync VERSION 0.1.1 LANGUAGES CXX)
|
project(clrsync VERSION 1.1.0 LANGUAGES CXX)
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 20)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||||
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
|
||||||
|
file(WRITE "${CMAKE_SOURCE_DIR}/.clangd"
|
||||||
|
"CompileFlags:\n CompilationDatabase: ${CMAKE_BINARY_DIR}\n")
|
||||||
|
|
||||||
|
option(USE_SYSTEM_GLFW "Use system-installed GLFW instead of fetching it statically" OFF)
|
||||||
|
message(STATUS "USE_SYSTEM_GLFW: ${USE_SYSTEM_GLFW}")
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
set(CMAKE_INSTALL_PREFIX "C:/Program Files/clrsync")
|
||||||
|
set(CMAKE_INSTALL_BINDIR "bin")
|
||||||
|
set(CMAKE_INSTALL_LIBDIR "lib")
|
||||||
|
set(CMAKE_INSTALL_DATADIR "share")
|
||||||
|
set(CMAKE_INSTALL_FULL_DATADIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
||||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||||
set(CMAKE_INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
|
set(CMAKE_INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
|
||||||
|
|
||||||
|
if(DEFINED CLRSYNC_SEMVER)
|
||||||
|
set(SEMVER "${CLRSYNC_SEMVER}")
|
||||||
|
else()
|
||||||
|
find_package(Git QUIET)
|
||||||
|
|
||||||
|
if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
||||||
|
execute_process(
|
||||||
|
COMMAND git describe --tags --long --always
|
||||||
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
|
OUTPUT_VARIABLE GIT_DESCRIBE
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
ERROR_QUIET
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(GIT_DESCRIBE MATCHES "^[vV]?[0-9]+\\.[0-9]+\\.[0-9]+-[0-9]+-g[0-9a-f]+")
|
||||||
|
string(REGEX REPLACE
|
||||||
|
"^[vV]?([0-9]+\\.[0-9]+\\.[0-9]+)-([0-9]+)-g([0-9a-f]+)"
|
||||||
|
"\\1+git.g\\3"
|
||||||
|
SEMVER "${GIT_DESCRIBE}"
|
||||||
|
)
|
||||||
|
elseif(GIT_DESCRIBE)
|
||||||
|
set(SEMVER "${PROJECT_VERSION}.git.${GIT_DESCRIBE}")
|
||||||
|
else()
|
||||||
|
set(SEMVER "${PROJECT_VERSION}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
message(STATUS "clrsync version: ${SEMVER}")
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
${CMAKE_SOURCE_DIR}/src/core/version.hpp.in
|
${CMAKE_SOURCE_DIR}/src/core/common/version.hpp.in
|
||||||
${CMAKE_SOURCE_DIR}/src/core/version.hpp
|
${CMAKE_SOURCE_DIR}/src/core/common/version.hpp
|
||||||
@ONLY
|
@ONLY
|
||||||
)
|
)
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
${CMAKE_SOURCE_DIR}/PKGBUILD.in
|
${CMAKE_SOURCE_DIR}/VERSION.in
|
||||||
${CMAKE_SOURCE_DIR}/PKGBUILD
|
${CMAKE_SOURCE_DIR}/VERSION
|
||||||
@ONLY
|
@ONLY
|
||||||
)
|
)
|
||||||
|
|
||||||
find_package(OpenGL REQUIRED)
|
configure_file(
|
||||||
|
${CMAKE_SOURCE_DIR}/AUR/PKGBUILD.in
|
||||||
if(WIN32)
|
${CMAKE_SOURCE_DIR}/AUR/PKGBUILD
|
||||||
include(FetchContent)
|
@ONLY
|
||||||
FetchContent_Declare(
|
|
||||||
freetype
|
|
||||||
URL https://download.savannah.gnu.org/releases/freetype/freetype-2.14.1.tar.gz
|
|
||||||
)
|
|
||||||
FetchContent_MakeAvailable(freetype)
|
|
||||||
|
|
||||||
FetchContent_Declare(
|
|
||||||
glfw
|
|
||||||
GIT_REPOSITORY https://github.com/glfw/glfw.git
|
|
||||||
GIT_TAG 3.3.10
|
|
||||||
)
|
|
||||||
FetchContent_MakeAvailable(glfw)
|
|
||||||
|
|
||||||
else()
|
|
||||||
find_package(Freetype REQUIRED)
|
|
||||||
find_package(PkgConfig REQUIRED)
|
|
||||||
find_package(Fontconfig REQUIRED)
|
|
||||||
pkg_check_modules(GLFW REQUIRED glfw3)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(CORE_SOURCES
|
|
||||||
src/core/palette/color.cpp
|
|
||||||
src/core/io/toml_file.cpp
|
|
||||||
src/core/config/config.cpp
|
|
||||||
src/core/utils.cpp
|
|
||||||
src/core/version.cpp
|
|
||||||
src/core/theme/theme_template.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(clrsync_core SHARED ${CORE_SOURCES})
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
|
||||||
target_include_directories(clrsync_core PUBLIC src SYSTEM lib)
|
include(Dependencies)
|
||||||
target_compile_definitions(clrsync_core PRIVATE
|
include(ImGui)
|
||||||
CLRSYNC_DATADIR=\"${CMAKE_INSTALL_FULL_DATADIR}/clrsync\"
|
|
||||||
)
|
|
||||||
|
|
||||||
add_executable(clrsync_cli src/cli/main.cpp)
|
add_subdirectory(src/core)
|
||||||
target_include_directories(clrsync_cli PRIVATE src SYSTEM lib)
|
add_subdirectory(src/cli)
|
||||||
target_link_libraries(clrsync_cli PRIVATE clrsync_core)
|
add_subdirectory(src/gui)
|
||||||
|
|
||||||
set(GUI_SOURCES
|
include(Install)
|
||||||
src/gui/main.cpp
|
include(Packaging)
|
||||||
src/gui/color_scheme_editor.cpp
|
|
||||||
src/gui/template_editor.cpp
|
|
||||||
src/gui/palette_controller.cpp
|
|
||||||
src/gui/template_controller.cpp
|
|
||||||
lib/color_text_edit/TextEditor.cpp
|
|
||||||
src/gui/imgui_helpers.cpp
|
|
||||||
src/gui/imgui_helpers.hpp
|
|
||||||
src/gui/about_window.cpp
|
|
||||||
src/gui/settings_window.cpp
|
|
||||||
src/gui/font_loader.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
add_executable(clrsync_gui ${GUI_SOURCES})
|
message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}")
|
||||||
target_include_directories(clrsync_gui PRIVATE src SYSTEM lib)
|
message(STATUS "CMAKE_INSTALL_FULL_DATADIR: ${CMAKE_INSTALL_FULL_DATADIR}")
|
||||||
|
|
||||||
if(WIN32)
|
message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}")
|
||||||
target_link_libraries(clrsync_gui PRIVATE clrsync_core glfw freetype imgui OpenGL::GL)
|
message(STATUS "CMAKE_INSTALL_FULL_DATADIR: ${CMAKE_INSTALL_FULL_DATADIR}")
|
||||||
else()
|
|
||||||
target_include_directories(clrsync_gui PRIVATE ${FREETYPE_INCLUDE_DIRS} ${GLFW_INCLUDE_DIRS})
|
|
||||||
target_link_libraries(clrsync_gui PRIVATE clrsync_core imgui ${FREETYPE_LIBRARIES} ${GLFW_LIBRARIES} X11 Xrandr Xi Fontconfig::Fontconfig OpenGL::GL)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(imgui_SOURCE_DIR lib/imgui)
|
|
||||||
add_library(imgui STATIC
|
|
||||||
${imgui_SOURCE_DIR}/imgui.cpp
|
|
||||||
${imgui_SOURCE_DIR}/imgui_draw.cpp
|
|
||||||
${imgui_SOURCE_DIR}/imgui_widgets.cpp
|
|
||||||
${imgui_SOURCE_DIR}/imgui_tables.cpp
|
|
||||||
${imgui_SOURCE_DIR}/backends/imgui_impl_glfw.cpp
|
|
||||||
${imgui_SOURCE_DIR}/backends/imgui_impl_opengl3.cpp
|
|
||||||
${imgui_SOURCE_DIR}/misc/freetype/imgui_freetype.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(imgui PUBLIC SYSTEM
|
|
||||||
${imgui_SOURCE_DIR}
|
|
||||||
${imgui_SOURCE_DIR}/backends
|
|
||||||
)
|
|
||||||
|
|
||||||
if(WIN32)
|
|
||||||
target_include_directories(imgui PUBLIC ${GLFW_INCLUDE_DIRS} ${freetype_SOURCE_DIR}/include)
|
|
||||||
else()
|
|
||||||
target_include_directories(imgui PUBLIC ${GLFW_INCLUDE_DIRS} ${FREETYPE_INCLUDE_DIRS})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_link_libraries(imgui PUBLIC glfw OpenGL::GL freetype)
|
|
||||||
target_compile_definitions(imgui PUBLIC IMGUI_ENABLE_FREETYPE)
|
|
||||||
|
|
||||||
install(TARGETS clrsync_core
|
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
install(TARGETS clrsync_cli
|
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
install(TARGETS clrsync_gui
|
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
install(FILES
|
|
||||||
example_config/config.toml
|
|
||||||
DESTINATION ${CMAKE_INSTALL_DATADIR}/clrsync
|
|
||||||
)
|
|
||||||
|
|
||||||
install(DIRECTORY example_config/templates
|
|
||||||
DESTINATION ${CMAKE_INSTALL_DATADIR}/clrsync
|
|
||||||
FILES_MATCHING PATTERN "*"
|
|
||||||
)
|
|
||||||
|
|
||||||
install(DIRECTORY example_config/palettes
|
|
||||||
DESTINATION ${CMAKE_INSTALL_DATADIR}/clrsync
|
|
||||||
FILES_MATCHING PATTERN "*.toml"
|
|
||||||
)
|
|
||||||
|
|
||||||
if(UNIX AND NOT APPLE)
|
|
||||||
install(FILES resources/colorsync.desktop
|
|
||||||
DESTINATION ${CMAKE_INSTALL_DATADIR}/applications
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|||||||
325
CMakePresets.json
Normal file
325
CMakePresets.json
Normal file
@@ -0,0 +1,325 @@
|
|||||||
|
{
|
||||||
|
"version": 6,
|
||||||
|
"configurePresets": [
|
||||||
|
{
|
||||||
|
"name": "base",
|
||||||
|
"hidden": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "debug",
|
||||||
|
"hidden": true,
|
||||||
|
"inherits": "base",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "release",
|
||||||
|
"hidden": true,
|
||||||
|
"inherits": "base",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux",
|
||||||
|
"hidden": true,
|
||||||
|
"inherits": "base",
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Linux"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows",
|
||||||
|
"hidden": true,
|
||||||
|
"inherits": "base",
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Windows"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos",
|
||||||
|
"hidden": true,
|
||||||
|
"inherits": "base",
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Darwin"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "gcc",
|
||||||
|
"hidden": true,
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_C_COMPILER": "gcc",
|
||||||
|
"CMAKE_CXX_COMPILER": "g++"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "clang",
|
||||||
|
"hidden": true,
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_C_COMPILER": "clang",
|
||||||
|
"CMAKE_CXX_COMPILER": "clang++"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ninja",
|
||||||
|
"hidden": true,
|
||||||
|
"generator": "Ninja"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "make",
|
||||||
|
"hidden": true,
|
||||||
|
"generator": "Unix Makefiles"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "msvc-ninja",
|
||||||
|
"displayName": "MSVC (Ninja)",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"hidden": true,
|
||||||
|
"binaryDir": "${sourceDir}/build/windows/msvc",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_C_COMPILER": "cl",
|
||||||
|
"CMAKE_CXX_COMPILER": "cl"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "msvc-vs2026",
|
||||||
|
"displayName": "MSVC (Visual Studio 18 2026)",
|
||||||
|
"generator": "Visual Studio 18 2026",
|
||||||
|
"binaryDir": "${sourceDir}/build/windows/msvc/vs2026",
|
||||||
|
"architecture": {
|
||||||
|
"value": "x64"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows-msvc-ninja-debug",
|
||||||
|
"inherits": [
|
||||||
|
"windows",
|
||||||
|
"msvc-ninja",
|
||||||
|
"ninja",
|
||||||
|
"debug"
|
||||||
|
],
|
||||||
|
"displayName": "Windows · MSVC · Ninja · Debug",
|
||||||
|
"binaryDir": "${sourceDir}/build/windows/msvc/ninja/debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows-msvc-ninja-release",
|
||||||
|
"inherits": [
|
||||||
|
"windows",
|
||||||
|
"msvc-ninja",
|
||||||
|
"ninja",
|
||||||
|
"release"
|
||||||
|
],
|
||||||
|
"displayName": "Windows · MSVC · Ninja · Release",
|
||||||
|
"binaryDir": "${sourceDir}/build/windows/msvc/ninja/release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-gcc-ninja-debug",
|
||||||
|
"inherits": [
|
||||||
|
"linux",
|
||||||
|
"gcc",
|
||||||
|
"ninja",
|
||||||
|
"debug"
|
||||||
|
],
|
||||||
|
"displayName": "Linux · GCC · Ninja · Debug",
|
||||||
|
"binaryDir": "${sourceDir}/build/linux/gcc/ninja/debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-gcc-ninja-release",
|
||||||
|
"inherits": [
|
||||||
|
"linux",
|
||||||
|
"gcc",
|
||||||
|
"ninja",
|
||||||
|
"release"
|
||||||
|
],
|
||||||
|
"displayName": "Linux · GCC · Ninja · Release",
|
||||||
|
"binaryDir": "${sourceDir}/build/linux/gcc/ninja/release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-gcc-make-debug",
|
||||||
|
"inherits": [
|
||||||
|
"linux",
|
||||||
|
"gcc",
|
||||||
|
"make",
|
||||||
|
"debug"
|
||||||
|
],
|
||||||
|
"displayName": "Linux · GCC · Make · Debug",
|
||||||
|
"binaryDir": "${sourceDir}/build/linux/gcc/make/debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-gcc-make-release",
|
||||||
|
"inherits": [
|
||||||
|
"linux",
|
||||||
|
"gcc",
|
||||||
|
"make",
|
||||||
|
"release"
|
||||||
|
],
|
||||||
|
"displayName": "Linux · GCC · Make · Release",
|
||||||
|
"binaryDir": "${sourceDir}/build/linux/gcc/make/release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-clang-ninja-debug",
|
||||||
|
"inherits": [
|
||||||
|
"linux",
|
||||||
|
"clang",
|
||||||
|
"ninja",
|
||||||
|
"debug"
|
||||||
|
],
|
||||||
|
"displayName": "Linux · Clang · Ninja · Debug",
|
||||||
|
"binaryDir": "${sourceDir}/build/linux/clang/ninja/debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-clang-ninja-release",
|
||||||
|
"inherits": [
|
||||||
|
"linux",
|
||||||
|
"clang",
|
||||||
|
"ninja",
|
||||||
|
"release"
|
||||||
|
],
|
||||||
|
"displayName": "Linux · Clang · Ninja · Release",
|
||||||
|
"binaryDir": "${sourceDir}/build/linux/clang/ninja/release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-clang-make-debug",
|
||||||
|
"inherits": [
|
||||||
|
"linux",
|
||||||
|
"clang",
|
||||||
|
"make",
|
||||||
|
"debug"
|
||||||
|
],
|
||||||
|
"displayName": "Linux · Clang · Make · Debug",
|
||||||
|
"binaryDir": "${sourceDir}/build/linux/clang/make/debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-clang-make-release",
|
||||||
|
"inherits": [
|
||||||
|
"linux",
|
||||||
|
"clang",
|
||||||
|
"make",
|
||||||
|
"release"
|
||||||
|
],
|
||||||
|
"displayName": "Linux · Clang · Make · Release",
|
||||||
|
"binaryDir": "${sourceDir}/build/linux/clang/make/release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos-appleclang-ninja-debug",
|
||||||
|
"inherits": [
|
||||||
|
"macos",
|
||||||
|
"clang",
|
||||||
|
"ninja",
|
||||||
|
"debug"
|
||||||
|
],
|
||||||
|
"displayName": "macOS · Apple Clang · Ninja · Debug",
|
||||||
|
"binaryDir": "${sourceDir}/build/macos/appleclang/ninja/debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos-appleclang-ninja-release",
|
||||||
|
"inherits": [
|
||||||
|
"macos",
|
||||||
|
"clang",
|
||||||
|
"ninja",
|
||||||
|
"release"
|
||||||
|
],
|
||||||
|
"displayName": "macOS · Apple Clang · Ninja · Release",
|
||||||
|
"binaryDir": "${sourceDir}/build/macos/appleclang/ninja/release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos-appleclang-make-debug",
|
||||||
|
"inherits": [
|
||||||
|
"macos",
|
||||||
|
"clang",
|
||||||
|
"make",
|
||||||
|
"debug"
|
||||||
|
],
|
||||||
|
"displayName": "macOS · Apple Clang · Make · Debug",
|
||||||
|
"binaryDir": "${sourceDir}/build/macos/appleclang/make/debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos-appleclang-make-release",
|
||||||
|
"inherits": [
|
||||||
|
"macos",
|
||||||
|
"clang",
|
||||||
|
"make",
|
||||||
|
"release"
|
||||||
|
],
|
||||||
|
"displayName": "macOS · Apple Clang · Make · Release",
|
||||||
|
"binaryDir": "${sourceDir}/build/macos/appleclang/make/release"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"buildPresets": [
|
||||||
|
{
|
||||||
|
"name": "vs-debug",
|
||||||
|
"configurePreset": "msvc-vs2026",
|
||||||
|
"configuration": "Debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "vs-release",
|
||||||
|
"configurePreset": "msvc-vs2026",
|
||||||
|
"configuration": "Release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "msvc-ninja-debug",
|
||||||
|
"configurePreset": "windows-msvc-ninja-debug",
|
||||||
|
"configuration": "Debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "msvc-ninja-release",
|
||||||
|
"configurePreset": "windows-msvc-ninja-release",
|
||||||
|
"configuration": "Release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-gcc-ninja-debug",
|
||||||
|
"configurePreset": "linux-gcc-ninja-debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-gcc-ninja-release",
|
||||||
|
"configurePreset": "linux-gcc-ninja-release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-gcc-make-debug",
|
||||||
|
"configurePreset": "linux-gcc-make-debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-gcc-make-release",
|
||||||
|
"configurePreset": "linux-gcc-make-release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-clang-ninja-debug",
|
||||||
|
"configurePreset": "linux-clang-ninja-debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-clang-ninja-release",
|
||||||
|
"configurePreset": "linux-clang-ninja-release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-clang-make-debug",
|
||||||
|
"configurePreset": "linux-clang-make-debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-clang-make-release",
|
||||||
|
"configurePreset": "linux-clang-make-release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos-appleclang-ninja-debug",
|
||||||
|
"configurePreset": "macos-appleclang-ninja-debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos-appleclang-ninja-release",
|
||||||
|
"configurePreset": "macos-appleclang-ninja-release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos-appleclang-make-debug",
|
||||||
|
"configurePreset": "macos-appleclang-make-debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos-appleclang-make-release",
|
||||||
|
"configurePreset": "macos-appleclang-make-release"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
425
README.md
425
README.md
@@ -1,6 +1,39 @@
|
|||||||
|
[](https://opensource.org/licenses/MIT)
|
||||||
|
[](https://nixos.wiki/wiki/Flakes)
|
||||||
|
|
||||||
# clrsync
|
# clrsync
|
||||||
|
|
||||||
A theme management tool for synchronizing color schemes across multiple applications. clrsync allows you to define color palettes once and apply them consistently to all your terminal emulators, editors, and other configurable applications.
|
A theme management tool for synchronizing color schemes across multiple applications. clrsync allows to define color palettes once and apply them consistently to all configurable applications.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Table of Contents
|
||||||
|
|
||||||
|
|
||||||
|
- [Features](#features)
|
||||||
|
- [Installation](#installation)
|
||||||
|
- [Linux](#linux)
|
||||||
|
- [Ubuntu](#ubuntu)
|
||||||
|
- [Fedora](#fedora)
|
||||||
|
- [NixOS](#nixos)
|
||||||
|
- [Home Manager Module](#home-manager-module)
|
||||||
|
- [Package](#package)
|
||||||
|
- [Install to profile](#install-to-profile)
|
||||||
|
- [Run without installing](#run-without-installing)
|
||||||
|
- [Windows](#windows)
|
||||||
|
- [Other systems](#other-systems)
|
||||||
|
- [Building](#building)
|
||||||
|
- [Prerequisites](#prerequisites)
|
||||||
|
- [With CMake](#with-cmake)
|
||||||
|
- [Configuration](#configuration)
|
||||||
|
- [Palette Files](#palette-files)
|
||||||
|
- [Template Files](#template-files)
|
||||||
|
- [Color Format Specifiers](#color-format-specifiers)
|
||||||
|
- [Usage](#usage)
|
||||||
|
- [CLI](#cli)
|
||||||
|
- [GUI](#gui)
|
||||||
|
- [Extras](#extras)
|
||||||
|
- [Acknowledgments](#acknowledgments)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
@@ -8,46 +41,238 @@ A theme management tool for synchronizing color schemes across multiple applicat
|
|||||||
- **CLI & GUI**: Choose between a command-line interface or a graphical editor
|
- **CLI & GUI**: Choose between a command-line interface or a graphical editor
|
||||||
- **Live Reload**: Define post-apply hooks (configurable per template)
|
- **Live Reload**: Define post-apply hooks (configurable per template)
|
||||||
- **Flexible Color Formats**: Support for HEX, RGB, HSL with multi-component access (e.g., `{color.r}`, `{color.hex}`, `{color.hsl}`)
|
- **Flexible Color Formats**: Support for HEX, RGB, HSL with multi-component access (e.g., `{color.r}`, `{color.hex}`, `{color.hsl}`)
|
||||||
- **Pre-built Themes**: Includes popular themes
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### Linux
|
||||||
|
|
||||||
|
#### Arch Linux
|
||||||
|
|
||||||
|
Install the package from AUR using any helper or install manually
|
||||||
|
|
||||||
|
```shell
|
||||||
|
yay -S clrsync-git
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Ubuntu
|
||||||
|
|
||||||
|
1. Download the latest .deb from the [releases page](https://github.com/obsqrbtz/clrsync/releases)
|
||||||
|
2. Install the package
|
||||||
|
|
||||||
|
```shell
|
||||||
|
sudo dpkg -i clrsync-<version>.deb
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Fedora
|
||||||
|
|
||||||
|
1. Download the latest .rpm from the [releases page](https://github.com/obsqrbtz/clrsync/releases)
|
||||||
|
|
||||||
|
2. Install the package
|
||||||
|
|
||||||
|
```shell
|
||||||
|
sudo rpm -i clrsync-<version>.rpm
|
||||||
|
|
||||||
|
# or
|
||||||
|
|
||||||
|
sudo dnf install clrsync-<version>.rpm
|
||||||
|
```
|
||||||
|
|
||||||
|
#### NixOS
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Home Manager Module</summary>
|
||||||
|
|
||||||
|
1. Add clrsync to your flake inputs
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
|
|
||||||
|
clrsync.url = "github:obsqrbtz/clrsync";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Add clrsync to flake outputs
|
||||||
|
|
||||||
|
```nix
|
||||||
|
outputs =
|
||||||
|
{
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
home-manager,
|
||||||
|
clrsync,
|
||||||
|
...
|
||||||
|
}@inputs:
|
||||||
|
let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# ...
|
||||||
|
homeConfigurations.<Your user name> = home-manager.lib.homeManagerConfiguration {
|
||||||
|
inherit pkgs;
|
||||||
|
extraSpecialArgs = { inherit inputs; };
|
||||||
|
modules = [
|
||||||
|
./home.nix
|
||||||
|
clrsync.homeModules.default
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Configure in home manager
|
||||||
|
|
||||||
|
```nix
|
||||||
|
programs.clrsync = {
|
||||||
|
package = inputs.clrsync.packages.x86_64-linux.default;
|
||||||
|
defaultTheme = "dark";
|
||||||
|
palettesPath = "~/.config/clrsync/palettes";
|
||||||
|
font = "JetBrainsMono Nerd Font Mono";
|
||||||
|
fontSize = 14;
|
||||||
|
applyTheme = true;
|
||||||
|
|
||||||
|
templates = {
|
||||||
|
kitty = {
|
||||||
|
enabled = true;
|
||||||
|
inputPath = "~/.config/clrsync/templates/kitty.conf";
|
||||||
|
outputPath = "~/.config/kitty/clrsync.conf";
|
||||||
|
reloadCmd = "pkill -SIGUSR1 kitty";
|
||||||
|
};
|
||||||
|
|
||||||
|
rofi = {
|
||||||
|
enabled = true;
|
||||||
|
inputPath = "~/.config/clrsync/templates/rofi.rasi";
|
||||||
|
outputPath = "~/.config/rofi/clrsync.rasi";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Rebuild
|
||||||
|
|
||||||
|
```nix
|
||||||
|
home-manager switch --flake .
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Package</summary>
|
||||||
|
|
||||||
|
1. Add clrsync to your flake inputs
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
clrsync.url = "github:obsqrbtz/clrsync";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Install the package
|
||||||
|
|
||||||
|
```nix
|
||||||
|
# In NixOS configuration.nix:
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
inputs.clrsync.overlays.default
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
clrsync
|
||||||
|
];
|
||||||
|
```
|
||||||
|
|
||||||
|
Or for home manager:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
# flake.nix
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
overlays = [
|
||||||
|
clrsync.overlays.default
|
||||||
|
];
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
```nix
|
||||||
|
# home.nix
|
||||||
|
home.packages = [
|
||||||
|
clrsync
|
||||||
|
];
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Use the app manually
|
||||||
|
|
||||||
|
```shell
|
||||||
|
clrsync_gui
|
||||||
|
|
||||||
|
# or
|
||||||
|
clrsync_cli --apply --theme dark
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Install to profile</summary>
|
||||||
|
|
||||||
|
```shell
|
||||||
|
nix profile add github:obsqrbtz/clrsync
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Run without installing</summary>
|
||||||
|
|
||||||
|
```shell
|
||||||
|
nix run github:obsqrbtz/clrsync
|
||||||
|
nix run github:obsqrbtz/clrsync#clrsync-cli
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### Windows
|
||||||
|
|
||||||
|
1. Download the latest installer from the [releases page](https://github.com/obsqrbtz/clrsync/releases)
|
||||||
|
2. Run the installer and follow the wizard
|
||||||
|
3. Optionally, add the installation dir to your PATH for easier CLI access
|
||||||
|
|
||||||
|
### Other systems
|
||||||
|
|
||||||
|
Follow the steps from Building section then install with cmake:
|
||||||
|
```bash
|
||||||
|
cd build
|
||||||
|
cmake --install .
|
||||||
|
```
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
- C++20 compatible compiler (GCC, Clang, or MSVC)
|
- C++20 compatible compiler (GCC, Clang, or MSVC)
|
||||||
- CMake or Meson
|
- CMake
|
||||||
- OpenGL
|
- OpenGL
|
||||||
|
- glfw
|
||||||
|
- fontconfig
|
||||||
|
- freetype
|
||||||
|
|
||||||
### Using CMake
|
### With CMake
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake ..
|
cmake ..
|
||||||
cmake --build .
|
cmake --build .
|
||||||
```
|
```
|
||||||
|
|
||||||
### Using Meson
|
|
||||||
|
|
||||||
```bash
|
|
||||||
meson setup builddir
|
|
||||||
meson compile -C builddir
|
|
||||||
```
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
After building, you'll have:
|
|
||||||
- `clrsync_cli` - CLI
|
|
||||||
- `clrsync_gui` - GUI
|
|
||||||
- `libclrsync_core` - Shared lib
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
Create a configuration file at `~/.config/clrsync/config.toml`:
|
Edit or create a configuration file at `~/.config/clrsync/config.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[general]
|
[general]
|
||||||
palettes_path = "~/.config/clrsync/palettes"
|
palettes_path = "~/.config/clrsync/palettes"
|
||||||
default_theme = "dark"
|
default_theme = "cursed"
|
||||||
|
|
||||||
[templates.kitty]
|
[templates.kitty]
|
||||||
input_path = "~/.config/clrsync/templates/kitty.conf"
|
input_path = "~/.config/clrsync/templates/kitty.conf"
|
||||||
@@ -58,79 +283,109 @@ reload_cmd = "pkill -SIGUSR1 kitty"
|
|||||||
|
|
||||||
### Palette Files
|
### Palette Files
|
||||||
|
|
||||||
Create palette files in your `palettes_path` directory:
|
<details>
|
||||||
|
<summary>Example palette file</summary>
|
||||||
|
|
||||||
|
Create palette files in your `palettes_path` directory:
|
||||||
```toml
|
```toml
|
||||||
# ~/.config/clrsync/palettes/dark.toml
|
# ~/.config/clrsync/palettes/dark.toml
|
||||||
[general]
|
[general]
|
||||||
name = "dark"
|
name = 'cursed'
|
||||||
|
|
||||||
[colors]
|
[colors]
|
||||||
background = "#111318FF"
|
accent = '#B44242FF'
|
||||||
surface = "#1E1F25FF"
|
background = '#151515FF'
|
||||||
surface_variant = "#282A2FFF"
|
base00 = '#151515FF'
|
||||||
|
base01 = '#B44242FF'
|
||||||
foreground = "#E2E2E9FF"
|
base02 = '#95A328FF'
|
||||||
foreground_secondary = "#A8ABB3FF"
|
base03 = '#E1C135FF'
|
||||||
|
base04 = '#60928FFF'
|
||||||
accent = "#00AA56FF"
|
base05 = '#7C435AFF'
|
||||||
outline = "#44474FFF"
|
base06 = '#A48B4AFF'
|
||||||
shadow = "#00000080"
|
base07 = '#C2C2B0FF'
|
||||||
cursor = "#FFFFFFFF"
|
base08 = '#3F3639FF'
|
||||||
|
base09 = '#DC7671FF'
|
||||||
error = "#FF5F5FFF"
|
base0A = '#E8E85AFF'
|
||||||
warning = "#FFC966FF"
|
base0B = '#9E9052FF'
|
||||||
success = "#6AD68BFF"
|
base0C = '#76C39BFF'
|
||||||
info = "#5DB2FFFF"
|
base0D = '#86596CFF'
|
||||||
|
base0E = '#CEB34FFF'
|
||||||
term_black = "#111318FF"
|
base0F = '#B0AFA8FF'
|
||||||
term_red = "#FF5F5FFF"
|
border = '#3F3639FF'
|
||||||
term_green = "#00AA56FF"
|
border_focused = '#E1C135FF'
|
||||||
term_yellow = "#FFC966FF"
|
cursor = '#E1C135FF'
|
||||||
term_blue = "#5DB2FFFF"
|
editor_background = '#151515FF'
|
||||||
term_magenta = "#DEBCDFFF"
|
editor_command = '#CEB34FFF'
|
||||||
term_cyan = "#86C9FFFF"
|
editor_comment = '#3F3639FF'
|
||||||
term_white = "#E2E2E9FF"
|
editor_disabled = '#3F3639FF'
|
||||||
|
editor_emphasis = '#DC7671FF'
|
||||||
term_black_bright = "#33353AFF"
|
editor_error = '#B44242FF'
|
||||||
term_red_bright = "#FFB780FF"
|
editor_inactive = '#3F3639FF'
|
||||||
term_green_bright = "#00CC6AFF"
|
editor_line_number = '#86596CFF'
|
||||||
term_yellow_bright = "#FFD580FF"
|
editor_link = '#60928FFF'
|
||||||
term_blue_bright = "#86C9FFFF"
|
editor_main = '#C2C2B0FF'
|
||||||
term_magenta_bright = "#F0D6F0FF"
|
editor_selected = '#3F3639FF'
|
||||||
term_cyan_bright = "#BFEFFFFF"
|
editor_selection_inactive = '#2A2A2AFF'
|
||||||
term_white_bright = "#FFFFFFFF"
|
editor_string = '#76C39BFF'
|
||||||
|
editor_success = '#95A328FF'
|
||||||
|
editor_warning = '#E1C135FF'
|
||||||
|
error = '#B44242FF'
|
||||||
|
foreground = '#C2C2B0FF'
|
||||||
|
info = '#60928FFF'
|
||||||
|
on_background = '#C2C2B0FF'
|
||||||
|
on_error = '#151515FF'
|
||||||
|
on_info = '#151515FF'
|
||||||
|
on_success = '#151515FF'
|
||||||
|
on_surface = '#C2C2B0FF'
|
||||||
|
on_surface_variant = '#C2C2B0FF'
|
||||||
|
on_warning = '#151515FF'
|
||||||
|
success = '#95A328FF'
|
||||||
|
surface = '#1C1C1CFF'
|
||||||
|
surface_variant = '#1C1C1CFF'
|
||||||
|
warning = '#E1C135FF'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
### Template Files
|
### Template Files
|
||||||
|
|
||||||
Create template files using color variables with flexible format specifiers:
|
<details>
|
||||||
|
<summary>Example template file</summary>
|
||||||
|
|
||||||
|
Create template files at `~/.config/clrsync/templates` using color variables:
|
||||||
```conf
|
```conf
|
||||||
# ~/.config/clrsync/templates/kitty.conf
|
# ~/.config/clrsync/templates/kitty.conf
|
||||||
cursor {foreground}
|
cursor {cursor}
|
||||||
cursor_text_color {background}
|
cursor_text_color {background}
|
||||||
|
|
||||||
foreground {foreground}
|
foreground {foreground}
|
||||||
background {background}
|
background {background}
|
||||||
selection_foreground {foreground_secondary}
|
selection_foreground {on_surface}
|
||||||
selection_background {surface}
|
selection_background {surface}
|
||||||
url_color {accent}
|
url_color {accent}
|
||||||
|
color0 {base00}
|
||||||
color0 {background}
|
color8 {base08}
|
||||||
color1 {term_red}
|
color1 {base01}
|
||||||
color2 {term_green}
|
color9 {base09}
|
||||||
color3 {term_yellow}
|
color2 {base02}
|
||||||
color4 {term_blue}
|
color10 {base0A}
|
||||||
color5 {term_magenta}
|
color3 {base03}
|
||||||
color6 {term_cyan}
|
color11 {base0B}
|
||||||
color7 {term_white}
|
color4 {base04}
|
||||||
|
color12 {base0C}
|
||||||
|
color5 {base05}
|
||||||
|
color13 {base0D}
|
||||||
|
color6 {base06}
|
||||||
|
color14 {base0E}
|
||||||
|
color7 {base07}
|
||||||
|
color15 {base0F}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Color Format Specifiers
|
</details>
|
||||||
|
|
||||||
Access color components using dot notation:
|
<details>
|
||||||
|
<summary>Color Format Specifiers</summary>
|
||||||
|
|
||||||
|
Format colors using dot notation:
|
||||||
```conf
|
```conf
|
||||||
# HEX formats
|
# HEX formats
|
||||||
{color} # Default: #RRGGBB
|
{color} # Default: #RRGGBB
|
||||||
@@ -160,6 +415,8 @@ Access color components using dot notation:
|
|||||||
{color.a} # Alpha component
|
{color.a} # Alpha component
|
||||||
```
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
### CLI
|
### CLI
|
||||||
@@ -176,7 +433,7 @@ clrsync_cli --apply
|
|||||||
|
|
||||||
Apply a specific theme:
|
Apply a specific theme:
|
||||||
```bash
|
```bash
|
||||||
clrsync_cli --apply --theme rose-pine
|
clrsync_cli --apply --theme cursed
|
||||||
```
|
```
|
||||||
|
|
||||||
Apply a theme from a file path:
|
Apply a theme from a file path:
|
||||||
@@ -202,32 +459,20 @@ clrsync_gui
|
|||||||
```
|
```
|
||||||
|
|
||||||
The GUI provides:
|
The GUI provides:
|
||||||
|
|
||||||
- **Color Scheme Editor**: Visual palette editor with color pickers
|
- **Color Scheme Editor**: Visual palette editor with color pickers
|
||||||
- **Template Editor**: Edit template files
|
- **Template Editor**: Edit template files
|
||||||
- **Live Preview**: See changes in real-time
|
- **Live Preview**: See changes in real-time
|
||||||
|
|
||||||
## Example Themes
|
## Extras
|
||||||
|
|
||||||
The project includes several pre-configured themes in `example_config/palettes/`:
|
You may find some pre-configured color schemes and templates in [extra](extra) directory of this repository.
|
||||||
- `dark.toml`
|
|
||||||
- `light.toml`
|
|
||||||
- `flexoki.toml`
|
|
||||||
- `flexoki-light.toml`
|
|
||||||
- `rose-pine.toml`
|
|
||||||
- `rose-pine-moon.toml`
|
|
||||||
- `rose-pine-dawn.toml`
|
|
||||||
|
|
||||||
## Acknowledgments
|
## Acknowledgments
|
||||||
|
|
||||||
This project uses the following open-source libraries:
|
- **[matugen](https://github.com/InioX/matugen)** - A material you color generation tool
|
||||||
|
|
||||||
- **[Dear ImGui](https://github.com/ocornut/imgui)** - Bloat-free graphical user interface library for C++
|
- **[Dear ImGui](https://github.com/ocornut/imgui)** - Bloat-free graphical user interface library for C++
|
||||||
- **[GLFW](https://www.glfw.org/)** - Multi-platform library for OpenGL, OpenGL ES and Vulkan development
|
- **[GLFW](https://www.glfw.org/)** - Multi-platform library for OpenGL, OpenGL ES and Vulkan development
|
||||||
- **[toml++](https://github.com/marzer/tomlplusplus)** - Header-only TOML config file parser and serializer for C++17
|
- **[toml++](https://github.com/marzer/tomlplusplus)** - Header-only TOML config file parser and serializer for C++17
|
||||||
- **[argparse](https://github.com/p-ranav/argparse)** - Argument Parser for Modern C++
|
- **[argparse](https://github.com/p-ranav/argparse)** - Argument Parser for Modern C++
|
||||||
- **[ImGuiColorTextEdit](https://github.com/BalazsJako/ImGuiColorTextEdit)** - Syntax highlighting text editor for ImGui
|
- **[ImGuiColorTextEdit](https://github.com/BalazsJako/ImGuiColorTextEdit)** - Syntax highlighting text editor for ImGui
|
||||||
|
|
||||||
Special thanks to the creators of the included color schemes:
|
|
||||||
- **[Flexoki](https://stephango.com/flexoki)** by Steph Ango
|
|
||||||
- **[Rosé Pine](https://rosepinetheme.com/)** by the Rosé Pine team
|
|
||||||
|
|
||||||
|
|||||||
1
VERSION.in
Normal file
1
VERSION.in
Normal file
@@ -0,0 +1 @@
|
|||||||
|
@PROJECT_VERSION@
|
||||||
BIN
assets/screenshot.png
Normal file
BIN
assets/screenshot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 856 KiB |
94
cmake/Dependencies.cmake
Normal file
94
cmake/Dependencies.cmake
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
find_package(OpenGL REQUIRED)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
include(FetchContent)
|
||||||
|
|
||||||
|
FetchContent_Declare(
|
||||||
|
freetype
|
||||||
|
URL https://download.savannah.gnu.org/releases/freetype/freetype-2.14.1.tar.gz
|
||||||
|
)
|
||||||
|
|
||||||
|
FetchContent_MakeAvailable(freetype)
|
||||||
|
elseif(APPLE)
|
||||||
|
option(USE_SYSTEM_GLFW ON)
|
||||||
|
find_package(Freetype REQUIRED)
|
||||||
|
find_package(ZLIB REQUIRED)
|
||||||
|
find_package(BZip2 REQUIRED)
|
||||||
|
find_package(PNG REQUIRED)
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if(PkgConfig_FOUND)
|
||||||
|
pkg_check_modules(HARFBUZZ harfbuzz)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
find_package(Freetype REQUIRED)
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
|
find_package(Fontconfig REQUIRED)
|
||||||
|
find_package(ZLIB REQUIRED)
|
||||||
|
find_package(BZip2 REQUIRED)
|
||||||
|
find_package(PNG REQUIRED)
|
||||||
|
find_library(BROTLIDEC_LIBRARY NAMES brotlidec)
|
||||||
|
find_library(BROTLICOMMON_LIBRARY NAMES brotlicommon)
|
||||||
|
pkg_check_modules(HARFBUZZ harfbuzz)
|
||||||
|
pkg_check_modules(WAYLAND_CLIENT wayland-client)
|
||||||
|
pkg_check_modules(WAYLAND_EGL wayland-egl)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(LINUX)
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
|
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(USE_SYSTEM_GLFW)
|
||||||
|
if(APPLE)
|
||||||
|
find_package(glfw3 QUIET)
|
||||||
|
if(glfw3_FOUND)
|
||||||
|
set(GLFW_FOUND TRUE)
|
||||||
|
set(GLFW_LIBRARIES glfw)
|
||||||
|
else()
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
|
pkg_check_modules(GLFW REQUIRED glfw3)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
pkg_check_modules(GLFW REQUIRED glfw3)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
include(FetchContent)
|
||||||
|
FetchContent_Declare(
|
||||||
|
glfw
|
||||||
|
GIT_REPOSITORY https://github.com/glfw/glfw.git
|
||||||
|
GIT_TAG 3.4
|
||||||
|
)
|
||||||
|
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
||||||
|
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
||||||
|
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
|
||||||
|
set(GLFW_BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
|
||||||
|
set(GLFW_INSTALL OFF CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
|
FetchContent_MakeAvailable(glfw)
|
||||||
|
set(GLFW_FOUND TRUE)
|
||||||
|
set(GLFW_INCLUDE_DIRS ${glfw_SOURCE_DIR}/include)
|
||||||
|
set(GLFW_LIBRARIES glfw)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(FREETYPE_EXTRA_LIBS "")
|
||||||
|
if(BROTLIDEC_LIBRARY AND BROTLICOMMON_LIBRARY)
|
||||||
|
list(APPEND FREETYPE_EXTRA_LIBS ${BROTLIDEC_LIBRARY} ${BROTLICOMMON_LIBRARY})
|
||||||
|
message(STATUS "Found Brotli libraries")
|
||||||
|
endif()
|
||||||
|
if(HARFBUZZ_FOUND)
|
||||||
|
list(APPEND FREETYPE_EXTRA_LIBS ${HARFBUZZ_LIBRARIES})
|
||||||
|
message(STATUS "Found HarfBuzz")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(WAYLAND_LIBS "")
|
||||||
|
if(NOT APPLE)
|
||||||
|
if(WAYLAND_CLIENT_FOUND)
|
||||||
|
list(APPEND WAYLAND_LIBS ${WAYLAND_CLIENT_LIBRARIES})
|
||||||
|
message(STATUS "Found Wayland client")
|
||||||
|
endif()
|
||||||
|
if(WAYLAND_EGL_FOUND)
|
||||||
|
list(APPEND WAYLAND_LIBS ${WAYLAND_EGL_LIBRARIES})
|
||||||
|
message(STATUS "Found Wayland EGL")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
32
cmake/ImGui.cmake
Normal file
32
cmake/ImGui.cmake
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
set(IMGUI_SOURCE_DIR ${CMAKE_SOURCE_DIR}/lib/imgui)
|
||||||
|
|
||||||
|
add_library(imgui STATIC
|
||||||
|
${IMGUI_SOURCE_DIR}/imgui.cpp
|
||||||
|
${IMGUI_SOURCE_DIR}/imgui_draw.cpp
|
||||||
|
${IMGUI_SOURCE_DIR}/imgui_widgets.cpp
|
||||||
|
${IMGUI_SOURCE_DIR}/imgui_tables.cpp
|
||||||
|
${IMGUI_SOURCE_DIR}/backends/imgui_impl_glfw.cpp
|
||||||
|
${IMGUI_SOURCE_DIR}/backends/imgui_impl_opengl3.cpp
|
||||||
|
${IMGUI_SOURCE_DIR}/misc/freetype/imgui_freetype.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(imgui PUBLIC SYSTEM
|
||||||
|
${IMGUI_SOURCE_DIR}
|
||||||
|
${IMGUI_SOURCE_DIR}/backends
|
||||||
|
)
|
||||||
|
|
||||||
|
target_compile_definitions(imgui PUBLIC IMGUI_ENABLE_FREETYPE)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
target_include_directories(imgui PUBLIC ${GLFW_INCLUDE_DIRS} ${freetype_SOURCE_DIR}/include)
|
||||||
|
target_link_libraries(imgui PUBLIC freetype)
|
||||||
|
else()
|
||||||
|
target_include_directories(imgui PUBLIC ${GLFW_INCLUDE_DIRS} ${FREETYPE_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(imgui PRIVATE
|
||||||
|
Freetype::Freetype
|
||||||
|
${FREETYPE_EXTRA_LIBS}
|
||||||
|
ZLIB::ZLIB
|
||||||
|
BZip2::BZip2
|
||||||
|
PNG::PNG
|
||||||
|
)
|
||||||
|
endif()
|
||||||
39
cmake/Install.cmake
Normal file
39
cmake/Install.cmake
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
install(TARGETS clrsync_core
|
||||||
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
|
COMPONENT Core
|
||||||
|
)
|
||||||
|
|
||||||
|
install(TARGETS clrsync_cli
|
||||||
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
|
COMPONENT CLI
|
||||||
|
)
|
||||||
|
|
||||||
|
install(TARGETS clrsync_gui
|
||||||
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
|
COMPONENT GUI
|
||||||
|
)
|
||||||
|
|
||||||
|
install(FILES example_config/config.toml
|
||||||
|
DESTINATION ${CMAKE_INSTALL_DATADIR}/clrsync
|
||||||
|
COMPONENT Core
|
||||||
|
)
|
||||||
|
|
||||||
|
install(DIRECTORY example_config/templates
|
||||||
|
DESTINATION ${CMAKE_INSTALL_DATADIR}/clrsync
|
||||||
|
COMPONENT Core
|
||||||
|
FILES_MATCHING PATTERN "*"
|
||||||
|
)
|
||||||
|
|
||||||
|
install(DIRECTORY example_config/palettes
|
||||||
|
DESTINATION ${CMAKE_INSTALL_DATADIR}/clrsync
|
||||||
|
COMPONENT Core
|
||||||
|
FILES_MATCHING PATTERN "*.toml"
|
||||||
|
)
|
||||||
|
|
||||||
|
if(UNIX AND NOT APPLE)
|
||||||
|
install(FILES resources/clrsync.desktop
|
||||||
|
DESTINATION ${CMAKE_INSTALL_DATADIR}/applications
|
||||||
|
COMPONENT Core
|
||||||
|
)
|
||||||
|
endif()
|
||||||
41
cmake/Packaging.cmake
Normal file
41
cmake/Packaging.cmake
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.txt")
|
||||||
|
set(CPACK_PACKAGE_NAME "clrsync")
|
||||||
|
set(CPACK_PACKAGE_VENDOR "Daniel Dada")
|
||||||
|
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
|
||||||
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Color scheme manager")
|
||||||
|
set(CPACK_GENERATOR "NSIS;DEB;RPM")
|
||||||
|
|
||||||
|
# Components
|
||||||
|
set(CPACK_COMPONENTS_ALL Core GUI CLI)
|
||||||
|
set(CPACK_COMPONENT_CORE_DISPLAY_NAME "Core Library")
|
||||||
|
set(CPACK_COMPONENT_CORE_DESCRIPTION "clrsync core library and default configs (required)")
|
||||||
|
set(CPACK_COMPONENT_CORE_REQUIRED ON)
|
||||||
|
set(CPACK_COMPONENT_GUI_DISPLAY_NAME "GUI Application")
|
||||||
|
set(CPACK_COMPONENT_GUI_DESCRIPTION "clrsync GUI app")
|
||||||
|
set(CPACK_COMPONENT_GUI_DEPENDS Core)
|
||||||
|
set(CPACK_COMPONENT_CLI_DISPLAY_NAME "Command Line Tool")
|
||||||
|
set(CPACK_COMPONENT_CLI_DESCRIPTION "clrsync CLI app")
|
||||||
|
set(CPACK_COMPONENT_CLI_DEPENDS Core)
|
||||||
|
|
||||||
|
# NSIS
|
||||||
|
set(CPACK_NSIS_INSTALLED_NAME "clrsync")
|
||||||
|
set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
|
||||||
|
set(CPACK_NSIS_MODIFY_PATH ON)
|
||||||
|
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
|
||||||
|
set(CPACK_NSIS_MENU_LINKS "bin/clrsync_gui.exe" "clrsync")
|
||||||
|
set(CPACK_NSIS_CREATE_DESKTOP_LINKS "bin/clrsync_gui.exe;clrsync")
|
||||||
|
|
||||||
|
# Debian
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Daniel Dada <dan@binarygoose.dev>")
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.31), libglfw3, libfreetype6, zlib1g, libharfbuzz0b")
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_SECTION "utils")
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
|
||||||
|
|
||||||
|
# RPM
|
||||||
|
set(CPACK_RPM_PACKAGE_LICENSE "MIT")
|
||||||
|
set(CPACK_RPM_PACKAGE_GROUP "Applications/System")
|
||||||
|
set(CPACK_RPM_PACKAGE_URL "https://github.com/obsqrbtz/clrsync")
|
||||||
|
set(CPACK_RPM_PACKAGE_REQUIRES "freetype, glfw, fontconfig, zlib, harfbuzz")
|
||||||
|
|
||||||
|
include(CPack)
|
||||||
@@ -12,11 +12,11 @@ output_path = '~/.config/clrsync/formats-demo'
|
|||||||
[templates.kitty]
|
[templates.kitty]
|
||||||
enabled = true
|
enabled = true
|
||||||
input_path = '~/.config/clrsync/templates/kitty.conf'
|
input_path = '~/.config/clrsync/templates/kitty.conf'
|
||||||
output_path = '~/.config/kitty/kitty_test.conf'
|
output_path = '~/.config/kitty/clrsync.conf'
|
||||||
reload_cmd = 'pkill -SIGUSR1 kitty'
|
reload_cmd = 'pkill -SIGUSR1 kitty'
|
||||||
|
|
||||||
[templates.nvim]
|
[templates.nvim]
|
||||||
enabled = true
|
enabled = true
|
||||||
input_path = '~/.config/clrsync/templates/nvim.lua'
|
input_path = '~/.config/clrsync/templates/nvim.lua'
|
||||||
output_path = '~/.config/nvim/colors/clrsync.lua'
|
output_path = '~/.config/nvim/colors/clrsync.lua'
|
||||||
reload_cmd = ''
|
reload_cmd = ''
|
||||||
|
|||||||
@@ -1,63 +0,0 @@
|
|||||||
[colors]
|
|
||||||
accent = '#A6D189FF'
|
|
||||||
background = '#303446FF'
|
|
||||||
border_emphasized = '#8CAAEEFF'
|
|
||||||
border_focused = '#A6D189FF'
|
|
||||||
border_window = '#51576DFF'
|
|
||||||
cursor = '#F2D5CFFF'
|
|
||||||
editor_background = '#303446FF'
|
|
||||||
error = '#E78284FF'
|
|
||||||
floating_window_background = '#414559FF'
|
|
||||||
foreground = '#C6D0F5FF'
|
|
||||||
foreground_emphasis = '#C6D0F5FF'
|
|
||||||
foreground_secondary = '#B5BFE2FF'
|
|
||||||
info = '#8CAAEEFF'
|
|
||||||
menu_option_background = '#414559FF'
|
|
||||||
outline = '#51576DFF'
|
|
||||||
popup_background = '#292C3CFF'
|
|
||||||
shadow = '#00000080'
|
|
||||||
sidebar_background = '#292C3CFF'
|
|
||||||
success = '#A6D189FF'
|
|
||||||
surface = '#292C3CFF'
|
|
||||||
surface_variant = '#414559FF'
|
|
||||||
syntax_error = '#E78284FF'
|
|
||||||
syntax_function = '#8CAAEEFF'
|
|
||||||
syntax_keyword = '#CA9EE6FF'
|
|
||||||
syntax_operator = '#99D1DBFF'
|
|
||||||
syntax_special_keyword = '#E5C890FF'
|
|
||||||
term_black = '#51576DFF'
|
|
||||||
term_black_bright = '#626880FF'
|
|
||||||
term_blue = '#8CAAEEFF'
|
|
||||||
term_blue_bright = '#8CAAEEFF'
|
|
||||||
term_cyan = '#81C8BEFF'
|
|
||||||
term_cyan_bright = '#81C8BEFF'
|
|
||||||
term_green = '#A6D189FF'
|
|
||||||
term_green_bright = '#A6D189FF'
|
|
||||||
term_magenta = '#F4B8E4FF'
|
|
||||||
term_magenta_bright = '#F4B8E4FF'
|
|
||||||
term_red = '#E78284FF'
|
|
||||||
term_red_bright = '#E78284FF'
|
|
||||||
term_white = '#B5BFE2FF'
|
|
||||||
term_white_bright = '#A5ADCEFF'
|
|
||||||
term_yellow = '#E5C890FF'
|
|
||||||
term_yellow_bright = '#E5C890FF'
|
|
||||||
terminal_gray = '#626880FF'
|
|
||||||
text_command = '#A6D189FF'
|
|
||||||
text_comment = '#737994FF'
|
|
||||||
text_disabled = '#737994FF'
|
|
||||||
text_emphasis = '#C6D0F5FF'
|
|
||||||
text_error = '#E78284FF'
|
|
||||||
text_inactive = '#838BA7FF'
|
|
||||||
text_line_number = '#737994FF'
|
|
||||||
text_link = '#8CAAEEFF'
|
|
||||||
text_main = '#C6D0F5FF'
|
|
||||||
text_selected = '#62688038'
|
|
||||||
text_selection_inactive = '#51576D38'
|
|
||||||
text_string = '#A6D189FF'
|
|
||||||
text_success = '#A6D189FF'
|
|
||||||
text_warning = '#E5C890FF'
|
|
||||||
warning = '#EF9F76FF'
|
|
||||||
warning_emphasis = '#E5C890FF'
|
|
||||||
|
|
||||||
[general]
|
|
||||||
name = 'catppuccin-frappe'
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
[colors]
|
|
||||||
accent = '#40A02BFF'
|
|
||||||
background = '#EFF1F5FF'
|
|
||||||
border_emphasized = '#1E66F5FF'
|
|
||||||
border_focused = '#40A02BFF'
|
|
||||||
border_window = '#CCD0DAFF'
|
|
||||||
cursor = '#DC8A78FF'
|
|
||||||
editor_background = '#EFF1F5FF'
|
|
||||||
error = '#D20F39FF'
|
|
||||||
floating_window_background = '#E6E9EFFF'
|
|
||||||
foreground = '#4C4F69FF'
|
|
||||||
foreground_emphasis = '#4C4F69FF'
|
|
||||||
foreground_secondary = '#6C6F85FF'
|
|
||||||
info = '#1E66F5FF'
|
|
||||||
menu_option_background = '#E6E9EFFF'
|
|
||||||
outline = '#CCD0DAFF'
|
|
||||||
popup_background = '#DCE0E8FF'
|
|
||||||
shadow = '#00000040'
|
|
||||||
sidebar_background = '#DCE0E8FF'
|
|
||||||
success = '#40A02BFF'
|
|
||||||
surface = '#DCE0E8FF'
|
|
||||||
surface_variant = '#E6E9EFFF'
|
|
||||||
syntax_error = '#D20F39FF'
|
|
||||||
syntax_function = '#1E66F5FF'
|
|
||||||
syntax_keyword = '#8839EFFF'
|
|
||||||
syntax_operator = '#04A5E5FF'
|
|
||||||
syntax_special_keyword = '#DF8E1DFF'
|
|
||||||
term_black = '#5C5F77FF'
|
|
||||||
term_black_bright = '#6C6F85FF'
|
|
||||||
term_blue = '#1E66F5FF'
|
|
||||||
term_blue_bright = '#1E66F5FF'
|
|
||||||
term_cyan = '#179299FF'
|
|
||||||
term_cyan_bright = '#179299FF'
|
|
||||||
term_green = '#40A02BFF'
|
|
||||||
term_green_bright = '#40A02BFF'
|
|
||||||
term_magenta = '#EA76CBFF'
|
|
||||||
term_magenta_bright = '#EA76CBFF'
|
|
||||||
term_red = '#D20F39FF'
|
|
||||||
term_red_bright = '#D20F39FF'
|
|
||||||
term_white = '#4C4F69FF'
|
|
||||||
term_white_bright = '#4C4F69FF'
|
|
||||||
term_yellow = '#DF8E1DFF'
|
|
||||||
term_yellow_bright = '#DF8E1DFF'
|
|
||||||
terminal_gray = '#9CA0B0FF'
|
|
||||||
text_command = '#40A02BFF'
|
|
||||||
text_comment = '#ACB0BEFF'
|
|
||||||
text_disabled = '#ACB0BEFF'
|
|
||||||
text_emphasis = '#4C4F69FF'
|
|
||||||
text_error = '#D20F39FF'
|
|
||||||
text_inactive = '#8C8FA1FF'
|
|
||||||
text_line_number = '#ACB0BEFF'
|
|
||||||
text_link = '#1E66F5FF'
|
|
||||||
text_main = '#4C4F69FF'
|
|
||||||
text_selected = '#CCD0DA38'
|
|
||||||
text_selection_inactive = '#DCE0E838'
|
|
||||||
text_string = '#40A02BFF'
|
|
||||||
text_success = '#40A02BFF'
|
|
||||||
text_warning = '#DF8E1DFF'
|
|
||||||
warning = '#FE640BFF'
|
|
||||||
warning_emphasis = '#DF8E1DFF'
|
|
||||||
|
|
||||||
[general]
|
|
||||||
name = 'catppuccin-latte'
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
[colors]
|
|
||||||
accent = '#A6DA95FF'
|
|
||||||
background = '#24273AFF'
|
|
||||||
border_emphasized = '#8AADF4FF'
|
|
||||||
border_focused = '#A6DA95FF'
|
|
||||||
border_window = '#494D64FF'
|
|
||||||
cursor = '#F4DBD6FF'
|
|
||||||
editor_background = '#24273AFF'
|
|
||||||
error = '#ED8796FF'
|
|
||||||
floating_window_background = '#363A4FFF'
|
|
||||||
foreground = '#CAD3F5FF'
|
|
||||||
foreground_emphasis = '#CAD3F5FF'
|
|
||||||
foreground_secondary = '#B8C0E0FF'
|
|
||||||
info = '#8AADF4FF'
|
|
||||||
menu_option_background = '#363A4FFF'
|
|
||||||
outline = '#494D64FF'
|
|
||||||
popup_background = '#1E2030FF'
|
|
||||||
shadow = '#00000080'
|
|
||||||
sidebar_background = '#1E2030FF'
|
|
||||||
success = '#A6DA95FF'
|
|
||||||
surface = '#1E2030FF'
|
|
||||||
surface_variant = '#363A4FFF'
|
|
||||||
syntax_error = '#ED8796FF'
|
|
||||||
syntax_function = '#8AADF4FF'
|
|
||||||
syntax_keyword = '#C6A0F6FF'
|
|
||||||
syntax_operator = '#91D7E3FF'
|
|
||||||
syntax_special_keyword = '#EED49FFF'
|
|
||||||
term_black = '#494D64FF'
|
|
||||||
term_black_bright = '#5B6078FF'
|
|
||||||
term_blue = '#8AADF4FF'
|
|
||||||
term_blue_bright = '#8AADF4FF'
|
|
||||||
term_cyan = '#8BD5CAFF'
|
|
||||||
term_cyan_bright = '#8BD5CAFF'
|
|
||||||
term_green = '#A6DA95FF'
|
|
||||||
term_green_bright = '#A6DA95FF'
|
|
||||||
term_magenta = '#F5BDE6FF'
|
|
||||||
term_magenta_bright = '#F5BDE6FF'
|
|
||||||
term_red = '#ED8796FF'
|
|
||||||
term_red_bright = '#ED8796FF'
|
|
||||||
term_white = '#B8C0E0FF'
|
|
||||||
term_white_bright = '#A5ADCBFF'
|
|
||||||
term_yellow = '#EED49FFF'
|
|
||||||
term_yellow_bright = '#EED49FFF'
|
|
||||||
terminal_gray = '#5B6078FF'
|
|
||||||
text_command = '#A6DA95FF'
|
|
||||||
text_comment = '#6E738DFF'
|
|
||||||
text_disabled = '#6E738DFF'
|
|
||||||
text_emphasis = '#CAD3F5FF'
|
|
||||||
text_error = '#ED8796FF'
|
|
||||||
text_inactive = '#8087A2FF'
|
|
||||||
text_line_number = '#6E738DFF'
|
|
||||||
text_link = '#8AADF4FF'
|
|
||||||
text_main = '#CAD3F5FF'
|
|
||||||
text_selected = '#5B607838'
|
|
||||||
text_selection_inactive = '#494D6438'
|
|
||||||
text_string = '#A6DA95FF'
|
|
||||||
text_success = '#A6DA95FF'
|
|
||||||
text_warning = '#EED49FFF'
|
|
||||||
warning = '#F5A97FFF'
|
|
||||||
warning_emphasis = '#EED49FFF'
|
|
||||||
|
|
||||||
[general]
|
|
||||||
name = 'catppuccin-macchiato'
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
[colors]
|
|
||||||
accent = '#A6E3A1FF'
|
|
||||||
background = '#1E1E2EFF'
|
|
||||||
border_emphasized = '#89B4FAFF'
|
|
||||||
border_focused = '#A6E3A1FF'
|
|
||||||
border_window = '#45475AFF'
|
|
||||||
cursor = '#F5E0DCFF'
|
|
||||||
editor_background = '#1E1E2EFF'
|
|
||||||
error = '#F38BA8FF'
|
|
||||||
floating_window_background = '#313244FF'
|
|
||||||
foreground = '#CDD6F4FF'
|
|
||||||
foreground_emphasis = '#CDD6F4FF'
|
|
||||||
foreground_secondary = '#BAC2DEFF'
|
|
||||||
info = '#89B4FAFF'
|
|
||||||
menu_option_background = '#313244FF'
|
|
||||||
outline = '#45475AFF'
|
|
||||||
popup_background = '#181825FF'
|
|
||||||
shadow = '#00000080'
|
|
||||||
sidebar_background = '#181825FF'
|
|
||||||
success = '#A6E3A1FF'
|
|
||||||
surface = '#181825FF'
|
|
||||||
surface_variant = '#313244FF'
|
|
||||||
syntax_error = '#F38BA8FF'
|
|
||||||
syntax_function = '#89B4FAFF'
|
|
||||||
syntax_keyword = '#CBA6F7FF'
|
|
||||||
syntax_operator = '#89DCEBFF'
|
|
||||||
syntax_special_keyword = '#F9E2AFFF'
|
|
||||||
term_black = '#45475AFF'
|
|
||||||
term_black_bright = '#585B70FF'
|
|
||||||
term_blue = '#89B4FAFF'
|
|
||||||
term_blue_bright = '#89B4FAFF'
|
|
||||||
term_cyan = '#94E2D5FF'
|
|
||||||
term_cyan_bright = '#94E2D5FF'
|
|
||||||
term_green = '#A6E3A1FF'
|
|
||||||
term_green_bright = '#A6E3A1FF'
|
|
||||||
term_magenta = '#F5C2E7FF'
|
|
||||||
term_magenta_bright = '#F5C2E7FF'
|
|
||||||
term_red = '#F38BA8FF'
|
|
||||||
term_red_bright = '#F38BA8FF'
|
|
||||||
term_white = '#BAC2DEFF'
|
|
||||||
term_white_bright = '#A6ADC8FF'
|
|
||||||
term_yellow = '#F9E2AFFF'
|
|
||||||
term_yellow_bright = '#F9E2AFFF'
|
|
||||||
terminal_gray = '#585B70FF'
|
|
||||||
text_command = '#A6E3A1FF'
|
|
||||||
text_comment = '#6C7086FF'
|
|
||||||
text_disabled = '#6C7086FF'
|
|
||||||
text_emphasis = '#CDD6F4FF'
|
|
||||||
text_error = '#F38BA8FF'
|
|
||||||
text_inactive = '#7F849CFF'
|
|
||||||
text_line_number = '#6C7086FF'
|
|
||||||
text_link = '#89B4FAFF'
|
|
||||||
text_main = '#CDD6F4FF'
|
|
||||||
text_selected = '#585B7038'
|
|
||||||
text_selection_inactive = '#45475A38'
|
|
||||||
text_string = '#A6E3A1FF'
|
|
||||||
text_success = '#A6E3A1FF'
|
|
||||||
text_warning = '#F9E2AFFF'
|
|
||||||
warning = '#FAB387FF'
|
|
||||||
warning_emphasis = '#F9E2AFFF'
|
|
||||||
|
|
||||||
[general]
|
|
||||||
name = 'catppuccin-mocha'
|
|
||||||
@@ -1,63 +1,55 @@
|
|||||||
[colors]
|
[colors]
|
||||||
accent = '#00AA56FF'
|
accent = '#9A8652FF'
|
||||||
background = '#111318FF'
|
accent_secondary = '#9A8652FF'
|
||||||
border_emphasized = '#5DB2FFFF'
|
background = '#111111FF'
|
||||||
border_focused = '#00AA56FF'
|
base00 = '#111111FF'
|
||||||
border_window = '#44474FFF'
|
base01 = '#668A51FF'
|
||||||
cursor = '#FFFFFFFF'
|
base02 = '#9A8652FF'
|
||||||
editor_background = '#111318FF'
|
base03 = '#B47837FF'
|
||||||
error = '#FF5F5FFF'
|
base04 = '#9A5552FF'
|
||||||
floating_window_background = '#282A2FFF'
|
base05 = '#AA477BFF'
|
||||||
foreground = '#E2E2E9FF'
|
base06 = '#3A898CFF'
|
||||||
foreground_emphasis = '#FFFFFFFF'
|
base07 = '#B5B5B5FF'
|
||||||
foreground_secondary = '#A8ABB3FF'
|
base08 = '#AA4E4AFF'
|
||||||
info = '#5DB2FFFF'
|
base09 = '#A9DC86FF'
|
||||||
menu_option_background = '#282A2FFF'
|
base0A = '#B6AB82FF'
|
||||||
outline = '#44474FFF'
|
base0B = '#C5916BFF'
|
||||||
popup_background = '#1E1F25FF'
|
base0C = '#AC7676FF'
|
||||||
shadow = '#00000080'
|
base0D = '#B0779EFF'
|
||||||
sidebar_background = '#1E1F25FF'
|
base0E = '#849899FF'
|
||||||
success = '#6AD68BFF'
|
base0F = '#D2D2D2FF'
|
||||||
surface = '#1E1F25FF'
|
border = '#242424FF'
|
||||||
surface_variant = '#282A2FFF'
|
border_focused = '#2E2E2EFF'
|
||||||
syntax_error = '#FF5F5FFF'
|
cursor = '#D2D2D2FF'
|
||||||
syntax_function = '#86C9FFFF'
|
editor_background = '#111111FF'
|
||||||
syntax_keyword = '#DEBCDFFF'
|
editor_command = '#3A898CFF'
|
||||||
syntax_operator = '#A8ABB3FF'
|
editor_comment = '#849899FF'
|
||||||
syntax_special_keyword = '#FFC966FF'
|
editor_disabled = '#849899FF'
|
||||||
term_black = '#111318FF'
|
editor_emphasis = '#A9DC86FF'
|
||||||
term_black_bright = '#33353AFF'
|
editor_error = '#AA4E4AFF'
|
||||||
term_blue = '#5DB2FFFF'
|
editor_inactive = '#849899FF'
|
||||||
term_blue_bright = '#86C9FFFF'
|
editor_line_number = '#849899FF'
|
||||||
term_cyan = '#86C9FFFF'
|
editor_link = '#B0779EFF'
|
||||||
term_cyan_bright = '#BFEFFFFF'
|
editor_main = '#D2D2D2FF'
|
||||||
term_green = '#00AA56FF'
|
editor_selected = '#242424FF'
|
||||||
term_green_bright = '#00CC6AFF'
|
editor_selection_inactive = '#1D1C1CFF'
|
||||||
term_magenta = '#DEBCDFFF'
|
editor_string = '#9A8652FF'
|
||||||
term_magenta_bright = '#F0D6F0FF'
|
editor_success = '#668A51FF'
|
||||||
term_red = '#FF5F5FFF'
|
editor_warning = '#B47837FF'
|
||||||
term_red_bright = '#FFB780FF'
|
error = '#AA4E4AFF'
|
||||||
term_white = '#E2E2E9FF'
|
foreground = '#D2D2D2FF'
|
||||||
term_white_bright = '#FFFFFFFF'
|
info = '#3A898CFF'
|
||||||
term_yellow = '#FFC966FF'
|
on_background = '#D4D4D4FF'
|
||||||
term_yellow_bright = '#FFD580FF'
|
on_error = '#D2D2D2FF'
|
||||||
terminal_gray = '#33353AFF'
|
on_info = '#D2D2D2FF'
|
||||||
text_command = '#00AA56FF'
|
on_success = '#D2D2D2FF'
|
||||||
text_comment = '#44474FFF'
|
on_surface = '#D4D4D4FF'
|
||||||
text_disabled = '#44474FFF'
|
on_surface_variant = '#D4D4D4FF'
|
||||||
text_emphasis = '#FFFFFFFF'
|
on_warning = '#D2D2D2FF'
|
||||||
text_error = '#FF5F5FFF'
|
success = '#668A51FF'
|
||||||
text_inactive = '#A8ABB3FF'
|
surface = '#111111FF'
|
||||||
text_line_number = '#44474FFF'
|
surface_variant = '#191919FF'
|
||||||
text_link = '#5DB2FFFF'
|
warning = '#B47837FF'
|
||||||
text_main = '#E2E2E9FF'
|
|
||||||
text_selected = '#FFFFFF1A'
|
|
||||||
text_selection_inactive = '#A8ABB338'
|
|
||||||
text_string = '#6AD68BFF'
|
|
||||||
text_success = '#6AD68BFF'
|
|
||||||
text_warning = '#FFC966FF'
|
|
||||||
warning = '#FFC966FF'
|
|
||||||
warning_emphasis = '#FFD580FF'
|
|
||||||
|
|
||||||
[general]
|
[general]
|
||||||
name = 'dark'
|
name = 'dark'
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
[colors]
|
|
||||||
accent = '#A7C080FF'
|
|
||||||
background = '#272E33FF'
|
|
||||||
border_emphasized = '#7FBBB3FF'
|
|
||||||
border_focused = '#A7C080FF'
|
|
||||||
border_window = '#475258FF'
|
|
||||||
cursor = '#D3C6AAFF'
|
|
||||||
editor_background = '#272E33FF'
|
|
||||||
error = '#E67E80FF'
|
|
||||||
floating_window_background = '#3D484DFF'
|
|
||||||
foreground = '#D3C6AAFF'
|
|
||||||
foreground_emphasis = '#D3C6AAFF'
|
|
||||||
foreground_secondary = '#9DA9A0FF'
|
|
||||||
info = '#7FBBB3FF'
|
|
||||||
menu_option_background = '#3D484DFF'
|
|
||||||
outline = '#475258FF'
|
|
||||||
popup_background = '#2E383CFF'
|
|
||||||
shadow = '#00000080'
|
|
||||||
sidebar_background = '#2E383CFF'
|
|
||||||
success = '#A7C080FF'
|
|
||||||
surface = '#2E383CFF'
|
|
||||||
surface_variant = '#3D484DFF'
|
|
||||||
syntax_error = '#E67E80FF'
|
|
||||||
syntax_function = '#7FBBB3FF'
|
|
||||||
syntax_keyword = '#D699B6FF'
|
|
||||||
syntax_operator = '#83C092FF'
|
|
||||||
syntax_special_keyword = '#DBBC7FFF'
|
|
||||||
term_black = '#475258FF'
|
|
||||||
term_black_bright = '#4F585EFF'
|
|
||||||
term_blue = '#7FBBB3FF'
|
|
||||||
term_blue_bright = '#7FBBB3FF'
|
|
||||||
term_cyan = '#83C092FF'
|
|
||||||
term_cyan_bright = '#83C092FF'
|
|
||||||
term_green = '#A7C080FF'
|
|
||||||
term_green_bright = '#A7C080FF'
|
|
||||||
term_magenta = '#D699B6FF'
|
|
||||||
term_magenta_bright = '#D699B6FF'
|
|
||||||
term_red = '#E67E80FF'
|
|
||||||
term_red_bright = '#E67E80FF'
|
|
||||||
term_white = '#D3C6AAFF'
|
|
||||||
term_white_bright = '#D3C6AAFF'
|
|
||||||
term_yellow = '#DBBC7FFF'
|
|
||||||
term_yellow_bright = '#DBBC7FFF'
|
|
||||||
terminal_gray = '#4F585EFF'
|
|
||||||
text_command = '#A7C080FF'
|
|
||||||
text_comment = '#859289FF'
|
|
||||||
text_disabled = '#859289FF'
|
|
||||||
text_emphasis = '#D3C6AAFF'
|
|
||||||
text_error = '#E67E80FF'
|
|
||||||
text_inactive = '#7A8478FF'
|
|
||||||
text_line_number = '#859289FF'
|
|
||||||
text_link = '#7FBBB3FF'
|
|
||||||
text_main = '#D3C6AAFF'
|
|
||||||
text_selected = '#543A4838'
|
|
||||||
text_selection_inactive = '#51404538'
|
|
||||||
text_string = '#A7C080FF'
|
|
||||||
text_success = '#A7C080FF'
|
|
||||||
text_warning = '#DBBC7FFF'
|
|
||||||
warning = '#E69875FF'
|
|
||||||
warning_emphasis = '#DBBC7FFF'
|
|
||||||
|
|
||||||
[general]
|
|
||||||
name = 'everforest-dark-hard'
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
[colors]
|
|
||||||
accent = '#A7C080FF'
|
|
||||||
background = '#2D353BFF'
|
|
||||||
border_emphasized = '#7FBBB3FF'
|
|
||||||
border_focused = '#A7C080FF'
|
|
||||||
border_window = '#475258FF'
|
|
||||||
cursor = '#D3C6AAFF'
|
|
||||||
editor_background = '#2D353BFF'
|
|
||||||
error = '#E67E80FF'
|
|
||||||
floating_window_background = '#3D484DFF'
|
|
||||||
foreground = '#D3C6AAFF'
|
|
||||||
foreground_emphasis = '#D3C6AAFF'
|
|
||||||
foreground_secondary = '#9DA9A0FF'
|
|
||||||
info = '#7FBBB3FF'
|
|
||||||
menu_option_background = '#3D484DFF'
|
|
||||||
outline = '#475258FF'
|
|
||||||
popup_background = '#343F44FF'
|
|
||||||
shadow = '#00000080'
|
|
||||||
sidebar_background = '#343F44FF'
|
|
||||||
success = '#A7C080FF'
|
|
||||||
surface = '#343F44FF'
|
|
||||||
surface_variant = '#3D484DFF'
|
|
||||||
syntax_error = '#E67E80FF'
|
|
||||||
syntax_function = '#7FBBB3FF'
|
|
||||||
syntax_keyword = '#D699B6FF'
|
|
||||||
syntax_operator = '#83C092FF'
|
|
||||||
syntax_special_keyword = '#DBBC7FFF'
|
|
||||||
term_black = '#475258FF'
|
|
||||||
term_black_bright = '#4F585EFF'
|
|
||||||
term_blue = '#7FBBB3FF'
|
|
||||||
term_blue_bright = '#7FBBB3FF'
|
|
||||||
term_cyan = '#83C092FF'
|
|
||||||
term_cyan_bright = '#83C092FF'
|
|
||||||
term_green = '#A7C080FF'
|
|
||||||
term_green_bright = '#A7C080FF'
|
|
||||||
term_magenta = '#D699B6FF'
|
|
||||||
term_magenta_bright = '#D699B6FF'
|
|
||||||
term_red = '#E67E80FF'
|
|
||||||
term_red_bright = '#E67E80FF'
|
|
||||||
term_white = '#D3C6AAFF'
|
|
||||||
term_white_bright = '#D3C6AAFF'
|
|
||||||
term_yellow = '#DBBC7FFF'
|
|
||||||
term_yellow_bright = '#DBBC7FFF'
|
|
||||||
terminal_gray = '#4F585EFF'
|
|
||||||
text_command = '#A7C080FF'
|
|
||||||
text_comment = '#859289FF'
|
|
||||||
text_disabled = '#859289FF'
|
|
||||||
text_emphasis = '#D3C6AAFF'
|
|
||||||
text_error = '#E67E80FF'
|
|
||||||
text_inactive = '#7A8478FF'
|
|
||||||
text_line_number = '#859289FF'
|
|
||||||
text_link = '#7FBBB3FF'
|
|
||||||
text_main = '#D3C6AAFF'
|
|
||||||
text_selected = '#543A4838'
|
|
||||||
text_selection_inactive = '#51404538'
|
|
||||||
text_string = '#A7C080FF'
|
|
||||||
text_success = '#A7C080FF'
|
|
||||||
text_warning = '#DBBC7FFF'
|
|
||||||
warning = '#E69875FF'
|
|
||||||
warning_emphasis = '#DBBC7FFF'
|
|
||||||
|
|
||||||
[general]
|
|
||||||
name = 'everforest-dark'
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
[colors]
|
|
||||||
accent = '#8DA101FF'
|
|
||||||
background = '#FFF9E8FF'
|
|
||||||
border_emphasized = '#3A94C5FF'
|
|
||||||
border_focused = '#8DA101FF'
|
|
||||||
border_window = '#E6E2CCFF'
|
|
||||||
cursor = '#5C6A72FF'
|
|
||||||
editor_background = '#FFF9E8FF'
|
|
||||||
error = '#F85552FF'
|
|
||||||
floating_window_background = '#F4F0D9FF'
|
|
||||||
foreground = '#5C6A72FF'
|
|
||||||
foreground_emphasis = '#5C6A72FF'
|
|
||||||
foreground_secondary = '#939F91FF'
|
|
||||||
info = '#3A94C5FF'
|
|
||||||
menu_option_background = '#F4F0D9FF'
|
|
||||||
outline = '#E6E2CCFF'
|
|
||||||
popup_background = '#FDFCEEFF'
|
|
||||||
shadow = '#00000040'
|
|
||||||
sidebar_background = '#FDFCEEFF'
|
|
||||||
success = '#8DA101FF'
|
|
||||||
surface = '#FDFCEEFF'
|
|
||||||
surface_variant = '#F4F0D9FF'
|
|
||||||
syntax_error = '#F85552FF'
|
|
||||||
syntax_function = '#3A94C5FF'
|
|
||||||
syntax_keyword = '#DF69BAFF'
|
|
||||||
syntax_operator = '#35A77CFF'
|
|
||||||
syntax_special_keyword = '#DFA000FF'
|
|
||||||
term_black = '#E6E2CCFF'
|
|
||||||
term_black_bright = '#D8CAACFF'
|
|
||||||
term_blue = '#3A94C5FF'
|
|
||||||
term_blue_bright = '#3A94C5FF'
|
|
||||||
term_cyan = '#35A77CFF'
|
|
||||||
term_cyan_bright = '#35A77CFF'
|
|
||||||
term_green = '#8DA101FF'
|
|
||||||
term_green_bright = '#8DA101FF'
|
|
||||||
term_magenta = '#DF69BAFF'
|
|
||||||
term_magenta_bright = '#DF69BAFF'
|
|
||||||
term_red = '#F85552FF'
|
|
||||||
term_red_bright = '#F85552FF'
|
|
||||||
term_white = '#5C6A72FF'
|
|
||||||
term_white_bright = '#5C6A72FF'
|
|
||||||
term_yellow = '#DFA000FF'
|
|
||||||
term_yellow_bright = '#DFA000FF'
|
|
||||||
terminal_gray = '#D8CAACFF'
|
|
||||||
text_command = '#8DA101FF'
|
|
||||||
text_comment = '#A6B0A0FF'
|
|
||||||
text_disabled = '#A6B0A0FF'
|
|
||||||
text_emphasis = '#5C6A72FF'
|
|
||||||
text_error = '#F85552FF'
|
|
||||||
text_inactive = '#939F91FF'
|
|
||||||
text_line_number = '#A6B0A0FF'
|
|
||||||
text_link = '#3A94C5FF'
|
|
||||||
text_main = '#5C6A72FF'
|
|
||||||
text_selected = '#EAE4D938'
|
|
||||||
text_selection_inactive = '#F0EBDB38'
|
|
||||||
text_string = '#8DA101FF'
|
|
||||||
text_success = '#8DA101FF'
|
|
||||||
text_warning = '#DFA000FF'
|
|
||||||
warning = '#F57D26FF'
|
|
||||||
warning_emphasis = '#DFA000FF'
|
|
||||||
|
|
||||||
[general]
|
|
||||||
name = 'everforest-light'
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
[colors]
|
|
||||||
accent = '#66800BFF'
|
|
||||||
background = '#FFFCF0FF'
|
|
||||||
border_emphasized = '#205EA6FF'
|
|
||||||
border_focused = '#66800BFF'
|
|
||||||
border_window = '#DAD8CEFF'
|
|
||||||
cursor = '#100F0FFF'
|
|
||||||
editor_background = '#FFFCF0FF'
|
|
||||||
error = '#AF3029FF'
|
|
||||||
floating_window_background = '#F2F0E5FF'
|
|
||||||
foreground = '#100F0FFF'
|
|
||||||
foreground_emphasis = '#100F0FFF'
|
|
||||||
foreground_secondary = '#403E3CFF'
|
|
||||||
info = '#205EA6FF'
|
|
||||||
menu_option_background = '#F2F0E5FF'
|
|
||||||
outline = '#DAD8CEFF'
|
|
||||||
popup_background = '#F2F0E5FF'
|
|
||||||
shadow = '#00000040'
|
|
||||||
sidebar_background = '#F2F0E5FF'
|
|
||||||
success = '#66800BFF'
|
|
||||||
surface = '#F2F0E5FF'
|
|
||||||
surface_variant = '#E6E4D9FF'
|
|
||||||
syntax_error = '#AF3029FF'
|
|
||||||
syntax_function = '#205EA6FF'
|
|
||||||
syntax_keyword = '#5E409DFF'
|
|
||||||
syntax_operator = '#24837BFF'
|
|
||||||
syntax_special_keyword = '#AD8301FF'
|
|
||||||
term_black = '#FFFCF0FF'
|
|
||||||
term_black_bright = '#6F6E69FF'
|
|
||||||
term_blue = '#205EA6FF'
|
|
||||||
term_blue_bright = '#205EA6FF'
|
|
||||||
term_cyan = '#24837BFF'
|
|
||||||
term_cyan_bright = '#24837BFF'
|
|
||||||
term_green = '#66800BFF'
|
|
||||||
term_green_bright = '#66800BFF'
|
|
||||||
term_magenta = '#A02F6FFF'
|
|
||||||
term_magenta_bright = '#A02F6FFF'
|
|
||||||
term_red = '#AF3029FF'
|
|
||||||
term_red_bright = '#AF3029FF'
|
|
||||||
term_white = '#100F0FFF'
|
|
||||||
term_white_bright = '#100F0FFF'
|
|
||||||
term_yellow = '#AD8301FF'
|
|
||||||
term_yellow_bright = '#AD8301FF'
|
|
||||||
terminal_gray = '#6F6E69FF'
|
|
||||||
text_command = '#66800BFF'
|
|
||||||
text_comment = '#878580FF'
|
|
||||||
text_disabled = '#B7B5ACFF'
|
|
||||||
text_emphasis = '#100F0FFF'
|
|
||||||
text_error = '#AF3029FF'
|
|
||||||
text_inactive = '#6F6E69FF'
|
|
||||||
text_line_number = '#878580FF'
|
|
||||||
text_link = '#205EA6FF'
|
|
||||||
text_main = '#100F0FFF'
|
|
||||||
text_selected = '#E6E4D938'
|
|
||||||
text_selection_inactive = '#F2F0E538'
|
|
||||||
text_string = '#66800BFF'
|
|
||||||
text_success = '#66800BFF'
|
|
||||||
text_warning = '#AD8301FF'
|
|
||||||
warning = '#BC5215FF'
|
|
||||||
warning_emphasis = '#AD8301FF'
|
|
||||||
|
|
||||||
[general]
|
|
||||||
name = 'flexoki-light'
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
[colors]
|
|
||||||
accent = '#879A39FF'
|
|
||||||
background = '#100F0FFF'
|
|
||||||
border_emphasized = '#4385BEFF'
|
|
||||||
border_focused = '#879A39FF'
|
|
||||||
border_window = '#282726FF'
|
|
||||||
cursor = '#CECDC3FF'
|
|
||||||
editor_background = '#100F0FFF'
|
|
||||||
error = '#D14D41FF'
|
|
||||||
floating_window_background = '#1C1B1AFF'
|
|
||||||
foreground = '#CECDC3FF'
|
|
||||||
foreground_emphasis = '#E6E4D9FF'
|
|
||||||
foreground_secondary = '#B7B5ACFF'
|
|
||||||
info = '#4385BEFF'
|
|
||||||
menu_option_background = '#1C1B1AFF'
|
|
||||||
outline = '#282726FF'
|
|
||||||
popup_background = '#1C1B1AFF'
|
|
||||||
shadow = '#00000080'
|
|
||||||
sidebar_background = '#1C1B1AFF'
|
|
||||||
success = '#879A39FF'
|
|
||||||
surface = '#1C1B1AFF'
|
|
||||||
surface_variant = '#282726FF'
|
|
||||||
syntax_error = '#D14D41FF'
|
|
||||||
syntax_function = '#4385BEFF'
|
|
||||||
syntax_keyword = '#8B7EC8FF'
|
|
||||||
syntax_operator = '#3AA99FFF'
|
|
||||||
syntax_special_keyword = '#D0A215FF'
|
|
||||||
term_black = '#100F0FFF'
|
|
||||||
term_black_bright = '#6F6E69FF'
|
|
||||||
term_blue = '#4385BEFF'
|
|
||||||
term_blue_bright = '#4385BEFF'
|
|
||||||
term_cyan = '#3AA99FFF'
|
|
||||||
term_cyan_bright = '#3AA99FFF'
|
|
||||||
term_green = '#879A39FF'
|
|
||||||
term_green_bright = '#879A39FF'
|
|
||||||
term_magenta = '#CE5D97FF'
|
|
||||||
term_magenta_bright = '#CE5D97FF'
|
|
||||||
term_red = '#D14D41FF'
|
|
||||||
term_red_bright = '#D14D41FF'
|
|
||||||
term_white = '#CECDC3FF'
|
|
||||||
term_white_bright = '#E6E4D9FF'
|
|
||||||
term_yellow = '#D0A215FF'
|
|
||||||
term_yellow_bright = '#D0A215FF'
|
|
||||||
terminal_gray = '#6F6E69FF'
|
|
||||||
text_command = '#879A39FF'
|
|
||||||
text_comment = '#575653FF'
|
|
||||||
text_disabled = '#403E3CFF'
|
|
||||||
text_emphasis = '#E6E4D9FF'
|
|
||||||
text_error = '#D14D41FF'
|
|
||||||
text_inactive = '#6F6E69FF'
|
|
||||||
text_line_number = '#575653FF'
|
|
||||||
text_link = '#4385BEFF'
|
|
||||||
text_main = '#CECDC3FF'
|
|
||||||
text_selected = '#28272638'
|
|
||||||
text_selection_inactive = '#1C1B1A38'
|
|
||||||
text_string = '#879A39FF'
|
|
||||||
text_success = '#879A39FF'
|
|
||||||
text_warning = '#D0A215FF'
|
|
||||||
warning = '#DA702CFF'
|
|
||||||
warning_emphasis = '#D0A215FF'
|
|
||||||
|
|
||||||
[general]
|
|
||||||
name = 'flexoki'
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
[colors]
|
|
||||||
accent = '#B8BB26FF'
|
|
||||||
background = '#282828FF'
|
|
||||||
border_emphasized = '#83A598FF'
|
|
||||||
border_focused = '#B8BB26FF'
|
|
||||||
border_window = '#504945FF'
|
|
||||||
cursor = '#EBDBB2FF'
|
|
||||||
editor_background = '#282828FF'
|
|
||||||
error = '#FB4934FF'
|
|
||||||
floating_window_background = '#3C3836FF'
|
|
||||||
foreground = '#EBDBB2FF'
|
|
||||||
foreground_emphasis = '#FBF1C7FF'
|
|
||||||
foreground_secondary = '#D5C4A1FF'
|
|
||||||
info = '#83A598FF'
|
|
||||||
menu_option_background = '#3C3836FF'
|
|
||||||
outline = '#504945FF'
|
|
||||||
popup_background = '#32302FFF'
|
|
||||||
shadow = '#00000080'
|
|
||||||
sidebar_background = '#32302FFF'
|
|
||||||
success = '#B8BB26FF'
|
|
||||||
surface = '#32302FFF'
|
|
||||||
surface_variant = '#3C3836FF'
|
|
||||||
syntax_error = '#FB4934FF'
|
|
||||||
syntax_function = '#83A598FF'
|
|
||||||
syntax_keyword = '#D3869BFF'
|
|
||||||
syntax_operator = '#8EC07CFF'
|
|
||||||
syntax_special_keyword = '#FABD2FFF'
|
|
||||||
term_black = '#282828FF'
|
|
||||||
term_black_bright = '#928374FF'
|
|
||||||
term_blue = '#458588FF'
|
|
||||||
term_blue_bright = '#83A598FF'
|
|
||||||
term_cyan = '#689D6AFF'
|
|
||||||
term_cyan_bright = '#8EC07CFF'
|
|
||||||
term_green = '#98971AFF'
|
|
||||||
term_green_bright = '#B8BB26FF'
|
|
||||||
term_magenta = '#B16286FF'
|
|
||||||
term_magenta_bright = '#D3869BFF'
|
|
||||||
term_red = '#CC241DFF'
|
|
||||||
term_red_bright = '#FB4934FF'
|
|
||||||
term_white = '#A89984FF'
|
|
||||||
term_white_bright = '#EBDBB2FF'
|
|
||||||
term_yellow = '#D79921FF'
|
|
||||||
term_yellow_bright = '#FABD2FFF'
|
|
||||||
terminal_gray = '#928374FF'
|
|
||||||
text_command = '#B8BB26FF'
|
|
||||||
text_comment = '#928374FF'
|
|
||||||
text_disabled = '#665C54FF'
|
|
||||||
text_emphasis = '#FBF1C7FF'
|
|
||||||
text_error = '#FB4934FF'
|
|
||||||
text_inactive = '#7C6F64FF'
|
|
||||||
text_line_number = '#7C6F64FF'
|
|
||||||
text_link = '#83A598FF'
|
|
||||||
text_main = '#EBDBB2FF'
|
|
||||||
text_selected = '#665C5438'
|
|
||||||
text_selection_inactive = '#50494538'
|
|
||||||
text_string = '#B8BB26FF'
|
|
||||||
text_success = '#B8BB26FF'
|
|
||||||
text_warning = '#FABD2FFF'
|
|
||||||
warning = '#FE8019FF'
|
|
||||||
warning_emphasis = '#FABD2FFF'
|
|
||||||
|
|
||||||
[general]
|
|
||||||
name = 'gruvbox-dark'
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
[colors]
|
|
||||||
accent = '#B8BB26FF'
|
|
||||||
background = '#1D2021FF'
|
|
||||||
border_emphasized = '#83A598FF'
|
|
||||||
border_focused = '#B8BB26FF'
|
|
||||||
border_window = '#504945FF'
|
|
||||||
cursor = '#EBDBB2FF'
|
|
||||||
editor_background = '#1D2021FF'
|
|
||||||
error = '#FB4934FF'
|
|
||||||
floating_window_background = '#3C3836FF'
|
|
||||||
foreground = '#EBDBB2FF'
|
|
||||||
foreground_emphasis = '#FBF1C7FF'
|
|
||||||
foreground_secondary = '#D5C4A1FF'
|
|
||||||
info = '#83A598FF'
|
|
||||||
menu_option_background = '#3C3836FF'
|
|
||||||
outline = '#504945FF'
|
|
||||||
popup_background = '#282828FF'
|
|
||||||
shadow = '#00000080'
|
|
||||||
sidebar_background = '#282828FF'
|
|
||||||
success = '#B8BB26FF'
|
|
||||||
surface = '#282828FF'
|
|
||||||
surface_variant = '#3C3836FF'
|
|
||||||
syntax_error = '#FB4934FF'
|
|
||||||
syntax_function = '#83A598FF'
|
|
||||||
syntax_keyword = '#D3869BFF'
|
|
||||||
syntax_operator = '#8EC07CFF'
|
|
||||||
syntax_special_keyword = '#FABD2FFF'
|
|
||||||
term_black = '#1D2021FF'
|
|
||||||
term_black_bright = '#928374FF'
|
|
||||||
term_blue = '#458588FF'
|
|
||||||
term_blue_bright = '#83A598FF'
|
|
||||||
term_cyan = '#689D6AFF'
|
|
||||||
term_cyan_bright = '#8EC07CFF'
|
|
||||||
term_green = '#98971AFF'
|
|
||||||
term_green_bright = '#B8BB26FF'
|
|
||||||
term_magenta = '#B16286FF'
|
|
||||||
term_magenta_bright = '#D3869BFF'
|
|
||||||
term_red = '#CC241DFF'
|
|
||||||
term_red_bright = '#FB4934FF'
|
|
||||||
term_white = '#A89984FF'
|
|
||||||
term_white_bright = '#EBDBB2FF'
|
|
||||||
term_yellow = '#D79921FF'
|
|
||||||
term_yellow_bright = '#FABD2FFF'
|
|
||||||
terminal_gray = '#928374FF'
|
|
||||||
text_command = '#B8BB26FF'
|
|
||||||
text_comment = '#928374FF'
|
|
||||||
text_disabled = '#665C54FF'
|
|
||||||
text_emphasis = '#FBF1C7FF'
|
|
||||||
text_error = '#FB4934FF'
|
|
||||||
text_inactive = '#7C6F64FF'
|
|
||||||
text_line_number = '#7C6F64FF'
|
|
||||||
text_link = '#83A598FF'
|
|
||||||
text_main = '#EBDBB2FF'
|
|
||||||
text_selected = '#665C5438'
|
|
||||||
text_selection_inactive = '#50494538'
|
|
||||||
text_string = '#B8BB26FF'
|
|
||||||
text_success = '#B8BB26FF'
|
|
||||||
text_warning = '#FABD2FFF'
|
|
||||||
warning = '#FE8019FF'
|
|
||||||
warning_emphasis = '#FABD2FFF'
|
|
||||||
|
|
||||||
[general]
|
|
||||||
name = 'gruvbox-dark-hard'
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
[colors]
|
|
||||||
accent = '#79740EFF'
|
|
||||||
background = '#F9F5D7FF'
|
|
||||||
border_emphasized = '#076678FF'
|
|
||||||
border_focused = '#79740EFF'
|
|
||||||
border_window = '#D5C4A1FF'
|
|
||||||
cursor = '#282828FF'
|
|
||||||
editor_background = '#F9F5D7FF'
|
|
||||||
error = '#9D0006FF'
|
|
||||||
floating_window_background = '#F2E5BCFF'
|
|
||||||
foreground = '#3C3836FF'
|
|
||||||
foreground_emphasis = '#282828FF'
|
|
||||||
foreground_secondary = '#504945FF'
|
|
||||||
info = '#076678FF'
|
|
||||||
menu_option_background = '#F2E5BCFF'
|
|
||||||
outline = '#D5C4A1FF'
|
|
||||||
popup_background = '#FBF1C7FF'
|
|
||||||
shadow = '#00000040'
|
|
||||||
sidebar_background = '#FBF1C7FF'
|
|
||||||
success = '#79740EFF'
|
|
||||||
surface = '#FBF1C7FF'
|
|
||||||
surface_variant = '#F2E5BCFF'
|
|
||||||
syntax_error = '#9D0006FF'
|
|
||||||
syntax_function = '#076678FF'
|
|
||||||
syntax_keyword = '#8F3F71FF'
|
|
||||||
syntax_operator = '#427B58FF'
|
|
||||||
syntax_special_keyword = '#B57614FF'
|
|
||||||
term_black = '#F9F5D7FF'
|
|
||||||
term_black_bright = '#928374FF'
|
|
||||||
term_blue = '#076678FF'
|
|
||||||
term_blue_bright = '#458588FF'
|
|
||||||
term_cyan = '#427B58FF'
|
|
||||||
term_cyan_bright = '#689D6AFF'
|
|
||||||
term_green = '#79740EFF'
|
|
||||||
term_green_bright = '#98971AFF'
|
|
||||||
term_magenta = '#8F3F71FF'
|
|
||||||
term_magenta_bright = '#B16286FF'
|
|
||||||
term_red = '#9D0006FF'
|
|
||||||
term_red_bright = '#CC241DFF'
|
|
||||||
term_white = '#7C6F64FF'
|
|
||||||
term_white_bright = '#3C3836FF'
|
|
||||||
term_yellow = '#B57614FF'
|
|
||||||
term_yellow_bright = '#D79921FF'
|
|
||||||
terminal_gray = '#928374FF'
|
|
||||||
text_command = '#79740EFF'
|
|
||||||
text_comment = '#928374FF'
|
|
||||||
text_disabled = '#D5C4A1FF'
|
|
||||||
text_emphasis = '#282828FF'
|
|
||||||
text_error = '#9D0006FF'
|
|
||||||
text_inactive = '#A89984FF'
|
|
||||||
text_line_number = '#A89984FF'
|
|
||||||
text_link = '#076678FF'
|
|
||||||
text_main = '#3C3836FF'
|
|
||||||
text_selected = '#D5C4A138'
|
|
||||||
text_selection_inactive = '#EBDBB238'
|
|
||||||
text_string = '#79740EFF'
|
|
||||||
text_success = '#79740EFF'
|
|
||||||
text_warning = '#B57614FF'
|
|
||||||
warning = '#AF3A03FF'
|
|
||||||
warning_emphasis = '#B57614FF'
|
|
||||||
|
|
||||||
[general]
|
|
||||||
name = 'gruvbox-light-hard'
|
|
||||||
@@ -1,63 +1,55 @@
|
|||||||
[colors]
|
[colors]
|
||||||
accent = '#007A35FF'
|
accent = '#9A8652FF'
|
||||||
background = '#FFFFFFFF'
|
accent_secondary = '#9A8652FF'
|
||||||
border_emphasized = '#3399FFFF'
|
background = '#E0E0E0FF'
|
||||||
border_focused = '#007A35FF'
|
base00 = '#E0E0E0FF'
|
||||||
border_window = '#CCCCCCFF'
|
base01 = '#668A51FF'
|
||||||
cursor = '#111318FF'
|
base02 = '#9A8652FF'
|
||||||
editor_background = '#FFFFFFFF'
|
base03 = '#B47837FF'
|
||||||
error = '#D00000FF'
|
base04 = '#9A5552FF'
|
||||||
floating_window_background = '#E8E8E8FF'
|
base05 = '#AA477BFF'
|
||||||
foreground = '#1E1F25FF'
|
base06 = '#3A898CFF'
|
||||||
foreground_emphasis = '#111318FF'
|
base07 = '#5A5A5AFF'
|
||||||
foreground_secondary = '#44474FFF'
|
base08 = '#AA4E4AFF'
|
||||||
info = '#3399FFFF'
|
base09 = '#4A7A2EFF'
|
||||||
menu_option_background = '#E8E8E8FF'
|
base0A = '#7A6A42FF'
|
||||||
outline = '#CCCCCCFF'
|
base0B = '#A5714BFF'
|
||||||
popup_background = '#F5F5F5FF'
|
base0C = '#8C5656FF'
|
||||||
shadow = '#000000FF'
|
base0D = '#90577EFF'
|
||||||
sidebar_background = '#F5F5F5FF'
|
base0E = '#2A6A6DFF'
|
||||||
success = '#008833FF'
|
base0F = '#2A2A2AFF'
|
||||||
surface = '#F5F5F5FF'
|
border = '#C5C5C5FF'
|
||||||
surface_variant = '#E8E8E8FF'
|
border_focused = '#B9B9B9FF'
|
||||||
syntax_error = '#D00000FF'
|
cursor = '#2A2A2AFF'
|
||||||
syntax_function = '#0066CCFF'
|
editor_background = '#E0E0E0FF'
|
||||||
syntax_keyword = '#9933CCFF'
|
editor_command = '#3A898CFF'
|
||||||
syntax_operator = '#44474FFF'
|
editor_comment = '#849899FF'
|
||||||
syntax_special_keyword = '#FF9900FF'
|
editor_disabled = '#A0A0A0FF'
|
||||||
term_black = '#111318FF'
|
editor_emphasis = '#4A7A2EFF'
|
||||||
term_black_bright = '#888888FF'
|
editor_error = '#AA4E4AFF'
|
||||||
term_blue = '#3399FFFF'
|
editor_inactive = '#A0A0A0FF'
|
||||||
term_blue_bright = '#66B2FFFF'
|
editor_line_number = '#9A9A95FF'
|
||||||
term_cyan = '#0066CCFF'
|
editor_link = '#90577EFF'
|
||||||
term_cyan_bright = '#99DDFFFF'
|
editor_main = '#2A2A2AFF'
|
||||||
term_green = '#007A35FF'
|
editor_selected = '#C9C9C9FF'
|
||||||
term_green_bright = '#33CC66FF'
|
editor_selection_inactive = '#D2D2D2FF'
|
||||||
term_magenta = '#9933CCFF'
|
editor_string = '#9A8652FF'
|
||||||
term_magenta_bright = '#CC99CCFF'
|
editor_success = '#668A51FF'
|
||||||
term_red = '#D00000FF'
|
editor_warning = '#B47837FF'
|
||||||
term_red_bright = '#FF6666FF'
|
error = '#AA4E4AFF'
|
||||||
term_white = '#FFFFFFFF'
|
foreground = '#2A2A2AFF'
|
||||||
term_white_bright = '#FFFFFFFF'
|
info = '#3A898CFF'
|
||||||
term_yellow = '#FF9900FF'
|
on_background = '#2A2A2AFF'
|
||||||
term_yellow_bright = '#FFCC80FF'
|
on_error = '#FAFAF8FF'
|
||||||
terminal_gray = '#CCCCCCFF'
|
on_info = '#FAFAF8FF'
|
||||||
text_command = '#007A35FF'
|
on_success = '#FAFAF8FF'
|
||||||
text_comment = '#888888FF'
|
on_surface = '#2A2A2AFF'
|
||||||
text_disabled = '#CCCCCCFF'
|
on_surface_variant = '#3A3A3AFF'
|
||||||
text_emphasis = '#111318FF'
|
on_warning = '#FAFAF8FF'
|
||||||
text_error = '#D00000FF'
|
success = '#668A51FF'
|
||||||
text_inactive = '#44474FFF'
|
surface = '#E0E0E0FF'
|
||||||
text_line_number = '#888888FF'
|
surface_variant = '#CECECEFF'
|
||||||
text_link = '#3399FFFF'
|
warning = '#B47837FF'
|
||||||
text_main = '#1E1F25FF'
|
|
||||||
text_selected = '#D6D6D6FF'
|
|
||||||
text_selection_inactive = '#888888FF'
|
|
||||||
text_string = '#008833FF'
|
|
||||||
text_success = '#008833FF'
|
|
||||||
text_warning = '#FF9900FF'
|
|
||||||
warning = '#FF9900FF'
|
|
||||||
warning_emphasis = '#FFCC80FF'
|
|
||||||
|
|
||||||
[general]
|
[general]
|
||||||
name = 'light'
|
name = 'light'
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
[colors]
|
|
||||||
accent = '#286983FF'
|
|
||||||
background = '#FAF4EDFF'
|
|
||||||
border_emphasized = '#907AA9FF'
|
|
||||||
border_focused = '#286983FF'
|
|
||||||
border_window = '#CECACDFF'
|
|
||||||
cursor = '#575279FF'
|
|
||||||
editor_background = '#FAF4EDFF'
|
|
||||||
error = '#B4637AFF'
|
|
||||||
floating_window_background = '#F2E9E1FF'
|
|
||||||
foreground = '#575279FF'
|
|
||||||
foreground_emphasis = '#111318FF'
|
|
||||||
foreground_secondary = '#797593FF'
|
|
||||||
info = '#907AA9FF'
|
|
||||||
menu_option_background = '#F2E9E1FF'
|
|
||||||
outline = '#9893A5FF'
|
|
||||||
popup_background = '#FFFAF3FF'
|
|
||||||
shadow = '#00000020'
|
|
||||||
sidebar_background = '#FFFAF3FF'
|
|
||||||
success = '#286983FF'
|
|
||||||
surface = '#FFFAF3FF'
|
|
||||||
surface_variant = '#F2E9E1FF'
|
|
||||||
syntax_error = '#B4637AFF'
|
|
||||||
syntax_function = '#907AA9FF'
|
|
||||||
syntax_keyword = '#D7827EFF'
|
|
||||||
syntax_operator = '#797593FF'
|
|
||||||
syntax_special_keyword = '#EA9D34FF'
|
|
||||||
term_black = '#FAF4EDFF'
|
|
||||||
term_black_bright = '#DFDAD9FF'
|
|
||||||
term_blue = '#907AA9FF'
|
|
||||||
term_blue_bright = '#66B2FFFF'
|
|
||||||
term_cyan = '#56949FFF'
|
|
||||||
term_cyan_bright = '#99DDFFFF'
|
|
||||||
term_green = '#286983FF'
|
|
||||||
term_green_bright = '#33CC66FF'
|
|
||||||
term_magenta = '#D7827EFF'
|
|
||||||
term_magenta_bright = '#CC99CCFF'
|
|
||||||
term_red = '#B4637AFF'
|
|
||||||
term_red_bright = '#FF6666FF'
|
|
||||||
term_white = '#575279FF'
|
|
||||||
term_white_bright = '#111318FF'
|
|
||||||
term_yellow = '#EA9D34FF'
|
|
||||||
term_yellow_bright = '#FFCC80FF'
|
|
||||||
terminal_gray = '#CCCCCCFF'
|
|
||||||
text_command = '#286983FF'
|
|
||||||
text_comment = '#9893A5FF'
|
|
||||||
text_disabled = '#9893A5FF'
|
|
||||||
text_emphasis = '#111318FF'
|
|
||||||
text_error = '#B4637AFF'
|
|
||||||
text_inactive = '#797593FF'
|
|
||||||
text_line_number = '#9893A5FF'
|
|
||||||
text_link = '#907AA9FF'
|
|
||||||
text_main = '#575279FF'
|
|
||||||
text_selected = '#DFDAD979'
|
|
||||||
text_selection_inactive = '#79759338'
|
|
||||||
text_string = '#286983FF'
|
|
||||||
text_success = '#286983FF'
|
|
||||||
text_warning = '#EA9D34FF'
|
|
||||||
warning = '#EA9D34FF'
|
|
||||||
warning_emphasis = '#FFD580FF'
|
|
||||||
|
|
||||||
[general]
|
|
||||||
name = 'rose-pine-dawn'
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
[general]
|
|
||||||
name = "rose-pine-moon"
|
|
||||||
|
|
||||||
[colors]
|
|
||||||
accent = "#3e8fb0FF"
|
|
||||||
background = "#232136FF"
|
|
||||||
border_emphasized = "#c4a7e7FF"
|
|
||||||
border_focused = "#3e8fb0FF"
|
|
||||||
border_window = "#56526eFF"
|
|
||||||
cursor = "#e0def4FF"
|
|
||||||
editor_background = "#232136FF"
|
|
||||||
error = "#eb6f92FF"
|
|
||||||
floating_window_background = "#393552FF"
|
|
||||||
foreground = "#e0def4FF"
|
|
||||||
foreground_emphasis = "#ffffffFF"
|
|
||||||
foreground_secondary = "#908caaFF"
|
|
||||||
info = "#c4a7e7FF"
|
|
||||||
menu_option_background = "#393552FF"
|
|
||||||
outline = "#6e6a86FF"
|
|
||||||
popup_background = "#2a273fff"
|
|
||||||
shadow = "#00000080"
|
|
||||||
sidebar_background = "#2a273fff"
|
|
||||||
success = "#3e8fb0FF"
|
|
||||||
surface = "#2a273fff"
|
|
||||||
surface_variant = "#393552FF"
|
|
||||||
syntax_error = "#eb6f92FF"
|
|
||||||
syntax_function = "#c4a7e7FF"
|
|
||||||
syntax_keyword = "#ea9a97FF"
|
|
||||||
syntax_operator = "#908caaFF"
|
|
||||||
syntax_special_keyword = "#f6c177FF"
|
|
||||||
term_black = "#232136FF"
|
|
||||||
term_black_bright = "#44415aFF"
|
|
||||||
term_blue = "#c4a7e7FF"
|
|
||||||
term_blue_bright = "#66b2ffff"
|
|
||||||
term_cyan = "#9ccfd8FF"
|
|
||||||
term_cyan_bright = "#bfefffff"
|
|
||||||
term_green = "#3e8fb0FF"
|
|
||||||
term_green_bright = "#00cc6aff"
|
|
||||||
term_magenta = "#ea9a97FF"
|
|
||||||
term_magenta_bright = "#f0d6f0FF"
|
|
||||||
term_red = "#eb6f92FF"
|
|
||||||
term_red_bright = "#ffb780FF"
|
|
||||||
term_white = "#e0def4FF"
|
|
||||||
term_white_bright = "#ffffffFF"
|
|
||||||
term_yellow = "#f6c177FF"
|
|
||||||
term_yellow_bright = "#ffd580FF"
|
|
||||||
terminal_gray = "#33353AFF"
|
|
||||||
text_command = "#3e8fb0FF"
|
|
||||||
text_comment = "#6e6a86FF"
|
|
||||||
text_disabled = "#6e6a86FF"
|
|
||||||
text_emphasis = "#ffffffFF"
|
|
||||||
text_error = "#eb6f92FF"
|
|
||||||
text_inactive = "#908caaFF"
|
|
||||||
text_line_number = "#6e6a86FF"
|
|
||||||
text_link = "#c4a7e7FF"
|
|
||||||
text_main = "#e0def4FF"
|
|
||||||
text_selected = "#56526e1A"
|
|
||||||
text_selection_inactive = "#908caa38"
|
|
||||||
text_string = "#3e8fb0FF"
|
|
||||||
text_success = "#3e8fb0FF"
|
|
||||||
text_warning = "#f6c177FF"
|
|
||||||
warning = "#f6c177FF"
|
|
||||||
warning_emphasis = "#ffd580FF"
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
[colors]
|
|
||||||
accent = '#31748FFF'
|
|
||||||
background = '#191724FF'
|
|
||||||
border_emphasized = '#C4A7E7FF'
|
|
||||||
border_focused = '#31748FFF'
|
|
||||||
border_window = '#524F67FF'
|
|
||||||
cursor = '#E0DEF4FF'
|
|
||||||
editor_background = '#191724FF'
|
|
||||||
error = '#EB6F92FF'
|
|
||||||
floating_window_background = '#26233AFF'
|
|
||||||
foreground = '#E0DEF4FF'
|
|
||||||
foreground_emphasis = '#FFFFFFFF'
|
|
||||||
foreground_secondary = '#908CAAFF'
|
|
||||||
info = '#C4A7E7FF'
|
|
||||||
menu_option_background = '#26233AFF'
|
|
||||||
outline = '#6E6A86FF'
|
|
||||||
popup_background = '#1F1D2EFF'
|
|
||||||
shadow = '#00000080'
|
|
||||||
sidebar_background = '#1F1D2EFF'
|
|
||||||
success = '#31748FFF'
|
|
||||||
surface = '#1F1D2EFF'
|
|
||||||
surface_variant = '#26233AFF'
|
|
||||||
syntax_error = '#EB6F92FF'
|
|
||||||
syntax_function = '#C4A7E7FF'
|
|
||||||
syntax_keyword = '#EBBCBAFF'
|
|
||||||
syntax_operator = '#908CAAFF'
|
|
||||||
syntax_special_keyword = '#F6C177FF'
|
|
||||||
term_black = '#191724FF'
|
|
||||||
term_black_bright = '#403D52FF'
|
|
||||||
term_blue = '#C4A7E7FF'
|
|
||||||
term_blue_bright = '#C4A7E7FF'
|
|
||||||
term_cyan = '#9CCFD8FF'
|
|
||||||
term_cyan_bright = '#9CCFD8FF'
|
|
||||||
term_green = '#31748FFF'
|
|
||||||
term_green_bright = '#31748FFF'
|
|
||||||
term_magenta = '#EBBCBAFF'
|
|
||||||
term_magenta_bright = '#F0D6F0FF'
|
|
||||||
term_red = '#EB6F92FF'
|
|
||||||
term_red_bright = '#EB6F92FF'
|
|
||||||
term_white = '#E0DEF4FF'
|
|
||||||
term_white_bright = '#FFFFFFFF'
|
|
||||||
term_yellow = '#F6C177FF'
|
|
||||||
term_yellow_bright = '#F6C177FF'
|
|
||||||
terminal_gray = '#33353AFF'
|
|
||||||
text_command = '#31748FFF'
|
|
||||||
text_comment = '#6E6A86FF'
|
|
||||||
text_disabled = '#6E6A86FF'
|
|
||||||
text_emphasis = '#FFFFFFFF'
|
|
||||||
text_error = '#EB6F92FF'
|
|
||||||
text_inactive = '#908CAAFF'
|
|
||||||
text_line_number = '#6E6A86FF'
|
|
||||||
text_link = '#C4A7E7FF'
|
|
||||||
text_main = '#E0DEF4FF'
|
|
||||||
text_selected = '#524F671A'
|
|
||||||
text_selection_inactive = '#908CAA38'
|
|
||||||
text_string = '#31748FFF'
|
|
||||||
text_success = '#31748FFF'
|
|
||||||
text_warning = '#F6C177FF'
|
|
||||||
warning = '#F6C177FF'
|
|
||||||
warning_emphasis = '#F6C177FF'
|
|
||||||
|
|
||||||
[general]
|
|
||||||
name = 'rose-pine'
|
|
||||||
@@ -1,36 +1,36 @@
|
|||||||
# BASE COLORS (raw)
|
# BASE COLORS (raw)
|
||||||
color1.raw {term_red}
|
color1.raw {base01}
|
||||||
|
|
||||||
# HEX
|
# HEX
|
||||||
color1.hex {term_red.hex}
|
color1.hex {base01.hex}
|
||||||
color1.hex.stripped {term_red.hex_stripped}
|
color1.hex.stripped {base01.hex_stripped}
|
||||||
|
|
||||||
color1.hexa {term_red.hexa}
|
color1.hexa {base01.hexa}
|
||||||
color1.hexa.stripped {term_red.hexa_stripped}
|
color1.hexa.stripped {base01.hexa_stripped}
|
||||||
|
|
||||||
# RGB (0–255)
|
# RGB (0–255)
|
||||||
color1.rgb {term_red.rgb}
|
color1.rgb {base01.rgb}
|
||||||
color1.r {term_red.r}
|
color1.r {base01.r}
|
||||||
color1.g {term_red.g}
|
color1.g {base01.g}
|
||||||
color1.b {term_red.b}
|
color1.b {base01.b}
|
||||||
|
|
||||||
# RGBA (A = 0–1 normalized)
|
# RGBA (A = 0–1 normalized)
|
||||||
color1.rgba {term_red.rgba}
|
color1.rgba {base01.rgba}
|
||||||
color1.a {term_red.a}
|
color1.a {base01.a}
|
||||||
|
|
||||||
# HSL (normalized 0–1 for s,l, integers for h)
|
# HSL (normalized 0–1 for s,l, integers for h)
|
||||||
color1.hsl {term_red.hsl}
|
color1.hsl {base01.hsl}
|
||||||
color1.h {term_red.h}
|
color1.h {base01.h}
|
||||||
color1.s {term_red.s}
|
color1.s {base01.s}
|
||||||
color1.l {term_red.l}
|
color1.l {base01.l}
|
||||||
|
|
||||||
# HSLA
|
# HSLA
|
||||||
color1.hsla {term_red.hsla}
|
color1.hsla {base01.hsla}
|
||||||
color1.hsla_a {term_red.hsla_a}
|
color1.hsla_a {base01.hsla_a}
|
||||||
|
|
||||||
# Combined custom formats
|
# Combined custom formats
|
||||||
color1.r-g-b {term_red.r}-{term_red.g}-{term_red.b}
|
color1.r-g-b {base01.r}-{base01.g}-{base01.b}
|
||||||
color1.r-g-b-a {term_red.r}-{term_red.g}-{term_red.b}-{term_red.a}
|
color1.r-g-b-a {base01.r}-{base01.g}-{base01.b}-{base01.a}
|
||||||
|
|
||||||
color1.h-s-l {term_red.h}-{term_red.s}-{term_red.l}
|
color1.h-s-l {base01.h}-{base01.s}-{base01.l}
|
||||||
color1.h-s-l-a {term_red.h}-{term_red.s}-{term_red.l}-{term_red.hsla_a}
|
color1.h-s-l-a {base01.h}-{base01.s}-{base01.l}-{base01.hsla_a}
|
||||||
@@ -1,32 +1,32 @@
|
|||||||
cursor {foreground}
|
cursor {cursor}
|
||||||
cursor_text_color {background}
|
cursor_text_color {background}
|
||||||
|
|
||||||
foreground {foreground}
|
foreground {foreground}
|
||||||
background {background}
|
background {background}
|
||||||
selection_foreground {foreground_secondary}
|
selection_foreground {on_surface}
|
||||||
selection_background {surface}
|
selection_background {surface}
|
||||||
url_color {accent}
|
url_color {accent_secondary}
|
||||||
|
|
||||||
color8 {surface_variant}
|
color0 {base00}
|
||||||
color0 {background}
|
color8 {base08}
|
||||||
|
|
||||||
color1 {term_red}
|
color1 {base01}
|
||||||
color9 {term_red_bright}
|
color9 {base09}
|
||||||
|
|
||||||
color2 {term_green}
|
color2 {base02}
|
||||||
color10 {term_green_bright}
|
color10 {base0A}
|
||||||
|
|
||||||
color3 {term_yellow}
|
color3 {base03}
|
||||||
color11 {term_yellow_bright}
|
color11 {base0B}
|
||||||
|
|
||||||
color4 {term_blue}
|
color4 {base04}
|
||||||
color12 {term_blue_bright}
|
color12 {base0C}
|
||||||
|
|
||||||
color5 {term_magenta}
|
color5 {base05}
|
||||||
color13 {term_magenta_bright}
|
color13 {base0D}
|
||||||
|
|
||||||
color6 {term_cyan}
|
color6 {base06}
|
||||||
color14 {term_cyan_bright}
|
color14 {base0E}
|
||||||
|
|
||||||
color15 {term_white_bright}
|
color7 {base07}
|
||||||
color7 {term_white}
|
color15 {base0F}
|
||||||
@@ -3,33 +3,39 @@ vim.cmd("syntax reset")
|
|||||||
vim.g.colors_name = "clrsync"
|
vim.g.colors_name = "clrsync"
|
||||||
|
|
||||||
local palette = {
|
local palette = {
|
||||||
-- TextEditor
|
-- Editor colors
|
||||||
Default = "{text_main.hex}",
|
Default = "{editor_main.hex}",
|
||||||
Keyword = "{syntax_keyword.hex}",
|
Keyword = "{editor_command.hex}",
|
||||||
Number = "{text_warning.hex}",
|
Number = "{editor_warning.hex}",
|
||||||
String = "{text_string.hex}",
|
String = "{editor_string.hex}",
|
||||||
CharLiteral = "{text_string.hex}",
|
CharLiteral = "{editor_string.hex}",
|
||||||
Punctuation = "{text_main.hex}",
|
Punctuation = "{editor_main.hex}",
|
||||||
Preprocessor = "{syntax_special_keyword.hex}",
|
Preprocessor = "{editor_emphasis.hex}",
|
||||||
Identifier = "{text_main.hex}",
|
Identifier = "{editor_main.hex}",
|
||||||
KnownIdentifier = "{text_link.hex}",
|
KnownIdentifier = "{editor_link.hex}",
|
||||||
PreprocIdentifier = "{text_link.hex}",
|
PreprocIdentifier = "{editor_link.hex}",
|
||||||
|
|
||||||
Comment = "{text_comment.hex}",
|
Comment = "{editor_comment.hex}",
|
||||||
MultiLineComment = "{text_comment.hex}",
|
MultiLineComment = "{editor_comment.hex}",
|
||||||
|
|
||||||
Background = "{editor_background.hex}",
|
Background = "{editor_background.hex}",
|
||||||
Cursor = "{cursor.hex}",
|
Cursor = "{cursor.hex}",
|
||||||
|
|
||||||
Selection = "{text_selected.hex}",
|
Selection = "{editor_selected.hex}",
|
||||||
ErrorMarker = "{syntax_error.hex}",
|
ErrorMarker = "{editor_error.hex}",
|
||||||
Breakpoint = "{syntax_error.hex}",
|
Breakpoint = "{editor_error.hex}",
|
||||||
|
|
||||||
LineNumber = "{text_line_number.hex}",
|
LineNumber = "{editor_line_number.hex}",
|
||||||
CurrentLineFill = "{surface_variant.hex}",
|
CurrentLineFill = "{surface_variant.hex}",
|
||||||
CurrentLineFillInactive = "{surface.hex}",
|
CurrentLineFillInactive = "{surface.hex}",
|
||||||
|
|
||||||
CurrentLineEdge = "{border_emphasized.hex}",
|
CurrentLineEdge = "{border_focused.hex}",
|
||||||
|
|
||||||
|
-- Semantic colors
|
||||||
|
Success = "{success.hex}",
|
||||||
|
Warning = "{warning.hex}",
|
||||||
|
Error = "{error.hex}",
|
||||||
|
Info = "{info.hex}",
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Helper function to set highlights in Neovim
|
-- Helper function to set highlights in Neovim
|
||||||
@@ -59,7 +65,7 @@ set_hl("Type", { fg = palette.Keyword })
|
|||||||
set_hl("Special", { fg = palette.PreprocIdentifier })
|
set_hl("Special", { fg = palette.PreprocIdentifier })
|
||||||
set_hl("Underlined", { fg = palette.KnownIdentifier })
|
set_hl("Underlined", { fg = palette.KnownIdentifier })
|
||||||
set_hl("Error", { fg = palette.ErrorMarker, bg = palette.Background })
|
set_hl("Error", { fg = palette.ErrorMarker, bg = palette.Background })
|
||||||
set_hl("Todo", { fg = palette.Text, bg = palette.Keyword })
|
set_hl("Todo", { fg = palette.Default, bg = palette.Keyword })
|
||||||
|
|
||||||
-- Floating windows
|
-- Floating windows
|
||||||
set_hl("NormalFloat", { bg = palette.Background })
|
set_hl("NormalFloat", { bg = palette.Background })
|
||||||
@@ -70,12 +76,12 @@ set_hl("Pmenu", { bg = palette.Background })
|
|||||||
set_hl("PmenuSel", { bg = palette.Keyword, fg = palette.Background })
|
set_hl("PmenuSel", { bg = palette.Keyword, fg = palette.Background })
|
||||||
|
|
||||||
-- Git and diagnostic highlights
|
-- Git and diagnostic highlights
|
||||||
set_hl("DiffAdd", { fg = palette.Success or palette.Default, bg = palette.Background })
|
set_hl("DiffAdd", { fg = palette.Success, bg = palette.Background })
|
||||||
set_hl("DiffChange", { fg = palette.Keyword, bg = palette.Background })
|
set_hl("DiffChange", { fg = palette.Keyword, bg = palette.Background })
|
||||||
set_hl("DiffDelete", { fg = palette.ErrorMarker, bg = palette.Background })
|
set_hl("DiffDelete", { fg = palette.ErrorMarker, bg = palette.Background })
|
||||||
set_hl("DiagnosticError", { fg = palette.ErrorMarker })
|
set_hl("DiagnosticError", { fg = palette.Error })
|
||||||
set_hl("DiagnosticWarn", { fg = palette.Number })
|
set_hl("DiagnosticWarn", { fg = palette.Warning })
|
||||||
set_hl("DiagnosticInfo", { fg = palette.Keyword })
|
set_hl("DiagnosticInfo", { fg = palette.Info })
|
||||||
set_hl("DiagnosticHint", { fg = palette.PreprocIdentifier })
|
set_hl("DiagnosticHint", { fg = palette.PreprocIdentifier })
|
||||||
|
|
||||||
-- Treesitter links
|
-- Treesitter links
|
||||||
@@ -84,4 +90,4 @@ set_hl("@string", { fg = palette.String })
|
|||||||
set_hl("@function", { fg = palette.Keyword })
|
set_hl("@function", { fg = palette.Keyword })
|
||||||
set_hl("@variable", { fg = palette.Identifier })
|
set_hl("@variable", { fg = palette.Identifier })
|
||||||
set_hl("@keyword", { fg = palette.Keyword })
|
set_hl("@keyword", { fg = palette.Keyword })
|
||||||
set_hl("@type", { fg = palette.Preprocessor })
|
set_hl("@type", { fg = palette.Preprocessor })
|
||||||
52
extra/README.md
Normal file
52
extra/README.md
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
# Extras
|
||||||
|
|
||||||
|
Pre-configured palettes and templates for clrsync.
|
||||||
|
|
||||||
|
## Palettes
|
||||||
|
|
||||||
|
| Palette | Preview |
|
||||||
|
|---------|---------|
|
||||||
|
| [Nord](palettes/dark/nord) |  |
|
||||||
|
| [Cursed](palettes/dark/cursed) |  |
|
||||||
|
| [Cursed Light](palettes/light/cursed-light) |  |
|
||||||
|
|
||||||
|
## Templates
|
||||||
|
|
||||||
|
### Terminals
|
||||||
|
- [Alacritty](templates/terminals/alacritty)
|
||||||
|
- [Ghostty](templates/terminals/ghostty)
|
||||||
|
- [Kitty](templates/terminals/kitty)
|
||||||
|
|
||||||
|
### Text Editors
|
||||||
|
- [Neovim](templates/text-editors/neovim)
|
||||||
|
- [VS Code](templates/text-editors/vscode)
|
||||||
|
|
||||||
|
### Browsers
|
||||||
|
- [Firefox](templates/browsers/firefox)
|
||||||
|
|
||||||
|
### Desktop
|
||||||
|
- [GTK](templates/desktop/gtk)
|
||||||
|
- [Qt](templates/desktop/qt)
|
||||||
|
|
||||||
|
### Window Managers
|
||||||
|
- [Hyprland](templates/wms/hyprland)
|
||||||
|
|
||||||
|
### Apps
|
||||||
|
- [Telegram](templates/apps/telegram)
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
To add a new palette:
|
||||||
|
|
||||||
|
1. Create a folder in `palettes/<dark/light>` with your palette name
|
||||||
|
2. Add your `.toml` palette file
|
||||||
|
3. Add a `readme.md` with description
|
||||||
|
4. Add a screenshot (`.png`)
|
||||||
|
5. Submit a PR
|
||||||
|
|
||||||
|
To add a new template:
|
||||||
|
|
||||||
|
1. Create a folder in `templates/<category>` with the app name
|
||||||
|
2. Add your template file(s)
|
||||||
|
3. Add a `readme.md` with installation instructions
|
||||||
|
4. Submit a PR
|
||||||
BIN
extra/palettes/dark/cursed/cursed.png
Normal file
BIN
extra/palettes/dark/cursed/cursed.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 235 KiB |
55
extra/palettes/dark/cursed/cursed.toml
Normal file
55
extra/palettes/dark/cursed/cursed.toml
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
[colors]
|
||||||
|
accent = '#95A328FF'
|
||||||
|
accent_secondary = '#95A328FF'
|
||||||
|
background = '#151515FF'
|
||||||
|
base00 = '#151515FF'
|
||||||
|
base01 = '#B44242FF'
|
||||||
|
base02 = '#95A328FF'
|
||||||
|
base03 = '#E1C135FF'
|
||||||
|
base04 = '#60928FFF'
|
||||||
|
base05 = '#7C435AFF'
|
||||||
|
base06 = '#A48B4AFF'
|
||||||
|
base07 = '#C2C2B0FF'
|
||||||
|
base08 = '#3F3639FF'
|
||||||
|
base09 = '#DC7671FF'
|
||||||
|
base0A = '#E8E85AFF'
|
||||||
|
base0B = '#9E9052FF'
|
||||||
|
base0C = '#76C39BFF'
|
||||||
|
base0D = '#86596CFF'
|
||||||
|
base0E = '#CEB34FFF'
|
||||||
|
base0F = '#B0AFA8FF'
|
||||||
|
border = '#3F3639FF'
|
||||||
|
border_focused = '#E1C135FF'
|
||||||
|
cursor = '#E1C135FF'
|
||||||
|
editor_background = '#151515FF'
|
||||||
|
editor_command = '#CEB34FFF'
|
||||||
|
editor_comment = '#7A7A7AFF'
|
||||||
|
editor_disabled = '#3F3639FF'
|
||||||
|
editor_emphasis = '#DC7671FF'
|
||||||
|
editor_error = '#B44242FF'
|
||||||
|
editor_inactive = '#3F3639FF'
|
||||||
|
editor_line_number = '#86596CFF'
|
||||||
|
editor_link = '#60928FFF'
|
||||||
|
editor_main = '#C2C2B0FF'
|
||||||
|
editor_selected = '#3F3639FF'
|
||||||
|
editor_selection_inactive = '#2A2A2AFF'
|
||||||
|
editor_string = '#76C39BFF'
|
||||||
|
editor_success = '#95A328FF'
|
||||||
|
editor_warning = '#E1C135FF'
|
||||||
|
error = '#B44242FF'
|
||||||
|
foreground = '#C2C2B0FF'
|
||||||
|
info = '#60928FFF'
|
||||||
|
on_background = '#C2C2B0FF'
|
||||||
|
on_error = '#151515FF'
|
||||||
|
on_info = '#151515FF'
|
||||||
|
on_success = '#151515FF'
|
||||||
|
on_surface = '#C2C2B0FF'
|
||||||
|
on_surface_variant = '#CCCCCCFF'
|
||||||
|
on_warning = '#151515FF'
|
||||||
|
success = '#95A328FF'
|
||||||
|
surface = '#1C1C1CFF'
|
||||||
|
surface_variant = '#1C1C1CFF'
|
||||||
|
warning = '#E1C135FF'
|
||||||
|
|
||||||
|
[general]
|
||||||
|
name = 'cursed'
|
||||||
7
extra/palettes/dark/cursed/readme.md
Normal file
7
extra/palettes/dark/cursed/readme.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# Cursed
|
||||||
|
|
||||||
|
A dark color scheme inspired by the `cursed` theme by [pyratebeard](https://pyratebeard.net).
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
[Download](cursed.toml)
|
||||||
BIN
extra/palettes/dark/nord/nord.png
Normal file
BIN
extra/palettes/dark/nord/nord.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 243 KiB |
55
extra/palettes/dark/nord/nord.toml
Normal file
55
extra/palettes/dark/nord/nord.toml
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
[colors]
|
||||||
|
accent = '#A1CDFAFF'
|
||||||
|
accent_secondary = '#A1CDFAFF'
|
||||||
|
background = '#2E3440FF'
|
||||||
|
base00 = '#2E3440FF'
|
||||||
|
base01 = '#BF616AFF'
|
||||||
|
base02 = '#A3BE8CFF'
|
||||||
|
base03 = '#EBCB8BFF'
|
||||||
|
base04 = '#81A1C1FF'
|
||||||
|
base05 = '#B48EADFF'
|
||||||
|
base06 = '#88C0D0FF'
|
||||||
|
base07 = '#E5E9F0FF'
|
||||||
|
base08 = '#4C566AFF'
|
||||||
|
base09 = '#D08770FF'
|
||||||
|
base0A = '#EBCB8BFF'
|
||||||
|
base0B = '#A3BE8CFF'
|
||||||
|
base0C = '#8FBCBBFF'
|
||||||
|
base0D = '#5E81ACFF'
|
||||||
|
base0E = '#B48EADFF'
|
||||||
|
base0F = '#ECEFF4FF'
|
||||||
|
border = '#4C566AFF'
|
||||||
|
border_focused = '#88C0D0FF'
|
||||||
|
cursor = '#D8DEE9FF'
|
||||||
|
editor_background = '#2E3440FF'
|
||||||
|
editor_command = '#81A1C1FF'
|
||||||
|
editor_comment = '#616E88FF'
|
||||||
|
editor_disabled = '#4C566AFF'
|
||||||
|
editor_emphasis = '#B48EADFF'
|
||||||
|
editor_error = '#BF616AFF'
|
||||||
|
editor_inactive = '#616E88FF'
|
||||||
|
editor_line_number = '#4C566AFF'
|
||||||
|
editor_link = '#88C0D0FF'
|
||||||
|
editor_main = '#D8DEE9FF'
|
||||||
|
editor_selected = '#434C5EFF'
|
||||||
|
editor_selection_inactive = '#3B4252FF'
|
||||||
|
editor_string = '#A3BE8CFF'
|
||||||
|
editor_success = '#A3BE8CFF'
|
||||||
|
editor_warning = '#EBCB8BFF'
|
||||||
|
error = '#BF616AFF'
|
||||||
|
foreground = '#D8DEE9FF'
|
||||||
|
info = '#5E81ACFF'
|
||||||
|
on_background = '#D8DEE9FF'
|
||||||
|
on_error = '#2E3440FF'
|
||||||
|
on_info = '#2E3440FF'
|
||||||
|
on_success = '#2E3440FF'
|
||||||
|
on_surface = '#ECEFF4FF'
|
||||||
|
on_surface_variant = '#ECEFF4FF'
|
||||||
|
on_warning = '#2E3440FF'
|
||||||
|
success = '#A3BE8CFF'
|
||||||
|
surface = '#3B4252FF'
|
||||||
|
surface_variant = '#434C5EFF'
|
||||||
|
warning = '#EBCB8BFF'
|
||||||
|
|
||||||
|
[general]
|
||||||
|
name = 'nord'
|
||||||
7
extra/palettes/dark/nord/readme.md
Normal file
7
extra/palettes/dark/nord/readme.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# Nord
|
||||||
|
|
||||||
|
A color scheme based on the [Nord](https://www.nordtheme.com/) palette.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
[Download](nord.toml)
|
||||||
BIN
extra/palettes/light/cursed-light/cursed-light.png
Normal file
BIN
extra/palettes/light/cursed-light/cursed-light.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 243 KiB |
55
extra/palettes/light/cursed-light/cursed-light.toml
Normal file
55
extra/palettes/light/cursed-light/cursed-light.toml
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
[colors]
|
||||||
|
accent = '#95A328FF'
|
||||||
|
accent_secondary = '#95A328FF'
|
||||||
|
background = '#F5F5F5FF'
|
||||||
|
base00 = '#F5F5F5FF'
|
||||||
|
base01 = '#B44242FF'
|
||||||
|
base02 = '#95A328FF'
|
||||||
|
base03 = '#C9A305FF'
|
||||||
|
base04 = '#60928FFF'
|
||||||
|
base05 = '#7C435AFF'
|
||||||
|
base06 = '#A48B4AFF'
|
||||||
|
base07 = '#3D3D2FFF'
|
||||||
|
base08 = '#C0C0B8FF'
|
||||||
|
base09 = '#DC7671FF'
|
||||||
|
base0A = '#D4D430FF'
|
||||||
|
base0B = '#9E9052FF'
|
||||||
|
base0C = '#76C39BFF'
|
||||||
|
base0D = '#86596CFF'
|
||||||
|
base0E = '#B89A1FFF'
|
||||||
|
base0F = '#4F4F48FF'
|
||||||
|
border = '#D0D0C8FF'
|
||||||
|
border_focused = '#C9A305FF'
|
||||||
|
cursor = '#C9A305FF'
|
||||||
|
editor_background = '#F5F5F5FF'
|
||||||
|
editor_command = '#B89A1FFF'
|
||||||
|
editor_comment = '#A0A098FF'
|
||||||
|
editor_disabled = '#C0C0B8FF'
|
||||||
|
editor_emphasis = '#DC7671FF'
|
||||||
|
editor_error = '#B44242FF'
|
||||||
|
editor_inactive = '#A0A098FF'
|
||||||
|
editor_line_number = '#86596CFF'
|
||||||
|
editor_link = '#60928FFF'
|
||||||
|
editor_main = '#3D3D2FFF'
|
||||||
|
editor_selected = '#D0D0C8FF'
|
||||||
|
editor_selection_inactive = '#E0E0D8FF'
|
||||||
|
editor_string = '#5FA37BFF'
|
||||||
|
editor_success = '#95A328FF'
|
||||||
|
editor_warning = '#C9A305FF'
|
||||||
|
error = '#B44242FF'
|
||||||
|
foreground = '#3D3D2FFF'
|
||||||
|
info = '#60928FFF'
|
||||||
|
on_background = '#3D3D2FFF'
|
||||||
|
on_error = '#F5F5F5FF'
|
||||||
|
on_info = '#F5F5F5FF'
|
||||||
|
on_success = '#F5F5F5FF'
|
||||||
|
on_surface = '#3D3D2FFF'
|
||||||
|
on_surface_variant = '#CCCCCCFF'
|
||||||
|
on_warning = '#F5F5F5FF'
|
||||||
|
success = '#95A328FF'
|
||||||
|
surface = '#E8E8E8FF'
|
||||||
|
surface_variant = '#D0D0C8FF'
|
||||||
|
warning = '#C9A305FF'
|
||||||
|
|
||||||
|
[general]
|
||||||
|
name = 'cursed-light'
|
||||||
7
extra/palettes/light/cursed-light/readme.md
Normal file
7
extra/palettes/light/cursed-light/readme.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# Cursed Light
|
||||||
|
|
||||||
|
A light variant of the `cursed` color scheme.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
[Download](cursed-light.toml)
|
||||||
17
extra/templates/apps/telegram/readme.md
Normal file
17
extra/templates/apps/telegram/readme.md
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# Telegram
|
||||||
|
|
||||||
|
1. Download the [template file](telegram.tdesktop-theme)
|
||||||
|
|
||||||
|
2. Configure the template in `~/.config/clrsync/config.toml`:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[templates.telegram]
|
||||||
|
enabled = true
|
||||||
|
input_path = '~/.config/clrsync/templates/telegram.tdesktop-theme'
|
||||||
|
output_path = '~/clrsync.tdesktop-theme'
|
||||||
|
reload_cmd = ''
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Apply the palette with clrsync and send the generated `clrsync.tdesktop-theme` file to yourself in Telegram
|
||||||
|
|
||||||
|
4. Click on the theme file in the Telegram dialog to apply it
|
||||||
213
extra/templates/apps/telegram/telegram.tdesktop-theme
Normal file
213
extra/templates/apps/telegram/telegram.tdesktop-theme
Normal file
@@ -0,0 +1,213 @@
|
|||||||
|
// Template mostly stolen from noctalia-shell
|
||||||
|
// https://github.com/noctalia-dev/noctalia-shell/blob/main/Assets/MatugenTemplates/telegram.tdesktop-theme
|
||||||
|
|
||||||
|
COLOR_GRAY: {border};
|
||||||
|
COLOR_DARK: {surface_variant};
|
||||||
|
|
||||||
|
windowBg: {background}; // Main background
|
||||||
|
windowFg: {on_background}; // Main text
|
||||||
|
windowBgOver: {surface_variant}; // Generic background on hover
|
||||||
|
windowBgRipple: {surface_variant}; // Ripple effect
|
||||||
|
windowFgOver: {on_surface_variant}; // Text on hover
|
||||||
|
windowSubTextFg: {foreground}60; // Minor text
|
||||||
|
windowSubTextFgOver: {foreground}80; // Minor text on hover
|
||||||
|
|
||||||
|
dialogsBg: {background}; // Sidebar background
|
||||||
|
dialogsBgActive: {surface}; // Active chat background
|
||||||
|
dialogsBgOver: {surface_variant}; // Hover background
|
||||||
|
dialogsRippleBg: {surface_variant}; // Ripple effect
|
||||||
|
dialogsRippleBgActive: {surface_variant}; // Ripple effect for active chat
|
||||||
|
|
||||||
|
dialogsNameFg: {foreground}; // Chat name
|
||||||
|
dialogsNameFgActive: {foreground}; // Chat name for active chat
|
||||||
|
dialogsNameFgOver: {foreground}; // Chat name on hover
|
||||||
|
|
||||||
|
dialogsTextFg: {foreground}; // Message preview
|
||||||
|
dialogsTextFgActive: {foreground}; // Message preview for active chat
|
||||||
|
dialogsTextFgOver: {foreground}; // Message preview on hover
|
||||||
|
|
||||||
|
dialogsTextFgService: {foreground}; // Service text (group sender name)
|
||||||
|
dialogsTextFgServiceActive: {foreground}; // Service text for active chat
|
||||||
|
dialogsTextFgServiceOver: {foreground}; // Service text on hover
|
||||||
|
|
||||||
|
dialogsDateFg: {foreground}60; // Date text
|
||||||
|
dialogsDateFgActive: {foreground}60; // Date text for active chat
|
||||||
|
dialogsDateFgOver: {foreground}60; // Date text on hover
|
||||||
|
|
||||||
|
dialogsDraftFg: {foreground}; // Draft label
|
||||||
|
dialogsDraftFgActive: {foreground}; // Draft label for active chat
|
||||||
|
dialogsDraftFgOver: {foreground}; // Draft label on hover
|
||||||
|
|
||||||
|
dialogsVerifiedIconBg: {accent}; // Verified badge background
|
||||||
|
dialogsVerifiedIconBgActive: {accent_secondary}; // Verified badge for active chat
|
||||||
|
dialogsVerifiedIconBgOver: {accent}; // Verified badge on hover
|
||||||
|
dialogsVerifiedIconFg: {background}; // Verified icon
|
||||||
|
dialogsVerifiedIconFgActive: {background}; // Verified icon for active chat
|
||||||
|
dialogsVerifiedIconFgOver: {background}; // Verified icon on hover
|
||||||
|
|
||||||
|
dialogsSendingIconFg: {foreground}; // Sending icon (clock)
|
||||||
|
dialogsSendingIconFgActive: {foreground}; // Sending icon for active chat
|
||||||
|
dialogsSendingIconFgOver: {foreground}; // Sending icon on hover
|
||||||
|
|
||||||
|
dialogsSentIconFg: {accent}; // Sent icon (tick)
|
||||||
|
dialogsSentIconFgActive: {accent_secondary}; // Sent icon for active chat
|
||||||
|
dialogsSentIconFgOver: {accent}; // Sent icon on hover
|
||||||
|
|
||||||
|
dialogsUnreadBg: {accent}; // Unread badge background
|
||||||
|
dialogsUnreadBgActive: {accent_secondary}; // Unread badge for active chat
|
||||||
|
dialogsUnreadBgOver: {accent}; // Unread badge on hover
|
||||||
|
dialogsUnreadBgMuted: {foreground}; // Muted unread badge
|
||||||
|
dialogsUnreadBgMutedActive: {foreground}; // Muted unread badge for active chat
|
||||||
|
dialogsUnreadBgMutedOver: {foreground}; // Muted unread badge on hover
|
||||||
|
dialogsUnreadFg: {background}; // Unread badge text
|
||||||
|
dialogsUnreadFgActive: {background}; // Unread badge text for active chat
|
||||||
|
dialogsUnreadFgOver: {background}; // Unread badge text on hover
|
||||||
|
|
||||||
|
dialogsChatIconFg: {foreground}; // Group/channel icon
|
||||||
|
dialogsChatIconFgActive: {foreground}; // Group/channel icon for active chat
|
||||||
|
dialogsChatIconFgOver: {foreground}; // Group/channel icon on hover
|
||||||
|
|
||||||
|
dialogsOnlineBadgeFg: {foreground}; // Online status
|
||||||
|
dialogsOnlineBadgeFgActive: {foreground}; // Online status for active chat
|
||||||
|
|
||||||
|
dialogsForwardBg: {surface}; // Forwarding panel background
|
||||||
|
dialogsForwardFg: {foreground}; // Forwarding panel text
|
||||||
|
|
||||||
|
dialogsMenuIconFg: {foreground}; // Main menu icon
|
||||||
|
dialogsMenuIconFgOver: {foreground}60; // Main menu icon on hover
|
||||||
|
windowBoldFg: {on_background}; // Bold text
|
||||||
|
windowBoldFgOver: {on_surface_variant}; // Bold text on hover
|
||||||
|
windowBgActive: {surface}; // Active items background
|
||||||
|
windowFgActive: {foreground}; // Active items text
|
||||||
|
windowActiveTextFg: {accent_secondary}; // Active items text
|
||||||
|
windowShadowFg: {border}; // Window shadow
|
||||||
|
windowShadowFgFallback: {border}; // Fallback for shadow
|
||||||
|
historyOutIconFg: {accent};
|
||||||
|
historyIconFgInverted: {on_surface};
|
||||||
|
|
||||||
|
msgServiceBg: {surface}80;
|
||||||
|
msgServiceFg: {foreground};
|
||||||
|
msgOutBg: {surface};
|
||||||
|
msgOutBgSelected: {surface_variant};
|
||||||
|
msgOutServiceFg: {on_surface};
|
||||||
|
msgOutDateFg: {foreground}80;
|
||||||
|
historySentIconFg: {foreground};
|
||||||
|
msgOutDateFgSelected: {foreground};
|
||||||
|
msgInBg: {surface_variant};
|
||||||
|
msgInBgSelected: {surface};
|
||||||
|
msgDateImgFg: {on_surface};
|
||||||
|
|
||||||
|
|
||||||
|
shadowFg: {border}; // General shadow
|
||||||
|
slideFadeOutBg: {background};
|
||||||
|
slideFadeOutShadowFg: {border};
|
||||||
|
|
||||||
|
imageBg: {surface};
|
||||||
|
imageBgTransparent: {surface};
|
||||||
|
|
||||||
|
activeButtonBg: {accent_secondary}; // Active button background
|
||||||
|
activeButtonBgOver: {surface_variant}; // Active button hover background
|
||||||
|
activeButtonBgRipple: {on_surface_variant}; // Active button ripple
|
||||||
|
activeButtonFg: {on_background}; // Active button text
|
||||||
|
activeButtonFgOver: {on_surface_variant}; // Active button hover text
|
||||||
|
activeButtonSecondaryFg: {on_background}; // Active button secondary text
|
||||||
|
activeButtonSecondaryFgOver: {on_surface_variant}; // Active button secondary hover text
|
||||||
|
activeLineFg: {accent};
|
||||||
|
dialogsBgActive: {surface};
|
||||||
|
|
||||||
|
lightButtonBg: {surface}; // Light button background
|
||||||
|
lightButtonBgOver: {surface_variant}; // Light button hover background
|
||||||
|
lightButtonBgRipple: {accent}; // Light button ripple
|
||||||
|
lightButtonFg: {on_surface}; // Light button text
|
||||||
|
lightButtonFgOver: {on_surface_variant}; // Light button hover text
|
||||||
|
|
||||||
|
attentionButtonFg: {error};
|
||||||
|
attentionButtonFgOver: {error};
|
||||||
|
attentionButtonBgOver: {surface_variant};
|
||||||
|
attentionButtonBgRipple: {on_surface};
|
||||||
|
|
||||||
|
outlineButtonBg: {surface}; // Outline button background
|
||||||
|
outlineButtonBgOver: {surface_variant}; // Outline button hover background
|
||||||
|
outlineButtonOutlineFg: {accent_secondary}; // Outline button color
|
||||||
|
outlineButtonBgRipple: {accent_secondary}; // Outline button ripple
|
||||||
|
|
||||||
|
menuBg: {surface};
|
||||||
|
menuBgOver: {surface_variant};
|
||||||
|
menuBgRipple: {accent_secondary};
|
||||||
|
menuIconFg: {on_surface};
|
||||||
|
menuIconFgOver: {on_surface_variant};
|
||||||
|
menuSubmenuArrowFg: {border};
|
||||||
|
menuFgDisabled: {border};
|
||||||
|
menuSeparatorFg: {border};
|
||||||
|
|
||||||
|
scrollBarBg: {accent}40; // Scroll bar background (40% opacity)
|
||||||
|
scrollBarBgOver: {accent_secondary}60; // Scroll bar hover background (60% opacity)
|
||||||
|
scrollBg: {surface_variant}40; // Scroll bar track (40% opacity)
|
||||||
|
scrollBgOver: {surface_variant}60; // Scroll bar track on hover (60% opacity)
|
||||||
|
|
||||||
|
smallCloseIconFg: {border};
|
||||||
|
smallCloseIconFgOver: {on_surface_variant};
|
||||||
|
|
||||||
|
radialFg: {accent_secondary};
|
||||||
|
radialBg: {surface};
|
||||||
|
|
||||||
|
placeholderFg: {border}; // Placeholder text
|
||||||
|
placeholderFgActive: {accent_secondary}; // Active placeholder text
|
||||||
|
inputBorderFg: {border}; // Input border
|
||||||
|
filterInputBorderFg: {border}; // Search input border
|
||||||
|
filterInputInactiveBg: {surface}; // Inactive search input background
|
||||||
|
checkboxFg: {accent_secondary}; // Checkbox color
|
||||||
|
|
||||||
|
// Filters sidebar (left side bar with folder filters)
|
||||||
|
sideBarBg: {surface}; // Filters sidebar background
|
||||||
|
sideBarBgActive: {surface_variant}; // Filters sidebar active filter background
|
||||||
|
sideBarBgRipple: {background}; // Filters sidebar ripple effect
|
||||||
|
sideBarTextFg: {foreground}; // Filters sidebar text
|
||||||
|
sideBarTextFgActive: {foreground}; // Filters sidebar active filter text
|
||||||
|
sideBarIconFg: {foreground}; // Filters sidebar icon
|
||||||
|
sideBarIconFgActive: {foreground}; // Filters sidebar active filter icon
|
||||||
|
sideBarBadgeBg: {accent}; // Filters sidebar badge background
|
||||||
|
sideBarBadgeBgMuted: {foreground}60; // Filters sidebar muted badge background
|
||||||
|
|
||||||
|
titleBg: {surface}; // Window title background
|
||||||
|
titleShadow: {border};
|
||||||
|
titleButtonFg: {on_surface}; // Title button color
|
||||||
|
titleButtonBgOver: {surface_variant}; // Title button hover background
|
||||||
|
titleButtonFgOver: {on_surface_variant}; // Title button hover color
|
||||||
|
titleButtonCloseBgOver: {error};
|
||||||
|
titleButtonCloseFgOver: {on_error};
|
||||||
|
titleFgActive: {on_surface}; // Active title text
|
||||||
|
titleFg: {on_surface}; // Inactive title text
|
||||||
|
|
||||||
|
trayCounterBg: {error}; // Tray counter background
|
||||||
|
trayCounterBgMute: {border}; // Muted tray counter background
|
||||||
|
trayCounterFg: {on_error}; // Tray counter text
|
||||||
|
trayCounterBgMacInvert: {error}; // Mac tray counter
|
||||||
|
trayCounterFgMacInvert: {on_error}; // Mac tray counter text
|
||||||
|
|
||||||
|
layerBg: {surface}99; // Layer background (60% opacity)
|
||||||
|
|
||||||
|
cancelIconFg: {error}; // Cancel icon
|
||||||
|
cancelIconFgOver: {error}; // Cancel icon on hover
|
||||||
|
|
||||||
|
boxBg: {surface}; // Box background
|
||||||
|
boxTextFg: {on_surface}; // Box text
|
||||||
|
boxTextFgGood: {accent_secondary}; // Box good text
|
||||||
|
boxTextFgError: {error}; // Box error text
|
||||||
|
boxTitleFg: {on_surface}; // Box title text
|
||||||
|
boxSearchBg: {surface}; // Box search field background
|
||||||
|
boxSearchCancelIconFg: {error}; // Box search cancel icon
|
||||||
|
boxSearchCancelIconFgOver: {error}; // Box search cancel icon on hover
|
||||||
|
|
||||||
|
contactsBg: {surface}; // Contacts background
|
||||||
|
contactsBgOver: {surface_variant}; // Contacts background on hover
|
||||||
|
contactsNameFg: {on_surface}; // Contact name
|
||||||
|
contactsStatusFg: {border}; // Contact status
|
||||||
|
contactsStatusFgOver: {on_surface_variant}; // Contact status on hover
|
||||||
|
contactsStatusFgOnline: {accent_secondary}; // Online contact status
|
||||||
|
|
||||||
|
photoCropFadeBg: {surface}cc; // Photo crop fade background
|
||||||
|
photoCropPointFg: {accent_secondary}; // Photo crop points
|
||||||
|
|
||||||
|
chat_inBubbleSelected: {surface_variant}; // inbox selected chat background
|
||||||
|
chat_outBubbleSelected: {surface_variant}; // outbox selected chat background
|
||||||
17
extra/templates/browsers/firefox/readme.md
Normal file
17
extra/templates/browsers/firefox/readme.md
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# Firefox
|
||||||
|
|
||||||
|
1. Download the [template file](userChrome.css)
|
||||||
|
|
||||||
|
2. Configure the template in `~/.config/clrsync/config.toml`:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[templates.firefox]
|
||||||
|
enabled = true
|
||||||
|
input_path = '~/.config/clrsync/templates/userChrome.css'
|
||||||
|
output_path = '~/.mozilla/firefox/<profile>/chrome/userChrome.css'
|
||||||
|
reload_cmd = ''
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Enable `toolkit.legacyUserProfileCustomizations.stylesheets` in `about:config`
|
||||||
|
|
||||||
|
4. Restart Firefox to apply the theme
|
||||||
109
extra/templates/browsers/firefox/userChrome.css
Normal file
109
extra/templates/browsers/firefox/userChrome.css
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
/* clrsync Firefox Theme */
|
||||||
|
/* Place in: <Firefox Profile>/chrome/userChrome.css */
|
||||||
|
/* Enable: about:config -> toolkit.legacyUserProfileCustomizations.stylesheets = true */
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--lwt-accent-color: {background} !important;
|
||||||
|
--lwt-text-color: {foreground} !important;
|
||||||
|
|
||||||
|
--toolbar-bgcolor: {surface} !important;
|
||||||
|
--toolbar-color: {on_surface} !important;
|
||||||
|
--toolbarbutton-hover-background: {surface_variant} !important;
|
||||||
|
--toolbarbutton-active-background: {border_focused} !important;
|
||||||
|
--toolbarbutton-icon-fill: {on_surface} !important;
|
||||||
|
|
||||||
|
--tab-selected-bgcolor: {surface} !important;
|
||||||
|
--tab-selected-textcolor: {foreground} !important;
|
||||||
|
--tab-loading-fill: {accent} !important;
|
||||||
|
--lwt-tab-text: {foreground} !important;
|
||||||
|
--tab-line-color: {accent} !important;
|
||||||
|
|
||||||
|
--urlbar-box-bgcolor: {surface_variant} !important;
|
||||||
|
--urlbar-box-text-color: {on_surface} !important;
|
||||||
|
--urlbar-box-hover-bgcolor: {surface} !important;
|
||||||
|
--urlbar-box-focus-bgcolor: {surface} !important;
|
||||||
|
--urlbar-popup-url-color: {editor_link} !important;
|
||||||
|
|
||||||
|
--arrowpanel-background: {surface} !important;
|
||||||
|
--arrowpanel-color: {on_surface} !important;
|
||||||
|
--arrowpanel-border-color: {border} !important;
|
||||||
|
--panel-separator-color: {border} !important;
|
||||||
|
|
||||||
|
--sidebar-background-color: {background} !important;
|
||||||
|
--sidebar-text-color: {foreground} !important;
|
||||||
|
--sidebar-border-color: {border} !important;
|
||||||
|
|
||||||
|
--toolbar-field-focus-background-color: {surface} !important;
|
||||||
|
--toolbar-field-focus-color: {on_surface} !important;
|
||||||
|
--toolbar-field-focus-border-color: {accent} !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#TabsToolbar {
|
||||||
|
background-color: {background} !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-background[selected="true"] {
|
||||||
|
background-color: {surface} !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected="true"]) {
|
||||||
|
background-color: {surface_variant} !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-line {
|
||||||
|
background-color: {accent} !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#nav-bar {
|
||||||
|
background-color: {surface} !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#urlbar-background {
|
||||||
|
background-color: {surface_variant} !important;
|
||||||
|
border-color: {border} !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#urlbar[focused="true"] > #urlbar-background {
|
||||||
|
background-color: {surface} !important;
|
||||||
|
border-color: {accent} !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#urlbar-input {
|
||||||
|
color: {on_surface} !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#PersonalToolbar {
|
||||||
|
background-color: {surface} !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
menupopup, panel {
|
||||||
|
--panel-background: {surface} !important;
|
||||||
|
--panel-color: {on_surface} !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
menupopup {
|
||||||
|
background-color: {surface} !important;
|
||||||
|
color: {on_surface} !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
menuitem:hover, menu:hover {
|
||||||
|
background-color: {surface_variant} !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar-box {
|
||||||
|
background-color: {background} !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar-header {
|
||||||
|
background-color: {surface} !important;
|
||||||
|
border-bottom-color: {border} !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
findbar {
|
||||||
|
background-color: {surface} !important;
|
||||||
|
color: {on_surface} !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
scrollbar-color: {surface_variant} {background} !important;
|
||||||
|
}
|
||||||
18
extra/templates/desktop/gtk/gtk.css
Normal file
18
extra/templates/desktop/gtk/gtk.css
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
@define-color accent_color {accent};
|
||||||
|
@define-color accent_bg_color {accent};
|
||||||
|
@define-color accent_fg_color {on_surface};
|
||||||
|
@define-color window_bg_color {background};
|
||||||
|
@define-color window_fg_color {foreground};
|
||||||
|
@define-color headerbar_bg_color {surface};
|
||||||
|
@define-color headerbar_fg_color {on_surface};
|
||||||
|
@define-color popover_bg_color {surface_variant};
|
||||||
|
@define-color popover_fg_color {on_surface_variant};
|
||||||
|
@define-color view_bg_color {background};
|
||||||
|
@define-color view_fg_color {foreground};
|
||||||
|
@define-color card_bg_color {surface};
|
||||||
|
@define-color card_fg_color {on_surface};
|
||||||
|
|
||||||
|
@define-color sidebar_bg_color {surface_variant};
|
||||||
|
@define-color sidebar_fg_color {on_surface};
|
||||||
|
@define-color sidebar_border_color @window_bg_color;
|
||||||
|
@define-color sidebar_backdrop_color @window_bg_color;
|
||||||
15
extra/templates/desktop/gtk/readme.md
Normal file
15
extra/templates/desktop/gtk/readme.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# GTK
|
||||||
|
|
||||||
|
1. Download the [template file](gtk.css)
|
||||||
|
|
||||||
|
2. Configure the template in `~/.config/clrsync/config.toml`:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[templates.gtk]
|
||||||
|
enabled = true
|
||||||
|
input_path = '~/.config/clrsync/templates/gtk.css'
|
||||||
|
output_path = '~/.config/gtk-3.0/gtk.css'
|
||||||
|
reload_cmd = ''
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Restart GTK applications to apply the theme
|
||||||
571
extra/templates/desktop/qt/kvantum.kvconfig
Normal file
571
extra/templates/desktop/qt/kvantum.kvconfig
Normal file
@@ -0,0 +1,571 @@
|
|||||||
|
[%General]
|
||||||
|
author=Matugen, based on MaterialADW by Vince Liuice
|
||||||
|
comment=A Material You theme generated by Matugen
|
||||||
|
x11drag=none
|
||||||
|
alt_mnemonic=true
|
||||||
|
left_tabs=false
|
||||||
|
attach_active_tab=false
|
||||||
|
mirror_doc_tabs=true
|
||||||
|
group_toolbar_buttons=false
|
||||||
|
toolbar_item_spacing=0
|
||||||
|
toolbar_interior_spacing=2
|
||||||
|
spread_progressbar=true
|
||||||
|
composite=true
|
||||||
|
menu_shadow_depth=6
|
||||||
|
spread_menuitems=false
|
||||||
|
tooltip_shadow_depth=7
|
||||||
|
splitter_width=1
|
||||||
|
scroll_width=9
|
||||||
|
scroll_arrows=false
|
||||||
|
scroll_min_extent=60
|
||||||
|
slider_width=2
|
||||||
|
slider_handle_width=23
|
||||||
|
slider_handle_length=22
|
||||||
|
tickless_slider_handle_size=22
|
||||||
|
center_toolbar_handle=true
|
||||||
|
check_size=24
|
||||||
|
textless_progressbar=false
|
||||||
|
progressbar_thickness=2
|
||||||
|
menubar_mouse_tracking=true
|
||||||
|
toolbutton_style=1
|
||||||
|
double_click=false
|
||||||
|
translucent_windows=false
|
||||||
|
blurring=false
|
||||||
|
popup_blurring=false
|
||||||
|
vertical_spin_indicators=false
|
||||||
|
spin_button_width=24
|
||||||
|
fill_rubberband=false
|
||||||
|
merge_menubar_with_toolbar=true
|
||||||
|
small_icon_size=16
|
||||||
|
large_icon_size=32
|
||||||
|
button_icon_size=16
|
||||||
|
toolbar_icon_size=16
|
||||||
|
combo_as_lineedit=true
|
||||||
|
animate_states=true
|
||||||
|
button_contents_shift=false
|
||||||
|
combo_menu=true
|
||||||
|
hide_combo_checkboxes=true
|
||||||
|
combo_focus_rect=false
|
||||||
|
groupbox_top_label=true
|
||||||
|
inline_spin_indicators=true
|
||||||
|
joined_inactive_tabs=false
|
||||||
|
layout_spacing=3
|
||||||
|
layout_margin=3
|
||||||
|
scrollbar_in_view=true
|
||||||
|
transient_scrollbar=true
|
||||||
|
transient_groove=false
|
||||||
|
submenu_overlap=0
|
||||||
|
tooltip_delay=0
|
||||||
|
tree_branch_line=false
|
||||||
|
no_window_pattern=false
|
||||||
|
opaque=kaffeine,kmplayer,subtitlecomposer,kdenlive,vlc,smplayer,smplayer2,avidemux,avidemux2_qt4,avidemux3_qt4,avidemux3_qt5,kamoso,QtCreator,VirtualBox,VirtualBoxVM,trojita,dragon,digikam,lyx
|
||||||
|
reduce_window_opacity=0
|
||||||
|
respect_DE=true
|
||||||
|
scrollable_menu=false
|
||||||
|
submenu_delay=150
|
||||||
|
no_inactiveness=false
|
||||||
|
reduce_menu_opacity=0
|
||||||
|
click_behavior=2
|
||||||
|
contrast=1.00
|
||||||
|
dialog_button_layout=0
|
||||||
|
intensity=1.00
|
||||||
|
saturation=1.00
|
||||||
|
shadowless_popup=false
|
||||||
|
drag_from_buttons=false
|
||||||
|
menu_blur_radius=0
|
||||||
|
tooltip_blur_radius=0
|
||||||
|
|
||||||
|
[GeneralColors]
|
||||||
|
window.color={surface}
|
||||||
|
base.color={surface}
|
||||||
|
alt.base.color={surface}
|
||||||
|
button.color={surface_variant}
|
||||||
|
light.color={surface}
|
||||||
|
mid.light.color={surface_variant}
|
||||||
|
dark.color={surface_variant}
|
||||||
|
mid.color={surface_variant}
|
||||||
|
highlight.color={accent}
|
||||||
|
inactive.highlight.color={accent}
|
||||||
|
text.color={on_surface}
|
||||||
|
window.text.color={on_surface}
|
||||||
|
button.text.color={on_surface}
|
||||||
|
disabled.text.color={editor_disabled}
|
||||||
|
tooltip.text.color={on_surface}
|
||||||
|
highlight.text.color={on_surface}
|
||||||
|
link.color={base06}
|
||||||
|
link.visited.color={base0D}
|
||||||
|
progress.indicator.text.color={on_surface}
|
||||||
|
|
||||||
|
[Hacks]
|
||||||
|
transparent_ktitle_label=true
|
||||||
|
transparent_dolphin_view=true
|
||||||
|
transparent_pcmanfm_sidepane=true
|
||||||
|
blur_translucent=false
|
||||||
|
transparent_menutitle=true
|
||||||
|
respect_darkness=true
|
||||||
|
kcapacitybar_as_progressbar=true
|
||||||
|
force_size_grip=true
|
||||||
|
iconless_pushbutton=false
|
||||||
|
iconless_menu=false
|
||||||
|
disabled_icon_opacity=100
|
||||||
|
lxqtmainmenu_iconsize=16
|
||||||
|
normal_default_pushbutton=true
|
||||||
|
single_top_toolbar=true
|
||||||
|
tint_on_mouseover=0
|
||||||
|
transparent_pcmanfm_view=true
|
||||||
|
no_selection_tint=true
|
||||||
|
transparent_arrow_button=true
|
||||||
|
middle_click_scroll=false
|
||||||
|
opaque_colors=false
|
||||||
|
kinetic_scrolling=false
|
||||||
|
scroll_jump_workaround=true
|
||||||
|
centered_forms=false
|
||||||
|
noninteger_translucency=false
|
||||||
|
style_vertical_toolbars=false
|
||||||
|
blur_only_active_window=true
|
||||||
|
|
||||||
|
[PanelButtonCommand]
|
||||||
|
frame=true
|
||||||
|
frame.element=button
|
||||||
|
frame.top=6
|
||||||
|
frame.bottom=6
|
||||||
|
frame.left=6
|
||||||
|
frame.right=6
|
||||||
|
interior=true
|
||||||
|
interior.element=button
|
||||||
|
indicator.size=8
|
||||||
|
text.normal.color={on_surface}
|
||||||
|
text.focus.color={on_surface}
|
||||||
|
text.press.color={on_surface}
|
||||||
|
text.toggle.color={on_surface}
|
||||||
|
text.shadow=0
|
||||||
|
text.margin=4
|
||||||
|
text.iconspacing=4
|
||||||
|
indicator.element=arrow
|
||||||
|
frame.expansion=0
|
||||||
|
|
||||||
|
[PanelButtonTool]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
text.normal.color={on_surface}
|
||||||
|
text.focus.color={on_surface}
|
||||||
|
text.press.color={on_surface}
|
||||||
|
text.toggle.color={on_surface}
|
||||||
|
text.bold=false
|
||||||
|
indicator.element=arrow
|
||||||
|
indicator.size=8
|
||||||
|
frame.expansion=0
|
||||||
|
|
||||||
|
[ToolbarButton]
|
||||||
|
frame=true
|
||||||
|
frame.element=tbutton
|
||||||
|
interior.element=tbutton
|
||||||
|
frame.top=16
|
||||||
|
frame.bottom=16
|
||||||
|
frame.left=16
|
||||||
|
frame.right=16
|
||||||
|
indicator.element=tarrow
|
||||||
|
text.normal.color={on_surface}
|
||||||
|
text.focus.color={on_surface}
|
||||||
|
text.press.color={on_surface}
|
||||||
|
text.toggle.color={on_surface}
|
||||||
|
text.bold=false
|
||||||
|
frame.expansion=32
|
||||||
|
|
||||||
|
[Dock]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
interior.element=dock
|
||||||
|
frame.element=dock
|
||||||
|
frame.top=1
|
||||||
|
frame.bottom=1
|
||||||
|
frame.left=1
|
||||||
|
frame.right=1
|
||||||
|
text.normal.color={on_surface}
|
||||||
|
|
||||||
|
[DockTitle]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
frame=false
|
||||||
|
interior=false
|
||||||
|
text.normal.color={on_surface}
|
||||||
|
text.focus.color={on_surface}
|
||||||
|
text.bold=false
|
||||||
|
|
||||||
|
[IndicatorSpinBox]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
frame=true
|
||||||
|
interior=true
|
||||||
|
frame.top=2
|
||||||
|
frame.bottom=2
|
||||||
|
frame.left=2
|
||||||
|
frame.right=2
|
||||||
|
indicator.element=spin
|
||||||
|
indicator.size=8
|
||||||
|
text.normal.color={on_surface}
|
||||||
|
text.margin.top=2
|
||||||
|
text.margin.bottom=2
|
||||||
|
text.margin.left=2
|
||||||
|
text.margin.right=2
|
||||||
|
|
||||||
|
[RadioButton]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
frame=false
|
||||||
|
interior.element=radio
|
||||||
|
text.normal.color={on_surface}
|
||||||
|
text.focus.color={on_surface}
|
||||||
|
min_width=+0.3font
|
||||||
|
min_height=+0.3font
|
||||||
|
|
||||||
|
[CheckBox]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
frame=false
|
||||||
|
interior.element=checkbox
|
||||||
|
text.normal.color={on_surface}
|
||||||
|
text.focus.color={on_surface}
|
||||||
|
min_width=+0.3font
|
||||||
|
min_height=+0.3font
|
||||||
|
|
||||||
|
[Focus]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
frame=true
|
||||||
|
frame.element=focus
|
||||||
|
frame.top=2
|
||||||
|
frame.bottom=2
|
||||||
|
frame.left=2
|
||||||
|
frame.right=2
|
||||||
|
frame.patternsize=14
|
||||||
|
|
||||||
|
[GenericFrame]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
frame=true
|
||||||
|
interior=false
|
||||||
|
frame.element=common
|
||||||
|
interior.element=common
|
||||||
|
frame.top=1
|
||||||
|
frame.bottom=1
|
||||||
|
frame.left=1
|
||||||
|
frame.right=1
|
||||||
|
|
||||||
|
[LineEdit]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
frame.element=lineedit
|
||||||
|
interior.element=lineedit
|
||||||
|
frame.top=6
|
||||||
|
frame.bottom=6
|
||||||
|
frame.left=6
|
||||||
|
frame.right=6
|
||||||
|
text.margin.top=2
|
||||||
|
text.margin.bottom=2
|
||||||
|
text.margin.left=2
|
||||||
|
text.margin.right=2
|
||||||
|
|
||||||
|
[ToolbarLineEdit]
|
||||||
|
frame.element=lineedit
|
||||||
|
interior.element=lineedit
|
||||||
|
|
||||||
|
[DropDownButton]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
indicator.element=arrow-down
|
||||||
|
|
||||||
|
[IndicatorArrow]
|
||||||
|
indicator.element=arrow
|
||||||
|
indicator.size=8
|
||||||
|
|
||||||
|
[ToolboxTab]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
text.normal.color={on_surface}
|
||||||
|
text.press.color={on_surface}
|
||||||
|
text.focus.color={on_surface}
|
||||||
|
|
||||||
|
[Tab]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
interior.element=tab
|
||||||
|
text.margin.left=8
|
||||||
|
text.margin.right=8
|
||||||
|
text.margin.top=0
|
||||||
|
text.margin.bottom=0
|
||||||
|
frame.element=tab
|
||||||
|
indicator.element=tab
|
||||||
|
indicator.size=22
|
||||||
|
frame.top=8
|
||||||
|
frame.bottom=8
|
||||||
|
frame.left=8
|
||||||
|
frame.right=8
|
||||||
|
text.normal.color={on_surface}
|
||||||
|
text.focus.color={on_surface}
|
||||||
|
text.press.color={on_surface}
|
||||||
|
text.toggle.color={on_surface}
|
||||||
|
frame.expansion=0
|
||||||
|
text.bold=false
|
||||||
|
|
||||||
|
[TabFrame]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
frame.element=tabframe
|
||||||
|
interior.element=tabframe
|
||||||
|
frame.top=6
|
||||||
|
frame.bottom=6
|
||||||
|
frame.left=6
|
||||||
|
frame.right=6
|
||||||
|
|
||||||
|
[TreeExpander]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
indicator.size=8
|
||||||
|
indicator.element=tree
|
||||||
|
|
||||||
|
[HeaderSection]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
interior.element=header
|
||||||
|
frame.element=header
|
||||||
|
frame.top=0
|
||||||
|
frame.bottom=1
|
||||||
|
frame.left=1
|
||||||
|
frame.right=1
|
||||||
|
text.normal.color={on_surface}
|
||||||
|
text.focus.color={on_surface}
|
||||||
|
text.press.color={on_surface}
|
||||||
|
text.toggle.color={on_surface}
|
||||||
|
frame.expansion=0
|
||||||
|
|
||||||
|
[SizeGrip]
|
||||||
|
indicator.element=resize-grip
|
||||||
|
|
||||||
|
[Toolbar]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
indicator.element=toolbar
|
||||||
|
indicator.size=5
|
||||||
|
text.margin=0
|
||||||
|
interior.element=menubar
|
||||||
|
frame.element=menubar
|
||||||
|
text.normal.color={on_surface}
|
||||||
|
text.focus.color={on_surface}
|
||||||
|
text.press.color={on_surface}
|
||||||
|
text.toggle.color={on_surface}
|
||||||
|
frame.left=6
|
||||||
|
frame.right=6
|
||||||
|
frame.top=0
|
||||||
|
frame.bottom=1
|
||||||
|
frame.expansion=0
|
||||||
|
|
||||||
|
[Slider]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
frame.element=slider
|
||||||
|
focusFrame=true
|
||||||
|
interior.element=slider
|
||||||
|
frame.top=3
|
||||||
|
frame.bottom=3
|
||||||
|
frame.left=3
|
||||||
|
frame.right=3
|
||||||
|
|
||||||
|
[SliderCursor]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
frame=false
|
||||||
|
interior.element=slidercursor
|
||||||
|
|
||||||
|
[Progressbar]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
frame.element=progress
|
||||||
|
interior.element=progress
|
||||||
|
text.margin=0
|
||||||
|
text.normal.color={on_surface}
|
||||||
|
text.focus.color={on_surface}
|
||||||
|
text.press.color={on_surface}
|
||||||
|
text.toggle.color={on_surface}
|
||||||
|
text.bold=false
|
||||||
|
frame.expansion=8
|
||||||
|
|
||||||
|
[ProgressbarContents]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
frame=true
|
||||||
|
frame.element=progress-pattern
|
||||||
|
interior.element=progress-pattern
|
||||||
|
|
||||||
|
[ItemView]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
text.margin=0
|
||||||
|
frame.element=itemview
|
||||||
|
interior.element=itemview
|
||||||
|
frame.top=4
|
||||||
|
frame.bottom=4
|
||||||
|
frame.left=4
|
||||||
|
frame.right=4
|
||||||
|
text.margin.top=0
|
||||||
|
text.margin.bottom=0
|
||||||
|
text.margin.left=8
|
||||||
|
text.margin.right=8
|
||||||
|
text.normal.color={on_surface}
|
||||||
|
text.focus.color={on_surface}
|
||||||
|
text.press.color={on_surface}
|
||||||
|
text.toggle.color={on_surface}
|
||||||
|
min_width=+0.3font
|
||||||
|
min_height=+0.3font
|
||||||
|
frame.expansion=0
|
||||||
|
|
||||||
|
[Splitter]
|
||||||
|
interior.element=splitter
|
||||||
|
frame=false
|
||||||
|
indicator.size=0
|
||||||
|
|
||||||
|
[Scrollbar]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
indicator.element=arrow
|
||||||
|
indicator.size=12
|
||||||
|
|
||||||
|
[ScrollbarSlider]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
frame.element=scrollbarslider
|
||||||
|
interior=false
|
||||||
|
frame.left=5
|
||||||
|
frame.right=5
|
||||||
|
frame.top=5
|
||||||
|
frame.bottom=5
|
||||||
|
indicator.element=grip
|
||||||
|
indicator.size=12
|
||||||
|
|
||||||
|
[ScrollbarGroove]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
interior=false
|
||||||
|
frame=false
|
||||||
|
|
||||||
|
[Menu]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
frame.top=10
|
||||||
|
frame.bottom=10
|
||||||
|
frame.left=10
|
||||||
|
frame.right=10
|
||||||
|
frame.element=menu
|
||||||
|
interior.element=menu
|
||||||
|
text.normal.color={on_surface}
|
||||||
|
text.shadow=false
|
||||||
|
frame.expansion=0
|
||||||
|
text.bold=false
|
||||||
|
|
||||||
|
[MenuItem]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
frame=true
|
||||||
|
frame.element=menuitem
|
||||||
|
interior.element=menuitem
|
||||||
|
indicator.element=menuitem
|
||||||
|
text.normal.color={on_surface}
|
||||||
|
text.focus.color={on_surface}
|
||||||
|
text.margin.top=0
|
||||||
|
text.margin.bottom=0
|
||||||
|
text.margin.left=6
|
||||||
|
text.margin.right=6
|
||||||
|
frame.top=4
|
||||||
|
frame.bottom=4
|
||||||
|
frame.left=4
|
||||||
|
frame.right=4
|
||||||
|
text.bold=false
|
||||||
|
frame.expansion=0
|
||||||
|
|
||||||
|
[MenuBar]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
frame.element=menubar
|
||||||
|
interior.element=menubar
|
||||||
|
frame.bottom=0
|
||||||
|
text.normal.color={on_surface}
|
||||||
|
text.focus.color={on_surface}
|
||||||
|
text.press.color={on_surface}
|
||||||
|
text.toggle.color={on_surface}
|
||||||
|
frame.expansion=0
|
||||||
|
text.bold=false
|
||||||
|
|
||||||
|
[MenuBarItem]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
interior=true
|
||||||
|
interior.element=menubaritem
|
||||||
|
frame.element=menubaritem
|
||||||
|
frame.top=2
|
||||||
|
frame.bottom=2
|
||||||
|
frame.left=2
|
||||||
|
frame.right=2
|
||||||
|
text.margin.left=4
|
||||||
|
text.margin.right=4
|
||||||
|
text.margin.top=0
|
||||||
|
text.margin.bottom=0
|
||||||
|
text.normal.color={on_surface}
|
||||||
|
text.focus.color={on_surface}
|
||||||
|
text.press.color={on_surface}
|
||||||
|
text.toggle.color={on_surface}
|
||||||
|
text.bold=false
|
||||||
|
min_width=+0.3font
|
||||||
|
min_height=+0.3font
|
||||||
|
frame.expansion=0
|
||||||
|
|
||||||
|
[TitleBar]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
frame=false
|
||||||
|
text.margin.top=2
|
||||||
|
text.margin.bottom=2
|
||||||
|
text.margin.left=2
|
||||||
|
text.margin.right=2
|
||||||
|
interior.element=titlebar
|
||||||
|
indicator.size=16
|
||||||
|
indicator.element=mdi
|
||||||
|
text.normal.color={on_surface}
|
||||||
|
text.focus.color={on_surface}
|
||||||
|
text.bold=false
|
||||||
|
text.italic=true
|
||||||
|
frame.expansion=0
|
||||||
|
|
||||||
|
[ComboBox]
|
||||||
|
inherits=PanelButtonCommand
|
||||||
|
frame.element=combo
|
||||||
|
interior.element=combo
|
||||||
|
frame.top=6
|
||||||
|
frame.bottom=6
|
||||||
|
frame.left=6
|
||||||
|
frame.right=6
|
||||||
|
text.margin.top=2
|
||||||
|
text.margin.bottom=2
|
||||||
|
text.margin.left=2
|
||||||
|
text.margin.right=2
|
||||||
|
text.focus.color={on_surface}
|
||||||
|
text.press.color={on_surface}
|
||||||
|
text.toggle.color={on_surface}
|
||||||
|
|
||||||
|
[GroupBox]
|
||||||
|
inherits=GenericFrame
|
||||||
|
frame=false
|
||||||
|
text.shadow=0
|
||||||
|
text.margin=0
|
||||||
|
text.normal.color={on_surface}
|
||||||
|
text.focus.color={on_surface}
|
||||||
|
text.bold=false
|
||||||
|
frame.expansion=0
|
||||||
|
|
||||||
|
[TabBarFrame]
|
||||||
|
inherits=GenericFrame
|
||||||
|
frame=false
|
||||||
|
frame.element=tabBarFrame
|
||||||
|
interior=false
|
||||||
|
frame.top=0
|
||||||
|
frame.bottom=0
|
||||||
|
frame.left=0
|
||||||
|
frame.right=0
|
||||||
|
|
||||||
|
[ToolTip]
|
||||||
|
inherits=GenericFrame
|
||||||
|
frame.top=6
|
||||||
|
frame.bottom=6
|
||||||
|
frame.left=6
|
||||||
|
frame.right=6
|
||||||
|
interior=true
|
||||||
|
text.shadow=0
|
||||||
|
text.margin=6
|
||||||
|
interior.element=tooltip
|
||||||
|
frame.element=tooltip
|
||||||
|
frame.expansion=6
|
||||||
|
|
||||||
|
[StatusBar]
|
||||||
|
inherits=GenericFrame
|
||||||
|
frame=false
|
||||||
|
interior=false
|
||||||
|
|
||||||
|
[Window]
|
||||||
|
interior=true
|
||||||
|
interior.element=window
|
||||||
|
frame=true
|
||||||
|
frame.element=window
|
||||||
|
frame.bottom=10
|
||||||
|
frame.top=10
|
||||||
|
|
||||||
|
text.disabled.color={editor_disabled}
|
||||||
6355
extra/templates/desktop/qt/kvantum.svg
Normal file
6355
extra/templates/desktop/qt/kvantum.svg
Normal file
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 170 KiB |
4
extra/templates/desktop/qt/qtct.conf
Normal file
4
extra/templates/desktop/qt/qtct.conf
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
[ColorScheme]
|
||||||
|
active_colors={on_background}, {surface}, #ffffff, #cacaca, #9f9f9f, #b8b8b8, {on_background}, #ffffff, {on_surface}, {background}, {background}, {border}, {accent}, {on_surface}, {base04}, {accent}, {surface}, {surface}, {surface}, {on_surface}, {base04}
|
||||||
|
disabled_colors={editor_disabled}, {surface}, #ffffff, #cacaca, #9f9f9f, #b8b8b8, {editor_disabled}, #ffffff, {editor_disabled}, {background}, {background}, {border}, {surface_variant}, {on_surface_variant}, {base04}, {accent}, {surface}, {surface}, {surface}, {editor_disabled}, {base04}
|
||||||
|
inactive_colors={on_background}, {surface}, #ffffff, #cacaca, #9f9f9f, #b8b8b8, {on_background}, #ffffff, {on_surface}, {background}, {background}, {border}, {surface_variant}, {on_surface_variant}, {base04}, {accent}, {surface}, {surface}, {surface}, {on_surface}, {base04}
|
||||||
48
extra/templates/desktop/qt/readme.md
Normal file
48
extra/templates/desktop/qt/readme.md
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
# Qt
|
||||||
|
|
||||||
|
1. Download the templates:
|
||||||
|
- Kvantum: [kvantum.kvconfig](kvantum.kvconfig) and [kvantum.svg](kvantum.svg)
|
||||||
|
- Qt5ct/Qt6ct: [qtct.conf](qtct.conf)
|
||||||
|
|
||||||
|
2. Configure the templates in `~/.config/clrsync/config.toml`:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[templates.kvantum]
|
||||||
|
enabled = true
|
||||||
|
input_path = '~/.config/clrsync/templates/kvantum/kvantum.kvconfig'
|
||||||
|
output_path = '~/.config/Kvantum/clrsync/clrsync.kvconfig'
|
||||||
|
reload_cmd = ''
|
||||||
|
|
||||||
|
[templates.kvantum-svg]
|
||||||
|
enabled = true
|
||||||
|
input_path = '~/.config/clrsync/templates/kvantum/kvantum.svg'
|
||||||
|
output_path = '~/.config/Kvantum/clrsync/clrsync.svg'
|
||||||
|
reload_cmd = ''
|
||||||
|
|
||||||
|
[templates.qt5ct]
|
||||||
|
enabled = true
|
||||||
|
input_path = '~/.config/clrsync/templates/qtct.conf'
|
||||||
|
output_path = '~/.config/qt5ct/colors/clrsync.conf'
|
||||||
|
reload_cmd = ''
|
||||||
|
|
||||||
|
[templates.qt6ct]
|
||||||
|
enabled = true
|
||||||
|
input_path = '~/.config/clrsync/templates/qtct.conf'
|
||||||
|
output_path = '~/.config/qt6ct/colors/clrsync.conf'
|
||||||
|
reload_cmd = ''
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Set the theme in `~/.config/Kvantum/kvantum.kvconfig`:
|
||||||
|
|
||||||
|
```conf
|
||||||
|
[General]
|
||||||
|
theme=clrsync
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Set the theme in `~/.config/qt5ct/qt5ct.conf` and `~/.config/qt6ct/qt6ct.conf`:
|
||||||
|
|
||||||
|
```conf
|
||||||
|
[Appearance]
|
||||||
|
color_scheme_path=$HOME/.config/qt5ct/colors/clrsync.conf
|
||||||
|
custom_palette=true
|
||||||
|
```
|
||||||
69
extra/templates/terminals/alacritty/alacritty.toml
Normal file
69
extra/templates/terminals/alacritty/alacritty.toml
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
[colors.primary]
|
||||||
|
background = '{background}'
|
||||||
|
foreground = '{foreground}'
|
||||||
|
|
||||||
|
[colors.cursor]
|
||||||
|
text = '{background}'
|
||||||
|
cursor = '{cursor}'
|
||||||
|
|
||||||
|
[colors.vi_mode_cursor]
|
||||||
|
text = '{background}'
|
||||||
|
cursor = '{cursor}'
|
||||||
|
|
||||||
|
[colors.selection]
|
||||||
|
text = 'CellForeground'
|
||||||
|
background = '{editor_selected}'
|
||||||
|
|
||||||
|
[colors.search.matches]
|
||||||
|
foreground = '{background}'
|
||||||
|
background = '{base0A}'
|
||||||
|
|
||||||
|
[colors.search.focused_match]
|
||||||
|
foreground = '{background}'
|
||||||
|
background = '{accent}'
|
||||||
|
|
||||||
|
[colors.footer_bar]
|
||||||
|
foreground = '{foreground}'
|
||||||
|
background = '{surface}'
|
||||||
|
|
||||||
|
[colors.hints.start]
|
||||||
|
foreground = '{background}'
|
||||||
|
background = '{warning}'
|
||||||
|
|
||||||
|
[colors.hints.end]
|
||||||
|
foreground = '{background}'
|
||||||
|
background = '{surface_variant}'
|
||||||
|
|
||||||
|
[colors.line_indicator]
|
||||||
|
foreground = 'None'
|
||||||
|
background = 'None'
|
||||||
|
|
||||||
|
[colors.normal]
|
||||||
|
black = '{base00}'
|
||||||
|
red = '{base08}'
|
||||||
|
green = '{base01}'
|
||||||
|
yellow = '{base02}'
|
||||||
|
blue = '{base06}'
|
||||||
|
magenta = '{base05}'
|
||||||
|
cyan = '{base0E}'
|
||||||
|
white = '{base07}'
|
||||||
|
|
||||||
|
[colors.bright]
|
||||||
|
black = '{border_focused}'
|
||||||
|
red = '{editor_error}'
|
||||||
|
green = '{editor_success}'
|
||||||
|
yellow = '{base0A}'
|
||||||
|
blue = '{editor_link}'
|
||||||
|
magenta = '{base0D}'
|
||||||
|
cyan = '{editor_comment}'
|
||||||
|
white = '{base0F}'
|
||||||
|
|
||||||
|
[colors.dim]
|
||||||
|
black = '{border}'
|
||||||
|
red = '{base0C}'
|
||||||
|
green = '{base01}'
|
||||||
|
yellow = '{editor_string}'
|
||||||
|
blue = '{base06}'
|
||||||
|
magenta = '{base05}'
|
||||||
|
cyan = '{base0E}'
|
||||||
|
white = '{base07}'
|
||||||
20
extra/templates/terminals/alacritty/readme.md
Normal file
20
extra/templates/terminals/alacritty/readme.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# Alacritty
|
||||||
|
|
||||||
|
1. Download the [template file](alacritty.toml)
|
||||||
|
|
||||||
|
2. Configure the template in `~/.config/clrsync/config.toml`:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[templates.alacritty]
|
||||||
|
enabled = true
|
||||||
|
input_path = '~/.config/clrsync/templates/alacritty.toml'
|
||||||
|
output_path = '~/.config/alacritty/clrsync.toml'
|
||||||
|
reload_cmd = ''
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Import the generated color scheme in `~/.config/alacritty/alacritty.toml`:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[general]
|
||||||
|
import = ["clrsync.toml"]
|
||||||
|
```
|
||||||
26
extra/templates/terminals/ghostty/ghostty.conf
Normal file
26
extra/templates/terminals/ghostty/ghostty.conf
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
background = {background}
|
||||||
|
foreground = {foreground}
|
||||||
|
|
||||||
|
cursor-color = {cursor}
|
||||||
|
cursor-text = {foreground}
|
||||||
|
|
||||||
|
selection-background = {editor_selected}
|
||||||
|
selection-foreground = {foreground}
|
||||||
|
|
||||||
|
palette = 0={base00}
|
||||||
|
palette = 1={base08}
|
||||||
|
palette = 2={base01}
|
||||||
|
palette = 3={base02}
|
||||||
|
palette = 4={base06}
|
||||||
|
palette = 5={base05}
|
||||||
|
palette = 6={base0E}
|
||||||
|
palette = 7={base07}
|
||||||
|
|
||||||
|
palette = 8={border_focused}
|
||||||
|
palette = 9={editor_error}
|
||||||
|
palette = 10={editor_success}
|
||||||
|
palette = 11={base0A}
|
||||||
|
palette = 12={editor_link}
|
||||||
|
palette = 13={base0D}
|
||||||
|
palette = 14={editor_comment}
|
||||||
|
palette = 15={base0F}
|
||||||
19
extra/templates/terminals/ghostty/readme.md
Normal file
19
extra/templates/terminals/ghostty/readme.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Ghostty
|
||||||
|
|
||||||
|
1. Download the [template file](ghostty)
|
||||||
|
|
||||||
|
2. Configure the template in `~/.config/clrsync/config.toml`:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[templates.ghostty]
|
||||||
|
enabled = true
|
||||||
|
input_path = '~/.config/clrsync/templates/ghostty'
|
||||||
|
output_path = '~/.config/ghostty/themes/clrsync'
|
||||||
|
reload_cmd = 'pkill -SIGUSR2 ghostty'
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Set the generated color scheme in `~/.config/ghostty/config`:
|
||||||
|
|
||||||
|
```conf
|
||||||
|
theme = "clrsync"
|
||||||
|
```
|
||||||
32
extra/templates/terminals/kitty/kitty.conf
Normal file
32
extra/templates/terminals/kitty/kitty.conf
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
cursor {cursor}
|
||||||
|
cursor_text_color {background}
|
||||||
|
|
||||||
|
foreground {foreground}
|
||||||
|
background {background}
|
||||||
|
selection_foreground {on_surface}
|
||||||
|
selection_background {surface}
|
||||||
|
url_color {accent}
|
||||||
|
|
||||||
|
color0 {base00}
|
||||||
|
color8 {base08}
|
||||||
|
|
||||||
|
color1 {base01}
|
||||||
|
color9 {base09}
|
||||||
|
|
||||||
|
color2 {base02}
|
||||||
|
color10 {base0A}
|
||||||
|
|
||||||
|
color3 {base03}
|
||||||
|
color11 {base0B}
|
||||||
|
|
||||||
|
color4 {base04}
|
||||||
|
color12 {base0C}
|
||||||
|
|
||||||
|
color5 {base05}
|
||||||
|
color13 {base0D}
|
||||||
|
|
||||||
|
color6 {base06}
|
||||||
|
color14 {base0E}
|
||||||
|
|
||||||
|
color7 {base07}
|
||||||
|
color15 {base0F}
|
||||||
19
extra/templates/terminals/kitty/readme.md
Normal file
19
extra/templates/terminals/kitty/readme.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Kitty
|
||||||
|
|
||||||
|
1. Download the [template file](kitty.conf)
|
||||||
|
|
||||||
|
2. Configure the template in `~/.config/clrsync/config.toml`:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[templates.kitty]
|
||||||
|
enabled = true
|
||||||
|
input_path = '~/.config/clrsync/templates/kitty.conf'
|
||||||
|
output_path = '~/.config/kitty/clrsync.conf'
|
||||||
|
reload_cmd = 'pkill -SIGUSR1 kitty'
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Import the generated color scheme in `~/.config/kitty/kitty.conf`:
|
||||||
|
|
||||||
|
```conf
|
||||||
|
include clrsync.conf
|
||||||
|
```
|
||||||
93
extra/templates/text-editors/neovim/nvim.lua
Normal file
93
extra/templates/text-editors/neovim/nvim.lua
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
vim.cmd("highlight clear")
|
||||||
|
vim.cmd("syntax reset")
|
||||||
|
vim.g.colors_name = "clrsync"
|
||||||
|
|
||||||
|
local palette = {
|
||||||
|
-- Editor colors
|
||||||
|
Default = "{editor_main.hex}",
|
||||||
|
Keyword = "{editor_command.hex}",
|
||||||
|
Number = "{editor_warning.hex}",
|
||||||
|
String = "{editor_string.hex}",
|
||||||
|
CharLiteral = "{editor_string.hex}",
|
||||||
|
Punctuation = "{editor_main.hex}",
|
||||||
|
Preprocessor = "{editor_emphasis.hex}",
|
||||||
|
Identifier = "{editor_main.hex}",
|
||||||
|
KnownIdentifier = "{editor_link.hex}",
|
||||||
|
PreprocIdentifier = "{editor_link.hex}",
|
||||||
|
|
||||||
|
Comment = "{editor_comment.hex}",
|
||||||
|
MultiLineComment = "{editor_comment.hex}",
|
||||||
|
|
||||||
|
Background = "{editor_background.hex}",
|
||||||
|
Cursor = "{cursor.hex}",
|
||||||
|
|
||||||
|
Selection = "{editor_selected.hex}",
|
||||||
|
ErrorMarker = "{editor_error.hex}",
|
||||||
|
Breakpoint = "{editor_error.hex}",
|
||||||
|
|
||||||
|
LineNumber = "{editor_line_number.hex}",
|
||||||
|
CurrentLineFill = "{surface_variant.hex}",
|
||||||
|
CurrentLineFillInactive = "{surface.hex}",
|
||||||
|
|
||||||
|
CurrentLineEdge = "{border_focused.hex}",
|
||||||
|
|
||||||
|
-- Semantic colors
|
||||||
|
Success = "{success.hex}",
|
||||||
|
Warning = "{warning.hex}",
|
||||||
|
Error = "{error.hex}",
|
||||||
|
Info = "{info.hex}",
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Helper function to set highlights in Neovim
|
||||||
|
local function set_hl(group, opts)
|
||||||
|
vim.api.nvim_set_hl(0, group, opts)
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.o.winborder = "rounded"
|
||||||
|
|
||||||
|
-- Basic editor highlights using the mapped palette
|
||||||
|
set_hl("Normal", { fg = palette.Default, bg = palette.Background })
|
||||||
|
set_hl("CursorLine", { bg = palette.CurrentLineFill })
|
||||||
|
set_hl("Visual", { bg = palette.Selection })
|
||||||
|
set_hl("LineNr", { fg = palette.LineNumber })
|
||||||
|
set_hl("CursorLineNr", { fg = palette.Keyword })
|
||||||
|
|
||||||
|
-- Syntax highlights
|
||||||
|
set_hl("Comment", { fg = palette.Comment, italic = true })
|
||||||
|
set_hl("Constant", { fg = palette.Number })
|
||||||
|
set_hl("String", { fg = palette.String })
|
||||||
|
set_hl("Character", { fg = palette.CharLiteral })
|
||||||
|
set_hl("Identifier", { fg = palette.Identifier })
|
||||||
|
set_hl("Function", { fg = palette.Keyword })
|
||||||
|
set_hl("Statement", { fg = palette.Keyword })
|
||||||
|
set_hl("PreProc", { fg = palette.Preprocessor })
|
||||||
|
set_hl("Type", { fg = palette.Keyword })
|
||||||
|
set_hl("Special", { fg = palette.PreprocIdentifier })
|
||||||
|
set_hl("Underlined", { fg = palette.KnownIdentifier })
|
||||||
|
set_hl("Error", { fg = palette.ErrorMarker, bg = palette.Background })
|
||||||
|
set_hl("Todo", { fg = palette.Default, bg = palette.Keyword })
|
||||||
|
|
||||||
|
-- Floating windows
|
||||||
|
set_hl("NormalFloat", { bg = palette.Background })
|
||||||
|
set_hl("FloatBorder", { fg = palette.CurrentLineEdge, bg = palette.Background })
|
||||||
|
|
||||||
|
-- Completion menu
|
||||||
|
set_hl("Pmenu", { bg = palette.Background })
|
||||||
|
set_hl("PmenuSel", { bg = palette.Keyword, fg = palette.Background })
|
||||||
|
|
||||||
|
-- Git and diagnostic highlights
|
||||||
|
set_hl("DiffAdd", { fg = palette.Success, bg = palette.Background })
|
||||||
|
set_hl("DiffChange", { fg = palette.Keyword, bg = palette.Background })
|
||||||
|
set_hl("DiffDelete", { fg = palette.ErrorMarker, bg = palette.Background })
|
||||||
|
set_hl("DiagnosticError", { fg = palette.Error })
|
||||||
|
set_hl("DiagnosticWarn", { fg = palette.Warning })
|
||||||
|
set_hl("DiagnosticInfo", { fg = palette.Info })
|
||||||
|
set_hl("DiagnosticHint", { fg = palette.PreprocIdentifier })
|
||||||
|
|
||||||
|
-- Treesitter links
|
||||||
|
set_hl("@comment", { link = "Comment" })
|
||||||
|
set_hl("@string", { fg = palette.String })
|
||||||
|
set_hl("@function", { fg = palette.Keyword })
|
||||||
|
set_hl("@variable", { fg = palette.Identifier })
|
||||||
|
set_hl("@keyword", { fg = palette.Keyword })
|
||||||
|
set_hl("@type", { fg = palette.Preprocessor })
|
||||||
19
extra/templates/text-editors/neovim/readme.md
Normal file
19
extra/templates/text-editors/neovim/readme.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Neovim
|
||||||
|
|
||||||
|
1. Download the [template file](nvim.lua)
|
||||||
|
|
||||||
|
2. Configure the template in `~/.config/clrsync/config.toml`:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[templates.nvim]
|
||||||
|
enabled = true
|
||||||
|
input_path = '~/.config/clrsync/templates/nvim.lua'
|
||||||
|
output_path = '~/.config/nvim/colors/clrsync.lua'
|
||||||
|
reload_cmd = ''
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Set the colorscheme in your Neovim config:
|
||||||
|
|
||||||
|
```lua
|
||||||
|
vim.cmd.colorscheme 'clrsync'
|
||||||
|
```
|
||||||
2094
extra/templates/text-editors/vscode/code.json
Normal file
2094
extra/templates/text-editors/vscode/code.json
Normal file
File diff suppressed because it is too large
Load Diff
17
extra/templates/text-editors/vscode/readme.md
Normal file
17
extra/templates/text-editors/vscode/readme.md
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# Visual Studio Code
|
||||||
|
|
||||||
|
1. Install the [clrsync VS Code theme](https://marketplace.visualstudio.com/items?itemName=obsqrbtz.clrsync)
|
||||||
|
|
||||||
|
2. Download the [template file](code.json)
|
||||||
|
|
||||||
|
3. Configure the template in `~/.config/clrsync/config.toml`:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[templates.vscode]
|
||||||
|
enabled = true
|
||||||
|
input_path = '~/.config/clrsync/templates/code.json'
|
||||||
|
output_path = '~/.vscode/extensions/obsqrbtz.clrsync-1.0.2/themes/clrsync-color-theme.json'
|
||||||
|
reload_cmd = ''
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Set the `clrsync` color scheme in VS Code
|
||||||
25
extra/templates/wms/hyprland/hyprland.conf
Normal file
25
extra/templates/wms/hyprland/hyprland.conf
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
$primary = rgb({accent_stripped})
|
||||||
|
$surface = rgb({surface_stripped})
|
||||||
|
$secondary = rgb({accent_secondary_stripped})
|
||||||
|
$error = rgb({error_stripped})
|
||||||
|
$tertiary = rgb({base06_stripped})
|
||||||
|
$surface_lowest = rgb({background_stripped})
|
||||||
|
|
||||||
|
general {
|
||||||
|
col.active_border = $primary
|
||||||
|
col.inactive_border = $surface
|
||||||
|
}
|
||||||
|
|
||||||
|
group {
|
||||||
|
col.border_active = $secondary
|
||||||
|
col.border_inactive = $surface
|
||||||
|
col.border_locked_active = $error
|
||||||
|
col.border_locked_inactive = $surface
|
||||||
|
|
||||||
|
groupbar {
|
||||||
|
col.active = $secondary
|
||||||
|
col.inactive = $surface
|
||||||
|
col.locked_active = $error
|
||||||
|
col.locked_inactive = $surface
|
||||||
|
}
|
||||||
|
}
|
||||||
19
extra/templates/wms/hyprland/readme.md
Normal file
19
extra/templates/wms/hyprland/readme.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Hyprland
|
||||||
|
|
||||||
|
1. Download the [template file](hyprland.conf)
|
||||||
|
|
||||||
|
2. Configure the template in `~/.config/clrsync/config.toml`:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[templates.hyprland]
|
||||||
|
enabled = true
|
||||||
|
input_path = '~/.config/clrsync/templates/hyprland.conf'
|
||||||
|
output_path = '~/.config/hypr/clrsync.conf'
|
||||||
|
reload_cmd = ''
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Source the generated config in `~/.config/hypr/hyprland.conf`:
|
||||||
|
|
||||||
|
```conf
|
||||||
|
source = clrsync.conf
|
||||||
|
```
|
||||||
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1765779637,
|
||||||
|
"narHash": "sha256-KJ2wa/BLSrTqDjbfyNx70ov/HdgNBCBBSQP3BIzKnv4=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "1306659b587dc277866c7b69eb97e5f07864d8c4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
94
flake.nix
Normal file
94
flake.nix
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
{
|
||||||
|
description = "clrsync - Color scheme manager";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs =
|
||||||
|
{ self, nixpkgs, ... }:
|
||||||
|
let
|
||||||
|
supportedSystems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||||
|
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
|
||||||
|
|
||||||
|
baseVersion = nixpkgs.lib.removeSuffix "\n" (builtins.readFile ./VERSION);
|
||||||
|
|
||||||
|
semver =
|
||||||
|
if self ? rev then
|
||||||
|
"${baseVersion}+git.${builtins.substring 0 7 self.rev}"
|
||||||
|
else
|
||||||
|
"${baseVersion}+dev";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
packages = forAllSystems (
|
||||||
|
system:
|
||||||
|
let
|
||||||
|
pkgs = nixpkgsFor.${system};
|
||||||
|
in
|
||||||
|
rec {
|
||||||
|
clrsync = pkgs.callPackage ./package.nix { inherit semver; };
|
||||||
|
default = clrsync;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
homeModules = {
|
||||||
|
default = import ./home-manager-module.nix self;
|
||||||
|
clrsync = self.homeModules.default;
|
||||||
|
};
|
||||||
|
|
||||||
|
apps = forAllSystems (system: {
|
||||||
|
clrsync-gui = {
|
||||||
|
type = "app";
|
||||||
|
program = "${self.packages.${system}.clrsync}/bin/clrsync_gui";
|
||||||
|
meta = {
|
||||||
|
description = "clrsync gui app";
|
||||||
|
license = self.packages.x86_64-linux.licenses.mit;
|
||||||
|
maintainers = [ "Daniel Dada" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
clrsync-cli = {
|
||||||
|
type = "app";
|
||||||
|
program = "${self.packages.${system}.clrsync}/bin/clrsync_cli";
|
||||||
|
meta = {
|
||||||
|
description = "clrsync cli app";
|
||||||
|
license = self.packages.x86_64-linux.licenses.mit;
|
||||||
|
maintainers = [ "Daniel Dada" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
default = self.apps.${system}.clrsync-cli;
|
||||||
|
});
|
||||||
|
|
||||||
|
devShells = forAllSystems (
|
||||||
|
system:
|
||||||
|
let
|
||||||
|
pkgs = nixpkgsFor.${system};
|
||||||
|
clrsync = self.packages.${system}.clrsync;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
default = pkgs.mkShell {
|
||||||
|
inputsFrom = [ clrsync ];
|
||||||
|
packages = with pkgs; [
|
||||||
|
cmake
|
||||||
|
ninja
|
||||||
|
clang-tools
|
||||||
|
gdb
|
||||||
|
];
|
||||||
|
|
||||||
|
shellHook = ''
|
||||||
|
export CMAKE_GENERATOR="Ninja"
|
||||||
|
export CMAKE_EXPORT_COMPILE_COMMANDS=1
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
overlays.default = final: prev: {
|
||||||
|
clrsync = self.packages.${final.system}.clrsync;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
155
home-manager-module.nix
Normal file
155
home-manager-module.nix
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
flake:
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.programs.clrsync;
|
||||||
|
|
||||||
|
clrsyncPackage = flake.packages.${pkgs.system}.default;
|
||||||
|
|
||||||
|
templateType = types.submodule {
|
||||||
|
options = {
|
||||||
|
enabled = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "Whether to enable this template.";
|
||||||
|
};
|
||||||
|
inputPath = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
description = "Path to the template input file.";
|
||||||
|
};
|
||||||
|
outputPath = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
description = "Path where the generated output will be written.";
|
||||||
|
};
|
||||||
|
reloadCmd = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "";
|
||||||
|
description = "Command to run after generating the output.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
configFormat = pkgs.formats.toml { };
|
||||||
|
configFile = configFormat.generate "config.toml" {
|
||||||
|
general = {
|
||||||
|
default_theme = cfg.defaultTheme;
|
||||||
|
palettes_path = cfg.palettesPath;
|
||||||
|
font = cfg.font;
|
||||||
|
font_size = cfg.fontSize;
|
||||||
|
};
|
||||||
|
templates = mapAttrs (
|
||||||
|
name: template: {
|
||||||
|
enabled = template.enabled;
|
||||||
|
input_path = template.inputPath;
|
||||||
|
output_path = template.outputPath;
|
||||||
|
reload_cmd = template.reloadCmd;
|
||||||
|
}
|
||||||
|
) cfg.templates;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.programs.clrsync = {
|
||||||
|
enable = mkEnableOption "clrsync color synchronization";
|
||||||
|
|
||||||
|
defaultTheme = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "cursed";
|
||||||
|
description = "Default theme to use.";
|
||||||
|
};
|
||||||
|
|
||||||
|
palettesPath = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "~/.config/clrsync/palettes";
|
||||||
|
description = "Path to color palettes directory.";
|
||||||
|
};
|
||||||
|
|
||||||
|
font = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "JetBrainsMono Nerd Font Mono";
|
||||||
|
description = "Font family to use.";
|
||||||
|
};
|
||||||
|
|
||||||
|
fontSize = mkOption {
|
||||||
|
type = types.int;
|
||||||
|
default = 14;
|
||||||
|
description = "Font size.";
|
||||||
|
};
|
||||||
|
|
||||||
|
templates = mkOption {
|
||||||
|
type = types.attrsOf templateType;
|
||||||
|
default = { };
|
||||||
|
description = "Template configurations.";
|
||||||
|
example = literalExpression ''
|
||||||
|
{
|
||||||
|
kitty = {
|
||||||
|
enabled = true;
|
||||||
|
inputPath = "~/.config/clrsync/templates/kitty.conf";
|
||||||
|
outputPath = "~/.config/kitty/kitty_test.conf";
|
||||||
|
reloadCmd = "pkill -SIGUSR1 kitty";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
applyTheme = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Whether to apply the default theme on activation.";
|
||||||
|
};
|
||||||
|
|
||||||
|
systemdTarget = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "graphical-session.target";
|
||||||
|
description = "Systemd target to bind the clrsync service to.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.packages = [ clrsyncPackage ];
|
||||||
|
|
||||||
|
xdg.enable = true;
|
||||||
|
|
||||||
|
home.activation.clrsyncDesktop = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
|
if [ -d "$HOME/.nix-profile/share/applications" ]; then
|
||||||
|
${pkgs.desktop-file-utils}/bin/update-desktop-database "$HOME/.nix-profile/share/applications" || true
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
xdg.configFile."clrsync/config.toml" = {
|
||||||
|
source = configFile;
|
||||||
|
force = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.activation.clrsyncConfig = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
|
run --quiet mkdir -p $HOME/.config/clrsync
|
||||||
|
run --quiet cp -f ${configFile} $HOME/.config/clrsync/config.toml
|
||||||
|
'';
|
||||||
|
|
||||||
|
home.activation.clrsyncApply = mkIf cfg.applyTheme (
|
||||||
|
lib.hm.dag.entryAfter [ "clrsyncConfig" ] ''
|
||||||
|
run --quiet ${clrsyncPackage}/bin/clrsync_cli --apply --theme ${cfg.defaultTheme}
|
||||||
|
''
|
||||||
|
);
|
||||||
|
|
||||||
|
systemd.user.services.clrsync = mkIf cfg.applyTheme {
|
||||||
|
Unit = {
|
||||||
|
Description = "Apply clrsync color palette";
|
||||||
|
After = [ cfg.systemdTarget ];
|
||||||
|
PartOf = [ cfg.systemdTarget ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = "${clrsyncPackage}/bin/clrsync_cli --apply --theme ${cfg.defaultTheme}";
|
||||||
|
RemainAfterExit = true;
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ cfg.systemdTarget ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
107
meson.build
107
meson.build
@@ -1,107 +0,0 @@
|
|||||||
project('clrsync', 'cpp',
|
|
||||||
version : '0.1.0',
|
|
||||||
default_options : [
|
|
||||||
'cpp_std=c++20',
|
|
||||||
'buildtype=debug',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
imgui_dep = dependency('imgui-docking',
|
|
||||||
fallback : ['imgui-docking', 'imgui_dep'],
|
|
||||||
default_options : [
|
|
||||||
'default_library=static',
|
|
||||||
'opengl=enabled',
|
|
||||||
'glfw=enabled',
|
|
||||||
]
|
|
||||||
)
|
|
||||||
|
|
||||||
imgui_dep = declare_dependency(
|
|
||||||
compile_args: ['-DIMGUI_ENABLE_FREETYPE'],
|
|
||||||
dependencies: [imgui_dep]
|
|
||||||
)
|
|
||||||
|
|
||||||
glfw_dep = dependency('glfw3', fallback : ['glfw', 'glfw_dep'])
|
|
||||||
gl_dep = dependency('gl')
|
|
||||||
|
|
||||||
freetype_dep = dependency('freetype2')
|
|
||||||
|
|
||||||
inc_dirs = include_directories('src')
|
|
||||||
lib_inc_dirs = include_directories('lib')
|
|
||||||
|
|
||||||
cpp_args = []
|
|
||||||
if host_machine.system() == 'windows'
|
|
||||||
compiler = meson.get_compiler('cpp')
|
|
||||||
if compiler.get_id() == 'msvc'
|
|
||||||
cpp_args += ['/EHsc']
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
core_sources = [
|
|
||||||
'src/core/palette/color.cpp',
|
|
||||||
'src/core/io/toml_file.cpp',
|
|
||||||
'src/core/config/config.cpp',
|
|
||||||
'src/core/utils.cpp',
|
|
||||||
'src/core/version.cpp',
|
|
||||||
'src/core/theme/theme_template.cpp',
|
|
||||||
]
|
|
||||||
|
|
||||||
text_edit_sources = [
|
|
||||||
'lib/color_text_edit/TextEditor.cpp',
|
|
||||||
]
|
|
||||||
|
|
||||||
clrsync_core = static_library(
|
|
||||||
'clrsync_core',
|
|
||||||
core_sources,
|
|
||||||
include_directories : [inc_dirs, lib_inc_dirs],
|
|
||||||
cpp_args : cpp_args,
|
|
||||||
)
|
|
||||||
|
|
||||||
clrsync_core_dep = declare_dependency(
|
|
||||||
link_with : clrsync_core,
|
|
||||||
include_directories : [inc_dirs, lib_inc_dirs],
|
|
||||||
)
|
|
||||||
|
|
||||||
clrsync_cli = executable(
|
|
||||||
'clrsync_cli',
|
|
||||||
'src/cli/main.cpp',
|
|
||||||
include_directories : [inc_dirs, lib_inc_dirs],
|
|
||||||
link_with : clrsync_core,
|
|
||||||
cpp_args : cpp_args,
|
|
||||||
)
|
|
||||||
|
|
||||||
gui_sources = [
|
|
||||||
'src/gui/main.cpp',
|
|
||||||
'src/gui/color_scheme_editor.cpp',
|
|
||||||
'src/gui/template_editor.cpp',
|
|
||||||
'src/gui/palette_controller.cpp',
|
|
||||||
'src/gui/template_controller.cpp',
|
|
||||||
'src/gui/imgui_helpers.cpp',
|
|
||||||
'src/gui/about_window.cpp',
|
|
||||||
'src/gui/settings_window.cpp',
|
|
||||||
'src/gui/font_loader.cpp',
|
|
||||||
]
|
|
||||||
|
|
||||||
clrsync_gui_link_args = []
|
|
||||||
|
|
||||||
fontconfig_dep = dependency('', required : false)
|
|
||||||
if host_machine.system() == 'linux'
|
|
||||||
fontconfig_dep = dependency('fontconfig', required : true)
|
|
||||||
clrsync_gui_link_args += ['-lX11', '-lXrandr', '-lXi']
|
|
||||||
endif
|
|
||||||
|
|
||||||
clrsync_gui = executable(
|
|
||||||
'clrsync_gui',
|
|
||||||
gui_sources,
|
|
||||||
text_edit_sources,
|
|
||||||
include_directories : [inc_dirs, lib_inc_dirs],
|
|
||||||
dependencies : [
|
|
||||||
clrsync_core_dep,
|
|
||||||
imgui_dep,
|
|
||||||
freetype_dep,
|
|
||||||
glfw_dep,
|
|
||||||
gl_dep,
|
|
||||||
fontconfig_dep,
|
|
||||||
],
|
|
||||||
cpp_args : cpp_args,
|
|
||||||
link_args : clrsync_gui_link_args
|
|
||||||
)
|
|
||||||
104
package.nix
Normal file
104
package.nix
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
cmake,
|
||||||
|
git,
|
||||||
|
pkg-config,
|
||||||
|
makeWrapper,
|
||||||
|
wrapGAppsHook3,
|
||||||
|
wayland-protocols,
|
||||||
|
glfw,
|
||||||
|
freetype,
|
||||||
|
fontconfig,
|
||||||
|
mesa,
|
||||||
|
xorg,
|
||||||
|
wayland,
|
||||||
|
libxkbcommon,
|
||||||
|
zlib,
|
||||||
|
bzip2,
|
||||||
|
wayland-scanner,
|
||||||
|
gtk3,
|
||||||
|
glib,
|
||||||
|
gsettings-desktop-schemas,
|
||||||
|
semver,
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "clrsync";
|
||||||
|
|
||||||
|
version = semver;
|
||||||
|
|
||||||
|
src = lib.cleanSourceWith {
|
||||||
|
src = ./.;
|
||||||
|
filter =
|
||||||
|
path: type:
|
||||||
|
let
|
||||||
|
baseName = baseNameOf path;
|
||||||
|
in
|
||||||
|
!(
|
||||||
|
lib.hasSuffix ".o" baseName
|
||||||
|
|| lib.hasSuffix ".a" baseName
|
||||||
|
|| baseName == "build"
|
||||||
|
|| baseName == "CMakeCache.txt"
|
||||||
|
|| baseName == "CMakeFiles"
|
||||||
|
|| baseName == ".git"
|
||||||
|
|| baseName == "result"
|
||||||
|
|| baseName == ".direnv"
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
git
|
||||||
|
pkg-config
|
||||||
|
makeWrapper
|
||||||
|
wrapGAppsHook3
|
||||||
|
wayland-protocols
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
glfw
|
||||||
|
freetype
|
||||||
|
fontconfig
|
||||||
|
xorg.libXcursor
|
||||||
|
mesa
|
||||||
|
xorg.libX11
|
||||||
|
xorg.libXrandr
|
||||||
|
xorg.libXi
|
||||||
|
xorg.libXinerama
|
||||||
|
wayland
|
||||||
|
wayland-scanner
|
||||||
|
wayland-protocols
|
||||||
|
libxkbcommon
|
||||||
|
zlib
|
||||||
|
bzip2
|
||||||
|
gtk3
|
||||||
|
gsettings-desktop-schemas
|
||||||
|
glib
|
||||||
|
];
|
||||||
|
|
||||||
|
cmakeFlags = [
|
||||||
|
"-DCMAKE_BUILD_TYPE=Release"
|
||||||
|
"-DUSE_SYSTEM_GLFW=ON"
|
||||||
|
"-DCLRSYNC_SEMVER=${version}"
|
||||||
|
];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
cmake --install . --prefix $out
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
dontWrapGApps = false;
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Color scheme manager with GUI and CLI";
|
||||||
|
homepage = "https://github.com/obsqrbtz/clrsync";
|
||||||
|
license = licenses.mit;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
mainProgram = "clrsync_gui";
|
||||||
|
maintainers = [ "Daniel Dada" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
BIN
resources/JetBrainsMono-Regular.ttf
Normal file
BIN
resources/JetBrainsMono-Regular.ttf
Normal file
Binary file not shown.
8
src/cli/CMakeLists.txt
Normal file
8
src/cli/CMakeLists.txt
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
add_executable(clrsync_cli main.cpp)
|
||||||
|
|
||||||
|
target_include_directories(clrsync_cli PRIVATE
|
||||||
|
${CMAKE_SOURCE_DIR}/src
|
||||||
|
SYSTEM ${CMAKE_SOURCE_DIR}/lib
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(clrsync_cli PRIVATE clrsync_core)
|
||||||
270
src/cli/main.cpp
270
src/cli/main.cpp
@@ -1,17 +1,20 @@
|
|||||||
#include <iostream>
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <argparse/argparse.hpp>
|
#include <argparse/argparse.hpp>
|
||||||
|
|
||||||
#include <core/utils.hpp>
|
#include "core/common/error.hpp"
|
||||||
#include <core/config/config.hpp>
|
#include "core/common/utils.hpp"
|
||||||
#include <core/io/toml_file.hpp>
|
#include "core/common/version.hpp"
|
||||||
#include <core/palette/palette_file.hpp>
|
#include "core/config/config.hpp"
|
||||||
#include <core/palette/palette_manager.hpp>
|
#include "core/io/toml_file.hpp"
|
||||||
#include <core/theme/theme_template.hpp>
|
#include "core/palette/hellwal_generator.hpp"
|
||||||
#include <core/theme/theme_renderer.hpp>
|
#include "core/palette/matugen_generator.hpp"
|
||||||
#include <core/version.hpp>
|
#include "core/palette/palette_file.hpp"
|
||||||
|
#include "core/palette/palette_manager.hpp"
|
||||||
|
#include "core/theme/theme_renderer.hpp"
|
||||||
|
#include "core/theme/theme_template.hpp"
|
||||||
|
|
||||||
void handle_show_vars()
|
void handle_show_vars()
|
||||||
{
|
{
|
||||||
@@ -21,9 +24,8 @@ void handle_show_vars()
|
|||||||
void handle_list_themes()
|
void handle_list_themes()
|
||||||
{
|
{
|
||||||
auto palette_manager = clrsync::core::palette_manager<clrsync::core::io::toml_file>();
|
auto palette_manager = clrsync::core::palette_manager<clrsync::core::io::toml_file>();
|
||||||
palette_manager.load_palettes_from_directory(
|
palette_manager.load_palettes_from_directory(clrsync::core::config::instance().palettes_path());
|
||||||
clrsync::core::config::instance().palettes_path());
|
|
||||||
|
|
||||||
const auto &palettes = palette_manager.palettes();
|
const auto &palettes = palette_manager.palettes();
|
||||||
std::cout << "Available themes:" << std::endl;
|
std::cout << "Available themes:" << std::endl;
|
||||||
for (const auto &p : palettes)
|
for (const auto &p : palettes)
|
||||||
@@ -36,16 +38,17 @@ int handle_apply_theme(const argparse::ArgumentParser &program, const std::strin
|
|||||||
{
|
{
|
||||||
clrsync::core::theme_renderer<clrsync::core::io::toml_file> renderer;
|
clrsync::core::theme_renderer<clrsync::core::io::toml_file> renderer;
|
||||||
std::string theme_identifier;
|
std::string theme_identifier;
|
||||||
|
clrsync::core::Result<void> result = clrsync::core::Ok();
|
||||||
|
|
||||||
if (program.is_used("--theme"))
|
if (program.is_used("--theme"))
|
||||||
{
|
{
|
||||||
theme_identifier = program.get<std::string>("--theme");
|
theme_identifier = program.get<std::string>("--theme");
|
||||||
renderer.apply_theme(theme_identifier);
|
result = renderer.apply_theme(theme_identifier);
|
||||||
}
|
}
|
||||||
else if (program.is_used("--path"))
|
else if (program.is_used("--path"))
|
||||||
{
|
{
|
||||||
theme_identifier = program.get<std::string>("--path");
|
theme_identifier = program.get<std::string>("--path");
|
||||||
renderer.apply_theme_from_path(theme_identifier);
|
result = renderer.apply_theme_from_path(theme_identifier);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -55,50 +58,90 @@ int handle_apply_theme(const argparse::ArgumentParser &program, const std::strin
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
theme_identifier = default_theme;
|
theme_identifier = default_theme;
|
||||||
renderer.apply_theme(theme_identifier);
|
result = renderer.apply_theme(theme_identifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
std::cerr << "Failed to apply theme: " << result.error().description() << std::endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
std::cout << "Applied theme " << theme_identifier << std::endl;
|
std::cout << "Applied theme " << theme_identifier << std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void initialize_config(const std::string &config_path)
|
clrsync::core::Result<void> initialize_config(const std::string &config_path)
|
||||||
{
|
{
|
||||||
auto conf = std::make_unique<clrsync::core::io::toml_file>(config_path);
|
auto conf = std::make_unique<clrsync::core::io::toml_file>(config_path);
|
||||||
clrsync::core::config::instance().initialize(std::move(conf));
|
return clrsync::core::config::instance().initialize(std::move(conf));
|
||||||
}
|
}
|
||||||
|
|
||||||
void setup_argument_parser(argparse::ArgumentParser &program)
|
void setup_argument_parser(argparse::ArgumentParser &program)
|
||||||
{
|
{
|
||||||
program.add_argument("-a", "--apply")
|
program.add_argument("-a", "--apply").help("applies default theme").flag();
|
||||||
.help("applies default theme")
|
|
||||||
.flag();
|
|
||||||
|
|
||||||
program.add_argument("-c", "--config")
|
program.add_argument("-c", "--config")
|
||||||
.default_value(clrsync::core::get_default_config_path())
|
.default_value(clrsync::core::get_default_config_path())
|
||||||
.help("sets config file path")
|
.help("sets config file path")
|
||||||
.metavar("PATH");
|
.metavar("PATH");
|
||||||
|
|
||||||
program.add_argument("-l", "--list-themes")
|
program.add_argument("-l", "--list-themes").help("lists available themes").flag();
|
||||||
.help("lists available themes")
|
|
||||||
.flag();
|
program.add_argument("-s", "--show-vars").help("shows color keys").flag();
|
||||||
|
|
||||||
program.add_argument("-s", "--show-vars")
|
|
||||||
.help("shows color keys")
|
|
||||||
.flag();
|
|
||||||
|
|
||||||
auto &group = program.add_mutually_exclusive_group();
|
auto &group = program.add_mutually_exclusive_group();
|
||||||
group.add_argument("-t", "--theme")
|
group.add_argument("-t", "--theme").help("sets theme <theme_name> to apply");
|
||||||
.help("sets theme <theme_name> to apply");
|
group.add_argument("-p", "--path").help("sets theme file <path/to/theme> to apply");
|
||||||
group.add_argument("-p", "--path")
|
|
||||||
.help("sets theme file <path/to/theme> to apply");
|
program.add_argument("-g", "--generate").nargs(1).help("generate palette from <image path>");
|
||||||
|
program.add_argument("--generate-color")
|
||||||
|
.nargs(1)
|
||||||
|
.help("generate palette from a color (hex), used with --generator matugen");
|
||||||
|
|
||||||
|
program.add_argument("--generator")
|
||||||
|
.default_value(std::string("hellwal"))
|
||||||
|
.help("palette generator to use (hellwal)")
|
||||||
|
.metavar("GENERATOR");
|
||||||
|
|
||||||
|
program.add_argument("--matugen-type")
|
||||||
|
.default_value(std::string("scheme-tonal-spot"))
|
||||||
|
.help("matugen: Sets a custom color scheme type")
|
||||||
|
.metavar("TYPE");
|
||||||
|
program.add_argument("--matugen-mode")
|
||||||
|
.default_value(std::string("dark"))
|
||||||
|
.help("matugen: Which mode to use for the color scheme (light,dark)")
|
||||||
|
.metavar("MODE");
|
||||||
|
program.add_argument("--matugen-contrast")
|
||||||
|
.default_value(std::string("0.0"))
|
||||||
|
.help("matugen: contrast value from -1 to 1")
|
||||||
|
.metavar("FLOAT");
|
||||||
|
|
||||||
|
// hellwal generator options
|
||||||
|
program.add_argument("--hellwal-neon").help("hellwal: enable neon mode").flag();
|
||||||
|
program.add_argument("--hellwal-dark").help("hellwal: prefer dark palettes").flag();
|
||||||
|
program.add_argument("--hellwal-light").help("hellwal: prefer light palettes").flag();
|
||||||
|
program.add_argument("--hellwal-color").help("hellwal: enable color mode").flag();
|
||||||
|
program.add_argument("--hellwal-invert").help("hellwal: invert colors").flag();
|
||||||
|
program.add_argument("--hellwal-dark-offset")
|
||||||
|
.default_value(std::string("0.0"))
|
||||||
|
.help("hellwal: dark offset (float)")
|
||||||
|
.metavar("FLOAT");
|
||||||
|
program.add_argument("--hellwal-bright-offset")
|
||||||
|
.default_value(std::string("0.0"))
|
||||||
|
.help("hellwal: bright offset (float)")
|
||||||
|
.metavar("FLOAT");
|
||||||
|
program.add_argument("--hellwal-gray-scale")
|
||||||
|
.default_value(std::string("0.0"))
|
||||||
|
.help("hellwal: gray scale factor (float)")
|
||||||
|
.metavar("FLOAT");
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argparse::ArgumentParser program("clrsync", clrsync::core::version_string());
|
argparse::ArgumentParser program("clrsync", clrsync::core::version_string());
|
||||||
setup_argument_parser(program);
|
setup_argument_parser(program);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
program.parse_args(argc, argv);
|
program.parse_args(argc, argv);
|
||||||
@@ -109,38 +152,165 @@ int main(int argc, char *argv[])
|
|||||||
std::cerr << program;
|
std::cerr << program;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string config_path = program.get<std::string>("--config");
|
std::string config_path = program.get<std::string>("--config");
|
||||||
|
|
||||||
try
|
auto config_result = initialize_config(config_path);
|
||||||
|
if (!config_result)
|
||||||
{
|
{
|
||||||
initialize_config(config_path);
|
std::cerr << "Error loading config: " << config_result.error().description() << std::endl;
|
||||||
}
|
|
||||||
catch (const std::exception &err)
|
|
||||||
{
|
|
||||||
std::cerr << "Error loading config: " << err.what() << std::endl;
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (program.is_used("--show-vars"))
|
if (program.is_used("--show-vars"))
|
||||||
{
|
{
|
||||||
handle_show_vars();
|
handle_show_vars();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (program.is_used("--list-themes"))
|
if (program.is_used("--list-themes"))
|
||||||
{
|
{
|
||||||
handle_list_themes();
|
handle_list_themes();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (program.is_used("--apply"))
|
if (program.is_used("--apply"))
|
||||||
{
|
{
|
||||||
const std::string default_theme = clrsync::core::config::instance().default_theme();
|
const std::string default_theme = clrsync::core::config::instance().default_theme();
|
||||||
return handle_apply_theme(program, default_theme);
|
return handle_apply_theme(program, default_theme);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (program.is_used("--generate"))
|
||||||
|
{
|
||||||
|
std::string image_path;
|
||||||
|
if (program.is_used("--generate"))
|
||||||
|
image_path = program.get<std::string>("--generate");
|
||||||
|
std::string generator_name = program.get<std::string>("--generator");
|
||||||
|
|
||||||
|
clrsync::core::palette pal;
|
||||||
|
if (generator_name == "hellwal")
|
||||||
|
{
|
||||||
|
clrsync::core::hellwal_generator gen;
|
||||||
|
clrsync::core::hellwal_generator::options opts{};
|
||||||
|
|
||||||
|
if (program.is_used("--hellwal-neon"))
|
||||||
|
opts.neon = true;
|
||||||
|
if (program.is_used("--hellwal-dark"))
|
||||||
|
opts.dark = true;
|
||||||
|
if (program.is_used("--hellwal-light"))
|
||||||
|
opts.light = true;
|
||||||
|
if (program.is_used("--hellwal-color"))
|
||||||
|
opts.color = true;
|
||||||
|
if (program.is_used("--hellwal-invert"))
|
||||||
|
opts.invert = true;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
std::string s1 = program.get<std::string>("--hellwal-dark-offset");
|
||||||
|
opts.dark_offset = std::stof(s1);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
std::string s2 = program.get<std::string>("--hellwal-bright-offset");
|
||||||
|
opts.bright_offset = std::stof(s2);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
std::string s3 = program.get<std::string>("--hellwal-gray-scale");
|
||||||
|
opts.gray_scale = std::stof(s3);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
pal = gen.generate_from_image(image_path, opts);
|
||||||
|
}
|
||||||
|
else if (generator_name == "matugen")
|
||||||
|
{
|
||||||
|
clrsync::core::matugen_generator gen;
|
||||||
|
clrsync::core::matugen_generator::options opts{};
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
opts.type = program.get<std::string>("--matugen-type");
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
opts.type = program.get<std::string>("--matugen-type");
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
opts.mode = program.get<std::string>("--matugen-mode");
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
std::string s = program.get<std::string>("--matugen-contrast");
|
||||||
|
opts.contrast = std::stof(s);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
if (program.is_used("--generate-color"))
|
||||||
|
{
|
||||||
|
std::string color = program.get<std::string>("--generate-color");
|
||||||
|
pal = gen.generate_from_color(color, opts);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pal = gen.generate_from_image(image_path, opts);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cerr << "Unknown generator: " << generator_name << std::endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pal.name().empty())
|
||||||
|
{
|
||||||
|
std::filesystem::path p(image_path);
|
||||||
|
pal.set_name("generated:" + p.filename().string());
|
||||||
|
}
|
||||||
|
|
||||||
|
auto dir = clrsync::core::config::instance().palettes_path();
|
||||||
|
clrsync::core::palette_manager<clrsync::core::io::toml_file> pal_mgr;
|
||||||
|
pal_mgr.save_palette_to_file(pal, dir);
|
||||||
|
|
||||||
|
clrsync::core::theme_renderer<clrsync::core::io::toml_file> renderer;
|
||||||
|
std::filesystem::path file_path = std::filesystem::path(dir) / (pal.name() + ".toml");
|
||||||
|
auto res = renderer.apply_theme_from_path(file_path.string());
|
||||||
|
if (!res)
|
||||||
|
{
|
||||||
|
std::cerr << "Failed to apply generated palette: " << res.error().description()
|
||||||
|
<< std::endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
std::cout << "Generated and applied palette: " << pal.name() << std::endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
std::cout << program << std::endl;
|
std::cout << program << std::endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
23
src/core/CMakeLists.txt
Normal file
23
src/core/CMakeLists.txt
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
set(CORE_SOURCES
|
||||||
|
palette/color.cpp
|
||||||
|
palette/hellwal_generator.cpp
|
||||||
|
palette/matugen_generator.cpp
|
||||||
|
io/toml_file.cpp
|
||||||
|
config/config.cpp
|
||||||
|
common/utils.cpp
|
||||||
|
common/version.cpp
|
||||||
|
theme/theme_template.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||||
|
|
||||||
|
add_library(clrsync_core SHARED ${CORE_SOURCES})
|
||||||
|
|
||||||
|
target_include_directories(clrsync_core PUBLIC
|
||||||
|
${CMAKE_SOURCE_DIR}/src
|
||||||
|
SYSTEM ${CMAKE_SOURCE_DIR}/lib
|
||||||
|
)
|
||||||
|
|
||||||
|
target_compile_definitions(clrsync_core PUBLIC
|
||||||
|
CLRSYNC_DATADIR=\"${CMAKE_INSTALL_FULL_DATADIR}/clrsync\"
|
||||||
|
)
|
||||||
266
src/core/common/error.hpp
Normal file
266
src/core/common/error.hpp
Normal file
@@ -0,0 +1,266 @@
|
|||||||
|
#ifndef CLRSYNC_CORE_ERROR_HPP
|
||||||
|
#define CLRSYNC_CORE_ERROR_HPP
|
||||||
|
|
||||||
|
#include <optional>
|
||||||
|
#include <string>
|
||||||
|
#include <variant>
|
||||||
|
|
||||||
|
namespace clrsync::core
|
||||||
|
{
|
||||||
|
|
||||||
|
enum class error_code
|
||||||
|
{
|
||||||
|
unknown,
|
||||||
|
|
||||||
|
file_not_found,
|
||||||
|
file_open_failed,
|
||||||
|
file_write_failed,
|
||||||
|
file_read_failed,
|
||||||
|
dir_create_failed,
|
||||||
|
|
||||||
|
parse_failed,
|
||||||
|
invalid_format,
|
||||||
|
|
||||||
|
config_missing,
|
||||||
|
config_invalid,
|
||||||
|
|
||||||
|
template_not_found,
|
||||||
|
template_load_failed,
|
||||||
|
template_apply_failed,
|
||||||
|
|
||||||
|
palette_not_found,
|
||||||
|
palette_load_failed,
|
||||||
|
|
||||||
|
init_failed,
|
||||||
|
invalid_arg,
|
||||||
|
resource_missing,
|
||||||
|
};
|
||||||
|
|
||||||
|
inline const char *error_code_string(error_code code)
|
||||||
|
{
|
||||||
|
switch (code)
|
||||||
|
{
|
||||||
|
case error_code::unknown:
|
||||||
|
return "Unknown error";
|
||||||
|
case error_code::file_not_found:
|
||||||
|
return "File not found";
|
||||||
|
case error_code::file_open_failed:
|
||||||
|
return "Failed to open file";
|
||||||
|
case error_code::file_write_failed:
|
||||||
|
return "Failed to write file";
|
||||||
|
case error_code::file_read_failed:
|
||||||
|
return "Failed to read file";
|
||||||
|
case error_code::dir_create_failed:
|
||||||
|
return "Failed to create directory";
|
||||||
|
case error_code::parse_failed:
|
||||||
|
return "Parse failed";
|
||||||
|
case error_code::invalid_format:
|
||||||
|
return "Invalid format";
|
||||||
|
case error_code::config_missing:
|
||||||
|
return "Configuration missing";
|
||||||
|
case error_code::config_invalid:
|
||||||
|
return "Configuration invalid";
|
||||||
|
case error_code::template_not_found:
|
||||||
|
return "Template not found";
|
||||||
|
case error_code::template_load_failed:
|
||||||
|
return "Failed to load template";
|
||||||
|
case error_code::template_apply_failed:
|
||||||
|
return "Failed to apply template";
|
||||||
|
case error_code::palette_not_found:
|
||||||
|
return "Palette not found";
|
||||||
|
case error_code::palette_load_failed:
|
||||||
|
return "Failed to load palette";
|
||||||
|
case error_code::init_failed:
|
||||||
|
return "Initialization failed";
|
||||||
|
case error_code::invalid_arg:
|
||||||
|
return "Invalid argument";
|
||||||
|
case error_code::resource_missing:
|
||||||
|
return "Resource missing";
|
||||||
|
default:
|
||||||
|
return "Unknown error code";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct Error
|
||||||
|
{
|
||||||
|
error_code code;
|
||||||
|
std::string message;
|
||||||
|
std::string context;
|
||||||
|
|
||||||
|
Error(error_code c) : code(c), message(error_code_string(c))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
Error(error_code c, std::string msg) : code(c), message(std::move(msg))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
Error(error_code c, std::string msg, std::string ctx)
|
||||||
|
: code(c), message(std::move(msg)), context(std::move(ctx))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string description() const
|
||||||
|
{
|
||||||
|
if (context.empty())
|
||||||
|
return message;
|
||||||
|
return message + " [" + context + "]";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T> class [[nodiscard]] Result
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
std::variant<T, Error> m_data;
|
||||||
|
|
||||||
|
public:
|
||||||
|
Result(T value) : m_data(std::move(value))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
Result(Error error) : m_data(std::move(error))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool is_ok() const
|
||||||
|
{
|
||||||
|
return std::holds_alternative<T>(m_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool is_error() const
|
||||||
|
{
|
||||||
|
return std::holds_alternative<Error>(m_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
explicit operator bool() const
|
||||||
|
{
|
||||||
|
return is_ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
T &value() &
|
||||||
|
{
|
||||||
|
return std::get<T>(m_data);
|
||||||
|
}
|
||||||
|
const T &value() const &
|
||||||
|
{
|
||||||
|
return std::get<T>(m_data);
|
||||||
|
}
|
||||||
|
T &&value() &&
|
||||||
|
{
|
||||||
|
return std::get<T>(std::move(m_data));
|
||||||
|
}
|
||||||
|
|
||||||
|
const Error &error() const
|
||||||
|
{
|
||||||
|
return std::get<Error>(m_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
T value_or(T default_value) const
|
||||||
|
{
|
||||||
|
return is_ok() ? std::get<T>(m_data) : std::move(default_value);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::optional<T> ok() const
|
||||||
|
{
|
||||||
|
if (is_ok())
|
||||||
|
return std::get<T>(m_data);
|
||||||
|
return std::nullopt;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::optional<Error> err() const
|
||||||
|
{
|
||||||
|
if (is_error())
|
||||||
|
return std::get<Error>(m_data);
|
||||||
|
return std::nullopt;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename F> auto map(F &&func) -> Result<decltype(func(std::declval<T>()))>
|
||||||
|
{
|
||||||
|
using U = decltype(func(std::declval<T>()));
|
||||||
|
if (is_ok())
|
||||||
|
return Result<U>(func(std::get<T>(m_data)));
|
||||||
|
return Result<U>(std::get<Error>(m_data));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename F> auto and_then(F &&func) -> decltype(func(std::declval<T>()))
|
||||||
|
{
|
||||||
|
if (is_ok())
|
||||||
|
return func(std::get<T>(m_data));
|
||||||
|
using ResultType = decltype(func(std::declval<T>()));
|
||||||
|
return ResultType(std::get<Error>(m_data));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template <> class [[nodiscard]] Result<void>
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
std::optional<Error> m_error;
|
||||||
|
|
||||||
|
public:
|
||||||
|
Result() : m_error(std::nullopt)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
Result(Error error) : m_error(std::move(error))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool is_ok() const
|
||||||
|
{
|
||||||
|
return !m_error.has_value();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool is_error() const
|
||||||
|
{
|
||||||
|
return m_error.has_value();
|
||||||
|
}
|
||||||
|
|
||||||
|
explicit operator bool() const
|
||||||
|
{
|
||||||
|
return is_ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
const Error &error() const
|
||||||
|
{
|
||||||
|
return *m_error;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::optional<Error> err() const
|
||||||
|
{
|
||||||
|
return m_error;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T> Result<T> Ok(T value)
|
||||||
|
{
|
||||||
|
return Result<T>(std::move(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline Result<void> Ok()
|
||||||
|
{
|
||||||
|
return Result<void>();
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T> Result<T> Err(Error error)
|
||||||
|
{
|
||||||
|
return Result<T>(std::move(error));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T> Result<T> Err(error_code code)
|
||||||
|
{
|
||||||
|
return Result<T>(Error(code));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T> Result<T> Err(error_code code, std::string message)
|
||||||
|
{
|
||||||
|
return Result<T>(Error(code, std::move(message)));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T> Result<T> Err(error_code code, std::string message, std::string context)
|
||||||
|
{
|
||||||
|
return Result<T>(Error(code, std::move(message), std::move(context)));
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace clrsync::core
|
||||||
|
|
||||||
|
#endif // CLRSYNC_CORE_ERROR_HPP
|
||||||
56
src/core/common/utils.cpp
Normal file
56
src/core/common/utils.cpp
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
#include "utils.hpp"
|
||||||
|
#include <filesystem>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
namespace clrsync::core
|
||||||
|
{
|
||||||
|
void print_color_keys()
|
||||||
|
{
|
||||||
|
for (const auto &key : clrsync::core::COLOR_KEYS)
|
||||||
|
{
|
||||||
|
std::cout << key << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string get_default_config_path()
|
||||||
|
{
|
||||||
|
const char *env_path = std::getenv("CLRSYNC_CONFIG_PATH");
|
||||||
|
if (env_path && env_path[0] != '\0')
|
||||||
|
return normalize_path(env_path).string();
|
||||||
|
|
||||||
|
std::filesystem::path home = normalize_path("~");
|
||||||
|
std::filesystem::path config_path = home / ".config" / "clrsync" / "config.toml";
|
||||||
|
return config_path.string();
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string expand_user(const std::string &path)
|
||||||
|
{
|
||||||
|
if (path.empty() || path[0] != '~')
|
||||||
|
return path;
|
||||||
|
|
||||||
|
if (path.length() == 1 || path[1] == '/' || path[1] == '\\')
|
||||||
|
{
|
||||||
|
#ifdef _WIN32
|
||||||
|
const char *home = std::getenv("USERPROFILE");
|
||||||
|
#else
|
||||||
|
const char *home = std::getenv("HOME");
|
||||||
|
#endif
|
||||||
|
if (!home)
|
||||||
|
return path;
|
||||||
|
|
||||||
|
if (path.length() == 1)
|
||||||
|
return std::string(home);
|
||||||
|
|
||||||
|
return std::string(home) + path.substr(1);
|
||||||
|
}
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::filesystem::path normalize_path(const std::string &path)
|
||||||
|
{
|
||||||
|
std::string expanded = expand_user(path);
|
||||||
|
std::filesystem::path fs_path(expanded);
|
||||||
|
return fs_path.lexically_normal();
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace clrsync::core
|
||||||
@@ -1,14 +1,16 @@
|
|||||||
#ifndef CLRSYNC_CORE_UTILS_HPP
|
#ifndef CLRSYNC_CORE_UTILS_HPP
|
||||||
#define CLRSYNC_CORE_UTILS_HPP
|
#define CLRSYNC_CORE_UTILS_HPP
|
||||||
|
|
||||||
|
#include <filesystem>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <core/palette/color_keys.hpp>
|
#include "core/palette/color_keys.hpp"
|
||||||
|
|
||||||
namespace clrsync::core
|
namespace clrsync::core
|
||||||
{
|
{
|
||||||
void print_color_keys();
|
void print_color_keys();
|
||||||
std::string get_default_config_path();
|
std::string get_default_config_path();
|
||||||
std::string expand_user(const std::string &path);
|
std::string expand_user(const std::string &path);
|
||||||
|
std::filesystem::path normalize_path(const std::string &path);
|
||||||
} // namespace clrsync::core
|
} // namespace clrsync::core
|
||||||
#endif // CLRSYNC_CORE_UTILS_HPP
|
#endif // CLRSYNC_CORE_UTILS_HPP
|
||||||
9
src/core/common/version.cpp
Normal file
9
src/core/common/version.cpp
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#include "core/common/version.hpp"
|
||||||
|
|
||||||
|
namespace clrsync::core
|
||||||
|
{
|
||||||
|
const std::string version_string()
|
||||||
|
{
|
||||||
|
return GIT_SEMVER;
|
||||||
|
}
|
||||||
|
} // namespace clrsync::core
|
||||||
@@ -1,15 +1,12 @@
|
|||||||
#ifndef CLRSYNC_CORE_VERSION_HPP
|
#ifndef CLRSYNC_CORE_VERSION_HPP
|
||||||
#define CLRSYNC_CORE_VERSION_HPP
|
#define CLRSYNC_CORE_VERSION_HPP
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace clrsync::core
|
namespace clrsync::core
|
||||||
{
|
{
|
||||||
|
|
||||||
constexpr uint8_t VERSION_MAJOR = 0;
|
const std::string GIT_SEMVER = "1.0.5+git.g2d015c6";
|
||||||
constexpr uint8_t VERSION_MINOR = 1;
|
|
||||||
constexpr uint8_t VERSION_PATCH = 1;
|
|
||||||
|
|
||||||
const std::string version_string();
|
const std::string version_string();
|
||||||
} // namespace clrsync::core
|
} // namespace clrsync::core
|
||||||
@@ -1,15 +1,12 @@
|
|||||||
#ifndef CLRSYNC_CORE_VERSION_HPP
|
#ifndef CLRSYNC_CORE_VERSION_HPP
|
||||||
#define CLRSYNC_CORE_VERSION_HPP
|
#define CLRSYNC_CORE_VERSION_HPP
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace clrsync::core
|
namespace clrsync::core
|
||||||
{
|
{
|
||||||
|
|
||||||
constexpr uint8_t VERSION_MAJOR = @PROJECT_VERSION_MAJOR@;
|
const std::string GIT_SEMVER = "@SEMVER@";
|
||||||
constexpr uint8_t VERSION_MINOR = @PROJECT_VERSION_MINOR@;
|
|
||||||
constexpr uint8_t VERSION_PATCH = @PROJECT_VERSION_PATCH@;
|
|
||||||
|
|
||||||
const std::string version_string();
|
const std::string version_string();
|
||||||
} // namespace clrsync::core
|
} // namespace clrsync::core
|
||||||
@@ -1,8 +1,16 @@
|
|||||||
#include "config.hpp"
|
#include "config.hpp"
|
||||||
|
#include "core/common/error.hpp"
|
||||||
|
#include "core/common/utils.hpp"
|
||||||
|
#include "core/io/toml_file.hpp"
|
||||||
|
|
||||||
#include <core/palette/color.hpp>
|
#include "core/palette/color.hpp"
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <stdexcept>
|
#include <fstream>
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "windows.h"
|
||||||
|
#endif
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
namespace clrsync::core
|
namespace clrsync::core
|
||||||
{
|
{
|
||||||
@@ -12,58 +20,221 @@ config &config::instance()
|
|||||||
return inst;
|
return inst;
|
||||||
}
|
}
|
||||||
|
|
||||||
void config::initialize(std::unique_ptr<clrsync::core::io::file> file)
|
Result<void> config::initialize(std::unique_ptr<clrsync::core::io::file> file)
|
||||||
{
|
{
|
||||||
copy_default_configs();
|
copy_default_configs();
|
||||||
m_file = std::move(file);
|
m_file = std::move(file);
|
||||||
if (m_file)
|
if (!m_file)
|
||||||
if (!m_file->parse())
|
return Err<void>(error_code::config_missing, "Config file is missing");
|
||||||
throw std::runtime_error{"Could not parse config file"};
|
|
||||||
|
auto parse_result = m_file->parse();
|
||||||
|
if (!parse_result)
|
||||||
|
return Err<void>(error_code::config_invalid, parse_result.error().message,
|
||||||
|
parse_result.error().context);
|
||||||
|
|
||||||
|
std::filesystem::path config_path = get_user_config_dir() / "config.toml";
|
||||||
|
std::filesystem::path temp_config_path = get_user_config_dir() / "config-temp.toml";
|
||||||
|
|
||||||
|
if (std::filesystem::exists(config_path))
|
||||||
|
{
|
||||||
|
std::error_code ec;
|
||||||
|
auto perms = std::filesystem::status(config_path, ec).permissions();
|
||||||
|
|
||||||
|
if (ec || (perms & std::filesystem::perms::owner_write) == std::filesystem::perms::none)
|
||||||
|
{
|
||||||
|
m_temp_config_path = temp_config_path.string();
|
||||||
|
|
||||||
|
if (std::filesystem::exists(temp_config_path))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
auto temp_conf = std::make_unique<clrsync::core::io::toml_file>(temp_config_path.string());
|
||||||
|
auto temp_parse = temp_conf->parse();
|
||||||
|
if (temp_parse)
|
||||||
|
{
|
||||||
|
m_temp_file = std::move(temp_conf);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (const std::exception &e)
|
||||||
|
{
|
||||||
|
std::cerr << "Warning: Failed to load temp config: " << e.what() << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::filesystem::path config::get_user_config_dir()
|
std::filesystem::path config::get_user_config_dir()
|
||||||
{
|
{
|
||||||
|
std::filesystem::path home = normalize_path("~");
|
||||||
|
return home / ".config" / "clrsync";
|
||||||
|
}
|
||||||
|
|
||||||
|
std::filesystem::path config::get_user_state_dir()
|
||||||
|
{
|
||||||
|
std::filesystem::path home = normalize_path("~");
|
||||||
|
return home / ".local" / "state" / "clrsync";
|
||||||
|
}
|
||||||
|
|
||||||
|
std::filesystem::path config::get_writable_config_path()
|
||||||
|
{
|
||||||
|
std::filesystem::path config_path = get_user_config_dir() / "config.toml";
|
||||||
|
|
||||||
|
if (std::filesystem::exists(config_path))
|
||||||
|
{
|
||||||
|
std::error_code ec;
|
||||||
|
auto perms = std::filesystem::status(config_path, ec).permissions();
|
||||||
|
|
||||||
|
if (ec || (perms & std::filesystem::perms::owner_write) == std::filesystem::perms::none)
|
||||||
|
{
|
||||||
|
return get_user_config_dir() / "config-temp.toml";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return config_path;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::filesystem::path config::get_data_dir()
|
||||||
|
{
|
||||||
|
if (std::filesystem::exists(CLRSYNC_DATADIR))
|
||||||
|
return {CLRSYNC_DATADIR};
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (const char *appdata = std::getenv("APPDATA"))
|
char buffer[MAX_PATH];
|
||||||
return fs::path(appdata) / "clrsync";
|
GetModuleFileNameA(nullptr, buffer, MAX_PATH);
|
||||||
else
|
std::filesystem::path exe_path(buffer);
|
||||||
return fs::path("C:/clrsync");
|
std::filesystem::path data_dir = exe_path.parent_path().parent_path() / "share" / "clrsync";
|
||||||
|
return data_dir;
|
||||||
#else
|
#else
|
||||||
if (const char *xdg = std::getenv("XDG_CONFIG_HOME"))
|
if (std::filesystem::exists("/usr/share/clrsync"))
|
||||||
return std::filesystem::path(xdg) / "clrsync";
|
return {"/usr/share/clrsync"};
|
||||||
else if (const char *home = std::getenv("HOME"))
|
if (std::filesystem::exists("/usr/local/share/clrsync"))
|
||||||
return std::filesystem::path(home) / ".config/clrsync";
|
return {"/usr/local/share/clrsync"};
|
||||||
else
|
return {};
|
||||||
return std::filesystem::path("/tmp/clrsync");
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void config::copy_file(const std::filesystem::path &src, const std::filesystem::path &dst)
|
||||||
|
{
|
||||||
|
if (std::filesystem::exists(dst))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!std::filesystem::exists(src))
|
||||||
|
return;
|
||||||
|
|
||||||
|
std::ifstream in(src, std::ios::binary);
|
||||||
|
std::ofstream out(dst, std::ios::binary);
|
||||||
|
|
||||||
|
if (!in || !out)
|
||||||
|
return;
|
||||||
|
|
||||||
|
out << in.rdbuf();
|
||||||
|
}
|
||||||
|
|
||||||
|
void config::copy_dir(const std::filesystem::path &src, const std::filesystem::path &dst)
|
||||||
|
{
|
||||||
|
if (!std::filesystem::exists(src))
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (auto const &entry : std::filesystem::recursive_directory_iterator(src))
|
||||||
|
{
|
||||||
|
auto rel = std::filesystem::relative(entry.path(), src);
|
||||||
|
auto out = dst / rel;
|
||||||
|
|
||||||
|
if (entry.is_directory())
|
||||||
|
{
|
||||||
|
std::filesystem::create_directories(out);
|
||||||
|
}
|
||||||
|
else if (entry.is_regular_file())
|
||||||
|
{
|
||||||
|
copy_file(entry.path(), out);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void config::copy_default_configs()
|
void config::copy_default_configs()
|
||||||
{
|
{
|
||||||
std::filesystem::path user_config = get_user_config_dir();
|
std::filesystem::path user_dir = get_user_config_dir();
|
||||||
|
std::filesystem::path system_dir = get_data_dir();
|
||||||
|
|
||||||
|
std::filesystem::create_directories(user_dir);
|
||||||
|
|
||||||
|
if (system_dir.empty())
|
||||||
|
return;
|
||||||
|
|
||||||
if (!std::filesystem::exists(user_config))
|
|
||||||
{
|
{
|
||||||
std::filesystem::create_directories(user_config);
|
auto src = system_dir / "config.toml";
|
||||||
|
auto dst = user_dir / "config.toml";
|
||||||
std::filesystem::path default_dir = CLRSYNC_DATADIR;
|
if (!std::filesystem::exists(dst))
|
||||||
std::filesystem::copy(default_dir / "config.toml", user_config / "config.toml");
|
copy_file(src, dst);
|
||||||
std::filesystem::copy(default_dir / "templates", user_config / "templates",
|
|
||||||
std::filesystem::copy_options::recursive);
|
|
||||||
std::filesystem::copy(default_dir / "palettes", user_config / "palettes",
|
|
||||||
std::filesystem::copy_options::recursive);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
auto src = system_dir / "templates";
|
||||||
|
auto dst = user_dir / "templates";
|
||||||
|
|
||||||
|
if (!std::filesystem::exists(dst))
|
||||||
|
std::filesystem::create_directories(dst);
|
||||||
|
|
||||||
|
copy_dir(src, dst);
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
auto src = system_dir / "palettes";
|
||||||
|
auto dst = user_dir / "palettes";
|
||||||
|
|
||||||
|
if (!std::filesystem::exists(dst))
|
||||||
|
std::filesystem::create_directories(dst);
|
||||||
|
|
||||||
|
copy_dir(src, dst);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Result<void> config::save_config_value(const std::string §ion, const std::string &key, const value_type &value)
|
||||||
|
{
|
||||||
|
if (!m_temp_config_path.empty())
|
||||||
|
{
|
||||||
|
if (!m_temp_file)
|
||||||
|
{
|
||||||
|
m_temp_file = std::make_unique<clrsync::core::io::toml_file>(m_temp_config_path);
|
||||||
|
(void)m_temp_file->parse();
|
||||||
|
}
|
||||||
|
|
||||||
|
m_temp_file->set_value(section, key, value);
|
||||||
|
return m_temp_file->save_file();
|
||||||
|
}
|
||||||
|
|
||||||
|
m_file->set_value(section, key, value);
|
||||||
|
return m_file->save_file();
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string &config::palettes_path()
|
const std::string &config::palettes_path()
|
||||||
{
|
{
|
||||||
if (m_palettes_dir.empty() && m_file)
|
if (m_palettes_dir.empty() && m_file)
|
||||||
|
{
|
||||||
|
if (m_temp_file)
|
||||||
|
{
|
||||||
|
auto temp_value = m_temp_file->get_string_value("general", "palettes_path");
|
||||||
|
if (!temp_value.empty())
|
||||||
|
{
|
||||||
|
m_palettes_dir = temp_value;
|
||||||
|
return m_palettes_dir;
|
||||||
|
}
|
||||||
|
}
|
||||||
m_palettes_dir = m_file->get_string_value("general", "palettes_path");
|
m_palettes_dir = m_file->get_string_value("general", "palettes_path");
|
||||||
|
}
|
||||||
return m_palettes_dir;
|
return m_palettes_dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string config::default_theme() const
|
const std::string config::default_theme() const
|
||||||
{
|
{
|
||||||
|
if (m_temp_file)
|
||||||
|
{
|
||||||
|
auto temp_value = m_temp_file->get_string_value("general", "default_theme");
|
||||||
|
if (!temp_value.empty())
|
||||||
|
return temp_value;
|
||||||
|
}
|
||||||
if (m_file)
|
if (m_file)
|
||||||
return m_file->get_string_value("general", "default_theme");
|
return m_file->get_string_value("general", "default_theme");
|
||||||
return {};
|
return {};
|
||||||
@@ -71,6 +242,12 @@ const std::string config::default_theme() const
|
|||||||
|
|
||||||
const std::string config::font() const
|
const std::string config::font() const
|
||||||
{
|
{
|
||||||
|
if (m_temp_file)
|
||||||
|
{
|
||||||
|
auto temp_value = m_temp_file->get_string_value("general", "font");
|
||||||
|
if (!temp_value.empty())
|
||||||
|
return temp_value;
|
||||||
|
}
|
||||||
if (m_file)
|
if (m_file)
|
||||||
return m_file->get_string_value("general", "font");
|
return m_file->get_string_value("general", "font");
|
||||||
return {};
|
return {};
|
||||||
@@ -78,55 +255,106 @@ const std::string config::font() const
|
|||||||
|
|
||||||
const uint32_t config::font_size() const
|
const uint32_t config::font_size() const
|
||||||
{
|
{
|
||||||
|
if (m_temp_file)
|
||||||
|
{
|
||||||
|
auto temp_value = m_temp_file->get_uint_value("general", "font_size");
|
||||||
|
if (temp_value != 0)
|
||||||
|
return temp_value;
|
||||||
|
}
|
||||||
if (m_file)
|
if (m_file)
|
||||||
return m_file->get_uint_value("general", "font_size");
|
return m_file->get_uint_value("general", "font_size");
|
||||||
return 14;
|
return 14;
|
||||||
}
|
}
|
||||||
|
|
||||||
void config::set_default_theme(const std::string &theme)
|
Result<void> config::set_default_theme(const std::string &theme)
|
||||||
{
|
{
|
||||||
if (m_file)
|
if (!m_file)
|
||||||
{
|
return Err<void>(error_code::config_missing, "Configuration not initialized");
|
||||||
m_file->set_value("general", "default_theme", theme);
|
|
||||||
m_file->save_file();
|
return save_config_value("general", "default_theme", theme);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void config::set_palettes_path(const std::string &path)
|
Result<void> config::set_palettes_path(const std::string &path)
|
||||||
{
|
{
|
||||||
if (m_file)
|
if (!m_file)
|
||||||
{
|
return Err<void>(error_code::config_missing, "Configuration not initialized");
|
||||||
m_file->set_value("general", "palettes_path", path);
|
|
||||||
m_file->save_file();
|
return save_config_value("general", "palettes_path", path);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void config::set_font(const std::string &font)
|
Result<void> config::set_font(const std::string &font)
|
||||||
{
|
{
|
||||||
if (m_file)
|
if (!m_file)
|
||||||
{
|
return Err<void>(error_code::config_missing, "Configuration not initialized");
|
||||||
m_file->set_value("general", "font", font);
|
|
||||||
m_file->save_file();
|
return save_config_value("general", "font", font);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
void config::set_font_size(int font_size)
|
Result<void> config::set_font_size(int font_size)
|
||||||
{
|
{
|
||||||
if (m_file)
|
if (!m_file)
|
||||||
{
|
return Err<void>(error_code::config_missing, "Configuration not initialized");
|
||||||
m_file->set_value("general", "font_size", font_size);
|
|
||||||
m_file->save_file();
|
return save_config_value("general", "font_size", static_cast<uint32_t>(font_size));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void config::update_template(const std::string &key,
|
Result<void> config::update_template(const std::string &key,
|
||||||
const clrsync::core::theme_template &theme_template)
|
const clrsync::core::theme_template &theme_template)
|
||||||
{
|
{
|
||||||
|
if (!m_file)
|
||||||
|
return Err<void>(error_code::config_missing, "Configuration not initialized");
|
||||||
|
|
||||||
m_themes[key] = theme_template;
|
m_themes[key] = theme_template;
|
||||||
m_file->set_value("templates." + key, "input_path", theme_template.template_path());
|
|
||||||
m_file->set_value("templates." + key, "output_path", theme_template.output_path());
|
auto result1 = save_config_value("templates." + key, "input_path", theme_template.template_path());
|
||||||
m_file->set_value("templates." + key, "enabled", theme_template.enabled());
|
if (!result1) return result1;
|
||||||
m_file->set_value("templates." + key, "reload_cmd", theme_template.reload_command());
|
|
||||||
m_file->save_file();
|
auto result2 = save_config_value("templates." + key, "output_path", theme_template.output_path());
|
||||||
|
if (!result2) return result2;
|
||||||
|
|
||||||
|
auto result3 = save_config_value("templates." + key, "enabled", theme_template.enabled());
|
||||||
|
if (!result3) return result3;
|
||||||
|
|
||||||
|
return save_config_value("templates." + key, "reload_cmd", theme_template.reload_command());
|
||||||
|
}
|
||||||
|
|
||||||
|
Result<void> config::remove_template(const std::string &key)
|
||||||
|
{
|
||||||
|
if (!m_file)
|
||||||
|
return Err<void>(error_code::config_missing, "Configuration not initialized");
|
||||||
|
|
||||||
|
auto it = m_themes.find(key);
|
||||||
|
if (it == m_themes.end())
|
||||||
|
return Err<void>(error_code::template_not_found, "Template not found", key);
|
||||||
|
|
||||||
|
std::filesystem::path template_file = it->second.template_path();
|
||||||
|
if (std::filesystem::exists(template_file))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
std::filesystem::remove(template_file);
|
||||||
|
}
|
||||||
|
catch (const std::exception &e)
|
||||||
|
{
|
||||||
|
return Err<void>(error_code::file_write_failed, "Failed to delete template file",
|
||||||
|
e.what());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
m_themes.erase(it);
|
||||||
|
|
||||||
|
if (!m_temp_config_path.empty())
|
||||||
|
{
|
||||||
|
if (!m_temp_file)
|
||||||
|
{
|
||||||
|
m_temp_file = std::make_unique<clrsync::core::io::toml_file>(m_temp_config_path);
|
||||||
|
(void)m_temp_file->parse();
|
||||||
|
}
|
||||||
|
m_temp_file->remove_section("templates." + key);
|
||||||
|
return m_temp_file->save_file();
|
||||||
|
}
|
||||||
|
|
||||||
|
m_file->remove_section("templates." + key);
|
||||||
|
return m_file->save_file();
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::unordered_map<std::string, clrsync::core::theme_template> config::templates()
|
const std::unordered_map<std::string, clrsync::core::theme_template> config::templates()
|
||||||
@@ -149,21 +377,23 @@ const std::unordered_map<std::string, clrsync::core::theme_template> config::tem
|
|||||||
theme.set_enabled(false);
|
theme.set_enabled(false);
|
||||||
}
|
}
|
||||||
theme.set_reload_command(std::get<std::string>(current["reload_cmd"]));
|
theme.set_reload_command(std::get<std::string>(current["reload_cmd"]));
|
||||||
theme.load_template();
|
(void)theme.load_template();
|
||||||
m_themes.insert({theme.name(), theme});
|
m_themes.insert({theme.name(), theme});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return m_themes;
|
return m_themes;
|
||||||
}
|
}
|
||||||
|
|
||||||
const clrsync::core::theme_template &config::template_by_name(const std::string &name) const
|
Result<const clrsync::core::theme_template *> config::template_by_name(
|
||||||
|
const std::string &name) const
|
||||||
{
|
{
|
||||||
auto it = m_themes.find(name);
|
auto it = m_themes.find(name);
|
||||||
if (it != m_themes.end())
|
if (it != m_themes.end())
|
||||||
{
|
{
|
||||||
return it->second;
|
return Ok(&it->second);
|
||||||
}
|
}
|
||||||
throw std::runtime_error("Template not found: " + name);
|
return Err<const clrsync::core::theme_template *>(error_code::template_not_found,
|
||||||
|
"Template not found", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace clrsync::core
|
} // namespace clrsync::core
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
#ifndef CLRSYNC_CORE_CONFIG_HPP
|
#ifndef CLRSYNC_CORE_CONFIG_HPP
|
||||||
#define CLRSYNC_CORE_CONFIG_HPP
|
#define CLRSYNC_CORE_CONFIG_HPP
|
||||||
|
|
||||||
#include <core/io/file.hpp>
|
#include "core/common/error.hpp"
|
||||||
#include <core/theme/theme_template.hpp>
|
#include "core/io/file.hpp"
|
||||||
|
#include "core/theme/theme_template.hpp"
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
@@ -14,24 +15,27 @@ class config
|
|||||||
public:
|
public:
|
||||||
static config &instance();
|
static config &instance();
|
||||||
|
|
||||||
void initialize(std::unique_ptr<clrsync::core::io::file> file);
|
Result<void> initialize(std::unique_ptr<clrsync::core::io::file> file);
|
||||||
|
|
||||||
const std::string font() const;
|
const std::string font() const;
|
||||||
const uint32_t font_size() const;
|
const uint32_t font_size() const;
|
||||||
const std::string &palettes_path();
|
const std::string &palettes_path();
|
||||||
const std::string default_theme() const;
|
const std::string default_theme() const;
|
||||||
const std::unordered_map<std::string, clrsync::core::theme_template> templates();
|
const std::unordered_map<std::string, clrsync::core::theme_template> templates();
|
||||||
const clrsync::core::theme_template &template_by_name(const std::string &name) const;
|
Result<const clrsync::core::theme_template *> template_by_name(const std::string &name) const;
|
||||||
std::filesystem::path get_user_config_dir();
|
std::filesystem::path get_user_config_dir();
|
||||||
|
std::filesystem::path get_user_state_dir();
|
||||||
|
std::filesystem::path get_writable_config_path();
|
||||||
|
|
||||||
|
Result<void> set_default_theme(const std::string &theme);
|
||||||
void set_default_theme(const std::string &theme);
|
Result<void> set_palettes_path(const std::string &path);
|
||||||
void set_palettes_path(const std::string &path);
|
Result<void> set_font(const std::string &font);
|
||||||
void set_font(const std::string &font);
|
Result<void> set_font_size(int font_size);
|
||||||
void set_font_size(int font_size);
|
|
||||||
|
|
||||||
void update_template(const std::string &key,
|
Result<void> update_template(const std::string &key,
|
||||||
const clrsync::core::theme_template &theme_template);
|
const clrsync::core::theme_template &theme_template);
|
||||||
|
Result<void> remove_template(const std::string &key);
|
||||||
|
static std::filesystem::path get_data_dir();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
config() = default;
|
config() = default;
|
||||||
@@ -40,7 +44,12 @@ class config
|
|||||||
|
|
||||||
std::string m_palettes_dir{};
|
std::string m_palettes_dir{};
|
||||||
std::unique_ptr<io::file> m_file;
|
std::unique_ptr<io::file> m_file;
|
||||||
|
std::unique_ptr<io::file> m_temp_file;
|
||||||
|
std::string m_temp_config_path;
|
||||||
std::unordered_map<std::string, theme_template> m_themes{};
|
std::unordered_map<std::string, theme_template> m_themes{};
|
||||||
|
Result<void> save_config_value(const std::string §ion, const std::string &key, const value_type &value);
|
||||||
|
static void copy_file(const std::filesystem::path &src, const std::filesystem::path &dst);
|
||||||
|
static void copy_dir(const std::filesystem::path &src, const std::filesystem::path &dst);
|
||||||
void copy_default_configs();
|
void copy_default_configs();
|
||||||
};
|
};
|
||||||
} // namespace clrsync::core
|
} // namespace clrsync::core
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#ifndef CLRSYNC_CORE_IO_FILE_HPP
|
#ifndef CLRSYNC_CORE_IO_FILE_HPP
|
||||||
#define CLRSYNC_CORE_IO_FILE_HPP
|
#define CLRSYNC_CORE_IO_FILE_HPP
|
||||||
|
#include "core/common/error.hpp"
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
@@ -14,7 +15,11 @@ class file
|
|||||||
public:
|
public:
|
||||||
file() = default;
|
file() = default;
|
||||||
file(std::string path) {};
|
file(std::string path) {};
|
||||||
virtual bool parse() { return false; };
|
virtual ~file() = default;
|
||||||
|
virtual Result<void> parse()
|
||||||
|
{
|
||||||
|
return Ok();
|
||||||
|
};
|
||||||
virtual const std::string get_string_value(const std::string §ion,
|
virtual const std::string get_string_value(const std::string §ion,
|
||||||
const std::string &key) const
|
const std::string &key) const
|
||||||
{
|
{
|
||||||
@@ -33,13 +38,17 @@ class file
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
virtual void set_value(const std::string §ion, const std::string &key,
|
virtual void set_value(const std::string §ion, const std::string &key,
|
||||||
const value_type &value)
|
const value_type &value)
|
||||||
{
|
{
|
||||||
insert_or_update_value(section, key, value);
|
insert_or_update_value(section, key, value);
|
||||||
}
|
}
|
||||||
virtual void insert_or_update_value(const std::string §ion, const std::string &key,
|
virtual void insert_or_update_value(const std::string §ion, const std::string &key,
|
||||||
const value_type &value) {};
|
const value_type &value) {};
|
||||||
virtual void save_file() {};
|
virtual void remove_section(const std::string §ion) {};
|
||||||
|
virtual Result<void> save_file()
|
||||||
|
{
|
||||||
|
return Ok();
|
||||||
|
};
|
||||||
};
|
};
|
||||||
} // namespace clrsync::core::io
|
} // namespace clrsync::core::io
|
||||||
#endif
|
#endif
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#include "toml_file.hpp"
|
#include "core/io/toml_file.hpp"
|
||||||
#include "core/utils.hpp"
|
#include "core/common/utils.hpp"
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@@ -8,15 +8,16 @@ namespace clrsync::core::io
|
|||||||
{
|
{
|
||||||
toml_file::toml_file(std::string path)
|
toml_file::toml_file(std::string path)
|
||||||
{
|
{
|
||||||
m_path = expand_user(path);
|
m_path = normalize_path(path).string();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool toml_file::parse()
|
Result<void> toml_file::parse()
|
||||||
{
|
{
|
||||||
if (!std::filesystem::exists(m_path))
|
if (!std::filesystem::exists(m_path))
|
||||||
return false;
|
return Err<void>(error_code::file_not_found, "File does not exist", m_path);
|
||||||
|
|
||||||
m_file = toml::parse_file(m_path);
|
m_file = toml::parse_file(m_path);
|
||||||
return true;
|
return Ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string toml_file::get_string_value(const std::string §ion,
|
const std::string toml_file::get_string_value(const std::string §ion,
|
||||||
@@ -63,7 +64,7 @@ std::map<std::string, value_type> toml_file::get_table(const std::string §io
|
|||||||
else if (auto d = val.value<double>())
|
else if (auto d = val.value<double>())
|
||||||
result[std::string(p.first.str())] = static_cast<uint32_t>(*d);
|
result[std::string(p.first.str())] = static_cast<uint32_t>(*d);
|
||||||
else
|
else
|
||||||
result[std::string(p.first.str())] = {}; // fallback for unsupported types
|
result[std::string(p.first.str())] = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@@ -91,11 +92,45 @@ void toml_file::insert_or_update_value(const std::string §ion, const std::st
|
|||||||
std::visit([&](auto &&v) { tbl->insert_or_assign(key, v); }, value);
|
std::visit([&](auto &&v) { tbl->insert_or_assign(key, v); }, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void toml_file::save_file()
|
void toml_file::remove_section(const std::string §ion)
|
||||||
{
|
{
|
||||||
std::filesystem::create_directories(std::filesystem::path(m_path).parent_path());
|
toml::table *tbl = m_file.as_table();
|
||||||
|
auto parts = split(section, '.');
|
||||||
|
|
||||||
|
if (parts.empty())
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (size_t i = 0; i < parts.size() - 1; ++i)
|
||||||
|
{
|
||||||
|
auto *sub = (*tbl)[parts[i]].as_table();
|
||||||
|
if (!sub)
|
||||||
|
return;
|
||||||
|
tbl = sub;
|
||||||
|
}
|
||||||
|
|
||||||
|
tbl->erase(parts.back());
|
||||||
|
}
|
||||||
|
|
||||||
|
Result<void> toml_file::save_file()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
std::filesystem::create_directories(std::filesystem::path(m_path).parent_path());
|
||||||
|
}
|
||||||
|
catch (const std::exception &e)
|
||||||
|
{
|
||||||
|
return Err<void>(error_code::dir_create_failed, e.what(), m_path);
|
||||||
|
}
|
||||||
|
|
||||||
std::ofstream stream(m_path, std::ios::binary);
|
std::ofstream stream(m_path, std::ios::binary);
|
||||||
|
if (!stream)
|
||||||
|
return Err<void>(error_code::file_write_failed, "Failed to open file for writing", m_path);
|
||||||
|
|
||||||
stream << m_file;
|
stream << m_file;
|
||||||
|
if (!stream)
|
||||||
|
return Err<void>(error_code::file_write_failed, "Failed to write to file", m_path);
|
||||||
|
|
||||||
|
return Ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string> toml_file::split(const std::string &s, char delim) const
|
std::vector<std::string> toml_file::split(const std::string &s, char delim) const
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#ifndef CLRSYNC_CORE_IO_TOML_FILE_HPP
|
#ifndef CLRSYNC_CORE_IO_TOML_FILE_HPP
|
||||||
#define CLRSYNC_CORE_IO_TOML_FILE_HPP
|
#define CLRSYNC_CORE_IO_TOML_FILE_HPP
|
||||||
#include <core/io/file.hpp>
|
#include "core/common/error.hpp"
|
||||||
|
#include "core/io/file.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <toml/toml.hpp>
|
#include <toml/toml.hpp>
|
||||||
|
|
||||||
@@ -10,7 +11,7 @@ class toml_file : public file
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit toml_file(std::string path);
|
explicit toml_file(std::string path);
|
||||||
bool parse() override;
|
Result<void> parse() override;
|
||||||
const std::string get_string_value(const std::string §ion,
|
const std::string get_string_value(const std::string §ion,
|
||||||
const std::string &key) const override;
|
const std::string &key) const override;
|
||||||
uint32_t get_uint_value(const std::string §ion, const std::string &key) const override;
|
uint32_t get_uint_value(const std::string §ion, const std::string &key) const override;
|
||||||
@@ -18,7 +19,8 @@ class toml_file : public file
|
|||||||
std::map<std::string, value_type> get_table(const std::string §ion_path) const override;
|
std::map<std::string, value_type> get_table(const std::string §ion_path) const override;
|
||||||
void insert_or_update_value(const std::string §ion, const std::string &key,
|
void insert_or_update_value(const std::string §ion, const std::string &key,
|
||||||
const value_type &value) override;
|
const value_type &value) override;
|
||||||
void save_file() override;
|
void remove_section(const std::string §ion) override;
|
||||||
|
Result<void> save_file() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
toml::parse_result m_file{};
|
toml::parse_result m_file{};
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <format>
|
#include <format>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <unordered_map>
|
|
||||||
|
|
||||||
namespace clrsync::core
|
namespace clrsync::core
|
||||||
{
|
{
|
||||||
@@ -112,14 +111,17 @@ void color::from_hex_string(const std::string &str)
|
|||||||
if (str.empty() || str[0] != '#')
|
if (str.empty() || str[0] != '#')
|
||||||
throw std::invalid_argument("Invalid hex color format");
|
throw std::invalid_argument("Invalid hex color format");
|
||||||
|
|
||||||
if (str.size() == 7) {
|
if (str.size() == 7)
|
||||||
|
{
|
||||||
uint32_t rgb = static_cast<uint32_t>(std::stoul(str.substr(1), nullptr, 16));
|
uint32_t rgb = static_cast<uint32_t>(std::stoul(str.substr(1), nullptr, 16));
|
||||||
m_hex = (rgb << 8) | 0xFF;
|
m_hex = (rgb << 8) | 0xFF;
|
||||||
}
|
}
|
||||||
else if (str.size() == 9) {
|
else if (str.size() == 9)
|
||||||
|
{
|
||||||
m_hex = static_cast<uint32_t>(std::stoul(str.substr(1), nullptr, 16));
|
m_hex = static_cast<uint32_t>(std::stoul(str.substr(1), nullptr, 16));
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
throw std::invalid_argument("Invalid hex color format");
|
throw std::invalid_argument("Invalid hex color format");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -138,30 +140,38 @@ const std::string color::to_hex_string_with_alpha() const
|
|||||||
return std::string(buffer);
|
return std::string(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string color::format(const std::string& field) const
|
std::string color::format(const std::string &field) const
|
||||||
{
|
{
|
||||||
auto rgb = to_rgb();
|
auto rgb = to_rgb();
|
||||||
auto rgba = to_rgba();
|
auto rgba = to_rgba();
|
||||||
auto hslv = to_hsl();
|
auto hslv = to_hsl();
|
||||||
auto hslav = to_hsla();
|
auto hslav = to_hsla();
|
||||||
|
|
||||||
if (field == "hex") return to_hex_string();
|
if (field == "hex")
|
||||||
if (field == "hex_stripped") {
|
return to_hex_string();
|
||||||
|
if (field == "hex_stripped")
|
||||||
|
{
|
||||||
auto s = to_hex_string();
|
auto s = to_hex_string();
|
||||||
return s.substr(1);
|
return s.substr(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (field == "hexa") return to_hex_string_with_alpha();
|
if (field == "hexa")
|
||||||
if (field == "hexa_stripped") {
|
return to_hex_string_with_alpha();
|
||||||
|
if (field == "hexa_stripped")
|
||||||
|
{
|
||||||
auto s = to_hex_string_with_alpha();
|
auto s = to_hex_string_with_alpha();
|
||||||
return s.substr(1);
|
return s.substr(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (field == "r") return std::to_string(rgb.r);
|
if (field == "r")
|
||||||
if (field == "g") return std::to_string(rgb.g);
|
return std::to_string(rgb.r);
|
||||||
if (field == "b") return std::to_string(rgb.b);
|
if (field == "g")
|
||||||
|
return std::to_string(rgb.g);
|
||||||
|
if (field == "b")
|
||||||
|
return std::to_string(rgb.b);
|
||||||
|
|
||||||
if (field == "a") {
|
if (field == "a")
|
||||||
|
{
|
||||||
float af = rgba.a / 255.0f;
|
float af = rgba.a / 255.0f;
|
||||||
return std::format("{:.2f}", af);
|
return std::format("{:.2f}", af);
|
||||||
}
|
}
|
||||||
@@ -170,9 +180,7 @@ std::string color::format(const std::string& field) const
|
|||||||
return std::format("rgb({},{},{})", rgb.r, rgb.g, rgb.b);
|
return std::format("rgb({},{},{})", rgb.r, rgb.g, rgb.b);
|
||||||
|
|
||||||
if (field == "rgba")
|
if (field == "rgba")
|
||||||
return std::format("rgba({},{},{},{:.2f})",
|
return std::format("rgba({},{},{},{:.2f})", rgba.r, rgba.g, rgba.b, rgba.a / 255.0f);
|
||||||
rgba.r, rgba.g, rgba.b,
|
|
||||||
rgba.a / 255.0f);
|
|
||||||
|
|
||||||
if (field == "h")
|
if (field == "h")
|
||||||
return std::format("{:.0f}", hslv.h);
|
return std::format("{:.0f}", hslv.h);
|
||||||
@@ -186,12 +194,10 @@ std::string color::format(const std::string& field) const
|
|||||||
return std::format("{:.2f}", hslav.a);
|
return std::format("{:.2f}", hslav.a);
|
||||||
|
|
||||||
if (field == "hsl")
|
if (field == "hsl")
|
||||||
return std::format("hsl({:.0f},{:.2f},{:.2f})",
|
return std::format("hsl({:.0f},{:.2f},{:.2f})", hslv.h, hslv.s, hslv.l);
|
||||||
hslv.h, hslv.s, hslv.l);
|
|
||||||
|
|
||||||
if (field == "hsla")
|
if (field == "hsla")
|
||||||
return std::format("hsla({:.0f},{:.2f},{:.2f},{:.2f})",
|
return std::format("hsla({:.0f},{:.2f},{:.2f},{:.2f})", hslav.h, hslav.s, hslav.l, hslav.a);
|
||||||
hslav.h, hslav.s, hslav.l, hslav.a);
|
|
||||||
|
|
||||||
throw std::runtime_error("Unknown color format: " + field);
|
throw std::runtime_error("Unknown color format: " + field);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ class color
|
|||||||
|
|
||||||
const std::string to_hex_string_with_alpha() const;
|
const std::string to_hex_string_with_alpha() const;
|
||||||
|
|
||||||
std::string format(const std::string& field) const;
|
std::string format(const std::string &field) const;
|
||||||
|
|
||||||
void set(uint32_t hex);
|
void set(uint32_t hex);
|
||||||
|
|
||||||
|
|||||||
@@ -1,55 +1,143 @@
|
|||||||
#ifndef CLRSYNC_CORE_PALETTE_COLOR_KEYS_HPP
|
#ifndef CLRSYNC_CORE_PALETTE_COLOR_KEYS_HPP
|
||||||
#define CLRSYNC_CORE_PALETTE_COLOR_KEYS_HPP
|
#define CLRSYNC_CORE_PALETTE_COLOR_KEYS_HPP
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
#include <cstdint>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
#include <string>
|
||||||
|
#include <unordered_map>
|
||||||
|
|
||||||
namespace clrsync::core
|
namespace clrsync::core
|
||||||
{
|
{
|
||||||
constexpr const char *COLOR_KEYS[] = {
|
constexpr const char *COLOR_KEYS[] = {
|
||||||
// UI / Surfaces
|
// General UI
|
||||||
"background", // main window / editor background
|
"background",
|
||||||
"surface", // panels, cards
|
"on_background",
|
||||||
"surface_variant", // alternate rows, subtle panels
|
|
||||||
"foreground", // main text
|
|
||||||
"foreground_secondary", // secondary text / hints
|
|
||||||
"accent", // buttons, highlights, selection
|
|
||||||
"outline", // borders, outlines
|
|
||||||
"shadow", // drop shadows / depth
|
|
||||||
"cursor", // caret / text cursor
|
|
||||||
|
|
||||||
// Editor-specific surfaces
|
"surface",
|
||||||
"editor_background", "sidebar_background", "popup_background", "floating_window_background",
|
"on_surface",
|
||||||
"menu_option_background",
|
|
||||||
|
|
||||||
// Editor text roles
|
"surface_variant",
|
||||||
"text_main", "text_emphasis", "text_command", "text_inactive", "text_disabled",
|
"on_surface_variant",
|
||||||
"text_line_number", "text_selected", "text_selection_inactive",
|
|
||||||
|
|
||||||
// Editor / Window borders
|
"border_focused",
|
||||||
"border_window", "border_focused", "border_emphasized",
|
"border",
|
||||||
|
|
||||||
// Syntax highlighting
|
"foreground",
|
||||||
"syntax_function", "syntax_error", "syntax_keyword", "syntax_special_keyword",
|
|
||||||
"syntax_operator",
|
|
||||||
|
|
||||||
// Semantic text colors
|
"cursor",
|
||||||
"text_error", "text_warning", "text_link", "text_comment", "text_string", "text_success",
|
"accent",
|
||||||
"warning_emphasis", "foreground_emphasis",
|
"accent_secondary",
|
||||||
|
|
||||||
// Extra
|
// Semantic
|
||||||
"terminal_gray",
|
"success",
|
||||||
|
"info",
|
||||||
|
"warning",
|
||||||
|
"error",
|
||||||
|
|
||||||
// Semantic / Status
|
"on_success",
|
||||||
"error", "warning", "success", "info",
|
"on_info",
|
||||||
|
"on_warning",
|
||||||
|
"on_error",
|
||||||
|
|
||||||
// Terminal colors (normal)
|
// Editor
|
||||||
"term_black", "term_red", "term_green", "term_yellow", "term_blue", "term_magenta", "term_cyan",
|
"editor_background",
|
||||||
"term_white",
|
"editor_command",
|
||||||
|
"editor_comment",
|
||||||
|
"editor_disabled",
|
||||||
|
"editor_emphasis",
|
||||||
|
"editor_error",
|
||||||
|
"editor_inactive",
|
||||||
|
"editor_line_number",
|
||||||
|
"editor_link",
|
||||||
|
"editor_main",
|
||||||
|
"editor_selected",
|
||||||
|
"editor_selection_inactive",
|
||||||
|
"editor_string",
|
||||||
|
"editor_success",
|
||||||
|
"editor_warning",
|
||||||
|
|
||||||
// Terminal colors (bright)
|
// Terminal
|
||||||
"term_black_bright", "term_red_bright", "term_green_bright", "term_yellow_bright",
|
"base00",
|
||||||
"term_blue_bright", "term_magenta_bright", "term_cyan_bright", "term_white_bright"};
|
"base01",
|
||||||
|
"base02",
|
||||||
|
"base03",
|
||||||
|
"base04",
|
||||||
|
"base05",
|
||||||
|
"base06",
|
||||||
|
"base07",
|
||||||
|
"base08",
|
||||||
|
"base09",
|
||||||
|
"base0A",
|
||||||
|
"base0B",
|
||||||
|
"base0C",
|
||||||
|
"base0D",
|
||||||
|
"base0E",
|
||||||
|
"base0F",
|
||||||
|
};
|
||||||
|
|
||||||
constexpr size_t NUM_COLOR_KEYS = std::size(COLOR_KEYS);
|
constexpr size_t NUM_COLOR_KEYS = std::size(COLOR_KEYS);
|
||||||
|
|
||||||
|
inline const std::unordered_map<std::string, uint32_t> DEFAULT_COLORS = {
|
||||||
|
{"background", 0x111111ff},
|
||||||
|
{"on_background", 0xd4d4d4ff},
|
||||||
|
|
||||||
|
{"surface", 0x111111ff},
|
||||||
|
{"on_surface", 0xd4d4d4ff},
|
||||||
|
|
||||||
|
{"surface_variant", 0x191919ff},
|
||||||
|
{"on_surface_variant", 0xd4d4d4ff},
|
||||||
|
|
||||||
|
{"border_focused", 0x2e2e2eff},
|
||||||
|
{"border", 0x242424ff},
|
||||||
|
|
||||||
|
{"foreground", 0xd2d2d2ff},
|
||||||
|
|
||||||
|
{"cursor", 0xd2d2d2ff},
|
||||||
|
{"accent", 0x9a8652ff},
|
||||||
|
{"accent_secondary", 0x9a8652ff},
|
||||||
|
|
||||||
|
{"success", 0x668a51ff},
|
||||||
|
{"info", 0x3a898cff},
|
||||||
|
{"warning", 0xb47837ff},
|
||||||
|
{"error", 0xaa4e4aff},
|
||||||
|
|
||||||
|
{"on_success", 0xd2d2d2ff},
|
||||||
|
{"on_info", 0xd2d2d2ff},
|
||||||
|
{"on_warning", 0xd2d2d2ff},
|
||||||
|
{"on_error", 0xd2d2d2ff},
|
||||||
|
|
||||||
|
{"editor_background", 0x111111ff},
|
||||||
|
{"editor_command", 0x3a898cff},
|
||||||
|
{"editor_comment", 0x849899ff},
|
||||||
|
{"editor_disabled", 0x849899ff},
|
||||||
|
{"editor_emphasis", 0xa9dc86ff},
|
||||||
|
{"editor_error", 0xaa4e4aff},
|
||||||
|
{"editor_inactive", 0x849899ff},
|
||||||
|
{"editor_line_number", 0x849899ff},
|
||||||
|
{"editor_link", 0xb0779eff},
|
||||||
|
{"editor_main", 0xd2d2d2ff},
|
||||||
|
{"editor_selected", 0x242424ff},
|
||||||
|
{"editor_selection_inactive", 0x1d1c1cff},
|
||||||
|
{"editor_string", 0x9a8652ff},
|
||||||
|
{"editor_success", 0x668a51ff},
|
||||||
|
{"editor_warning", 0xb47837ff},
|
||||||
|
|
||||||
|
{"base00", 0x111111ff},
|
||||||
|
{"base01", 0x668a51ff},
|
||||||
|
{"base02", 0x9a8652ff},
|
||||||
|
{"base03", 0xb47837ff},
|
||||||
|
{"base04", 0x9a5552ff},
|
||||||
|
{"base05", 0xaa477bff},
|
||||||
|
{"base06", 0x3a898cff},
|
||||||
|
{"base07", 0xb5b5b5ff},
|
||||||
|
{"base08", 0xaa4e4aff},
|
||||||
|
{"base09", 0xa9dc86ff},
|
||||||
|
{"base0A", 0xb6ab82ff},
|
||||||
|
{"base0B", 0xc5916bff},
|
||||||
|
{"base0C", 0xac7676ff},
|
||||||
|
{"base0D", 0xb0779eff},
|
||||||
|
{"base0E", 0x849899ff},
|
||||||
|
{"base0F", 0xd2d2d2ff},
|
||||||
|
};
|
||||||
} // namespace clrsync::core
|
} // namespace clrsync::core
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
19
src/core/palette/generator.hpp
Normal file
19
src/core/palette/generator.hpp
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#ifndef CLRSYNC_CORE_PALETTE_GENERATOR_HPP
|
||||||
|
#define CLRSYNC_CORE_PALETTE_GENERATOR_HPP
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include "core/palette/palette.hpp"
|
||||||
|
|
||||||
|
namespace clrsync::core
|
||||||
|
{
|
||||||
|
class generator
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
generator() = default;
|
||||||
|
virtual ~generator() = default;
|
||||||
|
|
||||||
|
virtual palette generate_from_image(const std::string &image_path) = 0;
|
||||||
|
};
|
||||||
|
} // namespace clrsync::core
|
||||||
|
|
||||||
|
#endif
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user