punktdateien/eww/scripts/get-music-progress.sh

5 lines
234 B
Bash
Raw Normal View History

2023-12-08 17:33:11 +01:00
#!/bin/bash
export "POSITION=$(playerctl metadata --format '{{ duration(position) }}'|sed 's/\:/\./g')"
export "LENGTH=$(playerctl metadata --format '{{ duration(mpris:length) }}'|sed 's/\:/\./g')"
echo "${POSITION}*100/${LENGTH}"|bc