GithubHelp home page GithubHelp logo

s00500 / unique-window-colors Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stuartcrobinson/unique-window-colors

0.0 0.0 0.0 3.32 MB

Uniquely color different VSCode workspace windows with automatic selections or customized colors and themes.

Home Page: https://marketplace.visualstudio.com/items?itemName=stuart.unique-window-colors

TypeScript 73.72% HTML 26.28%

unique-window-colors's Introduction

Window Colors

Uniquely and automatically colors each VSCode window.

drawing     drawing

What it does

This extension gives each new VS Code window a unique color based on a hash of the root directory name when it is opened. It does this by immediately writing three colors to the following settings in .vscode/settings.json:

  "workbench.colorCustomizations": {
    "activityBar.background": "#13332E",
    "titleBar.activeBackground": "#19423B",
    "titleBar.activeForeground": "#F6FBFB"
  }

The extension deletes this file and folder each time the VS Code window is closed unless the colors have been modified or unless they contain any other settings.

You can optionally set a single Base Color (see Window Colors settings) by hex code or css color name.

Usage with Git

To avoid checking .vscode/settings.json in to your remote repository without modifying .gitignore, you can either:

  1. locally: add .vscode/settings.json to your project's .git/info/exclude file

    or

  2. globally: create and use a global .gitignore_global file like so:

    git config --global core.excludesfile ~/.gitignore_global

Usage

Colors do not get overwritten. This allows you to set custom colors (or a single Base Color). To switch between light and dark themed colors, you must first delete the current colors from .vscode/settings.json. You can do this manually or by or selecting remove in the extension's Window Colors: Theme settings and reloading the VS Code window.

Notes

Workspaces containing multiple root folders are not currently supported by this extension. The current behavior for multi-folder workspaces is that the workspace color settings will be set by the first window opened, and can be saved in the workspace's <workspace-name>.code-workspace configuration file.

When opening new VSCode windows, you might see the relevant theme colors change as they are updated to the new workspace. This is normal:

drawing

Credits

Hashing and color generation functions adapted from https://www.designedbyaturtle.co.uk/convert-string-to-hexidecimal-colour-with-javascript-vanilla/ by Edd Turtle.

Workspace root folder detection function adapted from https://itnext.io/how-to-make-a-visual-studio-code-extension-77085dce7d82 by Van Huynh.



unique-window-colors's People

Contributors

s00500 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.