diff --git a/de/home/.config/eww/eww.scss b/de/home/.config/eww/eww.scss index dbe2d3e..3d57b6e 100644 --- a/de/home/.config/eww/eww.scss +++ b/de/home/.config/eww/eww.scss @@ -305,7 +305,7 @@ $home-widget-border-hover-color: rgba($color5,0.3); background-color: $home-widget-bg-color; // .nowplayingart, .mediadetails { - margin: 0px 25px 0px 15px; + margin: 10px 25px 10px 15px; label { margin: 0px; } diff --git a/de/home/.config/eww/modules/home/nowplayingart.yuck b/de/home/.config/eww/modules/home/nowplayingart.yuck index 972977c..875595f 100644 --- a/de/home/.config/eww/modules/home/nowplayingart.yuck +++ b/de/home/.config/eww/modules/home/nowplayingart.yuck @@ -1,5 +1,9 @@ -(deflisten nowplaying_img_path :initial "" +(deflisten nowplaying_imgpath :initial "" 'scripts/home/nowplayingart.sh') +(deflisten nowplaying_title :initial "" + 'scripts/home/nowplaying-title.sh') +(deflisten nowplaying_artist :initial "" + 'scripts/home/nowplaying-artist.sh') (defvar large_album_art false) (defwidget nowplayingbar [] @@ -25,15 +29,12 @@ (box :class "mediadetails ${large_album_art ? 'fullwidth' : ''}" :orientation "v" - :space-evenly false + :space-evenly true :halign "fill" :hexpand true (label - :text "󰎇 song title") - (label - :text "󰠃 song artist") - (label - :text "󰀥 album name") + :text "󰎇 ${nowplaying_title} +󰠃 ${nowplaying_artist}") (box :orientation "h" :space-evenly true @@ -67,11 +68,8 @@ (defwidget nowplayingart [] (box :class "nowplayingart" -; :preserve-aspect-ratio true :hexpand false :width 100 :height 100 -; :path '${nowplaying_img_path}')) -; :style "background-image: url('/run/user/1000/album_art_cache/getCoverArt.view?id=952&u=pogmommy&p=mG%232001068485&v=1.13.0&c=Feishin&size=300');")) - :style "background-image: url('${nowplaying_img_path}');")) -; :style "background-image: url('${rat_image}');")) +; :path '${nowplaying_imgpath}')) + :style "background-image: url('${nowplaying_imgpath}');")) diff --git a/de/home/.config/eww/scripts/home/nowplaying-info.sh b/de/home/.config/eww/scripts/home/nowplaying-artist.sh similarity index 86% rename from de/home/.config/eww/scripts/home/nowplaying-info.sh rename to de/home/.config/eww/scripts/home/nowplaying-artist.sh index 8177852..f2c642e 100755 --- a/de/home/.config/eww/scripts/home/nowplaying-info.sh +++ b/de/home/.config/eww/scripts/home/nowplaying-artist.sh @@ -1,8 +1,7 @@ #!/bin/bash #playerctl --follow metadata --format '{{ title }}' | { -playerctl metadata --format '{{ title }} -{{ artist }}' +playerctl --follow metadata --format '{{ artist }}' #playerctl metadata --format '{{ title }}\n{{ artist }}' | { # while read -r nowplaying_title; do diff --git a/de/home/.config/eww/scripts/home/nowplaying-title.sh b/de/home/.config/eww/scripts/home/nowplaying-title.sh new file mode 100755 index 0000000..1e72aeb --- /dev/null +++ b/de/home/.config/eww/scripts/home/nowplaying-title.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +#playerctl --follow metadata --format '{{ title }}' | { +playerctl --follow metadata --format '{{ title }}' + +#playerctl metadata --format '{{ title }}\n{{ artist }}' | { +# while read -r nowplaying_title; do +# if [ ${#nowplaying_title} -ge 45 ];then +# echo "${nowplaying_title:0:40}…" +# else +# echo "${nowplaying_title}" +# fi +# echo "${nowplaying_title}" | head -c 50; +# done +#}