Coder Social home page Coder Social logo

aspinwall-example-widget's Introduction

Example Aspinwall widget

This is a simple example project, which can be used as a template/skeleton for creating new widgets.

For more information, see Creating a new widget.

Using this template

Note: GitHub users can specify this repository as the template for a new repository by clicking the "Use this template" button.

  • Replace the widget ID in the meson.build file with the ID of your widget.
  • Change the metadata in the widget.py file to match your widget's metadata.
  • Change the widget class name, and update the _widget_class variable at the bottom of the file.
  • If you're planning to use settings schemas, rename the .xml file in the schemas directory to match your widget's ID and edit it to set the schema ID to your widget's ID.
    • If you're not planning to use settings schemas, remove the schemas folder and remove the subdir('schemas') line from the meson.build in the project's root.
  • Remove the example-specific .pot file from the po directory and regenerate the po/translation files by following the steps in the Generating translation files section.

Building and installing the widget

meson --prefix="/usr" . output
meson compile -C output
sudo meson install -C output

Or, if you want to install the widget for the current user:

meson --prefix="$HOME/.local" . output
meson compile -C output
meson install -C output

Generating translation files

NOTE: The following is automated by the po/update-po script. Make sure to edit it to change the widget ID before using it.

To generate the .pot file (this only needs to be done once, or whenever the widget ID changes):

meson . output
meson compile <widget id>-pot -C output

To update the translations:

meson . output
meson compile <widget id>-update-po -C output

Replace <widget id> with your widget's ID (without the brackets).

aspinwall-example-widget's People

Contributors

knuxify avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.