From 8ec712d76d76c925ed9fdbba82eee5fd7a4cb685 Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Tue, 17 May 2022 13:58:37 +0200 Subject: [PATCH] Change from tremc to stig --- applications.org | 21 ++++++++++++-- binaries-private.org | 7 +++++ sxhkd.org | 4 +++ torrent.org | 67 ++++++++++++++++---------------------------- 4 files changed, 54 insertions(+), 45 deletions(-) diff --git a/applications.org b/applications.org index 525652b..af3b597 100644 --- a/applications.org +++ b/applications.org @@ -18,7 +18,10 @@ image/gif=img.desktop; application/rss+xml=rss.desktop x-scheme-handler/mailto=neomutt.desktop message/rfc822=neomutt.desktop -application/x-bittorrent=deluge.desktop + +x-scheme-handler/magnet=stig.desktop; +application/x-bittorrent=stig.desktop + application/pdf=zathura.desktop x-scheme-handler/http=qutebrowser.desktop x-scheme-handler/https=qutebrowser.desktop @@ -34,7 +37,7 @@ application/x-extension-xht=qutebrowser.desktop [Added Associations] text/plain=mousepad.desktop; -application/x-bittorrent=deluge.desktop; +application/x-bittorrent=stig.desktop; #+END_SRC * Neomutt @@ -184,3 +187,17 @@ Terminal=false Categories=Office;Viewer; MimeType=application/pdf; #+end_src + +* Stig + +#+begin_src conf :tangle ~/.local/share/applications/stig.desktop +[Desktop Entry] +Name=Stig +Comment=TUI and CLI for Transmission +Terminal=true +Exec=torrent-add %U +Type=Application +MimeType=application/x-bittorrent +Categories=Network;FileTransfer;P2P; +Keywords=p2p;bittorrent;transmission;rpc; +#+end_src diff --git a/binaries-private.org b/binaries-private.org index 74f77a3..55d11a0 100644 --- a/binaries-private.org +++ b/binaries-private.org @@ -239,3 +239,10 @@ List all =pdf= files and open selected one with zathura. cd ~/Cloud/brain/pdfs/ && ls *.pdf | rofi -dmenu -lines 20 | xargs -I {} zathura {} #+end_src +* =torrent-add= - Add Torrent using =stig= +Used to add notification when a torrent is added. +#+begin_src bash :tangle ~/.local/bin/torrent-add +stig add $@ && \ + dunstify --replace=22221 "Stif" 'Torrent Added' || \ + dunstify --replace=22221 --urgency=critical "Stif" 'Failed' +#+end_src diff --git a/sxhkd.org b/sxhkd.org index fd11735..e085089 100644 --- a/sxhkd.org +++ b/sxhkd.org @@ -190,6 +190,10 @@ super + space ; w super + space ; p $TERMINAL -e tmux new-session -A -s ncmpcpp ncmpcpp +# Torrend Client with stig +super + space ; t + $TERMINAL -e tmux new-session -A -s stig stig + # Default Browser super + space ; i $BROWSER; diff --git a/torrent.org b/torrent.org index d74b46a..59eec96 100644 --- a/torrent.org +++ b/torrent.org @@ -1,50 +1,31 @@ #+TITLE: Torrent Configuration #+SETUPFILE: ./setup/org-setup-file.org -* =tremc= - Curses interface for Transmission -https://github.com/tremc/tremc +* =stig= - TUI and CLI for Transmission +https://github.com/rndusr/stig -#+begin_src conf :comments none :mkdirp yes :tangle ~/.config/tremc/settings.cfg :noweb no-export -[Connection] -password = <> -username = tdehaeze -port = 9091 -host = torrent.tdehaeze.xyz -path = /transmission/rpc/ -ssl = False +#+begin_src conf :comments none :mkdirp yes :tangle ~/.config/stig/rc :noweb no-export +# Host that runs Transmission daemon +set connect.host torrent.tdehaeze.xyz +set connect.port 9091 +set connect.user tdehaeze +set connect.password <> -[Sorting] -order = name +# Update torrent/peer/file/etc lists every 10 seconds +set tui.poll 10 -[Filtering] -filter = -invert = False +# Tabs +tab ls all --columns size,ratio,status,rate-down,rate-up,%downloaded,name +tab -b ls peers +tab -b ls uploading +tab -b ls downloading -[Misc] -compact_list = False -torrentname_is_progressbar = True -file_viewer = xdg-open %%s -file_open_in_terminal = True - -[Colors] -title_seed = bg:green,fg:black -title_download = bg:blue,fg:black -title_idle = bg:cyan,fg:black -title_verify = bg:magenta,fg:black -title_paused = bg:black,fg:white -title_error = bg:red,fg:white -download_rate = bg:black,fg:blue -upload_rate = bg:black,fg:red -eta+ratio = bg:black,fg:white -filter_status = bg:red,fg:black -dialog = bg:black,fg:white -dialog_important = bg:red,fg:black -button = bg:white,fg:black -button_focused = bg:black,fg:white -file_prio_high = bg:red,fg:black -file_prio_normal = bg:white,fg:black -file_prio_low = bg:yellow,fg:black -file_prio_off = bg:blue,fg:black +# Default columns in torrent lists +set columns.torrents marked eta %downloaded status rate-down rate-up size seeds peers name +set columns.peers host client %downloaded rate-down rate-up rate-est eta +set columns.files marked priority %downloaded downloaded size name +set columns.trackers tier domain error last-announce next-announce leeches seeds downloads +set columns.settings name value default description #+end_src * =aria2c= - Lightweight download utility @@ -65,15 +46,15 @@ on-download-error=/home/thomas/.config/aria2/download-error.sh ** Download Start Script #+begin_src bash :tangle ~/.config/aria2/download-start.sh :comments both :mkdirp yes :shebang "#!/bin/bash" -notify-send --hint=string:x-dunst-stack-tag:bHEPn7rW "DL Started" "$(basename \"$3\" 2> /dev/null)" +dunstify "DL Started" "$(basename \"$3\" 2> /dev/null)" #+end_src ** Download Complete Script #+begin_src bash :tangle ~/.config/aria2/download-complete.sh :comments both :mkdirp yes :shebang "#!/usr/bin/env bash" -notify-send --hint=string:x-dunst-stack-tag:bHEPn7rW "DL Completed" "$(basename \"$3\" 2> /dev/null)" +dunstify "DL Completed" "$(basename \"$3\" 2> /dev/null)" #+end_src ** Download Error Script #+begin_src bash :tangle ~/.config/aria2/download-error.sh :comments both :mkdirp yes :shebang "#!/usr/bin/env bash" -notify-send --hint=string:x-dunst-stack-tag:bHEPn7rW --urgency=critical "DL Failed" "$(basename \"$3\" 2> /dev/null)" +dunstify --urgency=critical "DL Failed" "$(basename \"$3\" 2> /dev/null)" #+end_src