mirror of
https://github.com/ksyasuda/rice.git
synced 2024-11-22 03:19:58 -08:00
2bada90e42
add rofi-stream module
24 lines
566 B
Bash
Executable File
24 lines
566 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
PLAYER="mpv"
|
|
|
|
ARGS=(
|
|
"lofi-hip-hop-radio - https://www.youtube.com/watch?v=5qap5aO4i9A"
|
|
"QUIT"
|
|
)
|
|
|
|
CHOICE=$(
|
|
printf "%s\n" "${ARGS[@]}" | rofi -config ~/SudacodeRice/rofi/flat-orange.rasi -dmenu -l 5 -i -p "Choose Stream"
|
|
)
|
|
|
|
if [[ "$CHOICE" == "Quit" ]]; then
|
|
printf "%s\n" "Bye." && exit 1 || exit 1
|
|
elif [[ "$CHOICE" ]]; then
|
|
TARGET=$(printf "%s\n" "${CHOICE}" | awk '{print $NF}')
|
|
printf "%s\n" "TARGET: $TARGET"
|
|
$PLAYER $TARGET
|
|
# "$PLAYER $TARGET" &>/dev/null &
|
|
else
|
|
printf "%s\n" "Should not get here"
|
|
fi
|