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