Update config
This commit is contained in:
parent
1ac452ccca
commit
83445aac4a
2 changed files with 33 additions and 72 deletions
103
README.md
103
README.md
|
@ -22,85 +22,46 @@ Elkowar’s Wacky Widgets is a standalone Widget System made in rust to add
|
|||
|
||||
# Configuration
|
||||
|
||||
Eww’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`.
|
||||
Eww’s configuration should be placed in `~/.config/eww/eww.xml` and any `scss` styles you want to add should be put into `~/.config/eww/eww.scss`.
|
||||
|
||||
|
||||
<a id="orgb769597"></a>
|
||||
|
||||
## Example Config
|
||||
```xml
|
||||
<eww>
|
||||
<definitions>
|
||||
<def name="test">
|
||||
<layout orientation="v">
|
||||
<text>$$foo</text>
|
||||
<button onclick='notify-send "that hurt,..."'>
|
||||
click me if you dare :<
|
||||
</button>
|
||||
<layout>
|
||||
<text>$$ree</text>
|
||||
<slider min="0" max="100" value="50" onchange="notify-send {}"/>
|
||||
</layout>
|
||||
</layout>
|
||||
</def>
|
||||
</definitions>
|
||||
|
||||
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: {
|
||||
structure: {
|
||||
some_widget: {
|
||||
some_value: "$$ooph"
|
||||
}
|
||||
}
|
||||
},
|
||||
bar: {
|
||||
structure: {
|
||||
layout: {
|
||||
children: [
|
||||
{ layout: { halign: left, children: "text" } }
|
||||
{ layout: { halign: center, hexpand: false, children: "$$date" }}
|
||||
{ layout: {
|
||||
halign: end,
|
||||
hexpand: false,
|
||||
children: [
|
||||
"$$date"
|
||||
{ slider: { value: "$$some_value", min: 0, max: 100, onchange: "notify-send 'changed' {}" } }
|
||||
"$$date"
|
||||
]
|
||||
} }
|
||||
{ label: { text: { run: "date", interval: 1s } } }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
default_vars: {
|
||||
foo: 12
|
||||
date: "neverrrr"
|
||||
},
|
||||
windows: {
|
||||
main_window: {
|
||||
pos.x: 0
|
||||
pos.y: 1080
|
||||
size.x: 2560
|
||||
size.y: 29
|
||||
widget: {
|
||||
bar: {
|
||||
some_value: "$$foo"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
<variables>
|
||||
<foo>test</foo>
|
||||
</variables>
|
||||
|
||||
|
||||
<windows>
|
||||
<window name="main_window">
|
||||
<size x="100" y="200" />
|
||||
<pos x="100" y="200" />
|
||||
<widget>
|
||||
<test ree="test" />
|
||||
</widget>
|
||||
</window>
|
||||
</windows>
|
||||
</eww>
|
||||
```
|
||||
|
||||
<a id="orgbf66ce2"></a>
|
||||
|
||||
# Building
|
||||
|
|
|
@ -86,7 +86,7 @@ fn get_config_file_path() -> PathBuf {
|
|||
.map(|v| PathBuf::from(v))
|
||||
.unwrap_or_else(|_| PathBuf::from(std::env::var("HOME").unwrap()).join(".config"))
|
||||
.join("eww")
|
||||
.join("eww.conf")
|
||||
.join("eww.xml")
|
||||
}
|
||||
|
||||
fn initialize_server(opts: Opt) -> Result<()> {
|
||||
|
|
Loading…
Add table
Reference in a new issue