♻️ eww(scripts/mediaplayer): handle artUrl type on script instead of yuck
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
(defwidget big-media [ show-album-bg show-album-image ?album-image-size ?style ?visible ]
|
||||
(box :class "big-media ${ show-album-bg ? 'album-bg' : '' } ${ show-album-image ? 'album-image' : '' }"
|
||||
:style "${ show-album-bg ? "background-image: url(\"${ json_media.artUrl =~ "^(http(.*)://(.*))$" ? json_media.artUrl : "${ "${ json_media.artUrl =~ "^(file://(.*))$" ? '' : 'file://' }" + json_media.artUrl }" }\")" : "" }; ${style}"
|
||||
:style "${ show-album-bg ? "background-image: url(\"${ json_media.artUrl != "null" ? json_media.artUrl : '' }\")" : "" }; ${style}"
|
||||
:visible { visible == false ? false : true }
|
||||
:space-evenly false
|
||||
:orientation "vertical"
|
||||
@@ -12,7 +12,7 @@
|
||||
(box :class "album-image"
|
||||
:width { album-image-size != "" ? album-image-size : 98 }
|
||||
:height { album-image-size != "" ? "${album-image-size - 11}" : 87 }
|
||||
:style "background-image: url('${ json_media.artUrl =~ "^(http(.*)://(.*))$" ? json_media.artUrl : "${ "${ json_media.artUrl =~ "^(file://(.*))$" ? '' : 'file://' }" + json_media.artUrl }" }');"
|
||||
:style "background-image: url(\"${ json_media.artUrl != "null" ? json_media.artUrl : "" }\");"
|
||||
:valign "center"
|
||||
:visible { json_media.artUrl == "null" || !show-album-image ? false : true })
|
||||
|
||||
|
||||
@@ -5,17 +5,17 @@
|
||||
(tile :icon ''
|
||||
:label "Network"
|
||||
:enabled { network_status == "full" ? true : false }
|
||||
:onenable "nmcli n on"
|
||||
:ondisable "nmcli n off"
|
||||
:onenable "nmcli n on > /dev/null"
|
||||
:ondisable "nmcli n off > /dev/null"
|
||||
:visible true
|
||||
:class "network")
|
||||
|
||||
(tile :icon ''
|
||||
:label "Bluetooth"
|
||||
:enabled { bluetooth_powered == "yes" ? true : false }
|
||||
:onenable "bluetoothctl power on"
|
||||
:ondisable "bluetoothctl power off"
|
||||
:visible true)
|
||||
:onenable "bluetoothctl power on > /dev/null"
|
||||
:ondisable "bluetoothctl power off > /dev/null"
|
||||
:visible { bluetooth_powered == "" ? false : true })
|
||||
|
||||
(tile :icon ''
|
||||
:label "Do Not Disturb"
|
||||
|
||||
Reference in New Issue
Block a user