Go to file
streetturtle 517906060e improvements 2021-04-30 22:17:47 -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 improvements 2021-04-30 22:17:47 -04: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 improvements 2021-04-30 22:17:47 -04:00
example.json improvements 2021-04-30 13:32:11 -04:00
init.lua improvements 2021-04-30 13:32:11 -04:00
row_builder.lua improvements 2021-04-30 22:17:47 -04:00
test.sh update readme 2021-03-12 22:43:13 -05:00

README.md

noobie

Still under development!

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

This is a 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 a 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:

screenshot2

Features:

  • icon (either of a widget or of 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 (with a fallback icon);
  • 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.

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' },