Skip to content

Instantly share code, notes, and snippets.

@hiphopsmurf
Forked from foosel/README.md
Created January 18, 2017 17:50
Show Gist options
  • Save hiphopsmurf/d17f34c95381a1a0d8c12295768bdeba to your computer and use it in GitHub Desktop.
Save hiphopsmurf/d17f34c95381a1a0d8c12295768bdeba to your computer and use it in GitHub Desktop.
OctoPrint Filetab plugin & configuration instructions
import octoprint.plugin
class FiletabPlugin(octoprint.plugin.TemplatePlugin):
def get_template_configs(self):
return [
dict(type="tab", name="Files")
]
__plugin_implementations__ = [FiletabPlugin()]

Moving the "Files" component from the sidebar to the tab section

  1. Create .octoprint/plugins/filetab and .octoprint/plugins/filetab/templates
  2. Copy __init__.py to .octoprint/plugins/filetab
  3. Copy filetab_tab.jinja2 to .octoprint/plugins/filetab/templates
  4. Modify .octoprint/plugins/config.yaml to include files in the disabled values for sidebar (see example)
  5. Optional: Adjust the order for tab if you want the "Files" tab to be placed somewhere else than after the regular tab components (see example)
  6. Restart OctoPrint, verify in the log that it discovered the plugin
# ...
appearance:
color: black
components:
disabled:
sidebar:
- files
order:
tab:
- plugin_filetab
- control
- temperature
- gcodeviewer
- terminal
- timelapse
# ...
<div id="files_wrapper">
<div id="files">
{% include "sidebar/files.jinja2" %}
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment