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

Easily set included schemes without file browser #26

Open
flutefreak7 opened this issue May 26, 2020 · 4 comments
Open

Easily set included schemes without file browser #26

flutefreak7 opened this issue May 26, 2020 · 4 comments

Comments

@flutefreak7
Copy link

I was confused at first because there weren't clear instructions on what to do to apply one of the included schemes. I didn't know that I needed to navigate to ~\Matlab\Add-Ons\Collections\MATLAB Schemer\scottclowe-matlab-schemer-2156bb9\schemes to find a file to load.

My suggestion would be to add support for quickly setting the included schemes via an API like schemer_import('monokai') and the function automatically loads the included file.

@flutefreak7 flutefreak7 changed the title Easier first run Easily set included schemes without file browser May 26, 2020
@flutefreak7
Copy link
Author

Also for a coworker the Add-Ons folder wasn't in his Matlab folder, but in AppData, so I suppose that location varies depending on the installation

@scottclowe
Copy link
Owner

scottclowe commented May 26, 2020 via email

@WinterAlexander
Copy link

Thank you for mentioning the directory containing the schemes. I otherwise wouldn't have found it. I also have the GUI open to my home directory when running schemer_import without argument.

@eMoss55
Copy link

eMoss55 commented Jan 12, 2021

I got around this (and made switching between my favorite schemes on the fly much easier) by writing a small wrapper that uses which to find the proper location.

function switch_scheme(theme)
arguments
    theme (1,1) string = "default";
end

switch theme
    case "default"
        themefile = "default.prf";
    case "dark"
        themefile = "darkmate.prf";
    case "contrast"
        themefile = "vibrant.prf";
    otherwise
        themefile = "default.prf";
end

themefile = fullfile(fileparts(which("schemer_import")),"schemes",themefile);

schemer_import(char(themefile));

end

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

4 participants