mabox-colorizer/bin/prtctl

57 lines
1.7 KiB
Plaintext
Raw Normal View History

#!/bin/bash
# prtctl - pyradio theme helper
# TODO start pyradio if not running
THEMERC=~/.config/pyradio/themes/mbcolors.pyradio-theme
stations() {
read S SFG SBG<<< "$(grep '^Stations ' ${THEMERC})"
#notify-send.sh "$S" "$SFG $SBG"
sd "^Stations .*$" "Stations $1 $2" ${THEMERC}
}
active_station(){
read AS1 AS2 ASFG<<< "$(grep '^Active Station ' ${THEMERC})"
sd "^Active Station .*$" "Active Station $1" ${THEMERC}
}
status_bar() {
read SB1 SB2 SBFG SBBG<<< "$(grep '^Status Bar ' ${THEMERC})"
sd "^Status Bar .*$" "Status Bar $1 $2" ${THEMERC}
}
normal_cursor() {
read NC1 NC2 NCFG NCBG<<< "$(grep '^Normal Cursor ' ${THEMERC})"
sd "^Normal Cursor .*$" "Normal Cursor $1 $2" ${THEMERC}
}
active_cursor() {
read AC1 AC2 ACFG ACBG<<< "$(grep '^Active Cursor ' ${THEMERC})"
sd "^Active Cursor .*$" "Active Cursor $1 $2" ${THEMERC}
}
edit_cursor() {
read EC1 EC2 ECFG ECBG<<< "$(grep '^Edit Cursor ' ${THEMERC})"
sd "^Edit Cursor .*$" "Edit Cursor $1 $2" ${THEMERC}
}
extra_func() {
sd "^Extra Func .*$" "Extra Func $1" ${THEMERC}
}
pyradio_url() {
sd "^PyRadio URL .*$" "PyRadio URL $1" ${THEMERC}
}
messages_border() {
sd "^Messages Border .*$" "Messages Border $1" ${THEMERC}
}
case "$1" in
stations) stations "$2" "$3";;
stations_fg) stations_fg "$2";;
stations_bg) stations_bg "$2";;
active_station) active_station "$2";;
status_bar) status_bar "$2" "$3";;
normal_cursor) normal_cursor "$2" "$3";;
active_cursor) active_cursor "$2" "$3";;
edit_cursor) edit_cursor "$2" "$3";;
extra_func) extra_func "$2";;
pyradio_url) pyradio_url "$2";;
messages_border) messages_border "$2";;
*);;
esac