This commit is contained in:
thek4n 2026-02-19 22:27:28 +03:00
parent 5414d49b01
commit 14f1863d83
4 changed files with 54 additions and 8 deletions

2
.gitignore vendored
View File

@ -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

View File

@ -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

15
home/user/.tmux/landing Executable file
View File

@ -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}"

19
home/user/.tmux/music Executable file
View File

@ -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}"