82 lines
3.9 KiB
EmacsLisp
82 lines
3.9 KiB
EmacsLisp
;;; packages.el --- Transmission Layer packages File for Spacemacs
|
|
;;
|
|
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
|
|
;;
|
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
;;
|
|
;; This file is not part of GNU Emacs.
|
|
;;
|
|
;; This program is free software; you can redistribute it and/or modify
|
|
;; it under the terms of the GNU General Public License as published by
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
;; (at your option) any later version.
|
|
;;
|
|
;; This program is distributed in the hope that it will be useful,
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
;; GNU General Public License for more details.
|
|
;;
|
|
;; You should have received a copy of the GNU General Public License
|
|
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
(setq transmission-packages
|
|
'(transmission))
|
|
|
|
(defun transmission/init-transmission ()
|
|
(use-package transmission
|
|
:defer t
|
|
:init (progn
|
|
(spacemacs/set-leader-keys "att" '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)))))
|