Add transmission layer.
Defer transmission package. Add transmission-auto-refresh-all var format Docs
This commit is contained in:
parent
0d352decc9
commit
11356be1e7
|
@ -0,0 +1,104 @@
|
|||
#+TITLE: Transmission layer
|
||||
|
||||
[[file:img/transmission.png]]
|
||||
|
||||
* Table of Contents :TOC_4_gh:noexport:
|
||||
- [[#description][Description]]
|
||||
- [[#install][Install]]
|
||||
- [[#faq][FAQ]]
|
||||
- [[#how-to-enable-status-auto-refresh][How to enable status auto refresh?]]
|
||||
- [[#key-bindings][Key bindings]]
|
||||
- [[#global][Global]]
|
||||
- [[#transmission-mode][=transmission-mode=]]
|
||||
- [[#transmission-info-mode][=transmission-info-mode=]]
|
||||
- [[#transmission-files-mode][=transmission-files-mode=]]
|
||||
- [[#transmission-peers-mode][=transmission-peers-mode=]]
|
||||
|
||||
* Description
|
||||
An interface to a Transmission session for GNU Emacs.
|
||||
|
||||
* Install
|
||||
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
|
||||
install and configure =transmission-daemon=. Debian example:
|
||||
#+BEGIN_SRC sh
|
||||
sudo apt-get -y install transmission-daemon
|
||||
sudo service transmission-daemon stop
|
||||
#+END_SRC
|
||||
Set =rpc-authentication-required= to false (or 0 if it is numeric)
|
||||
in /etc/transmission-daemon/settings.json or
|
||||
configure authorization.
|
||||
See transmission.el [[https://github.com/holomorph/transmission][README.org]] for details.
|
||||
Start the daemon:
|
||||
#+BEGIN_SRC sh
|
||||
sudo service transmission-daemon start
|
||||
#+END_SRC
|
||||
|
||||
* FAQ
|
||||
** How to enable status auto refresh?
|
||||
Add =(transmission :variables transmission-auto-refresh-all t)= to
|
||||
=dotspacemacs-configuration-layers= or pick modes manually:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq transmission-refresh-modes '(transmission-mode
|
||||
transmission-files-mode
|
||||
transmission-info-mode
|
||||
transmission-peers-mode))
|
||||
#+END_SRC
|
||||
|
||||
* Key bindings
|
||||
** Global
|
||||
|
||||
| Key Binding | Description |
|
||||
|-------------+--------------------|
|
||||
| ~SPC a t~ | start transmission |
|
||||
|
||||
** =transmission-mode=
|
||||
|
||||
| Key Binding | Description |
|
||||
|-------------+---------------------------------------------------------------|
|
||||
| ~SPC m g t~ | Open a `transmission-files-mode' buffer for torrent at point. |
|
||||
| ~SPC m a t~ | Add torrent by filename, URL, magnet link, or info hash. |
|
||||
| ~SPC m s d~ | Set global download speed limit in kB/s. |
|
||||
| ~SPC m g p~ | Open a =transmission-peers-mode= buffer for torrent at point. |
|
||||
| ~SPC m g i~ | Open a =transmission-info-mode= buffer for torrent at point. |
|
||||
| ~SPC m s l~ | Set global seed ratio limit. |
|
||||
| ~SPC m m~ | Move torrent at point or in region to a new location. |
|
||||
| ~SPC m r~ | Prompt to remove torrent at point or torrents in region. |
|
||||
| ~SPC m t s~ | Toggle torrent between started and stopped. |
|
||||
| ~SPC m a a~ | Add announce URLs to torrent or torrents. |
|
||||
| ~SPC m s u~ | Set global upload speed limit in kB/s. |
|
||||
| ~SPC m v~ | Verify torrent at point or in region. |
|
||||
| ~SPC m q~ | Quit and bury the buffer. |
|
||||
| ~SPC m s b~ | Set bandwidth priority of torrent(s) at point or in region. |
|
||||
|
||||
** =transmission-info-mode=
|
||||
|
||||
| Key Binding | Description |
|
||||
|-------------+---------------------------------------------------------------|
|
||||
| ~SPC m c~ | Copy magnet link of current torrent. |
|
||||
| ~SPC m s d~ | Set download limit of torrent(s) at point in kB/s. |
|
||||
| ~SPC m g p~ | Open a =transmission-peers-mode= buffer for torrent at point. |
|
||||
| ~SPC m s l~ | Set seed ratio limit of torrent(s) at point. |
|
||||
| ~SPC m m~ | Move torrent at point or in region to a new location. |
|
||||
| ~SPC m a a~ | Add announce URLs to torrent or torrents. |
|
||||
| ~SPC m T~ | Remove trackers from torrent at point by ID or announce URL. |
|
||||
| ~SPC m s u~ | Set upload limit of torrent(s) at point in kB/s. |
|
||||
| ~SPC m s p~ | Set bandwidth priority of torrent(s) at point or in region. |
|
||||
|
||||
** =transmission-files-mode=
|
||||
|
||||
| Key Binding | Description |
|
||||
|-------------+---------------------------------------------------------------|
|
||||
| ~SPC g f~ | Visit the file at point with =find-file-read-only=. |
|
||||
| ~SPC m r~ | Run a command on the file at point. |
|
||||
| ~SPC g p~ | Open a =transmission-peers-mode= buffer for torrent at point. |
|
||||
| ~SPC g i~ | Open a =transmission-info-mode= buffer for torrent at point. |
|
||||
| ~SPC m m~ | Move torrent at point or in region to a new location. |
|
||||
| ~SPC m m u~ | Mark file(s) at point or in region as unwanted. |
|
||||
| ~SPC m m w~ | Mark file(s) at point or in region as wanted. |
|
||||
| ~SPC s p~ | Set bandwidth priority on file(s) at point or in region. |
|
||||
|
||||
** =transmission-peers-mode=
|
||||
|
||||
| Key Binding | Description |
|
||||
|-------------+--------------------------------------------------------------|
|
||||
| ~SPC m g i~ | Open a =transmission-info-mode= buffer for torrent at point. |
|
|
@ -0,0 +1,13 @@
|
|||
;;; config.el --- Transmission Layer configuration File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2017 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
;;
|
||||
;; This file is not part of GNU Emacs.
|
||||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(defvar transmission-auto-refresh-all nil
|
||||
"Enable status auto refresh in all transmission buffers.")
|
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
|
@ -0,0 +1,70 @@
|
|||
;;; packages.el --- Transmission Layer packages File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2017 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
;;
|
||||
;; This file is not part of GNU Emacs.
|
||||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(setq transmission-packages
|
||||
'(transmission))
|
||||
|
||||
(defun transmission/init-transmission ()
|
||||
(use-package transmission
|
||||
:defer t
|
||||
:init (progn
|
||||
(spacemacs/set-leader-keys "at" 'transmission)
|
||||
(spacemacs/declare-prefix-for-mode 'transmission-mode "ma" "add")
|
||||
(spacemacs/declare-prefix-for-mode 'transmission-mode "mg" "goto")
|
||||
(spacemacs/declare-prefix-for-mode 'transmission-mode "ms" "set")
|
||||
(spacemacs/declare-prefix-for-mode 'transmission-mode "mt" "toggle")
|
||||
(spacemacs/set-leader-keys-for-major-mode 'transmission-mode
|
||||
"gt" 'transmission-files
|
||||
"at" 'transmission-add
|
||||
"sd" 'transmission-set-download
|
||||
"gp" 'transmission-peers
|
||||
"gi" 'transmission-info
|
||||
"sl" 'transmission-set-ratio
|
||||
"m" 'transmission-move
|
||||
"r" 'transmission-remove
|
||||
"ts" 'transmission-toggle
|
||||
"aa" 'transmission-trackers-add
|
||||
"su" 'transmission-set-upload
|
||||
"v" 'transmission-verify
|
||||
"q" 'transmission-quit
|
||||
"sb" 'transmission-set-bandwidth-priority)
|
||||
(spacemacs/declare-prefix-for-mode 'transmission-info-mode "ma" "add")
|
||||
(spacemacs/declare-prefix-for-mode 'transmission-info-mode "mg" "goto")
|
||||
(spacemacs/declare-prefix-for-mode 'transmission-info-mode "ms" "set")
|
||||
(spacemacs/set-leader-keys-for-major-mode 'transmission-info-mode
|
||||
"c" 'transmission-copy-magnet
|
||||
"sd" 'transmission-set-torrent-download
|
||||
"gp" 'transmission-peers
|
||||
"sl" 'transmission-set-torrent-ratio
|
||||
"m" 'transmission-move
|
||||
"aa" 'transmission-trackers-add
|
||||
"T" 'transmission-trackers-remove
|
||||
"su" 'transmission-set-torrent-upload
|
||||
"sp" 'transmission-set-bandwidth-priority)
|
||||
(spacemacs/declare-prefix-for-mode 'transmission-files-mode "mg" "goto")
|
||||
(spacemacs/declare-prefix-for-mode 'transmission-files-mode "mm" "mark")
|
||||
(spacemacs/declare-prefix-for-mode 'transmission-files-mode "ms" "set")
|
||||
(spacemacs/set-leader-keys-for-major-mode 'transmission-files-mode
|
||||
"gf" 'transmission-find-file
|
||||
"r" 'transmission-files-command
|
||||
"gp" 'transmission-peers
|
||||
"gi" 'transmission-info
|
||||
"mm" 'transmission-move
|
||||
"mu" 'transmission-files-unwant
|
||||
"mw" 'transmission-files-want
|
||||
"sp" 'transmission-files-priority)
|
||||
(spacemacs/set-leader-keys-for-major-mode 'transmission-peers-mode
|
||||
"i" 'transmission-info))
|
||||
:config (when transmission-auto-refresh-all
|
||||
(setq transmission-refresh-modes '(transmission-mode
|
||||
transmission-files-mode
|
||||
transmission-info-mode
|
||||
transmission-peers-mode)))))
|
Loading…
Reference in New Issue