Yazi: Add torrent download.
This commit is contained in:
parent
0edd6e301c
commit
3c2da7ca34
|
@ -63,6 +63,12 @@
|
|||
run = "mpv --no-video --shuffle \"$@\"/**";
|
||||
}
|
||||
];
|
||||
bottle_run = [
|
||||
{
|
||||
desc = "Run bottle";
|
||||
run = openWith "btp";
|
||||
}
|
||||
];
|
||||
browser = [
|
||||
{
|
||||
desc = "Browser";
|
||||
|
@ -142,12 +148,6 @@
|
|||
run = openWith "steam-run";
|
||||
}
|
||||
];
|
||||
bottle_run = [
|
||||
{
|
||||
desc = "Run bottle";
|
||||
run = openWith "btp";
|
||||
}
|
||||
];
|
||||
unlock = [
|
||||
{
|
||||
desc = "Unlock";
|
||||
|
@ -162,6 +162,13 @@
|
|||
run = openWith "nvim";
|
||||
}
|
||||
];
|
||||
torrent = [
|
||||
{
|
||||
desc = "Download";
|
||||
orphan = true;
|
||||
run = openWith "tdla";
|
||||
}
|
||||
];
|
||||
video = [
|
||||
{
|
||||
desc = "Video";
|
||||
|
@ -223,6 +230,7 @@
|
|||
(mkMime "application/vnd.openxmlformats-officedocument.*" [ "document" ])
|
||||
(mkMime "application/x-executable" [ "steam_run" ])
|
||||
(mkMime "application/x-pie-executable" [ "steam_run" ])
|
||||
(mkMime "application/x-bittorrent" [ "torrent" ])
|
||||
|
||||
{
|
||||
mime = "inode/directory";
|
||||
|
|
|
@ -6,10 +6,22 @@ function tdl() {
|
|||
# Download torrent files to home.
|
||||
# Usage: tdla <FILES>
|
||||
function tdla() {
|
||||
tdl -a "${@}"
|
||||
tdl --add "${@}"
|
||||
}
|
||||
|
||||
# List download torrents.
|
||||
function tdll() {
|
||||
transmission-remote home.local -l
|
||||
transmission-remote home.local --list
|
||||
}
|
||||
|
||||
# Remove torrent by id.
|
||||
# Usage: tdlr <ID>
|
||||
function tdlr() {
|
||||
tdl -t"${@}" --remove
|
||||
}
|
||||
|
||||
# Remove and delete files torrent by id.
|
||||
# Usage: tdlrd <ID>
|
||||
function tdlrd() {
|
||||
tdl -t"${@}" --remove-and-delete
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue