m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 16:45:38 -05:00

Add Transmission example

Guido Cella
2020-07-15 17:44:07 +02:00
parent 485872e3bf
commit 7fea60675a

@@ -55,6 +55,7 @@ Table of Contents
* [Python Behave BDD](#python-behave-bdd)
* [fzf as dmenu replacement](#fzf-as-dmenu-replacement)
* [dotfiles management](#dotfiles-management)
* [Transmission](#transmission)
### General
@@ -1484,4 +1485,19 @@ you manage your dotfiles. It heavily utilises fzf for interactive user
experience. It is inspired by forgit, but focuses on dotfiles rather than generic
git. By default, it wraps around git bare repository but it could also be easily integrated with a symlink/GNU stow setup.
![dotbare screenshot](https://user-images.githubusercontent.com/43941510/82644470-b4a32c80-9c54-11ea-9601-d237eb98912e.gif)
![dotbare screenshot](https://user-images.githubusercontent.com/43941510/82644470-b4a32c80-9c54-11ea-9601-d237eb98912e.gif)
### Transmission
zsh keybinding to select a torrent with transmission-remote.
```zsh
pick_torrent() LBUFFER="transmission-remote -t ${$({
for torrent in ${(f)"$(transmission-remote -l)"}; do
torrent_name=$torrent[73,-1]
[[ $torrent_name != (Name|) ]] && echo ${${${(s. .)torrent}[1]}%\*} $torrent_name
done
} | fzf)%% *} -"
zle -N pick_torrent
bindkey '^o' pick_torrent
```