https://github.com/itsjfx/cmus-fzf
quick and dirty script to play a track from your cmus library using fzf
https://github.com/itsjfx/cmus-fzf
Last synced: 3 months ago
JSON representation
quick and dirty script to play a track from your cmus library using fzf
- Host: GitHub
- URL: https://github.com/itsjfx/cmus-fzf
- Owner: itsjfx
- License: gpl-3.0
- Created: 2024-07-27T10:02:57.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-07-30T14:09:41.000Z (11 months ago)
- Last Synced: 2025-03-24T11:02:28.876Z (3 months ago)
- Language: Shell
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cmus-fzf
quick and dirty script to play a track from your cmus library using fzf
## setup
1. install [fzf](https://github.com/junegunn/fzf)
2. run `cmus-fzf`## example

## usage
### tmux popup
I run mine in a tmux popup when using `cmus`. [from my cmus rc](https://github.com/itsjfx/dotfiles/blob/master/.config/cmus/rc#L8):
* `bind -f library S shell tmux popup -e FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS" -w 60% -h 60% -E /path/to/cmus-fzf/cmus-fzf`
* and press `S`you could also bind this globally within tmux to do this from any application, e.g. to control your music within `vim` :)
* `bind-key S run-shell 'tmux popup -E /path/to/cmus-fzf/cmus-fzf || true'`### any regular terminal
you can spawn a lightweight terminal to run the script globally in your desktop environment or within cmus
e.g. with a cmus keybind
* `bind -f library S shell st -e '/path/to/cmus-fzf/cmus-fzf'`## shout outs
* [gavtory](https://github.com/gavtroy) for their help
* some fzf selection code from [lincheney/fzf-tab-completion](https://github.com/lincheney/fzf-tab-completion)
* and of course [fzf](https://github.com/junegunn/fzf)