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 self.open_windows
.remove(window_name) .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); self.eww_state.clear_window_state(window_name);

View file

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