Clean up example config further

This commit is contained in:
elkowar 2021-08-18 16:30:11 +02:00
parent f83ad913be
commit 3830e003fe
No known key found for this signature in database
GPG key ID: E321AD71B1D1F27F
2 changed files with 10 additions and 5 deletions

View file

@ -203,7 +203,8 @@ impl App {
self.open_windows
.remove(window_name)
.with_context(|| format!("Tried to close window named '{}', but no such window was open", window_name))?;
.with_context(|| format!("Tried to close window named '{}', but no such window was open", window_name))?
.close();
self.eww_state.clear_window_state(window_name);

View file

@ -38,7 +38,7 @@
:orientation "h"
:space-evenly false
:halign "center"
'🎵${music}'))
{music != "" ? "🎵${music}" : ""}))
(defwidget metric [label value onchange]
@ -54,8 +54,8 @@
(defpoll music :interval "5s"
"playerctl metadata --format '{{ artist }} - {{ title }}' || true")
(deflisten music :initial ""
"playerctl --follow metadata --format '{{ artist }} - {{ title }}' || true")
(defpoll volume :interval "1s"
"scripts/getvol")
@ -66,6 +66,10 @@
(defwindow bar
:monitor 0
:windowtype "dock"
:geometry (geometry :x "0%" :y "0%" :width "100%" :height "4%")
:geometry (geometry :x "0%"
:y "0%"
:width "90%"
:height "10px"
:anchor "top center")
:reserve (struts :side "top" :distance "4%")
(bar))