name: my-plugin
display_name: My Plugin
on_activate: my_plugin:activate
on_deactivate: my_plugin:deactivate
icon: https://picsum.photos/256
contributions:
  commands:
    - id: my-plugin.hello_world
      title: Hello World
    - id: my-plugin.another_command
      title: Another Command
    - id: my-plugin.some_reader
      title: Some Reader
      python_name: my_plugin:get_reader
    - id: my-plugin.url_reader
      title: URL Reader
      python_name: my_plugin:url_reader
    - id: my-plugin.my_writer
      title: My Multi-layer Writer
      python_name: my_plugin:writer_function
    - id: my-plugin.my_single_writer
      title: My single-layer Writer
      python_name: my_plugin:writer_function_single
    - id: my-plugin.generate_random_data
      title: Generate uniform random data
      python_name: my_plugin:random_data
    - id: my-plugin.some_widget
      title: Create my widget
      python_name: my_plugin:SomeWidget
    - id: my-plugin.some_function_widget
      title: Create widget from my function
      python_name: my_plugin:make_widget_from_function
  configuration:
    - title: My Plugin
      properties:
        my_plugin.reader.lazy:
          type: boolean
          default: false
          title: Load lazily
          description: Whether to load images lazily with dask
  readers:
    - command: my-plugin.some_reader
      filename_patterns: ["*.fzy", "*.fzzy"]
      accepts_directories: true
    - command: my-plugin.url_reader
      filename_patterns: ["http://*", "https://*"]
      accepts_directories: false
  writers:
    - command: my-plugin.my_writer
      filename_extensions: ["*.tif", "*.tiff"]
      layer_types: ["image{2,4}", "tracks?"]
    - command: my-plugin.my_writer
      filename_extensions: ["*.pcd", "*.e57"]
      layer_types: ["points{1}", "surface+"]
    - command: my-plugin.my_single_writer
      filename_extensions: ["*.xyz"]
      layer_types: ["labels"]

  widgets:
    - command: my-plugin.some_widget
      display_name: My Widget
    - command: my-plugin.some_function_widget
      display_name: A Widget From a Function
      autogenerate: true
  menus:
    /napari/layer_context:
      - submenu: mysubmenu
      - command: my-plugin.hello_world
    mysubmenu:
      - command: my-plugin.another_command
  submenus:
    - id: mysubmenu
      label: My SubMenu
  themes:
    - label: "SampleTheme"
      id: "sample_theme"
      type: "dark"
      syntax_style: "default"
      colors:
        canvas: "#000000"
        console: "#000000"
        background: "#272822"
        foreground: "#75715e"
        primary: "#cfcfc2"
        secondary: "#f8f8f2"
        highlight: "#e6db74"
        text: "#a1ef34"
        icon: "#a1ef34"
        warning: "#f92672"
        current: "#66d9ef"
  sample_data:
    - display_name: Some Random Data (512 x 512)
      key: random_data
      command: my-plugin.generate_random_data
    - display_name: Random internet image
      key: internet_image
      uri: https://picsum.photos/1024
