vivid-0.9.0/.cargo_vcs_info.json0000644000000001360000000000100121630ustar { "git": { "sha1": "ca8045eac287e5a2d921a6531ddd3ceb75de95ec" }, "path_in_vcs": "" }vivid-0.9.0/.github/workflows/CICD.yml000064400000000000000000000313401046102023000155760ustar 00000000000000name: CICD env: MIN_SUPPORTED_RUST_VERSION: "1.64.0" CICD_INTERMEDIATES_DIR: "_cicd-intermediates" on: workflow_dispatch: pull_request: push: branches: - master tags: - '*' jobs: ensure_cargo_fmt: name: Ensure 'cargo fmt' has been run runs-on: ubuntu-20.04 steps: - uses: dtolnay/rust-toolchain@stable with: components: rustfmt - uses: actions/checkout@v3 - run: cargo fmt -- --check - name: Ensure MSRV is set in `clippy.toml` run: grep "^msrv = \"${{ env.MIN_SUPPORTED_RUST_VERSION }}\"\$" clippy.toml min_version: name: Minimum supported rust version runs-on: ubuntu-20.04 steps: - name: Checkout source code uses: actions/checkout@v3 - name: Install rust toolchain (v${{ env.MIN_SUPPORTED_RUST_VERSION }}) uses: dtolnay/rust-toolchain@master with: toolchain: ${{ env.MIN_SUPPORTED_RUST_VERSION }} components: clippy - name: Run clippy (on minimum supported rust version to prevent warnings we can't fix) run: cargo clippy --locked --all-targets ${{ env.MSRV_FEATURES }} - name: Run tests run: cargo test --locked ${{ env.MSRV_FEATURES }} build: name: ${{ matrix.job.os }} (${{ matrix.job.target }}) runs-on: ${{ matrix.job.os }} strategy: fail-fast: false matrix: job: - { os: ubuntu-20.04, target: arm-unknown-linux-gnueabihf , use-cross: true } - { os: ubuntu-20.04, target: arm-unknown-linux-musleabihf, use-cross: true } - { os: ubuntu-20.04, target: aarch64-unknown-linux-gnu , use-cross: true } - { os: ubuntu-20.04, target: i686-unknown-linux-gnu , use-cross: true } - { os: ubuntu-20.04, target: i686-unknown-linux-musl , use-cross: true } - { os: ubuntu-20.04, target: x86_64-unknown-linux-gnu } - { os: ubuntu-20.04, target: x86_64-unknown-linux-musl , use-cross: true } - { os: macos-12, target: x86_64-apple-darwin } # - { os: windows-2019, target: i686-pc-windows-gnu } ## disabled; error: linker `i686-w64-mingw32-gcc` not found - { os: windows-2019, target: i686-pc-windows-msvc } - { os: windows-2019, target: x86_64-pc-windows-gnu } - { os: windows-2019, target: x86_64-pc-windows-msvc } env: BUILD_CMD: cargo steps: - name: Checkout source code uses: actions/checkout@v3 - name: Install prerequisites shell: bash run: | case ${{ matrix.job.target }} in arm-unknown-linux-*) sudo apt-get -y update ; sudo apt-get -y install gcc-arm-linux-gnueabihf ;; aarch64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu ;; esac - name: Extract crate information shell: bash run: | echo "PROJECT_NAME=vivid" >> $GITHUB_ENV echo "PROJECT_VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)" >> $GITHUB_ENV echo "PROJECT_MAINTAINER=$(sed -n 's/^authors = \["\(.*\)"\]/\1/p' Cargo.toml)" >> $GITHUB_ENV echo "PROJECT_HOMEPAGE=$(sed -n 's/^homepage = "\(.*\)"/\1/p' Cargo.toml)" >> $GITHUB_ENV - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable with: targets: ${{ matrix.job.target }} - name: Install cross if: matrix.job.use-cross uses: taiki-e/install-action@v2 with: tool: cross - name: Overwrite build command env variable if: matrix.job.use-cross shell: bash run: echo "BUILD_CMD=cross" >> $GITHUB_ENV - name: Show version information (Rust, cargo, GCC) shell: bash run: | gcc --version || true rustup -V rustup toolchain list rustup default cargo -V rustc -V - name: Build shell: bash run: $BUILD_CMD build --locked --release --target=${{ matrix.job.target }} - name: Strip debug information from executable id: strip shell: bash run: | # Figure out suffix of binary EXE_suffix="" case ${{ matrix.job.target }} in *-pc-windows-*) EXE_suffix=".exe" ;; esac; # Figure out what strip tool to use if any STRIP="strip" case ${{ matrix.job.target }} in arm-unknown-linux-*) STRIP="arm-linux-gnueabihf-strip" ;; aarch64-unknown-linux-gnu) STRIP="aarch64-linux-gnu-strip" ;; *-pc-windows-msvc) STRIP="" ;; esac; # Setup paths BIN_DIR="${{ env.CICD_INTERMEDIATES_DIR }}/stripped-release-bin/" mkdir -p "${BIN_DIR}" BIN_NAME="${{ env.PROJECT_NAME }}${EXE_suffix}" BIN_PATH="${BIN_DIR}/${BIN_NAME}" # Copy the release build binary to the result location cp "target/${{ matrix.job.target }}/release/${BIN_NAME}" "${BIN_DIR}" # Also strip if possible if [ -n "${STRIP}" ]; then "${STRIP}" "${BIN_PATH}" fi # Let subsequent steps know where to find the (stripped) bin echo "BIN_PATH=${BIN_PATH}" >> $GITHUB_OUTPUT echo "BIN_NAME=${BIN_NAME}" >> $GITHUB_OUTPUT - name: Set testing options id: test-options shell: bash run: | # test only library unit tests and binary for arm-type targets unset CARGO_TEST_OPTIONS unset CARGO_TEST_OPTIONS ; case ${{ matrix.job.target }} in arm-* | aarch64-*) CARGO_TEST_OPTIONS="--bin ${PROJECT_NAME}" ;; esac; echo "CARGO_TEST_OPTIONS=${CARGO_TEST_OPTIONS}" >> $GITHUB_OUTPUT - name: Run tests shell: bash run: $BUILD_CMD test --locked --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}} - name: Create tarball id: package shell: bash run: | PKG_suffix=".tar.gz" ; case ${{ matrix.job.target }} in *-pc-windows-*) PKG_suffix=".zip" ;; esac; PKG_BASENAME=${PROJECT_NAME}-v${PROJECT_VERSION}-${{ matrix.job.target }} PKG_NAME=${PKG_BASENAME}${PKG_suffix} echo "PKG_NAME=${PKG_NAME}" >> $GITHUB_OUTPUT PKG_STAGING="${{ env.CICD_INTERMEDIATES_DIR }}/package" ARCHIVE_DIR="${PKG_STAGING}/${PKG_BASENAME}/" mkdir -p "${ARCHIVE_DIR}" mkdir -p "${ARCHIVE_DIR}/autocomplete" # Binary cp "${{ steps.strip.outputs.BIN_PATH }}" "$ARCHIVE_DIR" # README, LICENSE and CHANGELOG files cp "README.md" "LICENSE-MIT" "LICENSE-APACHE" "CHANGELOG.md" "$ARCHIVE_DIR" # base compressed package pushd "${PKG_STAGING}/" >/dev/null case ${{ matrix.job.target }} in *-pc-windows-*) 7z -y a "${PKG_NAME}" "${PKG_BASENAME}"/* | tail -2 ;; *) tar czf "${PKG_NAME}" "${PKG_BASENAME}"/* ;; esac; popd >/dev/null # Let subsequent steps know where to find the compressed package echo "PKG_PATH=${PKG_STAGING}/${PKG_NAME}" >> $GITHUB_OUTPUT - name: Create Debian package id: debian-package shell: bash if: startsWith(matrix.job.os, 'ubuntu') run: | COPYRIGHT_YEARS="2018 - "$(date "+%Y") DPKG_STAGING="${{ env.CICD_INTERMEDIATES_DIR }}/debian-package" DPKG_DIR="${DPKG_STAGING}/dpkg" mkdir -p "${DPKG_DIR}" DPKG_BASENAME=${PROJECT_NAME} DPKG_CONFLICTS=${PROJECT_NAME}-musl case ${{ matrix.job.target }} in *-musl) DPKG_BASENAME=${PROJECT_NAME}-musl ; DPKG_CONFLICTS=${PROJECT_NAME} ;; esac; DPKG_VERSION=${PROJECT_VERSION} unset DPKG_ARCH case ${{ matrix.job.target }} in aarch64-*-linux-*) DPKG_ARCH=arm64 ;; arm-*-linux-*hf) DPKG_ARCH=armhf ;; i686-*-linux-*) DPKG_ARCH=i686 ;; x86_64-*-linux-*) DPKG_ARCH=amd64 ;; *) DPKG_ARCH=notset ;; esac; DPKG_NAME="${DPKG_BASENAME}_${DPKG_VERSION}_${DPKG_ARCH}.deb" echo "DPKG_NAME=${DPKG_NAME}" >> $GITHUB_OUTPUT # Binary install -Dm755 "${{ steps.strip.outputs.BIN_PATH }}" "${DPKG_DIR}/usr/bin/${{ steps.strip.outputs.BIN_NAME }}" # README and LICENSE install -Dm644 "README.md" "${DPKG_DIR}/usr/share/doc/${DPKG_BASENAME}/README.md" install -Dm644 "LICENSE-MIT" "${DPKG_DIR}/usr/share/doc/${DPKG_BASENAME}/LICENSE-MIT" install -Dm644 "LICENSE-APACHE" "${DPKG_DIR}/usr/share/doc/${DPKG_BASENAME}/LICENSE-APACHE" install -Dm644 "CHANGELOG.md" "${DPKG_DIR}/usr/share/doc/${DPKG_BASENAME}/changelog" gzip -n --best "${DPKG_DIR}/usr/share/doc/${DPKG_BASENAME}/changelog" cat > "${DPKG_DIR}/usr/share/doc/${DPKG_BASENAME}/copyright" < "${DPKG_DIR}/DEBIAN/control" <> $GITHUB_OUTPUT # build dpkg fakeroot dpkg-deb --build "${DPKG_DIR}" "${DPKG_PATH}" - name: "Artifact upload: tarball" uses: actions/upload-artifact@master with: name: ${{ steps.package.outputs.PKG_NAME }} path: ${{ steps.package.outputs.PKG_PATH }} - name: "Artifact upload: Debian package" uses: actions/upload-artifact@master if: steps.debian-package.outputs.DPKG_NAME with: name: ${{ steps.debian-package.outputs.DPKG_NAME }} path: ${{ steps.debian-package.outputs.DPKG_PATH }} - name: Check for release id: is-release shell: bash run: | unset IS_RELEASE ; if [[ $GITHUB_REF =~ ^refs/tags/v[0-9].* ]]; then IS_RELEASE='true' ; fi echo "IS_RELEASE=${IS_RELEASE}" >> $GITHUB_OUTPUT - name: Publish archives and packages uses: softprops/action-gh-release@v1 if: steps.is-release.outputs.IS_RELEASE with: files: | ${{ steps.package.outputs.PKG_PATH }} ${{ steps.debian-package.outputs.DPKG_PATH }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} vivid-0.9.0/.gitignore000064400000000000000000000000231046102023000127360ustar 00000000000000/target **/*.rs.bk vivid-0.9.0/CHANGELOG.md000064400000000000000000000045751046102023000125770ustar 00000000000000# unreleased ## Changes ## New filetypes ## New themes # v0.9.0 ## Changes - Make the output order deterministic, see #63 and #87 (@tavianator) - Added more filetypes, see #95 (@Babkock) - Make it possible to build vivid with LTO, see #90 (@ixti) ## Themes - Added alabaster_dark, see #91 (@p00f) - Added catppuccin-*, see #94 (@etenzy) - Added modus-operandi, see #96 (@apraga) - Updates in the lava theme, see #88 (@fredericrous) - Updates in the dracula theme, see #85 (@yavko) # v0.8.0 ## Changes - Added new core filetypes (reset_to_normal, multi_hard_link, door, setuid, setgid), see #78 (@ixti) - Added instructions on how to preview themes in a user-defined directory, see #75 (@WoLpH) ## New filetypes - Opus and WavPack audio extensions, see #71 (@desbma) - `.webm`, see #72 (@desbma) - `.pyd`, `.pyo`, see #73 (@bl-ue) ## New themes - Nord, see #66 (@Utagai) - Lava, see #66 (@fredericrous) - Iceberg, see #70 (@p00f) - Gruvbox, see #79 (@ixti) - Dracula, see #80 (@yavko) # v0.7.0 - List available themes via `vivid themes`, see #48 (@gillespiecd) - Added "One" theme, see #51 (@mortezadadgar) - Fix panic if stdout is closed, see #56 # v0.6.0 - The default themes and config files are now embedded into the `vivid` binary. See #43 (@LordFlashmeow) - Added `XDG_CONFIG_HOME` as a possible source for theme files, see #40 (@LordFlashmeow) - Better error handling, see #43 (@LordFlashmeow) - Added macOS category to unimportant files, see #33 (@gseidler) - Added more media file types, see #38 (@gseidler) - Add new core filetypes for `sticky`/`other_writable`/`sticky_other_writable`, see #34 (@mattbalvin) # v0.5.0 - Added `jellybeans` theme, see #26 (@chandlerc) - Added `solarized-dark` and `solarized-light` theme, see #30 (@menelaos) - Theme arguments can be a path to a YAML theme file, see #23 - Added LLVM file types, see #27 (@chandlerc) - Added support for block and character devices - Added `preview` subcommand, see #13 # v0.4.0 - Better theme- and filetype-db handling, closes #12 - Added unit tests - Updated filetypes database - Better error message if filetype database could not be found, closes #9 - Allow RRGGBB colors do be used directly, closes #18 # v0.3.0 - Rename project to "vivid" (was: dircolors-hd) - Updates to themes and filetypes database # v0.2.0 - Added `snazzy` theme - Updated filetype database - Better error handling # v0.1.0 Initial version vivid-0.9.0/Cargo.lock0000644000000341110000000000100101360ustar # This file is automatically @generated by Cargo. # It is not intended for manual editing. version = 3 [[package]] name = "ansi_colours" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7db9d9767fde724f83933a716ee182539788f293828244e9d999695ce0f7ba1e" dependencies = [ "rgb", ] [[package]] name = "bitflags" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "block-buffer" version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array", ] [[package]] name = "bytemuck" version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" [[package]] name = "cc" version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" [[package]] name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" version = "4.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3d7ae14b20b94cb02149ed21a86c423859cbe18dc7ed69845cace50e52b40a5" dependencies = [ "bitflags", "clap_lex", "is-terminal", "once_cell", "strsim", "termcolor", "terminal_size", ] [[package]] name = "clap_lex" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "350b9cf31731f9957399229e9b2adc51eeabdfbe9d71d9a0552275fd12710d09" dependencies = [ "os_str_bytes", ] [[package]] name = "cpufeatures" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" dependencies = [ "libc", ] [[package]] name = "crypto-common" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", "typenum", ] [[package]] name = "digest" version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ "block-buffer", "crypto-common", ] [[package]] name = "dirs" version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" dependencies = [ "dirs-sys", ] [[package]] name = "dirs-sys" version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" dependencies = [ "libc", "redox_users", "winapi", ] [[package]] name = "errno" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" dependencies = [ "errno-dragonfly", "libc", "winapi", ] [[package]] name = "errno-dragonfly" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" dependencies = [ "cc", "libc", ] [[package]] name = "generic-array" version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ "typenum", "version_check", ] [[package]] name = "getrandom" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ "cfg-if", "libc", "wasi", ] [[package]] name = "hermit-abi" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" [[package]] name = "io-lifetimes" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfa919a82ea574332e2de6e74b4c36e74d41982b335080fa59d4ef31be20fdf3" dependencies = [ "libc", "windows-sys", ] [[package]] name = "is-terminal" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21b6b32576413a8e69b90e952e4a026476040d81017b80445deda5f2d3921857" dependencies = [ "hermit-abi", "io-lifetimes", "rustix", "windows-sys", ] [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" version = "0.2.140" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" [[package]] name = "linked-hash-map" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "once_cell" version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" [[package]] name = "os_str_bytes" version = "6.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" [[package]] name = "proc-macro2" version = "1.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d0e1ae9e836cc3beddd63db0df682593d7e2d3d891ae8c9083d2113e1744224" dependencies = [ "unicode-ident", ] [[package]] name = "quote" version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" dependencies = [ "proc-macro2", ] [[package]] name = "redox_syscall" version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ "bitflags", ] [[package]] name = "redox_users" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom", "redox_syscall", "thiserror", ] [[package]] name = "rgb" version = "0.8.36" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20ec2d3e3fc7a92ced357df9cebd5a10b6fb2aa1ee797bf7e9ce2f17dffc8f59" dependencies = [ "bytemuck", ] [[package]] name = "rust-embed" version = "6.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb133b9a38b5543fad3807fb2028ea47c5f2b566f4f5e28a11902f1a358348b6" dependencies = [ "rust-embed-impl", "rust-embed-utils", "walkdir", ] [[package]] name = "rust-embed-impl" version = "6.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d4e0f0ced47ded9a68374ac145edd65a6c1fa13a96447b873660b2a568a0fd7" dependencies = [ "proc-macro2", "quote", "rust-embed-utils", "syn", "walkdir", ] [[package]] name = "rust-embed-utils" version = "7.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512b0ab6853f7e14e3c8754acb43d6f748bb9ced66aa5915a6553ac8213f7731" dependencies = [ "sha2", "walkdir", ] [[package]] name = "rustix" version = "0.36.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd5c6ff11fecd55b40746d1995a02f2eb375bf8c00d192d521ee09f42bef37bc" dependencies = [ "bitflags", "errno", "io-lifetimes", "libc", "linux-raw-sys", "windows-sys", ] [[package]] name = "same-file" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" dependencies = [ "winapi-util", ] [[package]] name = "sha2" version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ "cfg-if", "cpufeatures", "digest", ] [[package]] name = "strsim" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] [[package]] name = "termcolor" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" dependencies = [ "winapi-util", ] [[package]] name = "terminal_size" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c9afddd2cec1c0909f06b00ef33f94ab2cc0578c4a610aa208ddfec8aa2b43a" dependencies = [ "rustix", "windows-sys", ] [[package]] name = "thiserror" version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5ab016db510546d856297882807df8da66a16fb8c4101cb8b30054b0d5b2d9c" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5420d42e90af0c38c3290abcca25b9b3bdf379fc9f55c528f53a269d9c9a267e" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "typenum" version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "unicode-ident" version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" [[package]] name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "vivid" version = "0.9.0" dependencies = [ "ansi_colours", "clap", "dirs", "lazy_static", "rust-embed", "yaml-rust", ] [[package]] name = "walkdir" version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" dependencies = [ "same-file", "winapi", "winapi-util", ] [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "winapi" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu", ] [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ "winapi", ] [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-sys" version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ "windows-targets", ] [[package]] name = "windows-targets" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", "windows_i686_gnu", "windows_i686_msvc", "windows_x86_64_gnu", "windows_x86_64_gnullvm", "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_i686_gnu" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_x86_64_gnu" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "yaml-rust" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" dependencies = [ "linked-hash-map", ] vivid-0.9.0/Cargo.toml0000644000000022040000000000100101570ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2018" name = "vivid" version = "0.9.0" authors = ["David Peter "] exclude = ["demo/*"] description = "LS_COLORS manager with multiple themes" homepage = "https://github.com/sharkdp/vivid" readme = "README.md" categories = ["command-line-utilities"] license = "MIT/Apache-2.0" repository = "https://github.com/sharkdp/vivid" [dependencies.ansi_colours] version = "1.0" [dependencies.clap] version = "4" features = [ "suggestions", "color", "wrap_help", "cargo", ] [dependencies.dirs] version = "4.0" [dependencies.lazy_static] version = "1.2" [dependencies.rust-embed] version = "6.3" [dependencies.yaml-rust] version = "0.4" vivid-0.9.0/Cargo.toml.orig000064400000000000000000000010661046102023000136450ustar 00000000000000[package] authors = ["David Peter "] categories = ["command-line-utilities"] description = "LS_COLORS manager with multiple themes" homepage = "https://github.com/sharkdp/vivid" license = "MIT/Apache-2.0" name = "vivid" readme = "README.md" repository = "https://github.com/sharkdp/vivid" version = "0.9.0" exclude = ["demo/*"] edition = "2018" [dependencies] yaml-rust = "0.4" lazy_static = "1.2" ansi_colours = "1.0" dirs = "4.0" rust-embed = "6.3" [dependencies.clap] version = "4" features = ["suggestions", "color", "wrap_help", "cargo"] vivid-0.9.0/LICENSE-APACHE000064400000000000000000000261351046102023000127060ustar 00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. vivid-0.9.0/LICENSE-MIT000064400000000000000000000017771046102023000124230ustar 00000000000000Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. vivid-0.9.0/README.md000064400000000000000000000117031046102023000122340ustar 00000000000000# vivid [![CICD](https://github.com/sharkdp/vivid/actions/workflows/CICD.yml/badge.svg)](https://github.com/sharkdp/vivid/actions/workflows/CICD.yml) ![Crates.io](https://img.shields.io/crates/v/vivid) *vivid* is a generator for the **`LS_COLORS`** environment variable that controls the colorized output of [`ls`](https://www.gnu.org/software/coreutils/manual/html_node/ls-invocation.html#ls-invocation), [`tree`](http://mama.indstate.edu/users/ice/tree/), [`fd`](https://github.com/sharkdp/fd), [`bfs`](https://github.com/tavianator/bfs), [`dust`](https://github.com/bootandy/dust) and many other tools. It uses a YAML configuration format for the [filetype-database](config/filetypes.yml) and the [color themes](themes/). In contrast to [`dircolors`](https://www.gnu.org/software/coreutils/manual/html_node/dircolors-invocation.html#dircolors-invocation), the database and the themes are organized in different files. This allows users to choose and customize color themes independent from the collection of file extensions. Instead of using cryptic ANSI escape codes, colors can be specified in the `RRGGBB` format and will be translated to either truecolor (24-bit) ANSI codes or 8-bit codes for older terminal emulators. ## Preview | `snazzy` | `molokai` | `ayu` | | --- | --- | --- | | ![snazzy theme](https://i.imgur.com/ECdQqxb.png) | ![molokai theme](https://i.imgur.com/5OiAczQ.png) | ![ayu theme](https://i.imgur.com/LC4Cx8E.png) | | `lava` | | --- | | ![lava](https://user-images.githubusercontent.com/702227/124368181-77caa700-dc56-11eb-8286-95283e9a2b04.png) | ## Usage Choose a [color theme](themes/) (for example: `molokai`). Then, add this to your shells RC file (`~/.bashrc`, `~/.zshrc`, …): ``` bash export LS_COLORS="$(vivid generate molokai)" ``` ### Theme preview To try all available themes with your current directory: ``` bash for theme in $(vivid themes); do echo "Theme: $theme" LS_COLORS=$(vivid generate $theme) ls echo done ``` ### Terminals without true color support By default, `vivid` runs in true color mode (24-bit). If you don't have a [terminal that supports 24-bit colors](https://gist.github.com/XVilka/8346728), use the `--color-mode 8-bit` option when running `vivid`. This will generate interpolated 8-bit colors: ``` bash export LS_COLORS="$(vivid -m 8-bit generate molokai)" ``` ### Customization Custom [`filetypes.yml` databases](config/filetypes.yml) can be placed in `/usr/share/vivid`, `$HOME/.config/vivid`, or `$XDG_CONFIG_HOME/vivid` on POSIX systems, or in `%APPDATA%\vivid` on Windows systems. Custom color themes go into a `themes` subfolder, respectively. You can also specify an explicit path to your custom theme: `vivid generate path/to/my_theme.yml`. As a starting point, you can use one of the [bundled themes](themes/). ## Installation ### On Debian-based systems Download one of the Debian packages from the [release page](https://github.com/sharkdp/vivid/releases) and install it via `dpkg -i`: ``` bash wget "https://github.com/sharkdp/vivid/releases/download/v0.8.0/vivid_0.8.0_amd64.deb" sudo dpkg -i vivid_0.8.0_amd64.deb ``` ### On Arch Linux You can install `vivid` from [the official package repository](https://www.archlinux.org/packages/community/x86_64/vivid/): ``` bash pacman -S vivid ``` ### On Gentoo Linux You can install `vivid` from [GURU Overlay](https://wiki.gentoo.org/wiki/Project:GURU/Information_for_End_Users) ``` bash emerge vivid ``` ### On FreeBSD You can install `vivid` from [the FreeBSD Ports Collection](https://www.freshports.org/sysutils/vivid/): ``` bash pkg install vivid ``` ### On macOS You can install `vivid` from [Homebrew](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/vivid.rb): ``` bash brew install vivid ``` Note that the BSD version of `ls` does not use `LS_COLORS`, but you can use the GNU version of `ls` instead: ```bash brew install coreutils alias ls="gls --color" ``` ### On other distributions Check out the [release page](https://github.com/sharkdp/vivid/releases) for binary builds. ### From source If you have Rust 1.54 or higher, you can install `vivid` from source via `cargo`: ``` bash cargo install vivid ``` ## License Licensed under either of * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) at your option. ## Useful resources File types: - https://en.wikipedia.org/wiki/List_of_file_formats - https://fileinfo.com/ ANSI colors: - https://jonasjacek.github.io/colors/ Similar and related projects: - https://github.com/karlding/dirchromatic - https://github.com/trapd00r/LS_COLORS - https://geoff.greer.fm/lscolors/ - `LS_COLORS` themes: - https://github.com/seebi/dircolors-solarized - https://github.com/ivoarch/dircolors-zenburn - https://github.com/arcticicestudio/nord-dircolors - https://github.com/peterhellberg/dircolors-jellybeans - https://github.com/KKPMW/dircolors-moonshine vivid-0.9.0/clippy.toml000064400000000000000000000000201046102023000131400ustar 00000000000000msrv = "1.64.0" vivid-0.9.0/config/filetypes.yml000064400000000000000000000132261046102023000147530ustar 00000000000000core: normal_text: [$no] regular_file: [$fi] reset_to_normal: [$rs] directory: [$di] symlink: [$ln] multi_hard_link: [$mh] fifo: [$pi] socket: [$so] door: [$do] block_device: [$bd] character_device: [$cd] broken_symlink: [$or] missing_symlink_target: [$mi] setuid: [$su] setgid: [$sg] file_with_capability: [$ca] sticky_other_writable: [$tw] other_writable: [$ow] sticky: [$st] executable_file: [$ex] text: special: - CONTRIBUTORS - CONTRIBUTORS.md - CONTRIBUTORS.txt - INSTALL - INSTALL.md - INSTALL.txt - README - README.md - README.txt todo: - TODO - TODO.md - TODO.txt licenses: - COPYING - COPYRIGHT - LICENSE - LICENSE-APACHE - LICENSE-MIT configuration: generic: - .cfg - .conf - .config - .ini - .json - .tml - .toml - .yaml - .yml metadata: - .xmp bibtex: - .bib - .bst dockerfile: - Dockerfile nix: - .nix qt: - .ui desktop: - .desktop system: - passwd - shadow other: - .txt markup: web: - .htm - .html - .shtml - .xhtml other: - .csv - .markdown - .md - .mdown - .org - .rst - .xml programming: source: actionscript: [.as] applescript: [.applescript] asp: [.asa] awk: [.awk] basic: [.vb] cabal: [.cabal] clojure: [.clj] crystal: [.cr] csharp: [.cs, .csx] css: [.css, .sass, .scss] cxx: [.c, .cpp, .cc, .cp, .cxx, .c++, .h, .hh, .hpp, .hxx, .h++, .inc, .inl, .ipp, .def] d: [.d, .di] dart: [.dart] diff: [.diff, .patch] elixir: [.ex, .exs] emacs: [.elc] elm: [.elm] erlang: [.erl] fsharp: [.fs, .fsi, .fsx] go: [.go] graphviz: [.dot, .gv] groovy: [.groovy, .gvy, .gradle] haskell: [.hs] ipython: [.ipynb] java: [.java, .bsh] javascript: [.js, .htc] julia: [.jl] kotlin: [.kt, .kts] latex: [.tex, .ltx] less: [.less] llvm: [.ll, .mir] lisp: [.lisp, .el] lua: [.lua] mathematica: [.nb] matlab: [.matlab, .m, .mn] ocaml: [.ml, .mli] pascal: [.pas, .p, .dpr] perl: [.pl, .pm, .pod, .t, .cgi] php: [.php] powershell: [.ps1, .psm1, .psd1] puppet: [.pp, .epp] purescript: [.purs] python: [.py] r: [.r] ruby: [.rb] rust: [.rs] scala: [.scala, .sbt] shell: [.sh, .bash, .zsh, .fish] sql: [.sql] swift: [.swift] tablegen: [.td] tcl: [.tcl] typescript: [.ts, .tsx] viml: [.vim] tooling: vcs: git: - .gitignore - .gitmodules - .gitattributes - .gitconfig hg: - .hgrc - hgrc other: - CODEOWNERS - .ignore - .fdignore - .rgignore build: cmake: - .cmake - CMakeLists.txt - .cmake.in make: - Makefile - .make automake: - Makefile.am configure: - configure - configure.ac scons: - SConscript - SConstruct pip: - requirements.txt packaging: python: - MANIFEST.in - setup.py ruby: - .gemspec code-style: python: - .flake8 cxx: - .clang-format editors: qt: - .pro kdevelop: - .kdevelop documentation: doxygen: - Doxyfile - .dox continuous-integration: - appveyor.yml - .gitlab-ci.yml - .travis.yml media: image: - .bmp - .eps - .gif - .ico - .jpeg - .jpg - .pbm - .pgm - .png - .ppm - .psd - .svg - .tif - .tiff - .webp - .xcf audio: - .aif - .ape - .flac - .m3u - .m4a - .mid - .mp3 - .ogg - .opus - .wav - .wma - .wv video: - .avi - .flv - .h264 - .m4v - .mkv - .mov - .mp4 - .mpeg - .mpg - .rm - .swf - .vob - .webm - .wmv fonts: - .fnt - .fon - .otf - .ttf - .woff office: document: - .doc - .docx - .epub - .odt - .pdf - .ps - .rtf - .sxw spreadsheet: - .xls - .xlsx - .ods - .xlr presentation: - .ppt - .pptx - .odp - .sxi - .kex - .pps calendar: - .ics archives: packages: - .apk - .deb - .rpm - .xbps ros: - .bag images: - .bin - .dmg - .img - .iso - .toast - .vcd other: - .7z - .arj - .bz - .bz2 - .gz - .jar - .pkg - .rar - .tar - .tbz - .tbz2 - .tgz - .xz - .z - .zip - .zst executable: windows: - .bat - .com - .exe library: - .so - .a - .dll linux: - .ko unimportant: build_artifacts: cxx: - .o - .la - .lo cmake: - CMakeCache.txt automake: - Makefile.in rust: - .rlib python: - .pyc - .pyd - .pyo haskell: - .dyn_hi - .dyn_o - .cache - .hi java: - .class scons: - .scons_opt - .sconsign.dblite latex: - .aux - .bbl - .bcf - .blg - .fdb_latexmk - .fls - .idx - .ilg - .ind - .out - .sty - .synctex.gz - .toc llvm: - .bc macos: - .CFUserTextEncoding - .DS_Store - .localized other: - "~" - .bak - .git # only works for '.git' files (submodules) - .lock - .log - .orig - .pid - .swp - .tmp - package-lock.json vivid-0.9.0/src/color.rs000064400000000000000000000074741046102023000132420ustar 00000000000000use crate::error::{Result, VividError}; use ansi_colours::ansi256_from_rgb; #[derive(Debug, Clone, Copy, PartialEq)] pub enum ColorMode { BitDepth24, BitDepth8, } #[derive(Debug, Clone, Copy, PartialEq)] pub enum ColorType { Foreground, Background, } impl ColorType { fn get_code(self) -> &'static str { match self { ColorType::Foreground => "38", ColorType::Background => "48", } } } #[derive(Debug, Clone, PartialEq)] pub enum Color { Rgb(u8, u8, u8), } impl Color { pub fn from_hex_str(hex_str: &str) -> Result { let parse_error = || VividError::ColorParseError(hex_str.to_string()); if hex_str.len() == 6 { let r = u8::from_str_radix(&hex_str[0..2], 16).map_err(|_| parse_error())?; let g = u8::from_str_radix(&hex_str[2..4], 16).map_err(|_| parse_error())?; let b = u8::from_str_radix(&hex_str[4..6], 16).map_err(|_| parse_error())?; Ok(Color::Rgb(r, g, b)) } else if hex_str.len() == 3 { let r = u8::from_str_radix(&hex_str[0..1], 16).map_err(|_| parse_error())?; let g = u8::from_str_radix(&hex_str[1..2], 16).map_err(|_| parse_error())?; let b = u8::from_str_radix(&hex_str[2..3], 16).map_err(|_| parse_error())?; Ok(Color::Rgb((r << 4) + r, (g << 4) + g, (b << 4) + b)) } else { Err(parse_error()) } } pub fn get_style(&self, colortype: ColorType, colormode: ColorMode) -> String { match self { Color::Rgb(r, g, b) => match colormode { ColorMode::BitDepth24 => format!( "{ctype};2;{r};{g};{b}", ctype = colortype.get_code(), r = r, g = g, b = b ), ColorMode::BitDepth8 => format!( "{ctype};5;{code}", ctype = colortype.get_code(), code = ansi256_from_rgb((*r, *g, *b)) ), }, } } } #[cfg(test)] mod tests { use super::{Color, ColorMode, ColorType}; #[test] fn from_hex_str_6chars() { let color = Color::from_hex_str("4ec703").unwrap(); assert_eq!(Color::Rgb(0x4e, 0xc7, 0x03), color); } #[test] fn from_hex_str_3chars() { let color = Color::from_hex_str("4ec").unwrap(); assert_eq!(Color::Rgb(0x44, 0xee, 0xcc), color); } #[test] fn from_hex_str_errors() { assert!(Color::from_hex_str("").is_err()); assert!(Color::from_hex_str("fffffff").is_err()); assert!(Color::from_hex_str("4e").is_err()); assert!(Color::from_hex_str("ffggff").is_err()); assert!(Color::from_hex_str("ff ").is_err()); } #[test] fn fg_white() { let white = Color::Rgb(0xff, 0xff, 0xff); let style_8bit = white.get_style(ColorType::Foreground, ColorMode::BitDepth8); assert_eq!("38;5;231", style_8bit); let style_24bit = white.get_style(ColorType::Foreground, ColorMode::BitDepth24); assert_eq!("38;2;255;255;255", style_24bit); } #[test] fn bg_black() { let black = Color::Rgb(0x00, 0x00, 0x00); let style_8bit = black.get_style(ColorType::Background, ColorMode::BitDepth8); assert_eq!("48;5;16", style_8bit); let style_24bit = black.get_style(ColorType::Background, ColorMode::BitDepth24); assert_eq!("48;2;0;0;0", style_24bit); } #[test] fn fg_red() { let red = Color::Rgb(0xff, 0x00, 0x00); let style_8bit = red.get_style(ColorType::Foreground, ColorMode::BitDepth8); assert_eq!("38;5;196", style_8bit); let style_24bit = red.get_style(ColorType::Foreground, ColorMode::BitDepth24); assert_eq!("38;2;255;0;0", style_24bit); } } vivid-0.9.0/src/error.rs000064400000000000000000000047431046102023000132510ustar 00000000000000use std::error::Error; use std::fmt::Display; use std::io; use std::result; use yaml_rust::ScanError; #[derive(Debug)] pub enum VividError { IoError(io::Error), YamlParsingError(ScanError), UnexpectedYamlType, ColorParseError(String), DuplicateFileType(String), CouldNotLoadDatabaseFrom(String), CouldNotFindTheme(String), CouldNotLoadTheme(String), NoThemeProvided, EmptyThemeFile, CouldNotFindStyleFor(String), UnknownColor(String), InvalidFileName(String), } impl Display for VividError { fn fmt(&self, fmt: &mut std::fmt::Formatter) -> result::Result<(), std::fmt::Error> { match self { VividError::IoError(e) => write!(fmt, "{}", e), VividError::YamlParsingError(e) => write!(fmt, "{}", e), VividError::UnexpectedYamlType => write!(fmt, "Unexpected type in YAML file."), VividError::ColorParseError(color_str) => { write!(fmt, "Could not parse color string '{}'.", color_str) } VividError::DuplicateFileType(ft) => write!(fmt, "Duplicate file type '{}'.", ft), VividError::CouldNotLoadDatabaseFrom(path) => { write!(fmt, "Could not load filetypes database from '{}'.", path) } VividError::CouldNotFindTheme(name) => write!(fmt, "Could not find theme '{}'.", name), VividError::CouldNotLoadTheme(path) => write!(fmt, "Could not load theme '{}'.", path), VividError::NoThemeProvided => write!( fmt, "No theme specified. Try `vivid generate molokai` for an example" ), VividError::EmptyThemeFile => write!(fmt, "Theme file is empty"), VividError::CouldNotFindStyleFor(category) => { write!(fmt, "Could not find style for category '{}'", category) } VividError::UnknownColor(color) => write!(fmt, "Unknown color '{}'", color), VividError::InvalidFileName(file_name) => { write!(fmt, "Invalid file name '{}'", file_name) } } } } impl Error for VividError { fn description(&self) -> &str { "Dummy implementation: use .fmt()" } } impl From for VividError { fn from(e: io::Error) -> Self { VividError::IoError(e) } } impl From for VividError { fn from(e: ScanError) -> Self { VividError::YamlParsingError(e) } } pub type Result = std::result::Result; vivid-0.9.0/src/filetypes.rs000064400000000000000000000071171046102023000141220ustar 00000000000000use std::collections::HashMap; use std::path::Path; use rust_embed::RustEmbed; use yaml_rust::yaml::YamlLoader; use yaml_rust::Yaml; use crate::error::{Result, VividError}; use crate::types::{Category, FileType}; use crate::util::load_yaml_file; pub struct FileTypes { pub mapping: HashMap, } #[derive(RustEmbed)] #[folder = "config/"] struct ConfigAssets; impl FileTypes { pub fn from_path(path: &Path) -> Result { let contents = load_yaml_file(path) .map_err(|_| VividError::CouldNotLoadDatabaseFrom(path.to_string_lossy().into()))?; Self::from_string(&contents) } pub fn from_embedded() -> Result { let filetypes = ConfigAssets::get("filetypes.yml").unwrap(); let contents = std::str::from_utf8(&filetypes.data) .map_err(|_| VividError::CouldNotLoadDatabaseFrom(String::from("embedded defaults")))?; Self::from_string(contents) } fn from_string(contents: &str) -> Result { let docs = YamlLoader::load_from_str(contents)?; let doc = &docs[0]; Self::get_mapping(doc, &vec![]) } fn get_code(filetype: &str) -> String { if filetype.get(0..1) == Some("$") { filetype[1..].into() } else { let mut s = String::from("*"); s.push_str(filetype); s } } fn get_mapping(value: &Yaml, category: &Category) -> Result { let mut mapping = HashMap::new(); match value { Yaml::Array(array) => { for filetype in array { if let Yaml::String(filetype) = filetype { let code = Self::get_code(filetype); let result = mapping.insert(code, category.clone()); if result.is_some() { return Err(VividError::DuplicateFileType(filetype.to_string())); } } else { return Err(VividError::UnexpectedYamlType); } } } Yaml::Hash(ref map) => { for (key, value) in map { let mut child_category = category.clone(); if let Yaml::String(key) = key { child_category.push(key.clone()); } let child_mapping = Self::get_mapping(value, &child_category)?; if let Some(filetype) = child_mapping .mapping .keys() .find(|ft| mapping.contains_key(*ft)) { return Err(VividError::DuplicateFileType(filetype.to_string())); } mapping.extend(child_mapping.mapping); } } _ => { return Err(VividError::UnexpectedYamlType); } } Ok(FileTypes { mapping }) } } #[cfg(test)] mod tests { use super::FileTypes; #[test] fn basic() { let ft = FileTypes::from_string( " core: - .ext1 bar: baz: [.ext2, .ext3] ", ) .unwrap(); assert_eq!(vec!["core".to_string()], ft.mapping["*.ext1"]); assert_eq!( vec!["bar".to_string(), "baz".to_string()], ft.mapping["*.ext2"] ); assert_eq!( vec!["bar".to_string(), "baz".to_string()], ft.mapping["*.ext3"] ); } } vivid-0.9.0/src/main.rs000064400000000000000000000201651046102023000130400ustar 00000000000000mod color; mod error; mod filetypes; mod theme; mod types; mod util; use rust_embed::RustEmbed; use std::io::{self, Write}; use std::path::{Path, PathBuf}; use std::process; use std::{env, fs}; use clap::{ crate_description, crate_name, crate_version, Arg, ArgAction, ArgMatches, ColorChoice, Command, }; use crate::color::ColorMode; use crate::error::{Result, VividError}; use crate::filetypes::FileTypes; use crate::theme::Theme; #[derive(RustEmbed)] #[folder = "themes/"] struct ThemeAssets; const THEME_PATH_SYSTEM: &str = "/usr/share/vivid/themes/"; fn get_user_config_path() -> PathBuf { #[cfg(target_os = "macos")] let config_dir_op = env::var_os("XDG_CONFIG_HOME") .map(PathBuf::from) .filter(|p| p.is_absolute()) .or_else(|| dirs::home_dir().map(|d| d.join(".config"))); #[cfg(not(target_os = "macos"))] let config_dir_op = dirs::config_dir(); config_dir_op .map(|d| d.join("vivid")) .expect("Could not get home directory") } fn load_filetypes_database(matches: &ArgMatches, user_config_path: &Path) -> Result { let database_path_from_arg = matches.get_one::("database").map(Path::new); let mut database_path_user = user_config_path.to_owned(); database_path_user.push("filetypes.yml"); let database_path_env_s = env::var("VIVID_DATABASE").ok(); let database_path_env = database_path_env_s.as_ref().map(Path::new); let database_path_system = Path::new("/usr/share/vivid/filetypes.yml"); let database_path = database_path_from_arg .or(database_path_env) .or_else(|| util::get_first_existing_path(&[&database_path_user, database_path_system])); // If there is a specified database file and it exists, use it. // Otherwise, use the embedded file. match database_path { Some(path) => FileTypes::from_path(path), None => FileTypes::from_embedded(), } } fn available_theme_names(user_config_path: &Path) -> Result> { let theme_path_user = user_config_path.join("themes"); let theme_path_system = PathBuf::from(THEME_PATH_SYSTEM); let theme_paths = util::get_all_existing_paths(&[&theme_path_user, &theme_path_system]); // build from default themes first let mut available_themes: Vec = ThemeAssets::iter() .map(|theme_name| theme_name.trim_end_matches(".yml").to_owned()) .collect::>(); for path in theme_paths { let dir = fs::read_dir(path).map_err(VividError::IoError)?; for theme_file in dir { let theme_name = theme_file .map_err(VividError::IoError)? .file_name() .into_string() .map_err(|n| { VividError::InvalidFileName(n.as_os_str().to_string_lossy().into_owned()) })?; available_themes.push(theme_name.trim_end_matches(".yml").to_owned()); } } available_themes.sort(); available_themes.dedup(); Ok(available_themes) } fn load_theme( sub_matches: &ArgMatches, user_config_path: &Path, color_mode: ColorMode, ) -> Result { let theme_from_env = env::var("VIVID_THEME").ok(); let theme = sub_matches .get_one::("theme") .map(|s| s.as_str()) .or(theme_from_env.as_deref()) // Convert option to result, then unwrap value or return error if None .ok_or_else(|| VividError::NoThemeProvided)?; let theme_as_path = Path::new(theme); let theme_file = format!("{}.yml", theme); let mut theme_path_user = user_config_path.to_owned(); theme_path_user.push("themes"); theme_path_user.push(theme_file.clone()); let mut theme_path_system = PathBuf::new(); theme_path_system.push(THEME_PATH_SYSTEM); theme_path_system.push(&theme_file); let theme_path = util::get_first_existing_path(&[theme_as_path, &theme_path_user, &theme_path_system]); match theme_path { Some(path) => return Theme::from_path(path, color_mode), None => { if let Some(embedded_file) = ThemeAssets::get(&theme_file) { if let Ok(embedded_data) = std::str::from_utf8(&embedded_file.data) { return Theme::from_string(embedded_data, color_mode); } } } } Err(VividError::CouldNotFindTheme(theme.to_string())) } fn cli() -> clap::Command { Command::new(crate_name!()) .version(crate_version!()) .about(crate_description!()) .color(ColorChoice::Auto) .subcommand_required(true) .infer_subcommands(true) .max_term_width(100) .arg( Arg::new("color-mode") .long("color-mode") .short('m') .action(ArgAction::Set) .value_name("mode") .value_parser(["8-bit", "24-bit"]) .default_value("24-bit") .help("Type of ANSI colors to be used"), ) .arg( Arg::new("database") .long("database") .short('d') .action(ArgAction::Set) .value_name("path") .help("Path to filetypes database (filetypes.yml)"), ) .subcommand( Command::new("generate") .about("Generate a LS_COLORS expression") .arg( Arg::new("theme") .help("Name of the color theme") .action(ArgAction::Set), ), ) .subcommand( Command::new("preview").about("Preview a given theme").arg( Arg::new("theme") .help("Name of the color theme") .action(ArgAction::Set), ), ) .subcommand(Command::new("themes").about("Prints list of available themes")) } fn run() -> Result<()> { let matches = cli().get_matches(); let color_mode = match matches.get_one::("color-mode").map(|s| s.as_str()) { Some("8-bit") => ColorMode::BitDepth8, _ => ColorMode::BitDepth24, }; let user_config_path = get_user_config_path(); let filetypes = load_filetypes_database(&matches, &user_config_path)?; let stdout = io::stdout(); let mut stdout_lock = stdout.lock(); if let Some(sub_matches) = matches.subcommand_matches("generate") { let theme = load_theme(sub_matches, &user_config_path, color_mode)?; let mut mapping = filetypes .mapping .iter() .map(|(filetype, category)| (filetype, theme.get_style(category))) .map(|(filetype, style)| style.map(|style| (filetype, style))) .collect::>>()?; // Sort the keys deterministically. Shorter keys come first so that e.g. // *README.md will override *.md. mapping.sort_unstable_by_key(|&(filetype, _)| (filetype.len(), filetype)); let ls_colors: Vec<_> = mapping .iter() .map(|(filetype, style)| format!("{}={}", filetype, style)) .collect(); writeln!(stdout_lock, "{}", ls_colors.join(":")).ok(); } else if let Some(sub_matches) = matches.subcommand_matches("preview") { let theme = load_theme(sub_matches, &user_config_path, color_mode)?; let mut pairs = filetypes.mapping.iter().collect::>(); pairs.sort_by_key(|(_, category)| *category); for (entry, category) in pairs { let ansi_code = theme.get_style(category).unwrap_or_else(|_| "0".into()); writeln!( stdout_lock, "{}: \x1b[{}m{}\x1b[0m", category.join("."), ansi_code, entry ) .ok(); } } else if matches.subcommand_matches("themes").is_some() { for theme in available_theme_names(&user_config_path)? { writeln!(stdout_lock, "{}", theme).ok(); } } Ok(()) } fn main() { let res = run(); match res { Ok(()) => {} Err(e) => { eprintln!("Error: {}", e); process::exit(1); } } } #[test] fn verify_cli() { cli().debug_assert(); } vivid-0.9.0/src/theme.rs000064400000000000000000000136361046102023000132230ustar 00000000000000use std::collections::HashMap; use std::path::Path; use yaml_rust::yaml::YamlLoader; use yaml_rust::Yaml; use lazy_static::lazy_static; use crate::color::{Color, ColorMode, ColorType}; use crate::error::{Result, VividError}; use crate::types::CategoryRef; use crate::util::{load_yaml_file, transpose}; lazy_static! { static ref ANSI_STYLES: HashMap<&'static str, u8> = { let mut m = HashMap::new(); m.insert("regular", 0); m.insert("bold", 1); m.insert("faint", 2); m.insert("italic", 3); m.insert("underline", 4); m.insert("blink", 5); m.insert("rapid-blink", 6); m.insert("overline", 53); m }; } #[derive(Debug)] pub struct Theme { colors: HashMap, categories: Yaml, // TODO: load the category tree into a proper data structure color_mode: ColorMode, } impl Theme { pub fn from_path(path: &Path, color_mode: ColorMode) -> Result { let contents = load_yaml_file(path) .map_err(|_| VividError::CouldNotLoadTheme(path.to_string_lossy().into()))?; Self::from_string(&contents, color_mode) } pub(crate) fn from_string(contents: &str, color_mode: ColorMode) -> Result { let mut docs = YamlLoader::load_from_str(contents)?; let doc = docs.pop().ok_or(VividError::EmptyThemeFile)?; let mut colors = HashMap::new(); match &doc["colors"] { Yaml::Hash(map) => { for (key, value) in map { match (key, value) { (Yaml::String(key), Yaml::String(value)) => { colors.insert(key.clone(), Color::from_hex_str(value)?); } _ => return Err(VividError::UnexpectedYamlType), } } } _ => return Err(VividError::UnexpectedYamlType), } Ok(Theme { colors, categories: doc, color_mode, }) } fn get_color(&self, color_str: &str) -> Result { self.colors .get(color_str) .cloned() .or_else(|| Color::from_hex_str(color_str).ok()) .ok_or_else(|| VividError::UnknownColor(color_str.to_string())) } pub fn get_style(&self, category: CategoryRef) -> Result { if category.is_empty() { // TODO: use a non-empty collection data type to avoid this panic!("category should not be empty"); } let mut item = &self.categories; for key in category { if let Yaml::Hash(map) = item { if (map.contains_key(&Yaml::String("foreground".into())) || map.contains_key(&Yaml::String("background".into())) || map.contains_key(&Yaml::String("font-style".into()))) && map.get(&Yaml::String(key.clone())).is_none() { // We can not specialize further break; } if let Some(value) = map.get(&Yaml::String(key.clone())) { item = value; } else { return Err(VividError::CouldNotFindStyleFor(category.join("."))); } } else { return Err(VividError::UnexpectedYamlType); } } if let Yaml::Hash(map) = item { let font_style: &str = map .get(&Yaml::String("font-style".into())) .map(|s| s.as_str().expect("Color value should be a string")) .unwrap_or("regular"); let font_style_ansi: &u8 = ANSI_STYLES.get(&font_style).unwrap(); // TODO let foreground = map .get(&Yaml::String("foreground".into())) .map(|s| s.as_str().unwrap()); let foreground = transpose(foreground.map(|fg| self.get_color(fg)))?; let background = map .get(&Yaml::String("background".into())) .map(|s| s.as_str().expect("'background' value should be a string")); let background = transpose(background.map(|fg| self.get_color(fg)))?; let mut style: String = format!("{font_style}", font_style = *font_style_ansi,); if let Some(foreground) = foreground { let foreground_code = foreground.get_style(ColorType::Foreground, self.color_mode); style.push_str(&format!( ";{foreground_code}", foreground_code = foreground_code )); } if let Some(background) = background { let background_code = background.get_style(ColorType::Background, self.color_mode); style.push_str(&format!( ";{background_code}", background_code = background_code )); } Ok(style) } else { Err(VividError::UnexpectedYamlType) } } } #[cfg(test)] mod tests { use super::Theme; use crate::color::ColorMode; #[test] fn basic() { let theme = Theme::from_string( " colors: color1: '00ff7f' foo: bar: foreground: color1 c1: foreground: 'ffffff' c2: foreground: '000000' t3: font-style: bold", ColorMode::BitDepth24, ) .unwrap(); let style1 = theme.get_style(&["foo".into(), "bar".into()]).unwrap(); assert_eq!("0;38;2;0;255;127", style1); let style2 = theme .get_style(&["c1".into(), "c2".into(), "c3".into()]) .unwrap(); assert_eq!("0;38;2;0;0;0", style2); let style3 = theme.get_style(&["t3".into()]).unwrap(); assert_eq!("1", style3); } } vivid-0.9.0/src/types.rs000064400000000000000000000001461046102023000132550ustar 00000000000000pub type FileType = String; pub type Category = Vec; pub type CategoryRef<'a> = &'a [String]; vivid-0.9.0/src/util.rs000064400000000000000000000015331046102023000130670ustar 00000000000000use std::fs::File; use std::io::Read; use std::path::Path; use crate::error::Result; pub fn load_yaml_file(path: &Path) -> Result { let mut file = File::open(path)?; let mut contents = String::new(); file.read_to_string(&mut contents)?; Ok(contents) } /// Helper function that might appear in Rust stable at some point /// (https://doc.rust-lang.org/stable/std/option/enum.Option.html#method.transpose) pub fn transpose( opt: Option>, ) -> std::result::Result, E> { opt.map_or(Ok(None), |res| res.map(Some)) } pub fn get_first_existing_path<'a>(paths: &[&'a Path]) -> Option<&'a Path> { paths.iter().find(|p| Path::exists(p)).copied() } pub fn get_all_existing_paths<'a>(paths: &[&'a Path]) -> Vec<&'a Path> { paths.iter().cloned().filter(|p| Path::exists(p)).collect() } vivid-0.9.0/themes/alabaster_dark.yml000064400000000000000000000032761046102023000157320ustar 00000000000000colors: background_color: '0e1415' white: 'cecece' red: 'd2322d' green: '6abf40' yellow: 'cd974b' blue: '217ebc' pink: '9b3596' cyan: '178f79' light_red: 'd55d55' light_green: '95cb82' light_blue: '71aed7' light_pink: 'cc8bc9' light_cyan: '47BEA9' black: '000000' gray: '999999' darkgray: '666666' darkergray: '333333' core: normal_text: {} regular_file: {} reset_to_normal: {} directory: foreground: light_blue symlink: foreground: light_pink multi_hard_link: {} fifo: foreground: black background: blue socket: foreground: black background: light_pink door: foreground: black background: light_pink block_device: foreground: light_cyan background: darkergray character_device: foreground: light_pink background: darkergray broken_symlink: foreground: black background: red missing_symlink_target: foreground: black background: red setuid: {} setgid: {} file_with_capability: {} sticky_other_writable: {} other_writable: {} sticky: {} executable_file: foreground: light_red text: special: foreground: background_color background: yellow todo: font-style: bold licenses: foreground: gray configuration: foreground: yellow other: foreground: yellow markup: foreground: yellow programming: source: foreground: green tooling: foreground: light_green continuous-integration: foreground: green media: foreground: pink office: foreground: cyan archives: foreground: light_cyan font-style: underline executable: foreground: light_red font-style: bold unimportant: foreground: darkgray vivid-0.9.0/themes/ayu.yml000064400000000000000000000031471046102023000135660ustar 00000000000000colors: # Based on original "ayu" theme: # https://github.com/ayu-theme/ayu-colors background_color: 'fafafa' black: '000' apricot: 'ed9366' green: '318866' sienna: 'ed666a' blue: '1b7dc4' pink: 'f07171' lime: '86b300' light_green: '9ae845' gray: '666666' lightgray: 'aaa' core: normal_text: {} regular_file: {} reset_to_normal: {} directory: foreground: blue symlink: foreground: pink multi_hard_link: {} fifo: foreground: black background: blue socket: foreground: black background: pink door: foreground: black background: pink block_device: foreground: black background: sienna character_device: foreground: black background: lime broken_symlink: foreground: black background: sienna missing_symlink_target: foreground: black background: sienna setuid: {} setgid: {} file_with_capability: {} sticky_other_writable: {} other_writable: {} sticky: {} executable_file: foreground: sienna font-style: bold text: special: foreground: black background: apricot todo: font-style: bold licenses: foreground: gray configuration: foreground: apricot other: foreground: apricot markup: foreground: apricot programming: source: foreground: green tooling: foreground: light_green continuous-integration: foreground: green media: foreground: pink office: foreground: sienna archives: foreground: lime font-style: underline executable: foreground: sienna font-style: bold unimportant: foreground: lightgray vivid-0.9.0/themes/catppuccin-frappe.yml000064400000000000000000000035771046102023000164030ustar 00000000000000colors: # Original "catppuccin" theme # https://github.com/catppuccin/catppuccin rosewater: 'f2d5cf' flamingo: 'eebebe' pink: 'f4b8e4' mauve: 'ca9ee6' red: 'e78284' maroon: 'ea999c' peach: 'ef9f76' yellow: 'e5c890' green: 'a6d189' teal: '81c8be' sky: '99d1db' sapphire: '85c1dc' blue: '8caaee' lavender: 'babbf1' text: 'c6d0f5' subtext1: 'b5bfe2' subtext0: 'a5adce' overlay2: '949cbb' overlay1: '838ba7' overlay0: '737994' surface2: '626880' surface1: '51576d' surface0: '414559' base: '303446' mantle: '292c3c' crust: '232634' core: normal_text: {} regular_file: {} reset_to_normal: {} directory: foreground: blue symlink: foreground: pink multi_hard_link: {} fifo: foreground: crust background: blue socket: foreground: crust background: pink door: foreground: crust background: pink block_device: foreground: sapphire background: surface0 character_device: foreground: pink background: surface0 broken_symlink: foreground: crust background: red missing_symlink_target: foreground: crust background: red setuid: {} setgid: {} file_with_capability: {} sticky_other_writable: {} other_writable: {} sticky: {} executable_file: foreground: red font-style: bold text: special: foreground: base background: yellow todo: font-style: bold licenses: foreground: overlay2 configuration: foreground: yellow other: foreground: yellow markup: foreground: yellow programming: source: foreground: green tooling: foreground: teal continuous-integration: foreground: green media: foreground: flamingo office: foreground: red archives: foreground: sapphire font-style: underline executable: foreground: red font-style: bold unimportant: foreground: surface2 vivid-0.9.0/themes/catppuccin-latte.yml000064400000000000000000000035771046102023000162370ustar 00000000000000colors: # Original "catppuccin" theme # https://github.com/catppuccin/catppuccin rosewater: 'dc8a78' flamingo: 'dd7878' pink: 'ea76cb' mauve: '8839ef' red: 'd20f39' maroon: 'e64553' peach: 'fe640b' yellow: 'df8e1d' green: '40a02b' teal: '179299' sky: '04a5e5' sapphire: '209fb5' blue: '1e66f5' lavender: '7287fd' text: '4c4f69' subtext1: '5c5f77' subtext0: '6c6f85' overlay2: '7c7f93' overlay1: '8c8fa1' overlay0: '9ca0b0' surface2: 'acb0be' surface1: 'bcc0cc' surface0: 'ccd0da' crust: 'dce0e8' mantle: 'e6e9ef' base: 'eff1f5' core: normal_text: {} regular_file: {} reset_to_normal: {} directory: foreground: blue symlink: foreground: pink multi_hard_link: {} fifo: foreground: crust background: blue socket: foreground: crust background: pink door: foreground: crust background: pink block_device: foreground: sapphire background: surface0 character_device: foreground: pink background: surface0 broken_symlink: foreground: crust background: red missing_symlink_target: foreground: crust background: red setuid: {} setgid: {} file_with_capability: {} sticky_other_writable: {} other_writable: {} sticky: {} executable_file: foreground: red font-style: bold text: special: foreground: base background: yellow todo: font-style: bold licenses: foreground: overlay2 configuration: foreground: yellow other: foreground: yellow markup: foreground: yellow programming: source: foreground: green tooling: foreground: teal continuous-integration: foreground: green media: foreground: flamingo office: foreground: red archives: foreground: sapphire font-style: underline executable: foreground: red font-style: bold unimportant: foreground: surface2 vivid-0.9.0/themes/catppuccin-macchiato.yml000064400000000000000000000035771046102023000170560ustar 00000000000000colors: # Original "catppuccin" theme # https://github.com/catppuccin/catppuccin rosewater: 'f4dbd6' flamingo: 'f0c6c6' pink: 'f5bde6' mauve: 'c6a0f6' red: 'ed8796' maroon: 'ee99a0' peach: 'f5a97f' yellow: 'eed49f' green: 'a6da95' teal: '8bd5ca' sky: '91d7e3' sapphire: '7dc4e4' blue: '8aadf4' lavender: 'b7bdf8' text: 'cad3f5' subtext1: 'b8c0e0' subtext0: 'a5adcb' overlay2: '939ab7' overlay1: '8087a2' overlay0: '6e738d' surface2: '5b6078' surface1: '494d64' surface0: '363a4f' base: '24273a' mantle: '1e2030' crust: '181926' core: normal_text: {} regular_file: {} reset_to_normal: {} directory: foreground: blue symlink: foreground: pink multi_hard_link: {} fifo: foreground: crust background: blue socket: foreground: crust background: pink door: foreground: crust background: pink block_device: foreground: sapphire background: surface0 character_device: foreground: pink background: surface0 broken_symlink: foreground: crust background: red missing_symlink_target: foreground: crust background: red setuid: {} setgid: {} file_with_capability: {} sticky_other_writable: {} other_writable: {} sticky: {} executable_file: foreground: red font-style: bold text: special: foreground: base background: yellow todo: font-style: bold licenses: foreground: overlay2 configuration: foreground: yellow other: foreground: yellow markup: foreground: yellow programming: source: foreground: green tooling: foreground: teal continuous-integration: foreground: green media: foreground: flamingo office: foreground: red archives: foreground: sapphire font-style: underline executable: foreground: red font-style: bold unimportant: foreground: surface2 vivid-0.9.0/themes/catppuccin-mocha.yml000064400000000000000000000035771046102023000162150ustar 00000000000000colors: # Original "catppuccin" theme # https://github.com/catppuccin/catppuccin rosewater: 'f5e0dc' flamingo: 'f2cdcd' pink: 'f5c2e7' mauve: 'cba6f7' red: 'f38ba8' maroon: 'eba0ac' peach: 'fab387' yellow: 'f9e2af' green: 'a6e3a1' teal: '94e2d5' sky: '89dceb' sapphire: '74c7ec' blue: '89b4fa' lavender: 'b4befe' text: 'cdd6f4' subtext1: 'bac2de' subtext0: 'a6adc8' overlay2: '9399b2' overlay1: '7f849c' overlay0: '6c7086' surface2: '585b70' surface1: '45475a' surface0: '313244' base: '1e1e2e' mantle: '181825' crust: '11111b' core: normal_text: {} regular_file: {} reset_to_normal: {} directory: foreground: blue symlink: foreground: pink multi_hard_link: {} fifo: foreground: crust background: blue socket: foreground: crust background: pink door: foreground: crust background: pink block_device: foreground: sapphire background: surface0 character_device: foreground: pink background: surface0 broken_symlink: foreground: crust background: red missing_symlink_target: foreground: crust background: red setuid: {} setgid: {} file_with_capability: {} sticky_other_writable: {} other_writable: {} sticky: {} executable_file: foreground: red font-style: bold text: special: foreground: base background: yellow todo: font-style: bold licenses: foreground: overlay2 configuration: foreground: yellow other: foreground: yellow markup: foreground: yellow programming: source: foreground: green tooling: foreground: teal continuous-integration: foreground: green media: foreground: flamingo office: foreground: red archives: foreground: sapphire font-style: underline executable: foreground: red font-style: bold unimportant: foreground: surface2 vivid-0.9.0/themes/dracula.yml000064400000000000000000000041011046102023000143720ustar 00000000000000colors: # based off of solarized vivid theme and dracula/dircolors # Based on 'dracula' theme # (https://draculatheme.com/) # # The assignment of colors to file types roughly follows `dircolors` black : '282a36' green : '50fa7b' purple : 'bd93f9' red : 'ff5555' yellow : 'f1fa8c' cyan : '8be9fd' pink : 'ff79c6' orange : 'ffb86c' white : 'f8f8f2' base01 : '3a3c4e' core: normal_text: foreground: white regular_file: foreground: white reset_to_normal: foreground: orange directory: foreground: purple symlink: foreground: cyan multi_hard_link: {} fifo: foreground: yellow background: black socket: foreground: pink background: black font-style: bold door: foreground: pink background: black font-style: bold block_device: foreground: yellow background: black font-style: bold character_device: foreground: yellow background: black font-style: bold broken_symlink: foreground: red background: black font-style: bold missing_symlink_target: foreground: red background: black setuid: foreground: white background: red setgid: foreground: black background: yellow file_with_capability: {} sticky_other_writable: foreground: black background: green other_writable: foreground: purple background: green sticky: foreground: white background: purple executable_file: foreground: green text: special: foreground: orange todo: foreground: orange font-style: bold licenses: foreground: orange configuration: foreground: orange other: foreground: orange markup: foreground: orange programming: foreground: orange media: image: foreground: pink audio: foreground: cyan video: foreground: orange font-style: bold fonts: foreground: orange office: foreground: orange archives: foreground: red font-style: bold executable: foreground: green unimportant: foreground: base01 vivid-0.9.0/themes/gruvbox-dark-hard.yml000064400000000000000000000047531046102023000163230ustar 00000000000000colors: bg: "1d2021" bg0: "1d2021" bg1: "3c3836" bg2: "504945" bg3: "665c54" bg4: "7c6f64" fg: "ebdbb2" fg0: "fbf1c7" fg1: "ebdbb2" fg2: "d5c4a1" fg3: "bdae93" fg4: "a89984" red: "cc241d" green: "98971a" yellow: "d79921" blue: "458588" purple: "b16286" aqua: "689d6a" orange: "d65d0e" gray: "a89984" alt_red: "fb4934" alt_green: "b8bb26" alt_yellow: "fabd2f" alt_blue: "83a598" alt_purple: "d3869b" alt_aqua: "8ec07c" alt_orange: "fe8019" alt_gray: "928374" core: normal_text: foreground: fg background: bg regular_file: foreground: fg background: bg reset_to_normal: {} directory: foreground: blue symlink: foreground: alt_blue font-style: italic multi_hard_link: font-style: bold fifo: foreground: purple socket: foreground: purple font-style: bold door: foreground: alt_purple font-style: bold block_device: foreground: yellow font-style: bold character_device: foreground: alt_yellow font-style: italic broken_symlink: foreground: alt_red font-style: italic missing_symlink_target: foreground: fg background: alt_red setuid: foreground: fg background: red setgid: foreground: bg background: orange file_with_capability: foreground: bg background: red sticky_other_writable: foreground: fg background: blue font-style: italic other_writable: foreground: alt_green font-style: bold sticky: foreground: fg background: blue executable_file: foreground: alt_green font-style: bold text: special: foreground: alt_yellow font-style: bold todo: foreground: alt_green licenses: foreground: fg1 font-style: italic configuration: foreground: alt_yellow other: foreground: fg markup: foreground: yellow programming: source: foreground: green tooling: foreground: alt_green font-style: italic continuous-integration: foreground: alt_blue media: foreground: aqua video: foreground: alt_aqua font-style: bold office: foreground: alt_blue font-style: bold archives: foreground: orange images: foreground: alt_orange font-style: bold executable: foreground: alt_green font-style: bold unimportant: foreground: bg3 font-style: italic vivid-0.9.0/themes/gruvbox-dark-soft.yml000064400000000000000000000047531046102023000163600ustar 00000000000000colors: bg: "32302f" bg0: "32302f" bg1: "3c3836" bg2: "504945" bg3: "665c54" bg4: "7c6f64" fg: "ebdbb2" fg0: "fbf1c7" fg1: "ebdbb2" fg2: "d5c4a1" fg3: "bdae93" fg4: "a89984" red: "cc241d" green: "98971a" yellow: "d79921" blue: "458588" purple: "b16286" aqua: "689d6a" orange: "d65d0e" gray: "a89984" alt_red: "fb4934" alt_green: "b8bb26" alt_yellow: "fabd2f" alt_blue: "83a598" alt_purple: "d3869b" alt_aqua: "8ec07c" alt_orange: "fe8019" alt_gray: "928374" core: normal_text: foreground: fg background: bg regular_file: foreground: fg background: bg reset_to_normal: {} directory: foreground: blue symlink: foreground: alt_blue font-style: italic multi_hard_link: font-style: bold fifo: foreground: purple socket: foreground: purple font-style: bold door: foreground: alt_purple font-style: bold block_device: foreground: yellow font-style: bold character_device: foreground: alt_yellow font-style: italic broken_symlink: foreground: alt_red font-style: italic missing_symlink_target: foreground: fg background: alt_red setuid: foreground: fg background: red setgid: foreground: bg background: orange file_with_capability: foreground: bg background: red sticky_other_writable: foreground: fg background: blue font-style: italic other_writable: foreground: alt_green font-style: bold sticky: foreground: fg background: blue executable_file: foreground: alt_green font-style: bold text: special: foreground: alt_yellow font-style: bold todo: foreground: alt_green licenses: foreground: fg1 font-style: italic configuration: foreground: alt_yellow other: foreground: fg markup: foreground: yellow programming: source: foreground: green tooling: foreground: alt_green font-style: italic continuous-integration: foreground: alt_blue media: foreground: aqua video: foreground: alt_aqua font-style: bold office: foreground: alt_blue font-style: bold archives: foreground: orange images: foreground: alt_orange font-style: bold executable: foreground: alt_green font-style: bold unimportant: foreground: bg3 font-style: italic vivid-0.9.0/themes/gruvbox-dark.yml000064400000000000000000000047531046102023000154070ustar 00000000000000colors: bg: "282828" bg0: "282828" bg1: "3c3836" bg2: "504945" bg3: "665c54" bg4: "7c6f64" fg: "ebdbb2" fg0: "fbf1c7" fg1: "ebdbb2" fg2: "d5c4a1" fg3: "bdae93" fg4: "a89984" red: "cc241d" green: "98971a" yellow: "d79921" blue: "458588" purple: "b16286" aqua: "689d6a" orange: "d65d0e" gray: "a89984" alt_red: "fb4934" alt_green: "b8bb26" alt_yellow: "fabd2f" alt_blue: "83a598" alt_purple: "d3869b" alt_aqua: "8ec07c" alt_orange: "fe8019" alt_gray: "928374" core: normal_text: foreground: fg background: bg regular_file: foreground: fg background: bg reset_to_normal: {} directory: foreground: blue symlink: foreground: alt_blue font-style: italic multi_hard_link: font-style: bold fifo: foreground: purple socket: foreground: purple font-style: bold door: foreground: alt_purple font-style: bold block_device: foreground: yellow font-style: bold character_device: foreground: alt_yellow font-style: italic broken_symlink: foreground: alt_red font-style: italic missing_symlink_target: foreground: fg background: alt_red setuid: foreground: fg background: red setgid: foreground: bg background: orange file_with_capability: foreground: bg background: red sticky_other_writable: foreground: fg background: blue font-style: italic other_writable: foreground: alt_green font-style: bold sticky: foreground: fg background: blue executable_file: foreground: alt_green font-style: bold text: special: foreground: alt_yellow font-style: bold todo: foreground: alt_green licenses: foreground: fg1 font-style: italic configuration: foreground: alt_yellow other: foreground: fg markup: foreground: yellow programming: source: foreground: green tooling: foreground: alt_green font-style: italic continuous-integration: foreground: alt_blue media: foreground: aqua video: foreground: alt_aqua font-style: bold office: foreground: alt_blue font-style: bold archives: foreground: orange images: foreground: alt_orange font-style: bold executable: foreground: alt_green font-style: bold unimportant: foreground: bg3 font-style: italic vivid-0.9.0/themes/gruvbox-light-hard.yml000064400000000000000000000047531046102023000165110ustar 00000000000000colors: bg: "f9f5d7" bg0: "f9f5d7" bg1: "ebdbb2" bg2: "d5c4a1" bg3: "bdae93" bg4: "a89984" fg: "3c3836" fg0: "282828" fg1: "3c3836" fg2: "504945" fg3: "665c54" fg4: "7c6f64" red: "cc241d" green: "98971a" yellow: "d79921" blue: "458588" purple: "b16286" aqua: "689d6a" orange: "d65d0e" gray: "7c6f64" alt_red: "9d0006" alt_green: "79740e" alt_yellow: "b57614" alt_blue: "076678" alt_purple: "8f3f71" alt_aqua: "427b58" alt_orange: "af3a03" alt_gray: "928374" core: normal_text: foreground: fg background: bg regular_file: foreground: fg background: bg reset_to_normal: {} directory: foreground: blue symlink: foreground: alt_blue font-style: italic multi_hard_link: font-style: bold fifo: foreground: purple socket: foreground: purple font-style: bold door: foreground: alt_purple font-style: bold block_device: foreground: yellow font-style: bold character_device: foreground: alt_yellow font-style: italic broken_symlink: foreground: alt_red font-style: italic missing_symlink_target: foreground: fg background: alt_red setuid: foreground: fg background: red setgid: foreground: bg background: orange file_with_capability: foreground: bg background: red sticky_other_writable: foreground: fg background: blue font-style: italic other_writable: foreground: alt_green font-style: bold sticky: foreground: fg background: blue executable_file: foreground: alt_green font-style: bold text: special: foreground: alt_yellow font-style: bold todo: foreground: alt_green licenses: foreground: fg1 font-style: italic configuration: foreground: alt_yellow other: foreground: fg markup: foreground: yellow programming: source: foreground: green tooling: foreground: alt_green font-style: italic continuous-integration: foreground: alt_blue media: foreground: aqua video: foreground: alt_aqua font-style: bold office: foreground: alt_blue font-style: bold archives: foreground: orange images: foreground: alt_orange font-style: bold executable: foreground: alt_green font-style: bold unimportant: foreground: bg3 font-style: italic vivid-0.9.0/themes/gruvbox-light-soft.yml000064400000000000000000000047531046102023000165460ustar 00000000000000colors: bg: "f2e5bc" bg0: "f2e5bc" bg1: "ebdbb2" bg2: "d5c4a1" bg3: "bdae93" bg4: "a89984" fg: "3c3836" fg0: "282828" fg1: "3c3836" fg2: "504945" fg3: "665c54" fg4: "7c6f64" red: "cc241d" green: "98971a" yellow: "d79921" blue: "458588" purple: "b16286" aqua: "689d6a" orange: "d65d0e" gray: "7c6f64" alt_red: "9d0006" alt_green: "79740e" alt_yellow: "b57614" alt_blue: "076678" alt_purple: "8f3f71" alt_aqua: "427b58" alt_orange: "af3a03" alt_gray: "928374" core: normal_text: foreground: fg background: bg regular_file: foreground: fg background: bg reset_to_normal: {} directory: foreground: blue symlink: foreground: alt_blue font-style: italic multi_hard_link: font-style: bold fifo: foreground: purple socket: foreground: purple font-style: bold door: foreground: alt_purple font-style: bold block_device: foreground: yellow font-style: bold character_device: foreground: alt_yellow font-style: italic broken_symlink: foreground: alt_red font-style: italic missing_symlink_target: foreground: fg background: alt_red setuid: foreground: fg background: red setgid: foreground: bg background: orange file_with_capability: foreground: bg background: red sticky_other_writable: foreground: fg background: blue font-style: italic other_writable: foreground: alt_green font-style: bold sticky: foreground: fg background: blue executable_file: foreground: alt_green font-style: bold text: special: foreground: alt_yellow font-style: bold todo: foreground: alt_green licenses: foreground: fg1 font-style: italic configuration: foreground: alt_yellow other: foreground: fg markup: foreground: yellow programming: source: foreground: green tooling: foreground: alt_green font-style: italic continuous-integration: foreground: alt_blue media: foreground: aqua video: foreground: alt_aqua font-style: bold office: foreground: alt_blue font-style: bold archives: foreground: orange images: foreground: alt_orange font-style: bold executable: foreground: alt_green font-style: bold unimportant: foreground: bg3 font-style: italic vivid-0.9.0/themes/gruvbox-light.yml000064400000000000000000000047531046102023000155750ustar 00000000000000colors: bg: "fbf1c7" bg0: "fbf1c7" bg1: "ebdbb2" bg2: "d5c4a1" bg3: "bdae93" bg4: "a89984" fg: "3c3836" fg0: "282828" fg1: "3c3836" fg2: "504945" fg3: "665c54" fg4: "7c6f64" red: "cc241d" green: "98971a" yellow: "d79921" blue: "458588" purple: "b16286" aqua: "689d6a" orange: "d65d0e" gray: "7c6f64" alt_red: "9d0006" alt_green: "79740e" alt_yellow: "b57614" alt_blue: "076678" alt_purple: "8f3f71" alt_aqua: "427b58" alt_orange: "af3a03" alt_gray: "928374" core: normal_text: foreground: fg background: bg regular_file: foreground: fg background: bg reset_to_normal: {} directory: foreground: blue symlink: foreground: alt_blue font-style: italic multi_hard_link: font-style: bold fifo: foreground: purple socket: foreground: purple font-style: bold door: foreground: alt_purple font-style: bold block_device: foreground: yellow font-style: bold character_device: foreground: alt_yellow font-style: italic broken_symlink: foreground: alt_red font-style: italic missing_symlink_target: foreground: fg background: alt_red setuid: foreground: fg background: red setgid: foreground: bg background: orange file_with_capability: foreground: bg background: red sticky_other_writable: foreground: fg background: blue font-style: italic other_writable: foreground: alt_green font-style: bold sticky: foreground: fg background: blue executable_file: foreground: alt_green font-style: bold text: special: foreground: alt_yellow font-style: bold todo: foreground: alt_green licenses: foreground: fg1 font-style: italic configuration: foreground: alt_yellow other: foreground: fg markup: foreground: yellow programming: source: foreground: green tooling: foreground: alt_green font-style: italic continuous-integration: foreground: alt_blue media: foreground: aqua video: foreground: alt_aqua font-style: bold office: foreground: alt_blue font-style: bold archives: foreground: orange images: foreground: alt_orange font-style: bold executable: foreground: alt_green font-style: bold unimportant: foreground: bg3 font-style: italic vivid-0.9.0/themes/iceberg-dark.yml000064400000000000000000000030421046102023000153010ustar 00000000000000colors: background_color: '161821' white: 'c6c8d1' red: 'e27878' green: 'b4be82' yellow: 'e2a478' blue: '84a0c6' pink: 'ada0d3' cyan: '89b8c2' black: '1e2132' gray: '828597' darkgray: '6b7089' darkergray: '36384a' core: normal_text: {} regular_file: {} reset_to_normal: {} directory: foreground: blue symlink: foreground: pink multi_hard_link: {} fifo: foreground: black background: blue socket: foreground: black background: pink door: foreground: black background: pink block_device: foreground: cyan background: darkergray character_device: foreground: pink background: darkergray broken_symlink: foreground: black background: red missing_symlink_target: foreground: black background: red setuid: {} setgid: {} file_with_capability: {} sticky_other_writable: {} other_writable: {} sticky: {} executable_file: foreground: red font-style: bold text: special: foreground: background_color background: yellow todo: font-style: bold licenses: foreground: gray configuration: foreground: yellow other: foreground: yellow markup: foreground: yellow programming: source: foreground: green tooling: foreground: green continuous-integration: foreground: green media: foreground: pink office: foreground: red archives: foreground: cyan font-style: underline executable: foreground: red font-style: bold unimportant: foreground: darkgray vivid-0.9.0/themes/jellybeans.yml000064400000000000000000000037731046102023000151250ustar 00000000000000colors: # Theme colors bg: "151515" darker_grey: "1c1c1c" dark_grey: "262626" grey: "888888" blue_grey: "a0a8b0" light_grey: "d8dee9" white: "ffffff" dark_red: "902020" red: "cf6a4c" red_orange: "ffb964" bright_orange: "fad07a" pale_gold: "dad085" pink: "f0a0c0" lilac: "c6b6ee" dark_blue: "2b5b77" deep_blue: "0d61ac" blue: "8197bf" bright_blue: "7697d6" cyan: "8fbfdc" blue_green: "668799" green: "799d6a" bright_green: "70b950" brighter_green: "65c254" light_green: "99ad6a" dark_green: "556633" core: normal_text: {} regular_file: {} reset_to_normal: {} directory: foreground: lilac symlink: foreground: bright_orange multi_hard_link: {} fifo: foreground: pink socket: foreground: pink door: foreground: pink block_device: foreground: red character_device: foreground: red broken_symlink: foreground: bright_orange background: dark_red missing_symlink_target: foreground: bright_orange background: dark_red setuid: {} setgid: {} file_with_capability: {} sticky_other_writable: {} other_writable: {} sticky: {} executable_file: foreground: red_orange font-style: bold text: special: foreground: brighter_green font-style: bold todo: foreground: bright_green licenses: foreground: light_green font-style: italic configuration: foreground: light_green other: foreground: green markup: foreground: blue_green programming: source: foreground: blue tooling: foreground: bright_blue continuous-integration: foreground: cyan media: foreground: pale_gold office: foreground: blue_green archives: foreground: bright_orange font-style: underline executable: foreground: red_orange font-style: bold unimportant: foreground: grey font-style: italic vivid-0.9.0/themes/lava.yml000064400000000000000000000044651046102023000137170ustar 00000000000000# Author: https://github.com/fredericrous # Inspired by the Lava theme for Fish-Shell colors: base01: '6b3608' base0: '839496' base2: 'eee8d5' yellow: 'b58900' background_color: '1a1a1a' black: '000000' orangedir: 'e06206' darkorange: 'FF9400' amber: 'FFC100' vermilion: 'FF4B00' alpine: 'BF9C30' christine: 'BF5B30' fire: 'A63000' kourkinova: 'BF5B30' chardonnay: 'FFC373' core: regular_file: foreground: base0 reset_to_normal: foreground: base0 directory: foreground: orangedir font-style: bold executable_file: foreground: vermilion font-style: bold symlink: foreground: orangedir font-style: underline broken_symlink: foreground: background_color background: kourkinova font-style: bold missing_symlink_target: foreground: background_color background: kourkinova font-style: bold setuid: foreground: yellow background: black setgid: foreground: yellow background: black file_with_capability: {} multi_hard_link: {} fifo: foreground: background_color background: kourkinova font-style: bold socket: foreground: background_color background: kourkinova font-style: bold door: foreground: background_color background: kourkinova font-style: bold character_device: foreground: yellow background: base2 font-style: bold block_device: foreground: yellow background: base2 font-style: bold normal_text: foreground: base0 other_writable: {} sticky: {} sticky_other_writable: {} text: special: foreground: amber todo: foreground: amber font-style: bold licenses: foreground: christine configuration: foreground: amber font-style: bold other: foreground: darkorange markup: foreground: amber programming: source: foreground: amber tooling: foreground: christine continuous-integration: foreground: chardonnay media: image: foreground: kourkinova audio: foreground: alpine video: foreground: alpine font-style: bold fonts: foreground: kourkinova office: foreground: christine font-style: bold archives: foreground: christine font-style: bold executable: foreground: vermilion unimportant: foreground: base01 vivid-0.9.0/themes/modus-operandi.yml000064400000000000000000000055261046102023000157210ustar 00000000000000colors: # Port of modus-operandi, a light scheme for emacs # https://protesilaos.com/emacs/modus-themes bg-main : 'ffffff' bg-dim : 'f0f0f0' fg-main : '000000' fg-dim : '595959' fg-alt : '193668' bg-active : 'c4c4c4' bg-inactive : 'e0e0e0' border : '9f9f9f' red : 'a60000' red-warmer : '972500' red-cooler : 'a0132f' red-faint : '7f0000' red-intense : 'd00000' green : '006800' green-warmer : '316500' green-cooler : '00663f' green-faint : '2a5045' green-intense : '008900' yellow : '6f5500' yellow-warmer : '884900' yellow-cooler : '7a4f2f' yellow-faint : '624416' yellow-intense : '808000' blue : '0031a9' blue-warmer : '354fcf' blue-cooler : '0000b0' blue-faint : '003497' blue-intense : '0000ff' magenta : '721045' magenta-warmer : '8f0075' magenta-cooler : '531ab6' magenta-faint : '7c318f' magenta-intense : 'dd22dd' cyan : '005e8b' cyan-warmer : '3f578f' cyan-cooler : '005f5f' cyan-faint : '005077' cyan-intense : '008899' core: normal_text: foreground: fg-main regular_file: foreground: fg-main reset_to_normal: foreground: fg-main directory: foreground: blue font-style: bold symlink: foreground: cyan font-style: bold multi_hard_link: {} fifo: foreground: yellow background: bg-dim font-style: bold socket: foreground: magenta background: bg-dim font-style: bold door: foreground: magenta background: bg-dim font-style: bold block_device: foreground: yellow background: bg-dim font-style: bold character_device: foreground: yellow background: bg-dim font-style: bold broken_symlink: foreground: red background: bg-dim font-style: bold missing_symlink_target: foreground: red background: bg-dim font-style: bold setuid: {} setgid: {} file_with_capability: {} sticky_other_writable: {} other_writable: {} sticky: {} executable_file: foreground: green font-style: bold text: special: foreground: fg-main todo: foreground: fg-main font-style: bold licenses: foreground: fg-main configuration: foreground: fg-main other: foreground: fg-main markup: foreground: fg-main programming: foreground: fg-main media: image: foreground: magenta audio: foreground: cyan video: foreground: magenta font-style: bold fonts: foreground: magenta office: foreground: yellow archives: foreground: red font-style: bold executable: foreground: fg-main unimportant: foreground: fg-dim vivid-0.9.0/themes/molokai.yml000064400000000000000000000031561046102023000144230ustar 00000000000000colors: # Theme colors background_color: '1a1a1a' purple: "ae81ff" khaki: "e6db74" pink: "f92672" cyan: "66d9ef" green: "a6e22e" orange: "fd971f" # Others white: "ffffff" black: "000000" red: "ff4a44" gray: "b6b6b6" dimgray: "7a7070" gold: "e2d139" springgreen: "00ff87" darkgray: "333333" core: normal_text: {} regular_file: {} reset_to_normal: {} directory: foreground: cyan symlink: foreground: pink multi_hard_link: {} fifo: foreground: black background: cyan socket: foreground: black background: pink door: foreground: black background: pink block_device: foreground: cyan background: darkgray character_device: foreground: pink background: darkgray broken_symlink: foreground: black background: red missing_symlink_target: foreground: black background: red setuid: {} setgid: {} file_with_capability: {} sticky_other_writable: {} other_writable: {} sticky: {} executable_file: foreground: pink font-style: bold text: special: foreground: black background: khaki todo: font-style: bold licenses: foreground: gray configuration: foreground: green other: foreground: gold markup: foreground: gold programming: source: foreground: springgreen tooling: foreground: green continuous-integration: foreground: khaki media: foreground: orange office: foreground: khaki archives: foreground: pink font-style: underline executable: foreground: pink font-style: bold unimportant: foreground: dimgray vivid-0.9.0/themes/nord.yml000064400000000000000000000046571046102023000137410ustar 00000000000000colors: # Based on the Nord colorscheme. # (https://www.nordtheme.com/docs/colors-and-palettes) # Polar night polar-night-nord0 : '2e3440' polar-night-nord1 : '3b4252' polar-night-nord2 : '434c5e' polar-night-nord3 : '4c566a' # Snow storm snow-storm-nord4 : 'd8dee9' snow-storm-nord5 : 'e5e9f0' snow-storm-nord6 : 'eceff4' # Frost frost-nord7 : '8fbcbb' frost-nord8 : '88c0d0' frost-nord9 : '81a1c1' frost-nord10 : '5e81ac' # Aurora aurora-nord11 : 'bf616a' aurora-nord12 : 'd08770' aurora-nord13 : 'ebcb8b' aurora-nord14 : 'a3be8c' aurora-nord15 : 'b48ead' core: normal_text: foreground: polar-night-nord3 regular_file: foreground: polar-night-nord3 reset_to_normal: foreground: polar-night-nord3 directory: foreground: frost-nord7 font-style: bold symlink: foreground: aurora-nord14 font-style: bold multi_hard_link: {} fifo: foreground: aurora-nord13 background: polar-night-nord2 font-style: bold socket: foreground: aurora-nord15 background: polar-night-nord2 font-style: bold door: foreground: aurora-nord15 background: polar-night-nord2 font-style: bold block_device: foreground: aurora-nord13 background: polar-night-nord2 font-style: bold character_device: foreground: aurora-nord13 background: polar-night-nord2 font-style: bold broken_symlink: foreground: snow-storm-nord6 background: aurora-nord11 font-style: bold missing_symlink_target: foreground: snow-storm-nord6 background: aurora-nord11 font-style: bold setuid: {} setgid: {} file_with_capability: {} sticky_other_writable: {} other_writable: {} sticky: {} executable_file: foreground: aurora-nord12 font-style: bold text: special: foreground: aurora-nord15 todo: foreground: aurora-nord15 font-style: bold licenses: foreground: aurora-nord15 configuration: foreground: aurora-nord15 other: foreground: aurora-nord15 markup: foreground: aurora-nord15 programming: foreground: aurora-nord14 media: image: foreground: aurora-nord15 audio: foreground: aurora-nord15 video: foreground: aurora-nord15 fonts: foreground: aurora-nord15 office: foreground: aurora-nord15 archives: foreground: frost-nord9 font-style: bold executable: foreground: aurora-nord12 unimportant: foreground: polar-night-nord2 vivid-0.9.0/themes/one-dark.yml000064400000000000000000000030421046102023000144620ustar 00000000000000colors: background_color: '282c34' white: '828997' red: 'e06c75' green: '98c379' yellow: 'e5c07b' blue: '61afef' pink: 'ff6ac1' cyan: '56b6c2' black: '000000' gray: '999999' darkgray: '666666' darkergray: '333333' core: normal_text: {} regular_file: {} reset_to_normal: {} directory: foreground: blue symlink: foreground: pink multi_hard_link: {} fifo: foreground: black background: blue socket: foreground: black background: pink door: foreground: black background: pink block_device: foreground: cyan background: darkergray character_device: foreground: pink background: darkergray broken_symlink: foreground: black background: red missing_symlink_target: foreground: black background: red setuid: {} setgid: {} file_with_capability: {} sticky_other_writable: {} other_writable: {} sticky: {} executable_file: foreground: red font-style: bold text: special: foreground: background_color background: yellow todo: font-style: bold licenses: foreground: gray configuration: foreground: yellow other: foreground: yellow markup: foreground: yellow programming: source: foreground: green tooling: foreground: green continuous-integration: foreground: green media: foreground: pink office: foreground: red archives: foreground: cyan font-style: underline executable: foreground: red font-style: bold unimportant: foreground: darkgray vivid-0.9.0/themes/one-light.yml000064400000000000000000000030421046102023000146500ustar 00000000000000colors: background_color: 'fafafa' white: 'a0a1a7' red: 'e45649' green: '50a14f' yellow: 'c18401' blue: '4078f2' pink: 'ff6ac1' cyan: '0184bc' black: '000000' gray: '999999' darkgray: '666666' darkergray: '333333' core: normal_text: {} regular_file: {} reset_to_normal: {} directory: foreground: blue symlink: foreground: pink multi_hard_link: {} fifo: foreground: black background: blue socket: foreground: black background: pink door: foreground: black background: pink block_device: foreground: cyan background: darkergray character_device: foreground: pink background: darkergray broken_symlink: foreground: black background: red missing_symlink_target: foreground: black background: red setuid: {} setgid: {} file_with_capability: {} sticky_other_writable: {} other_writable: {} sticky: {} executable_file: foreground: red font-style: bold text: special: foreground: background_color background: yellow todo: font-style: bold licenses: foreground: gray configuration: foreground: yellow other: foreground: yellow markup: foreground: yellow programming: source: foreground: green tooling: foreground: green continuous-integration: foreground: green media: foreground: pink office: foreground: red archives: foreground: cyan font-style: underline executable: foreground: red font-style: bold unimportant: foreground: darkgray vivid-0.9.0/themes/snazzy.yml000064400000000000000000000034521046102023000143250ustar 00000000000000colors: # Original "snazzy" theme by sindresorhus # https://github.com/sindresorhus/hyper-snazzy background_color: '282a36' white: 'eff0eb' red: 'ff5c57' green: '5af78e' yellow: 'f3f99d' blue: '57c7ff' pink: 'ff6ac1' cyan: '9aedfe' rose: 'f9b79d' light_red: 'ff8b89' light_green: 'a5ffc3' light_yellow: 'f9fccf' light_blue: 'a3e1ff' light_pink: 'ffb4df' light_cyan: 'd4f7fe' black: '000000' gray: '999999' darkgray: '666666' darkergray: '333333' core: normal_text: {} regular_file: {} reset_to_normal: {} directory: foreground: blue symlink: foreground: pink multi_hard_link: {} fifo: foreground: black background: blue socket: foreground: black background: pink door: foreground: black background: pink block_device: foreground: cyan background: darkergray character_device: foreground: pink background: darkergray broken_symlink: foreground: black background: red missing_symlink_target: foreground: black background: red setuid: {} setgid: {} file_with_capability: {} sticky_other_writable: {} other_writable: {} sticky: {} executable_file: foreground: red font-style: bold text: special: foreground: background_color background: yellow todo: font-style: bold licenses: foreground: gray configuration: foreground: yellow other: foreground: yellow markup: foreground: yellow programming: source: foreground: green tooling: foreground: light_green continuous-integration: foreground: green media: foreground: light_pink office: foreground: red archives: foreground: cyan font-style: underline executable: foreground: red font-style: bold unimportant: foreground: darkgray vivid-0.9.0/themes/solarized-dark.yml000064400000000000000000000040711046102023000157000ustar 00000000000000colors: # Based on the dark mode of `Solarized` # (https://ethanschoonover.com/solarized/) # # The assignment of colors to file types roughly follows `dircolors` base03 : '002b36' base02 : '073642' base01 : '586e75' base00 : '657b83' base0 : '839496' base1 : '93a1a1' base2 : 'eee8d5' base3 : 'fdf6e3' yellow : 'b58900' orange : 'cb4b16' red : 'dc322f' magenta : 'd33682' violet : '6c71c4' blue : '268bd2' cyan : '2aa198' green : '859900' core: normal_text: foreground: base0 regular_file: foreground: base0 reset_to_normal: foreground: base0 directory: foreground: blue font-style: bold symlink: foreground: cyan font-style: bold multi_hard_link: {} fifo: foreground: yellow background: base2 font-style: bold socket: foreground: magenta background: base2 font-style: bold door: foreground: magenta background: base2 font-style: bold block_device: foreground: yellow background: base2 font-style: bold character_device: foreground: yellow background: base2 font-style: bold broken_symlink: foreground: red background: base2 font-style: bold missing_symlink_target: foreground: red background: base2 font-style: bold setuid: {} setgid: {} file_with_capability: {} sticky_other_writable: {} other_writable: {} sticky: {} executable_file: foreground: green font-style: bold text: special: foreground: base0 todo: foreground: base0 font-style: bold licenses: foreground: base0 configuration: foreground: base0 other: foreground: base0 markup: foreground: base0 programming: foreground: base0 media: image: foreground: magenta audio: foreground: cyan video: foreground: magenta font-style: bold fonts: foreground: violet office: foreground: orange archives: foreground: red font-style: bold executable: foreground: base0 unimportant: foreground: base01 vivid-0.9.0/themes/solarized-light.yml000064400000000000000000000041131046102023000160630ustar 00000000000000colors: # Based on the light mode of `Solarized` # (https://ethanschoonover.com/solarized/) # # The assignment of colors to file types roughly follows `dircolors` base03 : '002b36' base02 : '073642' base01 : '586e75' base00 : '657b83' base0 : '839496' base1 : '93a1a1' base2 : 'eee8d5' base3 : 'fdf6e3' yellow : 'b58900' orange : 'cb4b16' red : 'dc322f' magenta : 'd33682' violet : '6c71c4' blue : '268bd2' cyan : '2aa198' green : '859900' core: normal_text: foreground: base00 regular_file: foreground: base00 reset_to_normal: foreground: base00 directory: foreground: blue font-style: bold symlink: foreground: cyan font-style: bold multi_hard_link: {} fifo: foreground: yellow background: base02 font-style: bold socket: foreground: magenta background: base02 font-style: bold door: foreground: magenta background: base02 font-style: bold block_device: foreground: yellow background: base02 font-style: bold character_device: foreground: yellow background: base02 font-style: bold broken_symlink: foreground: red background: base02 font-style: bold missing_symlink_target: foreground: red background: base02 font-style: bold setuid: {} setgid: {} file_with_capability: {} sticky_other_writable: {} other_writable: {} sticky: {} executable_file: foreground: green font-style: bold text: special: foreground: base00 todo: foreground: base00 font-style: bold licenses: foreground: base00 configuration: foreground: base00 other: foreground: base00 markup: foreground: base00 programming: foreground: base00 media: image: foreground: magenta audio: foreground: cyan video: foreground: magenta font-style: bold fonts: foreground: violet office: foreground: orange archives: foreground: red font-style: bold executable: foreground: base00 unimportant: foreground: base1