New backup 2025-07-27 12:45:12
This commit is contained in:
parent
5ee20afa26
commit
7535f3abbd
2 changed files with 12 additions and 21 deletions
|
|
@ -1,9 +1,12 @@
|
||||||
(deflisten nowplaying_imgpath :initial ""
|
(deflisten nowplaying_imgpath :initial ""
|
||||||
'scripts/home/nowplayingart.sh')
|
'scripts/home/nowplayingart.sh')
|
||||||
(deflisten nowplaying_title :initial ""
|
;(deflisten nowplaying_title :initial ""
|
||||||
'scripts/home/nowplaying-title.sh')
|
; 'scripts/home/nowplaying-title.sh')
|
||||||
(deflisten nowplaying_artist :initial ""
|
;(deflisten nowplaying_artist :initial ""
|
||||||
'scripts/home/nowplaying-artist.sh')
|
; 'scripts/home/nowplaying-artist.sh')
|
||||||
|
(deflisten nowplaying_info :initial ""
|
||||||
|
'scripts/home/nowplaying.sh')
|
||||||
|
|
||||||
|
|
||||||
(defvar large_album_art false)
|
(defvar large_album_art false)
|
||||||
(defvar small_art_overlay false)
|
(defvar small_art_overlay false)
|
||||||
|
|
@ -11,7 +14,7 @@
|
||||||
(defwidget nowplayingbar []
|
(defwidget nowplayingbar []
|
||||||
; (centerbox
|
; (centerbox
|
||||||
(box
|
(box
|
||||||
:visible {nowplaying_title != ""}
|
:visible {jq(nowplaying_info,'.title','r') != ""}
|
||||||
:orientation 'v'
|
:orientation 'v'
|
||||||
:class "nowplayingbar"
|
:class "nowplayingbar"
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
|
|
@ -62,8 +65,8 @@
|
||||||
:hexpand true
|
:hexpand true
|
||||||
(label
|
(label
|
||||||
:justify "center"
|
:justify "center"
|
||||||
:text " ${nowplaying_title}
|
:text " ${jq(nowplaying_info,'.title','r')}
|
||||||
${nowplaying_artist}")
|
${jq(nowplaying_info,'.artist','r')}")
|
||||||
(box
|
(box
|
||||||
:orientation "h"
|
:orientation "h"
|
||||||
:space-evenly true
|
:space-evenly true
|
||||||
|
|
@ -87,7 +90,7 @@
|
||||||
:height 25
|
:height 25
|
||||||
:width 25
|
:width 25
|
||||||
:onclick "playerctl play-pause"
|
:onclick "playerctl play-pause"
|
||||||
"")
|
{(jq(nowplaying_info,'.status','r') == 'playing') ? "" : ""})
|
||||||
(button
|
(button
|
||||||
:class "mediabutton"
|
:class "mediabutton"
|
||||||
:valign "center"
|
:valign "center"
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,3 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#playerctl --follow metadata --format '{{ title }}' | {
|
playerctl --follow metadata --format '{"status":"{{lc(status)}}","artist":"{{artist}}","title":"{{trunc(title,23)}}"}'
|
||||||
playerctl --follow metadata --format '{{ trunc(artist,23) }}'
|
|
||||||
|
|
||||||
#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
|
|
||||||
#}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue