Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match Peacock current color in file tree #539

Open
patillacode opened this issue Nov 22, 2023 · 1 comment
Open

Match Peacock current color in file tree #539

patillacode opened this issue Nov 22, 2023 · 1 comment

Comments

@patillacode
Copy link

Is your feature request related to a problem? Please describe.
There is no problem, this would be a nice to have feature.

Describe the solution you'd like
In order to keep things under the same style it would be nice to have the current selected color for peacock as the "selected file highlight" color which rests under the list.inactiveSelectionBackground setting (and probably a few others, like list.hoverBackground)

this could be toggled on and off just like the other peacock settings!

Describe alternatives you've considered
After a bit of research I found that vscode settings.json file doesn't allow using variables:

The settings in settings.json are static and do not support variable substitution or referencing other settings.

Additional context
I put together a quick example of what I think might work in case it helps, here it is:

const vscode = require('vscode');

function activate(context) {
    let disposable = vscode.commands.registerCommand('extension.usePeacockColor', function () {
        // Get the current workspace configuration
        let config = vscode.workspace.getConfiguration();

        // Get the current Peacock color
        let peacockColor = config.get('peacock.color');

        // Update the other setting with the Peacock color
        config.update('list.inactiveSelectionBackground', peacockColor, vscode.ConfigurationTarget.Workspace);
    });

    context.subscriptions.push(disposable);
}

exports.activate = activate;

A couple of shots of what the end result could look like:

Screenshot 2023-11-22 at 13 17 35
Screenshot 2023-11-22 at 13 16 36

@johnpapa
Copy link
Owner

Thank you @patillacode for creating this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants