Skip to content
This repository has been archived by the owner on Dec 19, 2020. It is now read-only.

User themes in arduino 1.8.6 #25

Closed
figgyc opened this issue Feb 23, 2019 · 10 comments
Closed

User themes in arduino 1.8.6 #25

figgyc opened this issue Feb 23, 2019 · 10 comments

Comments

@figgyc
Copy link

figgyc commented Feb 23, 2019

In arduino 1.8.6 a commit was added so you can use custom themes without overwriting the installation. I managed to get it working fairly easily so you could add it to this project. All you need to do is create a zip file of what is in the theme folder and add a file theme.properties containing something along these lines:

name=DarkArduinoTheme
version=1.0

Then drop that zip file into the theme subfolder of the arduino sketchbook folder and it will appear in the preferences. just wanted to let you know

@jeffThompson
Copy link
Owner

Thanks @figgyc! I couldn't seem to get the theme to show up in my preferences though. The theme folder didn't exist in my sketchbook, so I tried creating it. I do see the option in the preferences window though, but the theme isn't there.

Any thoughts?

@Mumfrey
Copy link

Mumfrey commented May 28, 2019

Hi @jeffThompson, I'm the one who added the custom theme functionality (in this pull request) largely because I love your dark theme and wanted to give theme authors like yourself an easier way to distribute their themes to end users. (In fact in my original pull request I mentioned your theme specifically).

To package the theme so that it works with the functionality all you need to do is:

  • Package the resources from the theme directory as a .zip archive.
  • As mentioned by @figgyc above, include in the archive a file called theme.properties with the 2 lines inside. (The zip will be ignored unless it contains this file)
  • Instruct users to create a theme folder in their sketchbook folder, and place the zip file inside.
  • Select the theme in their IDE and then restart

I tried this myself to confirm it's working with your theme, if you're still not having success with it then ping me back.

An alternative that works is that resources places directly in the theme folder (in your sketchbook) will be loaded directly. This makes it easy to develop themes because you don't need to replace files in the main program folder any more, you can just add files to themes and they will be loaded.

Note that the new functionality also includes the ability to specify a custom editor font in theme.txt which will override the default one unless the user has already changed to a different font manually).

Hope this helps.

@jeffThompson
Copy link
Owner

@Mumfrey – so great, thank you for all this! Really glad this is baked into the IDE and will be easier for others to edit. I had considered trying to do something like this for a long time, but modding the IDE felt really daunting. I'm very much open to the dark theme being shipped with the Arduino IDE as a second option, if that would be of interest.

Unfortunately, I cannot get the theme to show up for me! I'm on Mac 10.14 (I saw from your PR that you hadn't tested on Mac) and the newest IDE version.

  • Does the .zip archive need to have any particular name?
  • Can you verify the folder I should create in my sketchbook is called theme and not themes?

Those are the only two things I can think of, but perhaps you'll have another guess as to what's breaking here? Thanks!

@Mumfrey
Copy link

Mumfrey commented May 28, 2019

I'm very much open to the dark theme being shipped with the Arduino IDE as a second option, if that would be of interest.

You'd have to ask the arduino team about that (or create a PR) I just PR'd the functionality to the IDE because I thought it was worth doing.

Unfortunately, I cannot get the theme to show up for me! I'm on Mac 10.14 (I saw from your PR that you hadn't tested on Mac) and the newest IDE version.

The original PR which supported just putting the files into theme (and yes it's theme rather than themes) definitely worked on mac, I had a friend who owns a mac test it for me. However the second PR (for zip bundles) I don't know for sure works on mac. I can ask my friend to test it if that helps.

A pre-packed version of a dark arduino skin (based on yours) is available here (lmihalkovic/darkduino
)
. Might be worth giving that a try and seeing if it works for you?

@suuuehgi
Copy link

suuuehgi commented Mar 20, 2020

Another year has passed. Please update the instructions. Fiddling around with system files as recommended here is a really bad practice. Google lists this repository first for arduino dark and countless blog posts copy the instructions (e.g. here).

  1. Go to your Sketchbook folder (e.g. ~/Arduino for Linux)
  2. Create a folder theme if not already present
  3. Throw the attached zip in.

It's as easy as that. Now start the IDE and choose the theme under preferences.
The zip is just what @figgyc wrote.

dark.zip

@jeffThompson
Copy link
Owner

@suuuehgi – I know! Keeping projects like this up to date is hard, and I'm not using Arduino a lot these days so I'm not often reminded. But the idea with Github is that others can help too! Posting issues is great, but feel free to fork the repo, change the README, and submit a pull request.

That said, hoping to get to the open issues here this week.

@ricardojlrufino
Copy link

Current installation is not user friendly. I'm improving installation in this pull request:
arduino/Arduino#10202
Now to enable a true Dark Mode, is need a mod on IDE , i done in this:
arduino/Arduino#10203

I made the build with these and other improvements and made available the link below, who can test it would be cool.
https://github.com/ricardojlrufino/Arduino/releases

@ricardojlrufino
Copy link

Usage

Add:

ui.laf = com.formdev.flatlaf.FlatDarkLaf

to theme.txt, from custom theme

Next, install custom theme. (#10202 ).

Example

Sample Dark theme in attachments.
darkduino.zip
Need add jar in /lib folder: https://bintray.com/jformdesigner/flatlaf/flatlaf/0.34#files/com/formdev/flatlaf/0.34

@0purple
Copy link

0purple commented Nov 10, 2020

Thank you @Mumfrey !

@jeffThompson
Copy link
Owner

Sorry all, I am no longer maintaining this repo. Please see the note in the README file.

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

No branches or pull requests

6 participants