From 28e8bdf7f8286bd431b7f3b709e79f3827b31469 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Wed, 24 Dec 2025 13:54:03 +0900 Subject: updates --- debian/.local/bin/tordone | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 debian/.local/bin/tordone (limited to 'debian/.local/bin/tordone') diff --git a/debian/.local/bin/tordone b/debian/.local/bin/tordone new file mode 100755 index 0000000..4e097a0 --- /dev/null +++ b/debian/.local/bin/tordone @@ -0,0 +1,10 @@ +#!/bin/sh + +completed_torrents=$(transmission-remote -n "$USER" -l | grep 100% | awk '{print $1}') +if [ -n "$completed_torrents" ]; then + for torrent_id in $completed_torrents; do + transmission-remote -n "$USER" -t "$torrent_id" -r + done + pkill -RTMIN+22 "${STATUSBAR:-dwmblocks}" && notify-send "✅ Transmission-daemon" "Torrent(s) $TR_TORRENT_NAME has completed downloading. Deleting torrent files." + [ -z "$(transmission-remote -n "$USER" -l | grep -v "Sum:")" ] && killall transmission-daemon && notify-send "❌ Transmission-daemon disabled." +fi -- cgit v1.2.3