A Cleaner Readme

This commit is contained in:
Tanish2002 2020-10-02 23:55:32 +05:30 committed by elkowar
parent 8467cf3fde
commit 1ac452ccca

196
README.md
View file

@ -1,81 +1,137 @@
# EWW - Elkowar's Wacky Widgets
## configuration # Table of Contents
Eww's configuration should be placed in `~/.config/eww/eww.conf`. * [About](#org4ab08b6)
any scss styles you want to add should be put into `~/.config/eww/eww.scss`. * [Configuration](#org581ca61)
* [Example Config](#orgb769597)
* [Building](#orgbf66ce2)
* [Prerequisites](#org727b3da)
* [Installation](#orgdd31739)
* [Usage](#org4a9b3c6)
### Example configuration
```hocon
widgets: { <a id="org4ab08b6"></a>
some_widget: {
structure: { # About
layout: {
class: "container", Elkowar&rsquo;s Wacky Widgets is a standalone Widget System made in rust to add AwesomeWM like widgets to any WM
children: [
{ layout: {
orientation: "v" <a id="org581ca61"></a>
children: [
{ button: "brah" } # Configuration
]
} } Eww&rsquo;s configuration should be placed in `~/.config/eww/eww.conf` and any `scss` styles you want to add should be put into `~/.config/eww/eww.scss`.
{ layout: {
children: [
"$$date" <a id="orgb769597"></a>
{ button: "Some button" }
{ slider: { value: "$$some_value", min: 0, max: 100, onchange: "notify-send 'changed' {}" } } ## Example Config
{ slider: { value: "$$some_value", orientation: "h" } }
"hu" widgets: {
] some_widget: {
} } structure: {
] layout: {
class: "container",
children: [
{ layout: {
orientation: "v"
children: [
{ button: "brah" }
]
} }
{ layout: {
children: [
"$$date"
{ button: "Some button" }
{ slider: { value: "$$some_value", min: 0, max: 100, onchange: "notify-send 'changed' {}" } }
{ slider: { value: "$$some_value", orientation: "h" } }
"hu"
]
} }
]
}
} }
} },
}, test: {
test: { structure: {
structure: { some_widget: {
some_widget: { some_value: "$$ooph"
some_value: "$$ooph" }
} }
} },
}, bar: {
bar: { structure: {
structure: { layout: {
layout: { children: [
children: [ { layout: { halign: left, children: "text" } }
{ layout: { halign: left, children: "text" } } { layout: { halign: center, hexpand: false, children: "$$date" }}
{ layout: { halign: center, hexpand: false, children: "$$date" }} { layout: {
{ layout: { halign: end,
halign: end, hexpand: false,
hexpand: false, children: [
children: [ "$$date"
"$$date" { slider: { value: "$$some_value", min: 0, max: 100, onchange: "notify-send 'changed' {}" } }
{ slider: { value: "$$some_value", min: 0, max: 100, onchange: "notify-send 'changed' {}" } } "$$date"
"$$date" ]
] } }
} } { label: { text: { run: "date", interval: 1s } } }
{ label: { text: { run: "date", interval: 1s } } } ]
] }
} }
} },
}
default_vars: {
foo: 12
date: "neverrrr"
}, },
} windows: {
default_vars: { main_window: {
foo: 12 pos.x: 0
date: "neverrrr" pos.y: 1080
}, size.x: 2560
windows: { size.y: 29
main_window: { widget: {
pos.x: 0 bar: {
pos.y: 1080 some_value: "$$foo"
size.x: 2560 }
size.y: 29
widget: {
bar: {
some_value: "$$foo"
} }
} }
} }
}
```
<a id="orgbf66ce2"></a>
# Building
<a id="org727b3da"></a>
## Prerequisites
- rustc
- cargo
Get them at <https://www.rust-lang.org/tools/install>
<a id="orgdd31739"></a>
## Installation
Build the Binary using -:
$ git clone https://github.com/Elkowar/eww.git
$ cd eww
$ cargo build --release
then copy the built binary from `./target/release` to anywhere in `$PATH` (example - `~/.local/bin`)
<a id="org4a9b3c6"></a>
# Usage
Create a Config and then just do `eww`!