diff --git a/Examples.md b/Examples.md index a7199f6..8a5369a 100644 --- a/Examples.md +++ b/Examples.md @@ -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) \ No newline at end of file +![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 +``` \ No newline at end of file