From 95030ea5c64c18c5a88d7cbff04461607aa21086 Mon Sep 17 00:00:00 2001 From: ITmail-dk <48917593+ITmail-dk@users.noreply.github.com> Date: Sun, 2 Jan 2022 12:35:09 +0100 Subject: [PATCH] Create rofi-beats --- config/rofi/rofi-beats | 65 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 config/rofi/rofi-beats diff --git a/config/rofi/rofi-beats b/config/rofi/rofi-beats new file mode 100644 index 0000000..2651902 --- /dev/null +++ b/config/rofi/rofi-beats @@ -0,0 +1,65 @@ +#!/bin/sh + +# add more args here according to preference +ARGS="--volume=40" + +notification(){ +# change the icon to whatever you want. Make sure your notification server +# supports it and already configured. + +# Now it will receive argument so the user can rename the radio title +# to whatever they want + + notify-send "Afspiller nu: " "$@" --icon=media-tape +} + +menu(){ + printf "1. Lofi Girl\n" + printf "2. Chillhop\n" + printf "3. Box Lofi\n" + printf "4. The Bootleg Boy\n" + printf "5. Radio Spinner\n" + printf "6. SmoothChill" +} + +main() { + choice=$(menu | rofi -dmenu | cut -d. -f1) + + case $choice in + 1) + notification "Lofi Girl ☕️🎶"; + URL="https://play.streamafrica.net/lofiradio" + break + ;; + 2) + notification "Chillhop ☕️🎶"; + URL="http://stream.zeno.fm/fyn8eh3h5f8uv" + break + ;; + 3) + notification "Box Lofi ☕️🎶"; + URL="http://stream.zeno.fm/f3wvbbqmdg8uv" + break + ;; + 4) + notification "The Bootleg Boy ☕️🎶"; + URL="http://stream.zeno.fm/0r0xa792kwzuv" + break + ;; + 5) + notification "Radio Spinner ☕️🎶"; + URL="https://live.radiospinner.com/lofi-hip-hop-64" + break + ;; + 6) + notification "SmoothChill ☕️🎶"; + URL="https://media-ssl.musicradio.com/SmoothChill" + break + ;; + esac + # run mpv with args and selected url + # added title arg to make sure the pkill command kills only this instance of mpv + mpv $ARGS --title="radio-mpv" $URL +} + +pkill -f radio-mpv || main