commit 0432fb7e852d4afbcb0015c92e86c8ed5a0781c8
parent 6dc0a6699059f36a5e3961e7026ea667541a628f
Author: Oscar Benedito <oscar@oscarbenedito.com>
Date:   Sat,  6 Feb 2021 02:01:38 +0100

Add torrent status bar block

Diffstat:
A.local/bin/dwmblocks/dwmb-torrents | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/.local/bin/dwmblocks/dwmb-torrents b/.local/bin/dwmblocks/dwmb-torrents @@ -0,0 +1,11 @@ +#!/usr/bin/env sh + +transmission-remote -l | grep % | + sed " # The letters are for sorting and will not appear. + s/.*Stopped.*/A /; + s/.*Seeding.*/Z /; + s/.*100%.*/N /; + s/.*Idle.*/B /; + s/.*Uploading.*/L /; + s/.*%.*/M /" | + sort -h | uniq -c | awk '{print $3, $1}' | paste -sd ' ' -