mirror of
https://github.com/elkowar/eww.git
synced 2024-10-26 13:21:42 +03:00
Clean up example bar
This commit is contained in:
parent
b8877c5dc0
commit
f83ad913be
@ -15,7 +15,7 @@ YUCK IS ALIVE! After months of waiting, the new configuration language has now b
|
|||||||
This also means that XML is no longer supported from this point onwards.
|
This also means that XML is no longer supported from this point onwards.
|
||||||
If you want to keep using the latest releases of eww, you'll need to migrate your config over to yuck.
|
If you want to keep using the latest releases of eww, you'll need to migrate your config over to yuck.
|
||||||
|
|
||||||
The steps to migrate can be found in [the migration guide](YUCK_MIGRATION.md)
|
The steps to migrate can be found in [the migration guide](YUCK_MIGRATION.md).
|
||||||
|
|
||||||
Additionally, a couple _amazing_ people have started to work on an
|
Additionally, a couple _amazing_ people have started to work on an
|
||||||
[automatic converter](https://github.com/undefinedDarkness/ewwxml) that can turn your old eww.xml into the new yuck format!
|
[automatic converter](https://github.com/undefinedDarkness/ewwxml) that can turn your old eww.xml into the new yuck format!
|
||||||
|
@ -19,7 +19,7 @@ The fields and structure of the `defwindow` block as been adjusted to better ref
|
|||||||
the options provided by the displayserver that is being used.
|
the options provided by the displayserver that is being used.
|
||||||
The major changes are:
|
The major changes are:
|
||||||
- The `screen` field is now called `monitor`
|
- The `screen` field is now called `monitor`
|
||||||
- `reserve` and `geometry` are now structured slightly differently
|
- `reserve` and `geometry` are now structured slightly differently (see [here](./docs/src/configuration.md#creating-your-first-window))
|
||||||
To see how exactly the configuration now looks, check the [respective documentation](./docs/src/configuration.md#creating-your-first-window)
|
To see how exactly the configuration now looks, check the [respective documentation](./docs/src/configuration.md#creating-your-first-window)
|
||||||
|
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ impl SimplExpr {
|
|||||||
SimplExpr::Concat(span, elems) => {
|
SimplExpr::Concat(span, elems) => {
|
||||||
let mut output = String::new();
|
let mut output = String::new();
|
||||||
for elem in elems {
|
for elem in elems {
|
||||||
let result = dbg!(elem.eval(values))?;
|
let result = elem.eval(values)?;
|
||||||
output.push_str(&result.0);
|
output.push_str(&result.0);
|
||||||
}
|
}
|
||||||
Ok(DynVal(output, *span))
|
Ok(DynVal(output, *span))
|
||||||
|
@ -16,13 +16,13 @@
|
|||||||
color: #ffd5cd;
|
color: #ffd5cd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.slider-vol scale trough highlight {
|
.metric scale trough highlight {
|
||||||
all: unset;
|
all: unset;
|
||||||
background-color: #D35D6E;
|
background-color: #D35D6E;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
.slider-vol scale trough {
|
.metric scale trough {
|
||||||
all: unset;
|
all: unset;
|
||||||
background-color: #4e4e4e;
|
background-color: #4e4e4e;
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
@ -31,13 +31,13 @@
|
|||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
}
|
}
|
||||||
.slider-ram scale trough highlight {
|
.metric scale trough highlight {
|
||||||
all: unset;
|
all: unset;
|
||||||
background-color: #D35D6E;
|
background-color: #D35D6E;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
.slider-ram scale trough {
|
.metric scale trough {
|
||||||
all: unset;
|
all: unset;
|
||||||
background-color: #4e4e4e;
|
background-color: #4e4e4e;
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
|
@ -6,8 +6,15 @@
|
|||||||
|
|
||||||
(defwidget sidestuff []
|
(defwidget sidestuff []
|
||||||
(box :class "sidestuff" :orientation "h" :space-evenly false :halign "end"
|
(box :class "sidestuff" :orientation "h" :space-evenly false :halign "end"
|
||||||
(slider-vol)
|
(metric :label "🔊"
|
||||||
(slider-ram)
|
:value volume
|
||||||
|
:onchange "amixer -D pulse sset Master {}%")
|
||||||
|
(metric :label ""
|
||||||
|
:value EWW_RAM
|
||||||
|
:onchange "")
|
||||||
|
(metric :label "💾"
|
||||||
|
:value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}
|
||||||
|
:onchange "")
|
||||||
time))
|
time))
|
||||||
|
|
||||||
(defwidget workspaces []
|
(defwidget workspaces []
|
||||||
@ -27,27 +34,34 @@
|
|||||||
(button :onclick "wmctrl -s 8" 9)))
|
(button :onclick "wmctrl -s 8" 9)))
|
||||||
|
|
||||||
(defwidget music []
|
(defwidget music []
|
||||||
(box :class "music" :orientation "h" :space-evenly false :halign "center"
|
(box :class "music"
|
||||||
|
:orientation "h"
|
||||||
|
:space-evenly false
|
||||||
|
:halign "center"
|
||||||
'🎵${music}'))
|
'🎵${music}'))
|
||||||
|
|
||||||
(defwidget slider-vol []
|
|
||||||
(box :class "slider-vol" :orientation "h" :space-evenly "false"
|
|
||||||
(box :class "label-vol" "🔊"
|
|
||||||
(scale :min 0 :max 101 :value volume :onchange "amixer -D pulse sset Master {}%"))))
|
|
||||||
|
|
||||||
(defwidget slider-ram []
|
(defwidget metric [label value onchange]
|
||||||
(box :orientation "h" :class "slider-ram" :space-evenly false
|
(box :orientation "h"
|
||||||
(box :class "label-ram" ""
|
:class "metric"
|
||||||
(scale :min 0 :max 101 :active false :value EWW_RAM))))
|
:space-evenly false
|
||||||
|
(box :class "label" label)
|
||||||
|
(scale :min 0
|
||||||
|
:max 101
|
||||||
|
:active {onchange != ""}
|
||||||
|
:value value
|
||||||
|
:onchange onchange)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(defpoll music :interval "5s"
|
||||||
|
"playerctl metadata --format '{{ artist }} - {{ title }}' || true")
|
||||||
|
|
||||||
|
(defpoll volume :interval "1s"
|
||||||
|
"scripts/getvol")
|
||||||
|
|
||||||
(defpoll music :interval "5s" "playerctl metadata --format '{{ artist }} - {{ title }}' || true")
|
(defpoll time :interval "10s"
|
||||||
(defpoll volume :interval "1s" "scripts/getvol")
|
"date '+%H:%M %b %d, %Y'")
|
||||||
|
|
||||||
(defpoll time :interval "10s" "date '+%H:%M %b %d, %Y'")
|
|
||||||
|
|
||||||
(defwindow bar
|
(defwindow bar
|
||||||
:monitor 0
|
:monitor 0
|
||||||
|
Loading…
Reference in New Issue
Block a user