Rofi Player is a bash script that uses Rofi, a substitute for windows switch, application launcher and dmenu, to create a simple and interactive music player.
It uses mpv to play music and mpv-mpris to support MPRIS
.
- Displays all folders (playlists) in the
~/Music
directory. - Shows the number of tracks in each playlist.
- Allows you to select a playlist to play.
- Plays the selected playlist in random order.
- Allows you to stop playback and exit the player.
- Allows to play YouTube playlist directly or by downloading
- Managing playlists
Rofi
^MPV
^ v0.37.0mpv-mpris
^jq
^ jq-1.7.1yt-dlp
^ 2024.03.10notify-send
^ 0.8.3socat
^ 1.8.0.0ffmpeg
^ n6.1.1
--offset
It allows you to set the indentation size to the number of songs in the directory--json_file
Custom way to YT playlists JSON--icon
Custom way to notify-send icon--notify
Enable/disable notification
- Make sure you have all dependensies installed.
- Copy the script to a convenient location.
- Give the script execute permissions
chmod +x
- Run the script from the terminal or bind it to a hotkey (for example, in
~/.config/hyprland/keybindings.conf
.
bind = $mainMod, Y, exec, pkill -x rofi || $scrPath/player.sh --offset=25 # open player
- In the Rofi window that opens, select a playlist to play.
From YouTube
is allows you to enter a URL on playlist, which will be played and saved in jsonSave YouTube
is allows you to enter a URL on playlist, which will be played and downloaded as mp3Delete
is running menu to delete playlistExit
is kill player