summaryrefslogtreecommitdiffstats
path: root/Reaktor/elchos/commands/list_downloads
blob: f53067d87611bdccc76aa738db82a1a9afde4eeb (plain)
1
2
3
4
5
6
7
8
#!/bin/sh
ncdc_user=hooker
count=$(sudo -u $ncdc_user /usr/bin/tmux list-windows -t dl 2>/dev/null| wc -l)

test $count -eq 0 && echo "no downloads running" && exit 0
for i in $(seq 0 $(($count-1)));do
  sudo -u $ncdc_user /usr/bin/tmux capture-pane -t dl:$i -p | grep -v '^$' | tail -n 1
done