Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/streetturtle/noobie
Create a wibar widget for Awesome WM with no lua code!
https://github.com/streetturtle/noobie
awesome-wm awesome-wm-widgets awesomewm lua widgets
Last synced: 4 months ago
JSON representation
Create a wibar widget for Awesome WM with no lua code!
- Host: GitHub
- URL: https://github.com/streetturtle/noobie
- Owner: streetturtle
- License: mit
- Created: 2021-02-13T15:17:52.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-24T18:21:30.000Z (over 3 years ago)
- Last Synced: 2024-09-27T13:41:15.188Z (4 months ago)
- Topics: awesome-wm, awesome-wm-widgets, awesomewm, lua, widgets
- Language: Lua
- Homepage:
- Size: 228 KB
- Stars: 42
- Watchers: 4
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-awesomewm-modules-widgets-and-libraries - noobie
- awesome-awesomewm-modules-widgets-and-libraries - noobie
README
# 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:```json
{
"widget": {
"icon": "smile",
"text": "noobie",
"mouse_actions": {
"on_right_click": "echo 'right click'"
}
}
}
```noobie will convert it to the widget:
![screenshot](./screenshots/screenshot.png).
More complex example (from a [people-in-space](https://github.com/streetturtle/noobie-plugins/tree/master/people-in-space) plugin) with a menu, each menu item has an icon, title and subtitle:
![screenshot](./screenshots/screenshot3.png).
For more examples check out plugins repository: [noobie-plugins](https://github.com/streetturtle/noobie-plugins)
## Features:
- dropdown menu:
![menu](./screenshots/screenshot2.png)
- mouse actions (scroll up/down, right click);
- icon could be either a local file, a [feathericons](https://feathericons.com/) icon or an image from URL;
- a notification with details in case your script failed:
![error notification](./screenshots/screenshot-errors.png)
## PluginsCheck 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](https://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
```json
{ "title": "-" }
```
- for a header menu item set `header` field to true, note that the `icon` field will be ignored:
```json
{
"header": "true",
"title": "Header Title"
}
```
## Installation1. Clone the repo under ~/.config/awesome/ folder
1. At the top of rc.lua add an import:
```lua
local noobie_exmaple_1 = require("noobie")
local noobie_exmaple_2 = require("noobie")
```
1. Add a widget to wibox and provide a path to your script:
```lua
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:```lua
noobie_exmaple_1{ path = 'cat ' .. os.getenv("HOME") .. '/.config/awesome/noobie/test.json' },
```
# TroubleshootingIn case of any problem / issue / question:
- create an [issue](https://github.com/streetturtle/noobie/issues/new/choose)
- raise a question on [Discussions](https://github.com/streetturtle/noobie/discussions)!
- ping me on AwesomeWM's discord, here's an [invite](https://discord.gg/XYvn8R5)