home-manager/gui: Longer and looping brainrot screensavers
Some checks failed
CI / Check, build and cache nixfiles (push) Failing after 29m7s

This commit is contained in:
Jack O'Sullivan 2025-03-25 10:56:08 +00:00
parent bc74fb4968
commit f322f3ebac
2 changed files with 10 additions and 7 deletions

View File

@ -17,12 +17,12 @@ let
hash = "sha256-HX1DvlAeZ9kn5BXguPPinDvzMHXoWXIYFvZSpSbKx3E=";
};
subwaySurfers = pkgs.fetchurl {
url = "https://p.${pubDomain}/video/subway-surfers.mkv";
hash = "sha256-apn/0DPeihXj+nP6ytVkH/SlZRelxIpRXOUOfxHczl8=";
url = "https://p.${pubDomain}/video/subway-surfers-smol.mkv";
hash = "sha256-fMe7TDRNTymRHIJOi7qG3trzu4GP8a3gCDz+FMkX1dY=";
};
minecraftParkour = pkgs.fetchurl {
url = "https://p.${pubDomain}/video/minecraft-parkour.mkv";
hash = "sha256-1fJZyi9N4g/QyoL1Pk7akL0jTDjxReYmN31EOUHhHXk=";
url = "https://p.${pubDomain}/video/minecraft-parkour-smol.mkv";
hash = "sha256-723pRm4AsIjY/WFUyAHzTJp+JvH4Pn5hvzF9wHTnOPA=";
};
doomsaver = pkgs.runCommand "doomsaver" {

View File

@ -87,11 +87,14 @@ class TTESaver(Screensaver):
self.proc.terminate()
class FFmpegCACASaver(Screensaver):
def __init__(self, video, weight=1.5):
def __init__(self, video, weight=2):
cols, lines = os.get_terminal_size()
# IDK if it's reasonable to do this as "1:1"
size = lines - 4
super().__init__(
['@ffmpeg@/bin/ffmpeg', '-hide_banner', '-loglevel', 'error',
'-i', video,
'-pix_fmt', 'rgb24', '-window_size', '80x80',
'-stream_loop', '-1', '-i', video,
'-pix_fmt', 'rgb24', '-window_size', f'{size}x{size}',
'-f', 'caca', '-'],
env={
'CACA_DRIVER': 'ncurses',