├── .editorconfig ├── .fantasticonrc ├── .github ├── CODEOWNERS └── workflows │ └── publish.yml ├── .gitignore ├── .husky └── commit-msg ├── .vscode ├── extensions.json ├── launch.json └── tasks.json ├── .vscodeignore ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── bun.lockb ├── package.json ├── package.nls.json ├── scripts └── build.ts ├── src ├── constants │ ├── glyph.ts │ └── index.ts ├── extension.ts ├── themes.ts └── utils │ ├── icon-set.ts │ └── index.ts ├── static ├── glyph.woff ├── icon.png ├── icons │ ├── angular.svg │ ├── archive.svg │ ├── audio.svg │ ├── braces.svg │ ├── brackets.svg │ ├── camera.svg │ ├── certificate.svg │ ├── commit.svg │ ├── copyright.svg │ ├── database.svg │ ├── docs.svg │ ├── document.svg │ ├── eslint.svg │ ├── expo.svg │ ├── file.svg │ ├── fingerprint.svg │ ├── folder-expanded.svg │ ├── folder.svg │ ├── format.svg │ ├── gatsby.svg │ ├── git.svg │ ├── history.svg │ ├── i18n.svg │ ├── image.svg │ ├── information.svg │ ├── lock.svg │ ├── merge.svg │ ├── microsoft.svg │ ├── next.svg │ ├── open-source.svg │ ├── parenthesis.svg │ ├── prisma.svg │ ├── react.svg │ ├── root-folder-expanded.svg │ ├── root-folder.svg │ ├── settings.svg │ ├── shell.svg │ ├── shield.svg │ ├── svelte.svg │ ├── table.svg │ ├── tag.svg │ ├── test.svg │ ├── triangle.svg │ ├── video.svg │ └── vue.svg ├── social-preview.png └── spectrum-legacy.png └── tsconfig.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # learn more: https://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | end_of_line = lf 8 | indent_size = 2 9 | indent_style = space 10 | insert_final_newline = true 11 | trim_trailing_whitespace = true 12 | -------------------------------------------------------------------------------- /.fantasticonrc: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const { FontAssetType, OtherAssetType } = require("fantasticon"); 4 | 5 | /** @type {import("fantasticon").RunnerOptions} */ 6 | module.exports = { 7 | name: "glyph", 8 | inputDir: "static/icons", 9 | outputDir: "static", 10 | assetTypes: [OtherAssetType.TS], 11 | fontTypes: [FontAssetType.WOFF], 12 | formatOptions: { 13 | ts: { 14 | types: ["constant", "enum"], 15 | }, 16 | }, 17 | pathOptions: { 18 | ts: "src/constants/glyph.ts", 19 | }, 20 | getIconId({ basename }) { 21 | return basename.replaceAll("-", "_"); 22 | }, 23 | }; 24 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # learn more: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners 2 | 3 | * @lewxdev 4 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: publish release to marketplace 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | permissions: 9 | contents: write 10 | 11 | jobs: 12 | publish: 13 | if: startsWith(github.ref, 'refs/tags/') 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v4 17 | - uses: oven-sh/setup-bun@v2 18 | 19 | - run: | 20 | bun install 21 | bun run build --production 22 | echo "filepath=$(ls dist/*.vsix)" >> $GITHUB_ENV 23 | echo "version=$(ls dist/*.vsix | grep -oE '\d+\.\d+\.\d+')" >> $GITHUB_ENV 24 | 25 | - env: 26 | VSCE_PAT: ${{ secrets.VSCE_PAT }} 27 | run: bun run vsce publish --packagePath $filepath 28 | 29 | - env: 30 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 31 | run: gh release create v$version $filepath --generate-notes --verify-tag 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # learn more: 2 | # * https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files 3 | # * https://git-scm.com/docs/gitignore 4 | 5 | # Node 6 | # see: https://github.com/github/gitignore/blob/main/Node.gitignore 7 | 8 | # Logs 9 | logs 10 | *.log 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | lerna-debug.log* 15 | .pnpm-debug.log* 16 | 17 | # Diagnostic reports (https://nodejs.org/api/report.html) 18 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 19 | 20 | # Runtime data 21 | pids 22 | *.pid 23 | *.seed 24 | *.pid.lock 25 | 26 | # Directory for instrumented libs generated by jscoverage/JSCover 27 | lib-cov 28 | 29 | # Coverage directory used by tools like istanbul 30 | coverage 31 | *.lcov 32 | 33 | # nyc test coverage 34 | .nyc_output 35 | 36 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 37 | .grunt 38 | 39 | # Bower dependency directory (https://bower.io/) 40 | bower_components 41 | 42 | # node-waf configuration 43 | .lock-wscript 44 | 45 | # Compiled binary addons (https://nodejs.org/api/addons.html) 46 | build/Release 47 | 48 | # Dependency directories 49 | node_modules/ 50 | jspm_packages/ 51 | 52 | # Snowpack dependency directory (https://snowpack.dev/) 53 | web_modules/ 54 | 55 | # TypeScript cache 56 | *.tsbuildinfo 57 | 58 | # Optional npm cache directory 59 | .npm 60 | 61 | # Optional eslint cache 62 | .eslintcache 63 | 64 | # Optional stylelint cache 65 | .stylelintcache 66 | 67 | # Microbundle cache 68 | .rpt2_cache/ 69 | .rts2_cache_cjs/ 70 | .rts2_cache_es/ 71 | .rts2_cache_umd/ 72 | 73 | # Optional REPL history 74 | .node_repl_history 75 | 76 | # Output of 'npm pack' 77 | *.tgz 78 | 79 | # Yarn Integrity file 80 | .yarn-integrity 81 | 82 | # dotenv environment variable files 83 | .env 84 | .env.development.local 85 | .env.test.local 86 | .env.production.local 87 | .env.local 88 | 89 | # parcel-bundler cache (https://parceljs.org/) 90 | .cache 91 | .parcel-cache 92 | 93 | # Next.js build output 94 | .next 95 | out 96 | 97 | # Nuxt.js build / generate output 98 | .nuxt 99 | dist 100 | 101 | # Gatsby files 102 | .cache/ 103 | # Comment in the public line in if your project uses Gatsby and not Next.js 104 | # https://nextjs.org/blog/next-9-1#public-directory-support 105 | # public 106 | 107 | # vuepress build output 108 | .vuepress/dist 109 | 110 | # vuepress v2.x temp and cache directory 111 | .temp 112 | .cache 113 | 114 | # Docusaurus cache and generated files 115 | .docusaurus 116 | 117 | # Serverless directories 118 | .serverless/ 119 | 120 | # FuseBox cache 121 | .fusebox/ 122 | 123 | # DynamoDB Local files 124 | .dynamodb/ 125 | 126 | # TernJS port file 127 | .tern-port 128 | 129 | # Stores VSCode versions used for testing VSCode extensions 130 | .vscode-test 131 | 132 | # yarn v2 133 | .yarn/cache 134 | .yarn/unplugged 135 | .yarn/build-state.yml 136 | .yarn/install-state.gz 137 | .pnp.* 138 | 139 | # Global/VisualStudioCode 140 | # see: https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore 141 | 142 | .vscode/* 143 | !.vscode/settings.json 144 | !.vscode/tasks.json 145 | !.vscode/launch.json 146 | !.vscode/extensions.json 147 | !.vscode/*.code-snippets 148 | 149 | # Local History for Visual Studio Code 150 | .history/ 151 | 152 | # Built Visual Studio Code Extensions 153 | *.vsix 154 | 155 | # Global/Linux 156 | # see: https://github.com/github/gitignore/blob/main/Global/Linux.gitignore 157 | 158 | *~ 159 | 160 | # temporary files which can be created if a process still has a handle open of a deleted file 161 | .fuse_hidden* 162 | 163 | # KDE directory preferences 164 | .directory 165 | 166 | # Linux trash folder which might appear on any partition or disk 167 | .Trash-* 168 | 169 | # .nfs files are created when an open file is removed but is still being accessed 170 | .nfs* 171 | 172 | # Global/macOS 173 | # see: https://github.com/github/gitignore/blob/main/Global/macOS.gitignore 174 | 175 | # General 176 | .DS_Store 177 | .AppleDouble 178 | .LSOverride 179 | 180 | # Icon must end with two \r 181 | Icon 182 | 183 | 184 | # Thumbnails 185 | ._* 186 | 187 | # Files that might appear in the root of a volume 188 | .DocumentRevisions-V100 189 | .fseventsd 190 | .Spotlight-V100 191 | .TemporaryItems 192 | .Trashes 193 | .VolumeIcon.icns 194 | .com.apple.timemachine.donotpresent 195 | 196 | # Directories potentially created on remote AFP share 197 | .AppleDB 198 | .AppleDesktop 199 | Network Trash Folder 200 | Temporary Items 201 | .apdisk 202 | 203 | # Global/Windows 204 | # see: https://github.com/github/gitignore/blob/main/Global/Windows.gitignore 205 | 206 | # Windows thumbnail cache files 207 | Thumbs.db 208 | Thumbs.db:encryptable 209 | ehthumbs.db 210 | ehthumbs_vista.db 211 | 212 | # Dump file 213 | *.stackdump 214 | 215 | # Folder config file 216 | [Dd]esktop.ini 217 | 218 | # Recycle Bin used on file shares 219 | $RECYCLE.BIN/ 220 | 221 | # Windows Installer files 222 | *.cab 223 | *.msi 224 | *.msix 225 | *.msm 226 | *.msp 227 | 228 | # Windows shortcuts 229 | *.lnk 230 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | bun run commitlint --edit $1 4 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["davidanson.vscode-markdownlint", "joshbolduc.commitlint"] 3 | } 4 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "launch extension", 6 | "type": "extensionHost", 7 | "request": "launch", 8 | "args": [ 9 | "${workspaceFolder}/..", 10 | "--disable-extensions", 11 | "--extensionDevelopmentPath=${workspaceFolder}/dist" 12 | ], 13 | "preLaunchTask": "build extension" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "build extension", 6 | "type": "shell", 7 | "command": "bun run build" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | # run 'vsce ls' to verify only the correct files are included 2 | # learn more: https://code.visualstudio.com/api/working-with-extensions/publishing-extension#using-.vscodeignore 3 | 4 | **/* 5 | !static/ 6 | !theme/ 7 | !package.json 8 | !package.nls.json 9 | !CHANGELOG.md 10 | !LICENSE.md 11 | !README.md 12 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), 6 | and this project adheres to 7 | [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 8 | 9 | ## [Unreleased] 10 | 11 | ### Added 12 | 13 | - New **Glyph** icon theme contribution (the full set of icons available, a 14 | kitchen sink of sorts) 15 | - Color settings available for fine-tuning the icon colors (with some presets) 16 | 17 | ### Changed 18 | 19 | - Update icons to use a `.woff` icon font rather than `.svg` files to make it 20 | easier to create new icon theme contributions with more customization 21 | 22 | ## [0.2.0] - 2024-03-15 23 | 24 | ### Added 25 | 26 | - New **Glyph (Legacy)** icon theme contribution (all icons from the original 27 | Spectrum Icon extension) 28 | ([#7](https://github.com/lewxdev/vscode-glyph/pull/7)) 29 | 30 | ### Changed 31 | 32 | - Promoted the extension out of preview status 🎉 33 | - Updated social preview image with the new icon changes included 34 | 35 | ### Fixed 36 | 37 | - Gear icon outermost stroke not rendering correctly (also improved the shape 38 | and size of the icon) 39 | 40 | ## [0.1.2] - 2024-03-15 41 | 42 | ### Fixed 43 | 44 | - Unnecessary files included in the extension package 45 | ([#4](https://github.com/lewxdev/vscode-glyph/pull/4)) 46 | 47 | ## [0.1.1] - 2024-03-15 48 | 49 | ### Fixed 50 | 51 | - Incorrect branch for the initial release 52 | ([#3](https://github.com/lewxdev/vscode-glyph/pull/3)) 53 | - Missing updated content in `CHANGELOG.md` for the 0.1.0 release 54 | ([#3](https://github.com/lewxdev/vscode-glyph/pull/3)) 55 | 56 | ## [0.1.0] - 2024-03-15 57 | 58 | ### Added 59 | 60 | - New **Glyph (Minimal)** icon theme contribution (just the most essential icons 61 | to ensure everything is working as expected) 62 | ([#2](https://github.com/lewxdev/vscode-glyph/pull/2)) 63 | - All icons made available for the file icon theme 64 | - Initial contribution-forward setup for the repository 65 | ([#1](https://github.com/lewxdev/vscode-glyph/pull/1)) 66 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | First off, thanks for taking the time to contribute! ❤️ 4 | 5 | Please see the common guidelines in the 6 | [CONTRIBUTING.md](https://github.com/lewxdev/.github/blob/main/CONTRIBUTING.md) 7 | for more information on making your first contribution. 8 | 9 | To contribute code changes, please follow these steps: 10 | 11 | 1. Fork the repository. 12 | 1. Make your changes in a new branch. 13 | 1. Test your changes locally to ensure they work as expected. 14 | 1. Submit a pull request with a clear description. 15 | 16 | To add new icons to this icon theme, follow the steps below to access the design 17 | file and submit your changes: 18 | 19 | 1. [Create an account](https://www.figma.com/signup) or 20 | [sign in](https://www.figma.com/login) to Figma. 21 | 1. Open the public [design file](https://www.figma.com/community/file/1350146481023811423) 22 | resource. 23 | 1. Add new icon components, use the existing icons as a reference for the design 24 | style and placement. 25 | 1. Download all exports to the `theme/icons` directory. 26 | 1. Follow the steps mentioned above to submit a pull request with your changes. 27 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # The MIT License (MIT) 2 | 3 | Copyright © 2024-Present, [lewxdev](https://github.com/lewxdev) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the “Software”), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | # Glyph for vscode 4 | 5 | [![Visual Studio Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/lewxdev.vscode-glyph?include_prereleases&style=flat-square&labelColor=1B1D23&color=007ACC)](https://marketplace.visualstudio.com/items?itemName=lewxdev.vscode-glyph&ssr=false#version-history) 6 | [![Visual Studio Marketplace Rating](https://img.shields.io/visual-studio-marketplace/r/lewxdev.vscode-glyph?style=flat-square&labelColor=1B1D23&color=007ACC)](https://marketplace.visualstudio.com/items?itemName=lewxdev.vscode-glyph&ssr=false#review-details) 7 | [![Visual Studio Marketplace Installs](https://img.shields.io/visual-studio-marketplace/i/lewxdev.vscode-glyph?style=flat-square&label=Installs&labelColor=1B1D23&color=007ACC)](https://marketplace.visualstudio.com/items?itemName=lewxdev.vscode-glyph) 8 | [![Visual Studio Marketplace Downloads](https://img.shields.io/visual-studio-marketplace/d/lewxdev.vscode-glyph?style=flat-square&label=Downloads&labelColor=1B1D23&color=007ACC)](https://marketplace.visualstudio.com/items?itemName=lewxdev.vscode-glyph) 9 | 10 |
11 | 12 | ![Social preview](static/social-preview.png) 13 | 14 | ## Overview 15 | 16 | After [**Spectrum Icons**](static/spectrum-legacy.png) was removed from 17 | GitHub and the Visual Studio Marketplace, I meticulously crafted this icon theme 18 | to be its successor. 19 | 20 | The **Glyph for vscode** file icon theme provides highly customizable options 21 | delivered in a minimalist package. These icons perfectly match the look of 22 | Activity Bar items to make for a more cohesive-feeling experience. 23 | 24 | ## Features 25 | 26 | - **Minimalistic design** - a simple icon set that stays true to the original 27 | - **Multiple Icon Themes** - choose from a variety of icon themes, including 28 | legacy (the original set), minimal, and default (in color and monochrome 29 | variants) 30 | - **Expanded Icon Set** - building on the icons from Spectrum, this theme 31 | introduces new icons for a broader range of file types 32 | 33 | ## Installation 34 | 35 | 36 | 37 | 1. Launch **Visual Studio Code** 38 | 1. Go to the **Extensions** view (Ctrl + Shift + 39 | X or Cmd + Shift + X on macOS) 40 | 1. Search for "Glyph for vscode". 41 | 1. Click on the **Install** button. 42 | 1. Once installed, click on the gear icon and select "Set File Icon Theme". 43 | 1. Chose any of the `glyph.*` options from the list. 44 | 1. Enjoy! :) 45 | 46 | ## Contributing 47 | 48 | See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to this 49 | project. 50 | 51 | --- 52 | 53 | © 2024-Present, **Glyph for vscode** is released under the 54 | [MIT License](LICENSE.md) and is maintained by 55 | [@lewxdev](https://github.com/lewxdev) and community contributors. 56 | 57 | Special thanks to [@alexperronnet](https://github.com/alexperronnet), the 58 | original creator of Spectrum Icons. 59 | -------------------------------------------------------------------------------- /bun.lockb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewxdev/vscode-glyph/e8ad9b040504f65a636ee18ce72d235236bbe076/bun.lockb -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "publisher": "lewxdev", 3 | "name": "vscode-glyph", 4 | "version": "0.2.0", 5 | "displayName": "%displayName%", 6 | "description": "%description%", 7 | "icon": "static/icon.png", 8 | "repository": "github:lewxdev/vscode-glyph", 9 | "license": "MIT", 10 | "engines": { 11 | "vscode": "^1.87.0" 12 | }, 13 | "galleryBanner": { 14 | "color": "#62646a", 15 | "theme": "dark" 16 | }, 17 | "sponsor": { 18 | "url": "https://github.com/sponsors/lewxdev" 19 | }, 20 | "categories": [ 21 | "Themes" 22 | ], 23 | "extensionKind": [ 24 | "ui" 25 | ], 26 | "keywords": [ 27 | "customization", 28 | "icon-theme", 29 | "icons", 30 | "minimal", 31 | "theme" 32 | ], 33 | "main": "src/extension.js", 34 | "activationEvents": [ 35 | "onStartupFinished" 36 | ], 37 | "contributes": { 38 | "iconThemes": [ 39 | { 40 | "id": "glyph.legacy", 41 | "label": "%iconThemeLabelLegacy%", 42 | "path": "theme/legacy-icon-theme.json" 43 | }, 44 | { 45 | "id": "glyph.minimal", 46 | "label": "%iconThemeLabelMinimal%", 47 | "path": "theme/minimal-icon-theme.json" 48 | } 49 | ] 50 | }, 51 | "scripts": { 52 | "build": "bun run clean && bun run scripts/build.ts", 53 | "clean": "git clean -xdf dist", 54 | "generate": "fantasticon", 55 | "prepare": "husky" 56 | }, 57 | "dependencies": { 58 | "brace-expansion": "^4.0.0" 59 | }, 60 | "devDependencies": { 61 | "@commitlint/cli": "^19", 62 | "@commitlint/config-conventional": "^19", 63 | "@tsconfig/bun": "^1.0.7", 64 | "@tsconfig/strictest": "^2.0.5", 65 | "@types/brace-expansion": "^1.1.2", 66 | "@types/bun": "^1.1.6", 67 | "@types/vscode": "^1.87", 68 | "@vscode/vsce": "^2.25.0", 69 | "esbuild": "^0.23.0", 70 | "fantasticon": "^3.0.0", 71 | "husky": "^9" 72 | }, 73 | "commitlint": { 74 | "extends": [ 75 | "@commitlint/config-conventional" 76 | ] 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /package.nls.json: -------------------------------------------------------------------------------- 1 | { 2 | "displayName": "Glyph for vscode", 3 | "description": "A minimal icon theme for vscode inspired by Spectrum Icons by Alex Perronnet", 4 | "iconThemeLabelLegacy": "Glyph (Legacy)", 5 | "iconThemeLabelMinimal": "Glyph (Minimal)" 6 | } 7 | -------------------------------------------------------------------------------- /scripts/build.ts: -------------------------------------------------------------------------------- 1 | import { build } from "esbuild"; 2 | import * as themes from "../src/themes"; 3 | 4 | const isProduction = process.argv.includes("--production"); 5 | 6 | // see: https://aka.ms/vscode-bundle-extension#using-esbuild 7 | await build({ 8 | entryPoints: [ 9 | "static/*", 10 | "src/extension.ts", 11 | "package.json", 12 | "package.nls.json", 13 | "CHANGELOG.md", 14 | "LICENSE.md", 15 | "README.md", 16 | ], 17 | loader: { 18 | ".json": "copy", 19 | ".md": "copy", 20 | ".png": "copy", 21 | ".svg": "copy", 22 | ".woff": "copy", 23 | }, 24 | outdir: "dist", 25 | external: ["vscode"], 26 | format: "cjs", 27 | platform: "node", 28 | bundle: true, 29 | sourcesContent: false, 30 | minify: isProduction, 31 | sourcemap: !isProduction, 32 | }); 33 | 34 | await Array.fromAsync(Object.values(themes), async (theme) => { 35 | await theme.write(); 36 | }); 37 | 38 | if (isProduction) { 39 | const { createVSIX } = await import("@vscode/vsce"); 40 | await createVSIX({ cwd: "dist", dependencies: false }); 41 | } 42 | -------------------------------------------------------------------------------- /src/constants/glyph.ts: -------------------------------------------------------------------------------- 1 | export enum Glyph { 2 | Vue = "vue", 3 | Video = "video", 4 | Triangle = "triangle", 5 | Test = "test", 6 | Tag = "tag", 7 | Table = "table", 8 | Svelte = "svelte", 9 | Shield = "shield", 10 | Shell = "shell", 11 | Settings = "settings", 12 | RootFolder = "root_folder", 13 | RootFolderExpanded = "root_folder_expanded", 14 | React = "react", 15 | Prisma = "prisma", 16 | Parenthesis = "parenthesis", 17 | OpenSource = "open_source", 18 | Next = "next", 19 | Microsoft = "microsoft", 20 | Merge = "merge", 21 | Lock = "lock", 22 | Information = "information", 23 | Image = "image", 24 | I18n = "i18n", 25 | History = "history", 26 | Git = "git", 27 | Gatsby = "gatsby", 28 | Format = "format", 29 | Folder = "folder", 30 | FolderExpanded = "folder_expanded", 31 | Fingerprint = "fingerprint", 32 | File = "file", 33 | Expo = "expo", 34 | Eslint = "eslint", 35 | Document = "document", 36 | Docs = "docs", 37 | Database = "database", 38 | Copyright = "copyright", 39 | Commit = "commit", 40 | Certificate = "certificate", 41 | Camera = "camera", 42 | Brackets = "brackets", 43 | Braces = "braces", 44 | Audio = "audio", 45 | Archive = "archive", 46 | Angular = "angular", 47 | } 48 | 49 | export const GLYPH_CODEPOINTS: { [key in Glyph]: string } = { 50 | [Glyph.Vue]: "61697", 51 | [Glyph.Video]: "61698", 52 | [Glyph.Triangle]: "61699", 53 | [Glyph.Test]: "61700", 54 | [Glyph.Tag]: "61701", 55 | [Glyph.Table]: "61702", 56 | [Glyph.Svelte]: "61703", 57 | [Glyph.Shield]: "61704", 58 | [Glyph.Shell]: "61705", 59 | [Glyph.Settings]: "61706", 60 | [Glyph.RootFolder]: "61707", 61 | [Glyph.RootFolderExpanded]: "61708", 62 | [Glyph.React]: "61709", 63 | [Glyph.Prisma]: "61710", 64 | [Glyph.Parenthesis]: "61711", 65 | [Glyph.OpenSource]: "61712", 66 | [Glyph.Next]: "61713", 67 | [Glyph.Microsoft]: "61714", 68 | [Glyph.Merge]: "61715", 69 | [Glyph.Lock]: "61716", 70 | [Glyph.Information]: "61717", 71 | [Glyph.Image]: "61718", 72 | [Glyph.I18n]: "61719", 73 | [Glyph.History]: "61720", 74 | [Glyph.Git]: "61721", 75 | [Glyph.Gatsby]: "61722", 76 | [Glyph.Format]: "61723", 77 | [Glyph.Folder]: "61724", 78 | [Glyph.FolderExpanded]: "61725", 79 | [Glyph.Fingerprint]: "61726", 80 | [Glyph.File]: "61727", 81 | [Glyph.Expo]: "61728", 82 | [Glyph.Eslint]: "61729", 83 | [Glyph.Document]: "61730", 84 | [Glyph.Docs]: "61731", 85 | [Glyph.Database]: "61732", 86 | [Glyph.Copyright]: "61733", 87 | [Glyph.Commit]: "61734", 88 | [Glyph.Certificate]: "61735", 89 | [Glyph.Camera]: "61736", 90 | [Glyph.Brackets]: "61737", 91 | [Glyph.Braces]: "61738", 92 | [Glyph.Audio]: "61739", 93 | [Glyph.Archive]: "61740", 94 | [Glyph.Angular]: "61741", 95 | }; 96 | -------------------------------------------------------------------------------- /src/constants/index.ts: -------------------------------------------------------------------------------- 1 | const COLOR_DEFAULT = "#7b7d84" as const; 2 | const COLOR_LIGHT = "#62646a" as const; 3 | 4 | export const DEFAULT_COLOR_MAP = [ 5 | ["default", COLOR_DEFAULT], 6 | ["light", COLOR_LIGHT], 7 | ] as const; 8 | 9 | export const PREFIX = "glyph" as const; 10 | -------------------------------------------------------------------------------- /src/extension.ts: -------------------------------------------------------------------------------- 1 | import * as vscode from "vscode"; 2 | 3 | export function activate(context: vscode.ExtensionContext) { 4 | console.log(`[${context.extension.id}] active`); 5 | } 6 | -------------------------------------------------------------------------------- /src/themes.ts: -------------------------------------------------------------------------------- 1 | import { Glyph } from "./constants/glyph"; 2 | import { IconSet } from "./utils/icon-set"; 3 | 4 | export const minimal = new IconSet("minimal"); 5 | 6 | export const legacy = new IconSet("legacy") 7 | .icon(Glyph.Angular, { 8 | fileExtensions: 9 | "{component,directive,guard,module,resolver,service,pipe}.{js,ts},filter.js,ng-template", 10 | fileNames: "angular.json,angular-cli.json", 11 | }) 12 | .icon(Glyph.Archive, { 13 | fileExtensions: "7z,br,brotli,bzip2,gz,gzip,rar,tar,tgz,xz,zip", 14 | }) 15 | .icon(Glyph.Audio, { 16 | fileExtensions: "aiff,flac,m4a,mp3,wav,wma", 17 | }) 18 | .icon(Glyph.Braces, { 19 | fileExtensions: "js", 20 | languageIds: 21 | "c,coffeescript,cpp,csharp,css,fsharp,go,groovy,handlebars,html,jade,java,javascript,javascriptreact,less,lua,objective-c,perl,php,properties,python,ruby,rust,scss,swift,typescript,typescriptreact,xml,yaml", 22 | }) 23 | .icon(Glyph.Brackets, { 24 | fileExtensions: "htm,html,xml", 25 | }) 26 | .icon(Glyph.Camera, { 27 | fileExtensions: "snap", 28 | }) 29 | .icon(Glyph.Certificate, { 30 | fileExtensions: "cer,cert,crt", 31 | fileNames: "{licence,license,unlicense}{,.md,.txt}", 32 | }) 33 | .icon(Glyph.Copyright, { 34 | fileNames: "authors{,.md,.txt}", 35 | }) 36 | .icon(Glyph.Database, { 37 | fileExtensions: "graphql,json,sqlite", 38 | languageIds: "json,sql", 39 | }) 40 | .icon(Glyph.Docs, { 41 | fileExtensions: "md,mdx", 42 | languageIds: "markdown", 43 | }) 44 | .icon(Glyph.Document, { 45 | fileExtensions: "doc,docx,pdf,ppt,pptx,rtf,txt", 46 | fileNames: "_headers,_redirects,.htaccess,robots.txt,sitemap.xml", 47 | }) 48 | .icon(Glyph.Fingerprint, { 49 | fileExtensions: "asc,gpg,key,pem,pub", 50 | fileNames: ".htpasswd", 51 | }) 52 | .icon(Glyph.Format, { 53 | fileNames: 54 | ".prettierignore,.prettierrc{,.js,.json,.yaml,.yml},prettier.config.js", 55 | }) 56 | .icon(Glyph.Gatsby, { 57 | fileNames: "gatsby-{browser,config,node,ssr}.js", 58 | }) 59 | .icon(Glyph.Git, { 60 | fileExtensions: "patch", 61 | fileNames: 62 | ".git-history,.gitattributes,.gitconfig,.gitignore,.gitkeep,.gitmodules", 63 | }) 64 | .icon(Glyph.History, { 65 | fileNames: "{changelog,changes}{,.md,.txt}", 66 | }) 67 | .icon(Glyph.I18n, { 68 | fileExtensions: "mo,po,pot", 69 | }) 70 | .icon(Glyph.Image, { 71 | fileExtensions: 72 | "bmp,eps,gif,ico,img,jpeg,jpg,png,psd,raw,svg,tif,tiff,webp", 73 | }) 74 | .icon(Glyph.Information, { 75 | fileExtensions: "log", 76 | fileNames: "readme{,.md,.txt}", 77 | }) 78 | .icon(Glyph.Lock, { 79 | fileExtensions: "lock", 80 | fileNames: "security{,.md,.txt}", 81 | }) 82 | .icon(Glyph.Microsoft, { 83 | fileExtensions: 84 | "code-workplace,csproj,ruleset,sln,suo,vb,vbs,{vcxitems,vcxproj}{,.filters},vscodeignore,vsix,vsixmanifest", 85 | }) 86 | .icon(Glyph.OpenSource, { 87 | fileNames: "contributing.md,credits{,.md,.txt}", 88 | }) 89 | .icon(Glyph.Parenthesis, { 90 | fileExtensions: "cl,el,elc,fasl,l,lisp,lsp,wat", 91 | languageIds: "clojure", 92 | }) 93 | .icon(Glyph.React, { 94 | fileExtensions: "jsx,tsx", 95 | }) 96 | .icon(Glyph.Settings, { 97 | fileExtensions: 98 | "cfg,conf,config,dlc,dll,env{,.example},ini,option,prefs,prop,properties,props,settings,sln.dotsettings{,.user},toml", 99 | fileNames: 100 | ".buildignore,.jshintignore,.clang-{format,tidy},.mrconfig,.yardopts,manifest.mf,package.json", 101 | languageIds: "makefile", 102 | }) 103 | .icon(Glyph.Shell, { 104 | fileExtensions: "awk,fish,tcsh,zshrc", 105 | languageIds: "bat,powershell,shellscript", 106 | }) 107 | .icon(Glyph.Shield, { 108 | fileNames: 109 | ".eslintcache,.eslintignore,.eslintrc{,.cjs,.js,.json,.yaml,.yml}", 110 | }) 111 | .icon(Glyph.Table, { 112 | fileExtensions: "csv,tsv,xls,xlsx", 113 | }) 114 | .icon(Glyph.Tag, { 115 | fileExtensions: "css,less,sass,scss,styl", 116 | }) 117 | .icon(Glyph.Test, { 118 | fileExtensions: 119 | "e2e-spec.{js,ts},{js,jsx,ts,tsx}.snap,{spec,test}.{js,jsx,ts,tsx}", 120 | }) 121 | .icon(Glyph.Video, { 122 | fileExtensions: "avi,m2v,m4v,mkv,mov,mp4,mpeg,mpg,mpv,webm,wmv", 123 | }) 124 | .icon(Glyph.Vue, { 125 | fileExtensions: "store.{js,ts},vue", 126 | fileNames: "store.{js,ts},{nuxt.config,vue.config}.{js,ts}", 127 | }); 128 | -------------------------------------------------------------------------------- /src/utils/icon-set.ts: -------------------------------------------------------------------------------- 1 | // see: https://code.visualstudio.com/api/extension-guides/file-icon-theme 2 | 3 | import fs from "node:fs/promises"; 4 | import path from "node:path"; 5 | import expand from "brace-expansion"; 6 | import { DEFAULT_COLOR_MAP, PREFIX } from "../constants"; 7 | import { Glyph, GLYPH_CODEPOINTS } from "../constants/glyph"; 8 | import { capitalize, unsafeEntries } from "."; 9 | 10 | type FontDefinition = { 11 | id: string; 12 | src: { path: string; format: string }[]; 13 | weight?: string; 14 | style?: string; 15 | size?: string; 16 | }; 17 | 18 | type IconDefinition = { 19 | fontCharacter: string; 20 | fontColor: string; 21 | fontSize?: string; 22 | fontId?: string; 23 | }; 24 | 25 | type FileAssociations = { 26 | file?: string; 27 | folder?: string; 28 | folderExpanded?: string; 29 | rootFolder?: string; 30 | rootFolderExpanded?: string; 31 | folderNames?: Record; 32 | folderNamesExpanded?: Record; 33 | rootFolderNames?: Record; 34 | rootFolderNamesExpanded?: Record; 35 | languageIds?: Record; 36 | fileExtensions?: Record; 37 | fileNames?: Record; 38 | }; 39 | 40 | type AssociationsInit = { 41 | [K in keyof FileAssociations]: FileAssociations[K] extends string | undefined 42 | ? true 43 | : string; 44 | }; 45 | 46 | export class IconSet { 47 | private readonly outFile: string; 48 | private readonly data = { 49 | fonts: [] as FontDefinition[], 50 | iconDefinitions: {} as Record, 51 | light: {} as FileAssociations, 52 | hidesExplorerArrows: true, 53 | showLanguageModeIcons: false, 54 | ...({} as FileAssociations), 55 | }; 56 | 57 | public constructor( 58 | public readonly name: string, 59 | public readonly id = `${PREFIX}.${name}`, 60 | public readonly label = `${capitalize(PREFIX)} (${capitalize(name)})` 61 | ) { 62 | const fontPath = "dist/static/glyph.woff"; 63 | this.outFile = `dist/theme/${name}-icon-theme.json`; 64 | this.data.fonts.push({ 65 | id: "glyph", 66 | src: [{ format: "woff", path: path.relative(this.outDir, fontPath) }], 67 | size: "125%", 68 | }); 69 | this.icon(Glyph.File, { file: true }) 70 | .icon(Glyph.Folder, { folder: true }) 71 | .icon(Glyph.FolderExpanded, { folderExpanded: true }) 72 | .icon(Glyph.RootFolder, { rootFolder: true }) 73 | .icon(Glyph.RootFolderExpanded, { rootFolderExpanded: true }); 74 | } 75 | 76 | public icon(glyph: Glyph, associations: AssociationsInit) { 77 | const fontCharacter = `\\${parseInt(GLYPH_CODEPOINTS[glyph]).toString(16)}`; 78 | 79 | for (const [theme, fontColor] of DEFAULT_COLOR_MAP) { 80 | const iconId = `_${glyph}_${theme}`; 81 | const root = theme === "default" ? this.data : this.data[theme]; 82 | this.data.iconDefinitions[iconId] = { fontCharacter, fontColor }; 83 | 84 | for (const [association, value] of unsafeEntries(associations)) { 85 | if (typeof value === "boolean") { 86 | root[association] = iconId; 87 | } 88 | 89 | if (typeof value === "string") { 90 | root[association] ||= {}; 91 | for (const key of expand(`{,${value}}`)) { 92 | root[association][key] = iconId; 93 | } 94 | } 95 | } 96 | } 97 | 98 | return this; 99 | } 100 | 101 | public async write() { 102 | const data = JSON.stringify(this.data, null, 2); 103 | await fs.mkdir(this.outDir, { recursive: true }); 104 | await fs.writeFile(this.outFile, data, "utf8"); 105 | } 106 | 107 | private get outDir() { 108 | return path.dirname(this.outFile); 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export const capitalize = (s: T) => 2 | s.replace(/^\w/, (c) => c.toUpperCase()) as Capitalize; 3 | 4 | export const unsafeEntries = Object.entries as ( 5 | o: T 6 | ) => { [K in keyof T]-?: [K, T[K]] }[keyof T][]; 7 | -------------------------------------------------------------------------------- /static/glyph.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewxdev/vscode-glyph/e8ad9b040504f65a636ee18ce72d235236bbe076/static/glyph.woff -------------------------------------------------------------------------------- /static/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewxdev/vscode-glyph/e8ad9b040504f65a636ee18ce72d235236bbe076/static/icon.png -------------------------------------------------------------------------------- /static/icons/angular.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/archive.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/audio.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/braces.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/brackets.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/camera.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/certificate.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/commit.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/copyright.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/database.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/docs.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/document.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/eslint.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/expo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/file.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/fingerprint.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/folder-expanded.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/folder.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/format.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/gatsby.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/git.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/history.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/i18n.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/image.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/information.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/lock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/merge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/microsoft.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/next.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/open-source.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/parenthesis.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/prisma.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/react.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/root-folder-expanded.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/root-folder.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/settings.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/shell.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/shield.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/svelte.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/table.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/tag.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/test.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/triangle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/video.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/icons/vue.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/social-preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewxdev/vscode-glyph/e8ad9b040504f65a636ee18ce72d235236bbe076/static/social-preview.png -------------------------------------------------------------------------------- /static/spectrum-legacy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lewxdev/vscode-glyph/e8ad9b040504f65a636ee18ce72d235236bbe076/static/spectrum-legacy.png -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["@tsconfig/bun", "@tsconfig/strictest"], 3 | "include": ["scripts", "src"] 4 | } 5 | --------------------------------------------------------------------------------