Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Flashwalker/56d5690706c9651254e14cf5ae60cfe7 to your computer and use it in GitHub Desktop.
Save Flashwalker/56d5690706c9651254e14cf5ae60cfe7 to your computer and use it in GitHub Desktop.
Lo-Fi Music Radio Fullscreen 🎵️ (Chilled Cow) (YouTube Music) (Chromium) (Linux)
#!/bin/sh
mkdir -p ~/Documents
src=$(readlink -m "$0")
cd "${src%/*}"
install --mode u+rw,go+r lofi.html ~/Documents/ && \
ls ~/Documents/lofi.html >/dev/null && \
echo ~/Documents/lofi.html "\e[0;32minstalled\e[0m"
install --mode u+rw,go+r lofi.svg ${XDG_DATA_HOME:-~/.local/share}/icons/ && \
ls ${XDG_DATA_HOME:-~/.local/share}/icons/lofi.svg >/dev/null && \
echo ${XDG_DATA_HOME:-~/.local/share}/icons/lofi.svg "\e[0;32minstalled\e[0m"
install --mode u+rwx,go+r lofi.desktop ${XDG_DATA_HOME:-~/.local/share}/applications/ && \
ls ${XDG_DATA_HOME:-~/.local/share}/applications/lofi.desktop >/dev/null && \
echo ${XDG_DATA_HOME:-~/.local/share}/applications/lofi.desktop "\e[0;32minstalled\e[0m"
## Listen Lo-Fi redio from YouTube Music in Chromium fullscreen popup window on Linux
--------------------------------------------------------------------------------------
Run install.sh in terminal to install
[Desktop Entry]
Version=1.0
Name=Lo🎵Fi
Exec=sh -c "exec chromium --new-window --chrome --kiosk --allow-file-access-from-files --disable-popup-blocking --noerrdialogs --disable-translate --no-first-run --fast --fast-start --disable-infobars --disable-features=TranslateUI --disk-cache-dir=/dev/null --password-store=basic --temp-profile --incognito file://${HOME}/Documents/lofi.html"
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=lofi
Categories=Network;WebBrowser;AudioVideo;Audio;Player;
MimeType=text/html;text/xml;application/xhtml_xml;application/x-mimearchive;x-scheme-handler/http;x-scheme-handler/https;
StartupWMClass=chromium
StartupNotify=true
Keywords=browser
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<script type="text/javascript">
function closeParent() {
window.close();
}
var popUpObj;
function openPopUp() {
popUpObj=window.open("https://music.youtube.com/playlist?list=PLofht4PTcKYnaH8w5olJCI-wUVxuoMHqM",
// Lofi Records https://music.youtube.com/channel/UCuw1VDsmOWOldKGLYq6AkVg https://www.youtube.com/c/LofiRecords
// playlist 1 relax/study: https://music.youtube.com/playlist?list=PLofht4PTcKYnaH8w5olJCI-wUVxuoMHqM
// playlist 2 sleep/chill: https://music.youtube.com/playlist?list=PLofht4PTcKYkwt9NTxtpfw8VPllgfe-sm
// playlist 3 focus/work: https://music.youtube.com/playlist?list=PLofht4PTcKYki_6M4TCWftA2SIcdD0x7h
//
// Lofi girl https://music.youtube.com/channel/UCSJ4gkVC6NrvII8umztf0Ow https://www.youtube.com/c/LofiGirl
// playlist albums: https://music.youtube.com/playlist?list=PL6NdkXsPL07IOu1AZ2Y2lGNYfjDStyT6O
// playlist long compilations: https://music.youtube.com/playlist?list=PL6NdkXsPL07KN01gH2vucrHCEyyNmVEx4
// long 1 relax/study: https://music.youtube.com/watch?v=5qap5aO4i9A
// long 2 sleep/chill: https://music.youtube.com/watch?v=DWcJFNfaw9c
// livestream 1 relax/study: https://youtu.be/jfKfPfyJRdk
// livestream 2 sleep/chill: https://youtu.be/rUxyKA_-grg
// livestreams playlist: https://www.youtube.com/playlist?list=PL6NdkXsPL07LFpk9MhvWlgEAzS2siKz8O
//
// LO:FI (inyourchill) https://music.youtube.com/channel/UCncxHd8o_VhhHAJ7QqB5azg https://www.youtube.com/c/InYourChill
// livestream 1 LO:FI: https://youtu.be/3WBPGAzCcng
// livestream 2 Chill VHS Radio: https://youtu.be/e97w-GHsRMY
"ModalPopUp",
"toolbar=no," +
"scrollbars=no," +
"location=no," +
"statusbar=no," +
"menubar=no," +
"resizable=1," +
// "width="+screen.availWidth+"," +
"width="+screen.width+"," +
// "height="+screen.availHeight+"," +
"height="+screen.height+"," +
"left = 0," +
"top=0"
);
if(!popUpObj || popUpObj.closed || typeof popUpObj.closed=='undefined')
{
function createItem(h) {
let div = document.createElement('div');
div.innerHTML = h;
return div;
}
const body = document.querySelector('body');
body.appendChild(createItem('<h1 style="text-align: center; color: red;">Your browser is blocking popups. <br/><br/> Allow popups for <pre style="color: green;">file:///*</pre> here: <br/> <strong><pre style="color: green;">chrome://settings/content/popups</pre></strong></h1>'));
}else{
popUpObj.moveTo(0, 0);
//popUpObj.resizeTo(screen.width, screen.height);
popUpObj.focus();
closeParent();
}
}
document.addEventListener('DOMContentLoaded', openPopUp());
</script>
</body>
</html>
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment