🎵 Search and Play songs from YouTube inside your terminal
GPL-2.0 License
Tuner searches and plays songs from YouTube and SoundCloud inside your terminal.
If you want a GUI application with more features, take a look at Neptune.
!
is used as a prefix for theUsing Tuner is simple. Just install it and then run tuner
inside your terminal.
That will launch a interactive player. If that's not what you want, here are some
alternative modes:
tuner play <search term>
(or tuner p
): plays the first result found fortuner simple-play <search term>
(or tuner sp
): plays the first resultYou can create a script in /usr/bin/play
(or any other folder in your path)
with the following content:
#!/bin/bash
search_query="$@"
# when the search query is not defined
if [ -z "$1" ]; then
search_query=$(echo "stop" | dmenu -p "Play: ")
fi
# when the search query is stop
if [ "$search_query" = "stop" ]; then
killall tuner -w
exit 0
fi
# when the search query is ok to be played
tuner sp "$search_query"
With that, you can use dmenu to quickly play songs, by:
play
(that will open a dmenu prompt asking for the searchplay <song name>
(where song name
is not required) in dmenu_runsuper+d
).Install from the AUR (yay -S go-tuner-git
).
Use this install script:
$ wget -O - https://raw.githubusercontent.com/Pauloo27/tuner/master/install-debian.sh | bash
Tuner is a written in Go, so you will need to install the GoLang compiler. On
Arch Linux, you should install the go
package.
Before running Tuner you need to install MPV and youtube-dl.
On Arch Linux, the dependencies packages are mpv youtube-dl
On Debian based (Ubuntu, PopOs, Linux Mint, etc), install libmpv-dev
via APT
and youtube-dl
via PIP (sudo -H pip3 install --upgrade youtube-dl
).
Font Awesome 5 is also required to display the icons. You can also customize
the icons in the icons/icons.go
file.
Clone the repository:
$ git clone https://github.com/Pauloo27/tuner.git && cd tuner
Install:
$ make install
Tuner + pfetch:
Tuner search menu:
Tuner + Discord:
Tuner + cava:
Tuner + lolcat:
The option to show the song Album Art is disabled by default, here's how to enable it:
First install Ãœberzug
(on Arch Linux, install the ueberzug
package)...
Then open Tuner and type /a
in the search bar and restart your Terminal and
Tuner.
To enable MPRIS, first install mpv-mpris
(it needs to be placed at ~/.config/mpv/scripts/mpris.so
or
/etc/mpv/scripts/mpris.so
).
if you are using Arch Linux and installed Tuner using the go-tuner-git
AUR package, it's already installed.
After that, use /mpris
command and restart tuner.
To enable or disable the integration with Discord, type /discord
in the search bar.
If keybinds aren't working, try running Tuner with TERM="xterm" tuner
.
If it doesn't work, restart you terminal and open a issue on GitHub with
the output of echo $TERM
. If it does work, you can also open the issue or set
a alias.
TIP: You can see the keybinds inside Tuner by pressing ?
.
There are a few commands you can type in the search bar:
/discord
or /dc
: Toggle option to show Tuner in Discord./cache
or /c
: Toggle option to keep cache (default is false)./album
or /a
: Toggle option to show album art (default is false)./mpris
or /m
: Toggle option to load mpv-mpris (default is false)./help
or /h
: List all commands.Tuner data (cache and config) is stored at ~/.cache/tuner
. Tuner doesn't keep
the songs downloaded, the only cached data is the album art (if the feature is
enabled) and the info of playlist entries.
This project is licensed under GNU General Public License v2.0.
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 2 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.