2022-10-16 22:41:38 +02:00
|
|
|
(defpoll time :interval "10s" "date '+%H:%M'")
|
|
|
|
(defpoll year :interval "10h" "date '+%Y'")
|
|
|
|
(defpoll date :interval "30m" "date '+%m-%d'")
|
|
|
|
|
2023-04-23 18:55:30 +02:00
|
|
|
(defpoll audio_sink_default
|
|
|
|
:interval "10s"
|
|
|
|
`pactl get-default-sink`)
|
2022-10-16 22:41:38 +02:00
|
|
|
|
2023-04-23 18:55:30 +02:00
|
|
|
(defpoll audio_source_default
|
|
|
|
:interval "10s"
|
|
|
|
`pactl get-default-source`)
|
|
|
|
|
|
|
|
(deflisten media-player_status
|
|
|
|
:initial "paused"
|
|
|
|
"playerctl --player plasma-browser-integration --follow status")
|
|
|
|
|
|
|
|
(deflisten media-player_metadata
|
|
|
|
:initial "{\"title\": \"Nothing playing\", \"album\": \"\", \"artist\": \"\", \"art_url\": \"\"}"
|
|
|
|
"playerctl --player plasma-browser-integration --follow metadata --format '{\"title\": \"{{title}}\", \"album\": \"{{album}}\", \"artist\": \"{{artist}}\", \"art_url\": \"{{mpris:artUrl}}\"}'")
|
|
|
|
|
|
|
|
(deflisten media-player_metadata_image
|
|
|
|
:initial "/tmp/mpris-thumb"
|
|
|
|
"playerctl --follow --player plasma-browser-integration --follow metadata --format {{mpris:artUrl}} | /home/kalle/bin/scripts/eww-playerctl-download-image")
|
|
|
|
|
|
|
|
(defpoll audio-sinks
|
|
|
|
:initial "[]"
|
|
|
|
:interval "10s"
|
|
|
|
"pactl -f json list sinks | jq '[.[]|{\"id\": .name, \"name\":.description, \"volume\": .volume.\"front-left\".value_percent | rtrimstr(\"%\"), \"muted\": .mute}]'")
|
|
|
|
|
|
|
|
(defpoll audio-sources
|
|
|
|
:initial "[]"
|
|
|
|
:interval "10s"
|
|
|
|
"pactl -f json list sources | jq '[.[] | select(.monitor_source == \"\") | {\"id\": .name, \"name\":.description, \"volume\": .volume.\"front-left\".value_percent | rtrimstr(\"%\"), \"muted\": .mute}]'")
|