Eww: More improvements to radio & css & powermenu

This commit is contained in:
soraefir
2023-11-23 12:55:23 +01:00
parent c87ccc2ed7
commit 5e569bbb48
13 changed files with 180 additions and 100 deletions

View File

@ -12,8 +12,8 @@
:x "0%"
:y "0%"
:anchor "bottom right"
:width "200px"
:height "300px")
:width "0px"
:height "0px")
(radio-win))
@ -32,9 +32,7 @@
(box
:class "album_art"
:vexpand "false"
:hexpand "false"
:style "background-size:cover; background-image: url('${radio.song.image600}');")
:style "background-size:cover; background-image: url('${radio.song.image600?:'https://www.radiorecord.ru/upload/stations_images/record_image600_white_fill.png'}');")
(box
:space-evenly false
:orientation "v"
@ -42,14 +40,14 @@
:halign "center"
:class "song"
:wrap "true"
:limit-width 25
:text "${radio.song.song}")
:limit-width 18
:text "${radio.song.song?:'...'}")
(label
:halign "center"
:class "artist"
:wrap "true"
:limit-width 22
:text "${radio.song.artist}")
:text "${radio.song.artist?:'...'}")
(box
:space-evenly true
:orientation "h"
@ -61,9 +59,9 @@
:onclick "${EWW_CMD} update radio_rev=${!radio_rev}"
(box "󰷐"))
(button
(button
:class "btn_play"
:timeout "1s"
:timeout "2s"
:onclick "scripts/radio toggle"
"${radio.is_paused==1 ? "󰐌" : "󰏥"}")
@ -91,8 +89,8 @@
(for station in {radio.stations}
(button
:class "station_art"
:timeout "1s"
:class "station_art ${(radio.radio == station.id)?'station_sel':''}"
:timeout "2s"
:onclick "scripts/radio start ${station.id}"
:tooltip "${station.title}"
:style "background-size:cover; background-image: url('${station.icon_fill_white}');"
@ -104,7 +102,7 @@
(defwidget radio-button []
(button
:onclick "${EWW_CMD} open --toggle radio"
:onclick "${EWW_CMD} open --toggle --no-daemonize radio"
(box
:class "module"
:orientation "v"