scripts

scripts
git clone git://git.wimdupont.com/scripts.git
Log | Files | Refs | README | LICENSE

commit 64396c52ca0a249e9236e7e2fc20dd15f5aa72a5
parent e286a1bae19b0ac7e3d344e2a55b4841dece5a86
Author: Wim Dupont <wim@wimdupont.com>
Date:   Tue,  3 May 2022 18:38:15 +0200

radio improve txt config

Diffstat:
MREADME.adoc | 3+--
Mbin/radio | 6+++---
2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/README.adoc b/README.adoc @@ -59,8 +59,7 @@ Only first line is mandatory for this script to be useful, usernames en URL's ca == ./bin/radio -Uses dmenu to browse and play online radio stations saved in a textfile (default in ~/Desktop/radiostations). The textfile should consist of the URL and a searchname separated by a -semicolon (;) delimiter and with a new line for each new station. +Uses dmenu to browse and play online radio stations saved in a textfile (default in ~/Desktop/radiostations). The textfile should consist of a searchname and the URL separated by a semicolon (;) and with a new line for each new station. .Requires: diff --git a/bin/radio b/bin/radio @@ -11,15 +11,15 @@ file=~/Desktop/radiostations readarray -t stations < "$file" -stationName=$(printf '%s\n' "${stations[@]}" | cut -f2 -d ';' | "$dmenu" -fn "$font" -l "$lines" "$@") +stationName=$(printf '%s\n' "${stations[@]}" | cut -f1 -d ';' | "$dmenu" -fn "$font" -l "$lines" "$@") for i in "${stations[@]}" do - name=$(echo "$i" | cut -f2 -d ';') + name=$(echo "$i" | cut -f1 -d ';') if [[ $name == $stationName ]]; then - station=$(echo "$i" | cut -f1 -d ';') + station=$(echo "$i" | cut -f2 -d ';') exec urxvt -e mpv $station break fi