punktdateien/eww/scripts/get-music-progress.sh
2023-12-08 17:33:11 +01:00

4 lines
234 B
Bash
Executable file

#!/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