Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
needs rofi, streamlink,mpv, acestream optional
#!/usr/bin/env bash
# author: unknown
#
# ▓▓▓▓▓▓▓▓▓▓
# ░▓ author ▓ cirrus <cirrus@archlinux.info>
# ░▓ code ▓ https://gist.github.com/cirrusUK
# ░▓ mirror ▓ http://cirrus.turtil.net
# ░▓▓▓▓▓▓▓▓▓▓
# ░░░░░░░░░░
#
declare -A LABELS
declare -A COMMANDS
###
# List of defined 'bangs'
# launch programs
#COMMANDS["apps"]="rofi -combi-modi window,drun -show combi"
#LABELS["apps"]=""
# open bookmarks
#COMMANDS["bookmarks"]="~/scripts/rofi-surfraw-bookmarks.sh"
#LABELS["bookmarks"]=""
# search local files
#COMMANDS["locate"]="~/scripts/rofi-locate.sh"
#LABELS["locate"]=""
# open custom web searches
#COMMANDS["websearch"]="~/scripts/rofi-surfraw-websearch.sh"
#LABELS["websearch"]=""
# playlist
#COMMANDS["playlist"]="/home/cirrus/.config/rofi/playlist"
#LABELS["playlist"]=""
# CI
COMMANDS["CI"]= "acestream-launcher acestream://cf66593dc47dfbd384b5a2204673ee23315bfae3 "
LABELS["CI "]=""
# Discovery_I.D
COMMANDS["Discovery_I.D"]="mpv http://127.0.0.1:6878/ace/m/652016f9c7832eeac301c2c8d08b66b9c2265d5e/f528764d624db129b32c21fbca0cb8d6.m3u8"
LABELS["Discovery_I.D"]=""
# BBC_Earth
COMMANDS["BBC_Earth"]="sopcast-launcher sop://broker.sopcast.com:3912/148257 --player mpv"
LABELS["BBC_Earth"]=""
# Paramount
COMMANDS["Paramount"]="sopcast-launcher sop://broker.sopcast.com:3912/253033 --player mpv"
LABELS["Paramount"]=""
# Sky_SportsPL
COMMANDS["Sky_SportsPL⚽ "]="mpv http://cdnv.cli.tn/iptv/ch937 "
LABELS["Sky_SportsPL⚽ "]=""
# Sky_Sports_Football
COMMANDS["Sky_Sports_Football⚽ "]="mpv http://cdnv.cli.tn/iptv/ch922 "
LABELS["Sky_Sports_Football⚽ "]=""
# TLC
COMMANDS["TLC"]="sopcast-launcher sop://broker.sopcast.com:3912/148256 --player mpv"
LABELS["TLC"]=""
# History
COMMANDS["History"]="sopcast-launcher sop://broker.sopcast.com:3912/253032 --player mpv"
LABELS["History"]=""
# NatGeo
COMMANDS["NatGeo"]="sopcast-launcher sop://broker.sopcast.com:3912/148248 --player mpv"
LABELS["NatGeo"]=""
# Discovery
COMMANDS["Discovery"]="sopcast-launcher sop://broker.sopcast.com:3912/256241 --player mpv"
LABELS["Discovery"]=""
# Crime1
COMMANDS["Crime1"]="mpv http://www.dailymotion.com/crimetime-tv"
LABELS["Crime1"]=""
# Cops
COMMANDS["Cops"]='streamlink -p mpv "https://www.arconai.tv/stream.php?id=33" live'
LABELS["Cops"]=""
# Big_Bang_Theory
COMMANDS["Big_Bang_Theory"]='streamlink -p mpv "https://www.arconai.tv/stream.php?id=91" live'
LABELS["Big_Bang_Theory"]=""
# Family_Guy
COMMANDS["Family_Guy"]='streamlink -p mpv "https://vaughn.live/familyguytv47" live'
LABELS["Family_Guy"]=""
# Southpark
COMMANDS["Southpark"]='streamlink -p mpv "https://vaughn.live/southparktv2" live'
LABELS["Southpark📡📡"]=""
# Friends
COMMANDS["Friends"]='streamlink -p mpv "https://www.arconai.tv/stream.php?id=47" live'
LABELS["Friends"]=""
# Forensicfiles
COMMANDS["Forensicfiles"]='~/venv/bin/streamlink -p mpv "https://vaughn.live/forensicfiles" live'
LABELS["Forensicfiles💉💉"]=""
# crime_docs_4u_
COMMANDS["crime_docs_4u_"]='streamlink -p mpv "https://vaughn.live/crime_docs_4u_" live'
LABELS["crime_docs_4u_🔫🔫"]=""
# crimedocs4u
COMMANDS["crimedocs4u"]= 'streamlink -p mpv "https://vaughn.live/crimedocs4u" worst'
LABELS["crimedocs4u🔫🔫"]=""
# World_At_War
COMMANDS["World_At_War"]='streamlink -p mpv "https://vaughn.live/world_at_war" live'
LABELS["World_At_War"]=""
# Westerns
COMMANDS["Westerns"]='streamlink -p mpv "https://vaughn.live/the_old_west" live'
LABELS["Westerns"]=""
# True_Crime
COMMANDS["True_Crime"]='streamlink -p mpv "https://vaughn.live/0_true_crime" live'
LABELS["True_Crime"]=""
# BoB_2012
COMMANDS["BoB_2012"]='streamlink -p mpv "https://vaughn.live/bob__2012" live'
LABELS["BoB_2012"]=""
# startrektv1
COMMANDS["Startrektv"]='streamlink -p mpv "https://vaughn.live/startrektv1" live'
LABELS["Startrektv"]=""
# Unsolved_Mysteries
COMMANDS["Unsolved_Mysteries"]='streamlink -p mpv "https://vaughn.live/unsolvedmysteries_" live'
LABELS["Unsolved_Mysteries"]=""
# CBS
COMMANDS["CBS"]='streamlink -p mpv "https://www.filmon.com/tv/cbs-reality" worst'
LABELS["CBS"]=""
# CBS1
COMMANDS["CBS1"]='streamlink -p mpv "https://www.filmon.com/tv/cbs-reality1" worst'
LABELS["CBS1"]=""
# NATGEOWILD_HD
COMMANDS["NATGEOWILD_HD"]="mpv 'http://185.19.191.94:8090/NATGEOWILD/index.m3u8'"
LABELS["NATGEOWILD_HD"]=""
# BBC1_Scotland
COMMANDS["BBC1_Scotland"]='streamlink -p mpv "https://www.filmon.com/tv/bbc-1-scotland" low'
LABELS["BBC1_Scotland"]=""
# BBC2
COMMANDS["BBC2"]='streamlink -p mpv "https://www.filmon.com/tv/bbc-two" low'
LABELS["BBC2"]=""
# ITV1
COMMANDS["ITV1"]='streamlink -p mpv "https://www.filmon.com/tv/itv1" low'
LABELS["ITV1"]=""
# ITV2
COMMANDS["ITV2"]='streamlink -p mpv "https://www.filmon.com/tv/itv2" low'
LABELS["ITV2"]=""
# ITV2+1
COMMANDS["ITV2+1"]='streamlink -p mpv "https://www.filmon.com/tv/itv2-plus-1" low'
LABELS["ITV2+1"]=""
# ITVBe
COMMANDS["ITVBe"]='streamlink -p mpv "https://www.filmon.com/tv/itvbe" low'
LABELS["ITVBe"]=""
# TRUTV
COMMANDS["TRUTV"]='streamlink -p mpv "https://www.filmon.com/tv/tru-tv" low'
LABELS["TRUTV"]=""
# Really
COMMANDS["REALLY"]='streamlink -p mpv "https://www.filmon.com/tv/really" low'
LABELS["REALLY"]=""
# FilmonFootball
COMMANDS["FilmonFootball"]='streamlink -p mpv "https://www.filmon.com/tv/filmon-football" low'
LABELS["Filmon⚽Football"]=""
# CBS_Drama
COMMANDS["CBS_Drama"]='streamlink -p mpv "https://www.filmon.com/tv/cbs-drama" low'
LABELS["CBS_Drama"]=""
# BTSports1
COMMANDS["BTSports1"]= "mpv http://cdnv.cli.tn/iptv/ch1828 "
LABELS["BTSports1"]=""
# BTSports2
COMMANDS["BTSports2"]= "mpv http://cdnv.cli.tn/iptv/ch1829 "
LABELS["BTSports2"]=""
# BTSports3
COMMANDS["BTSports3"]= "mpv http://cdnv.cli.tn/iptv/ch1830 "
LABELS["BTSports3"]=""
# Crime_Investigation
COMMANDS["Crime_Investigation "]= "acestream-launcher acestream://14e6d21984e1e06decfecd20ad704f066910b389 --player mpv "
LABELS["Crime_Investigation "]=""
# show clipboard history
# source: https://bitbucket.org/pandozer/rofi-clipboard-manager/overview
# COMMANDS["clipboard"]='rofi -modi "clipboard:~/scripts/mclip.py menu" -show clipboard && ~/scripts/mclip.py paste'
# LABELS["clipboard"]=""
# references --------------------------
# COMMANDS["sr2"]="firefox wikipedia.org/search-redirect.php?search=\" \${input}\""
# LABELS["sr2"]=""
# COMMANDS["piratebay"]="firefox --disk-cache-dir=/tmp/cache https://thepiratebay-proxy.com/search/\" \${input}\""
# LABELS["piratebay"]=""
# COMMANDS[".bin"]="spacefm -r '/home/dkm/bin'"
# LABELS[".bin"]=".bin"
# COMMANDS["Screenshot"]='/usr/local/bin/rofiscrot'
# LABELS["Screenshot"]="screenshot"
################################################################################
# do not edit below
################################################################################
##
# Generate menu
##
function print_menu()
{
for key in ${!LABELS[@]}
do
echo "$key ${LABELS}"
# echo "$key ${LABELS[$key]}"
# my top version just shows the first field in labels row, not two words side by side
done
}
##
# Show rofi.
##
function start()
{
# print_menu | rofi -dmenu -p "?=>"
print_menu | rofi -dmenu -msg ">>>" -i -p " 🎬 📺 Rofi Video Streams 📺 🎬 "
}
# Run it
value="$(start)"
# Split input.
# grab upto first space.
choice=${value%%\ *}
# graph remainder, minus space.
input=${value:$((${#choice}+1))}
##
# Cancelled? bail out
##
if test -z ${choice}
then
exit
fi
# check if choice exists
if test ${COMMANDS[$choice]+isset}
then
# Execute the choice
eval echo "Executing: ${COMMANDS[$choice]}"
eval ${COMMANDS[$choice]}
else
eval $choice | rofi
# prefer my above so I can use this same script to also launch apps like geany or leafpad etc (DK)
# echo "Unknown command: ${choice}" | rofi -dmenu -p "error"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment