New backup 2025-07-27 12:45:12

This commit is contained in:
Penelope Gwen 2025-07-27 12:45:12 -07:00
parent 5ee20afa26
commit 7535f3abbd
2 changed files with 12 additions and 21 deletions

View file

@ -1,9 +1,12 @@
(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')
;(deflisten nowplaying_title :initial ""
; 'scripts/home/nowplaying-title.sh')
;(deflisten nowplaying_artist :initial ""
; 'scripts/home/nowplaying-artist.sh')
(deflisten nowplaying_info :initial ""
'scripts/home/nowplaying.sh')
(defvar large_album_art false)
(defvar small_art_overlay false)
@ -11,7 +14,7 @@
(defwidget nowplayingbar []
; (centerbox
(box
:visible {nowplaying_title != ""}
:visible {jq(nowplaying_info,'.title','r') != ""}
:orientation 'v'
:class "nowplayingbar"
:space-evenly false
@ -62,8 +65,8 @@
:hexpand true
(label
:justify "center"
:text "󰎇 ${nowplaying_title}
󰠃 ${nowplaying_artist}")
:text "󰎇 ${jq(nowplaying_info,'.title','r')}
󰠃 ${jq(nowplaying_info,'.artist','r')}")
(box
:orientation "h"
:space-evenly true
@ -87,7 +90,7 @@
:height 25
:width 25
:onclick "playerctl play-pause"
"󰐎")
{(jq(nowplaying_info,'.status','r') == 'playing') ? "" : ""})
(button
:class "mediabutton"
:valign "center"

View file

@ -1,15 +1,3 @@
#!/bin/bash
#playerctl --follow metadata --format '{{ title }}' | {
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
#}
playerctl --follow metadata --format '{"status":"{{lc(status)}}","artist":"{{artist}}","title":"{{trunc(title,23)}}"}'