diff --git a/.gitignore b/.gitignore index ea28378..5dfd034 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,8 @@ home/user/.tmux/* !home/user/.tmux/ssh !home/user/.tmux/example-background-job !home/user/.tmux/system-update +!home/user/.tmux/music +!home/user/.tmux/landing home/user/.config/git/local diff --git a/home/user/.local/bin/radio b/home/user/.local/bin/radio index 9fc6e3f..b445486 100755 --- a/home/user/.local/bin/radio +++ b/home/user/.local/bin/radio @@ -4,16 +4,26 @@ set -eu channel="${1:-}" if [ "${channel}" = lofi ]; then - url='https://live.hunter.fm/lofi_low' -elif [ "${channel}" = trance ]; then - url='http://ubuntu.hbr1.com:19800/trance.ogg' -elif [ "${channel}" = salsa ]; then - url='https://latinasalsa.ice.infomaniak.ch/latinasalsa.mp3' -elif [ "${channel}" = kfai ]; then - url='https://kfai.broadcasttool.stream/kfai-1' + url='https://radiorecord.hostingradio.ru/lofi96.aacp' +elif [ "${channel}" = fallout ]; then + url='http://fallout.fm:8000/falloutfm1.ogg' +elif [ "${channel}" = wasteland ]; then + url='http://wasteland.su:8080/radio' +elif [ "${channel}" = retrofm ]; then + url='http://hls-01-retro.emgsound.ru/12/128/playlist.m3u8' +elif [ "${channel}" = rusradio ]; then + url='https://rusradio.hostingradio.ru/rusradio128.mp3' +elif [ "${channel}" = rock ]; then + url='https://radiorecord.hostingradio.ru/rock96.aacp' +elif [ "${channel}" = phonk ]; then + url='https://radiorecord.hostingradio.ru/phonk96.aacp' +elif [ "${channel}" = dorognoe ]; then + url='https://dorognoe.hostingradio.ru:8000/dorognoe' else - echo "don't know \"${channel}\": lofi/trance/salsa/kfai" 1>&2 + echo "don't know \"${channel}\": lofi/fallout/wasteland/retrofm/rusradio/rock/phonk/dorognoe" 1>&2 exit 1 fi exec mpv --really-quiet "${url}" + +# https://gist.github.com/ergoz/e7837a54956116167db93b016dbd51a9 diff --git a/home/user/.tmux/landing b/home/user/.tmux/landing new file mode 100755 index 0000000..bc8df36 --- /dev/null +++ b/home/user/.tmux/landing @@ -0,0 +1,15 @@ +#!/bin/sh + +set -eux + +readonly SESSION=landing +readonly MAINW=landing + +readonly WORKING_PROJECT="${HOME}" + +if ! tmux has-session -t="${SESSION}"; then + tmux new-session -s "${SESSION}" -d -n "1" -c "${WORKING_PROJECT}" 'sh -c "tmux set-option remain-on-exit on; figlet -ct -f big Landing; trap : INT; while true; do sleep 3600; done"' + tmux rename-window -t="${SESSION}:1" "${MAINW}" +fi + +tmux switch-client -t "${SESSION}" diff --git a/home/user/.tmux/music b/home/user/.tmux/music new file mode 100755 index 0000000..5711457 --- /dev/null +++ b/home/user/.tmux/music @@ -0,0 +1,19 @@ +#!/bin/sh + +set -eux + +readonly SESSION=music +readonly MAINW=radio +readonly SECONDW=tunes + +readonly WORKING_PROJECT="${HOME}" + +if ! tmux has-session -t="${SESSION}"; then + tmux new-session -s "${SESSION}" -d -n "${MAINW}" -c "${WORKING_PROJECT}" + tmux rename-window -t "${SESSION}:1" "${MAINW}" + tmux new-window -t "${SESSION}" -d -n "${SECONDW}" -c "${WORKING_PROJECT}" + tmux send-keys -t "${SESSION}:${MAINW}.1" "radio rock" Enter + tmux send-keys -t "${SESSION}:${SECONDW}.1" 'tunes' +fi + +tmux switch-client -t "${SESSION}"