initial commit

This commit is contained in:
2026-10-26 11:44:44 +01:00
commit 9b3066453b
3 changed files with 63 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
MS_BIN:="$(HOME)/.local/bin"
MS_NAME:="muni-streamer"
MS_CONFIG:="$(HOME)/.config/$(MS_NAME)"
install:
mkdir -p $(MS_BIN)
mkdir -p $(MS_CONFIG)
cp $(MS_NAME).sh $(MS_BIN)/$(MS_NAME)
chmod 744 $(MS_BIN)/$(MS_NAME)
touch $(MS_CONFIG)/streams.txt
+7
View File
@@ -0,0 +1,7 @@
# A tool for playing MUNI streams hosted on cesnet via mpv on linux
install with `make install`
you will need to put streams into streams.txt at $(MS_CONFIG) ($HOME/.config/muni-streamer by default) with html urls (one on each line)
<title> <url>, e.g. `SUBJECT https://live.cesnet.cz/xyz.html`
+46
View File
@@ -0,0 +1,46 @@
#!/usr/bin/env bash
# Gruvbox
col_gray1="#1d2021"
col_gray2="#504945"
col_gray3="#ebdbb2"
col_gray4="#ebdbb2"
col_main="#3c3836"
# Font
font="JetBrainsMono Nerd Font Propo:size=14"
# Prompt
prompt="Select a stream to watch:"
# Dimentions
rows=10
cols=1
MS_BIN="$HOME/.local/bin"
MS_NAME="muni-streamer"
MS_CONFIG="$HOME/.config/$MS_NAME"
declare -A items
while IFS= read -r line; do
[[ -z "$line" ]] && continue
read -r key val <<< "$line"
items["$key"]="$val"
done < $MS_CONFIG/streams.txt
DMENU_OPTS=(
-l "$rows" -g "$cols"
-nb "$col_gray1" -nf "$col_gray3"
-sb "$col_main" -sf "$col_gray4"
-fn "$font" -p "$prompt"
)
choice=$(
for key in "${!items[@]}"; do
printf '%s - %s\n' "$key" "${items[$key]}"
done | dmenu "${DMENU_OPTS[@]}"
)
[ "$choice" != "" ] && mpv ${choice#* -}