Go to file
streetturtle 62ab2059e7 icon now can be from a file or from web 2021-04-26 23:15:02 -04:00
.github/workflows add release action 2021-03-12 22:48:06 -05:00
feather_icons draft 2021-02-20 15:07:09 -05:00
screenshots update readme 2021-03-12 22:43:13 -05:00
.gitignore icon now can be from a file or from web 2021-04-26 23:15:02 -04:00
LICENSE Initial commit 2021-02-13 10:17:52 -05:00
README.md icon now can be from a file or from web 2021-04-26 23:15:02 -04:00
example.json icon now can be from a file or from web 2021-04-26 23:15:02 -04:00
init.lua icon now can be from a file or from web 2021-04-26 23:15:02 -04:00
test.sh update readme 2021-03-12 22:43:13 -05:00

README.md

noobie

Create a wibar widget for Awesome WM with no lua code!

This is widget-maker tool - it creates a widget based on a definition described in JSON format and returned by a script.

For example, if your script returns a following JSON:

{
  "widget": {
    "icon": "smile",
    "text": "noobie",
    "mouse_actions": {
      "on_scroll_up": "echo 'scroll up'",
      "on_scroll_down": "echo 'scroll down'",
      "on_right_click": "echo 'right click'"
    }
  }
}

noobie will convert it to following widget:

screenshot.

You can also create widgets with menu:

{
  "widget": {
    "icon": "smile",
    "text": "noobie",
    "mouse_actions": {
      "on_scroll_up": "echo 'scroll up'",
      "on_scroll_down": "echo 'scroll down'",
      "on_right_click": "echo 'right click'"
    }
  },
  "menu": {
    "items": [
      {
        "icon": "bell",
        "title": "Say hi!",
        "onclick": "notify-send 'hi!'"
      },
      {
        "icon": "terminal",
        "title": "Execute some script",
        "onclick": "/tmp/somescript.sh"
      },
      {
        "icon": "slack",
        "title": "OpenSlack",
        "onclick": "xdg-open https://slack.com"
      }
    ]
  }
}

gives:

Features:

  • icon (either a widget or a menu item) can be one of:
    • a name of an icon from feather icons: arrow-down-circle;
    • a path to a file: `/tmp/someicon.png;
    • a URL pointing to the icon: http://some-icon.online/image.png;

Plugins

You can create your own scripts in any language, the only rule is - it should return a proper JSON. Or you can check existing plugins in this repo: https://github.com/streetturtle/noobie-plugins.

Installation

  1. Download the latest release under ~/.config/awesome/ folder
  2. At the top of rc.lua add an import:
local noobie_exmaple = require("noobie")
  1. Add a widget to wibox and provide a path to your script:
noobie{ path = os.getenv("HOME") .. '/.config/awesome/noobie/test.sh' },