diff options
author | Soispha <soispha@vhack.eu> | 2024-01-06 21:34:46 +0100 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2024-01-06 21:34:46 +0100 |
commit | 40179fbcfaba8f0767d1443b75417081dabe0ff2 (patch) | |
tree | 3aa4fdc6de97cd66774272a153790486796b820a /hm/soispha/pkgs/scripts/specific/ytcc | |
parent | fix(hm/pkgs/scr/specific/ytcc/yts): Add default ordering mode (diff) | |
download | nixos-config-40179fbcfaba8f0767d1443b75417081dabe0ff2.zip |
fix(hm/pkgs/scr/specific/ytcc/yts): Only trap the task stop if it's started
Diffstat (limited to 'hm/soispha/pkgs/scripts/specific/ytcc')
-rwxr-xr-x | hm/soispha/pkgs/scripts/specific/ytcc/yts | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/hm/soispha/pkgs/scripts/specific/ytcc/yts b/hm/soispha/pkgs/scripts/specific/ytcc/yts index 390cc0f5..534151a6 100755 --- a/hm/soispha/pkgs/scripts/specific/ytcc/yts +++ b/hm/soispha/pkgs/scripts/specific/ytcc/yts @@ -9,11 +9,6 @@ AUTHORS="Soispha" YEARS="2023" NAME="neorg" -cleanup() { - task stop "$TASK_UUID" -} -trap cleanup EXIT - help_text=" # Commands: # w, watch <id> = watch id @@ -94,6 +89,10 @@ table="$(ytcc --output json list "$@" | jq --raw-output 'map("pick \(.id) \(.tit selection_file="$(mktmp)"; +cleanup() { + task stop "$TASK_UUID" +} +trap cleanup EXIT task start "$TASK_UUID" echo "$table" > "$selection_file"; |