Giter VIP home page Giter VIP logo

noobie's Introduction

noobie

This is a widget-maker tool - it creates a widget based on a JSON definition returned by a script. For example, if your script returns following JSON:

{
  "widget": {
    "icon": "smile",
    "text": "noobie",
    "mouse_actions": {
      "on_right_click": "echo 'right click'"
    }
  }
}

noobie will convert it to the widget:

screenshot.

More complex example (from a people-in-space plugin) with a menu, each menu item has an icon, title and subtitle:

screenshot.

For more examples check out plugins repository: noobie-plugins

Features:

  • dropdown menu:

    menu

  • mouse actions (scroll up/down, right click);

  • icon could be either a local file, a feathericons icon or an image from URL;

  • a notification with details in case your script failed:

    error notification

Plugins

Check out existing plugins in this repo: https://github.com/streetturtle/noobie-plugins.

Creating a plugin

Please consult a noobie.schema.json for details. Below are few important excerpts:

  • icon of the widget or menu item can be one of
    • a name of feathericons icon, you can get it here: feathericons.com;
    • an absolute path to the image file;
    • URL to the image file. If you are not sure image exists, you can add a icon_fallback field with an absolute path to the fallback image;
  • for a horizontal line in the menu add an item with title equals to '-', like
    { "title":  "-" }
  • for a header menu item set header field to true, note that the icon field will be ignored:
    {
      "header": "true",
      "title": "Header Title"
    }

Installation

  1. Clone the repo under ~/.config/awesome/ folder

  2. At the top of rc.lua add an import:

    local noobie_exmaple_1 = require("noobie")
    local noobie_exmaple_2 = require("noobie")
  3. Add a widget to wibox and provide a path to your script:

    noobie_exmaple_1{ path = os.getenv("HOME") .. '/.config/awesome/noobie/test.sh' },
    noobie_exmaple_2{ path = os.getenv("HOME") .. '/.config/awesome/noobie/othertest.py' },

If your widget is static you can define it in a JSON file and use like this:

noobie_exmaple_1{ path = 'cat ' .. os.getenv("HOME") .. '/.config/awesome/noobie/test.json' },

Troubleshooting

In case of any problem / issue / question:

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.