matlab-schemer icon indicating copy to clipboard operation
matlab-schemer copied to clipboard

Easily set included schemes without file browser

Open flutefreak7 opened this issue 4 years ago • 4 comments

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 avatar May 26 '20 20:05 flutefreak7

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

flutefreak7 avatar May 26 '20 20:05 flutefreak7

Sorry to hear you had difficulties getting it to run.

The quick start instructions are to run schemer_import without any parameters. If you do this it will open a GUI to select the colour scheme .prf file. By default, the GUI should open at the directory containing the schemes which ship with schemer. So it should open with the directory containing monokai.prf showing so you can select it straight away.

What happens for you when you run schemer_import without any arguments?

On Tue, 26 May 2020, 21:27 Brett Ables, [email protected] wrote:

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.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/scottclowe/matlab-schemer/issues/26, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWCADZMFDV3LXXBOY2NCVDRTQQZRANCNFSM4NLCZC7Q .

scottclowe avatar May 26 '20 21:05 scottclowe

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.

WinterAlexander avatar Jun 04 '20 00:06 WinterAlexander

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

eMoss55 avatar Jan 12 '21 06:01 eMoss55