This commit is contained in:
Lennart J. Kurzweg (Nx2)
2025-08-27 23:59:29 +02:00
parent d009d109a9
commit cd25a1a569
6 changed files with 136 additions and 48 deletions

View File

@@ -52,7 +52,7 @@ in {
packages = with pkgs; [
chatterino2
streamlink
mpv
# mpv
];
file = {
".local/share/chatterino/Settings/settings.json".text = with secrets.chatterino; /* json */ ''

View File

@@ -2,14 +2,53 @@
programs.mpv = {
enable = true;
package = pkgs.mpv;
scrips = with pkgs.mpvScripts; [
config = {
# osc = false; # Disables the on-screen controller (seekbar, volume, etc.)
# osd-bar = false; # Disables the on-screen display progress bar
demuxer-max-back-bytes = 4294967296; # Sets the maximum number of bytes to buffer for seeking backwards
demuxer-max-bytes = 4294967296; # Sets the maximum number of bytes to buffer for seeking forwards
interpolation = true; # Enables frame interpolation for smoother playback
video-sync = "display-resample"; # Synchronizes video playback to the display's refresh rate
sub-visibility = true; # Hides subtitles by default
sub-auto = "fuzzy"; # Automatically loads subtitles if their filename is similar to the video file
sub-font = rice.font.base.name;
# sub-blur = 10; # this blurs the whole thing, text aswell
sub-color = rice.color.accent.bright;
sub-back-color = "${rice.color.background}${rice.lib.float-to-drune 0.8}"; # does not seem to work
# sub-border-size = 0;
sub-border-style = "opaque-box";
background-color = "${rice.color.background}"; # transparency breaks blur on hyprland sometimes, so just rgb
alang = "en,eng,de,ger"; # Sets preferred audio languages in order
slang = "en,eng,de,ger"; # Sets preferred subtitle languages in order
vlang = "en,eng,de,ger"; # Sets preferred video languages in order
save-position-on-quit = true; # Saves the playback position when quitting
ignore-path-in-watch-later-config = true; # Ignores the path in the watch-later configuration
ytdl-format = "bestvideo[height<=?1080]+bestaudio/best"; # Sets the format for downloading YouTube videos
vo = pkgs.lib.mkIf hyper.nvidia.enable "gpu";
hwdec = if hyper.nvidia.enable then "no" else "no"; # bugged
};
scripts = with pkgs.mpvScripts; [
mpris # use media keys
thumbfast # thumbnails on timeline hover
uosc # custom ui
# uosc # custom ui
sponsorblock
];
bindings = {
O = ''no-osd cycle-values glsl-shaders "~~/shaders/invert.glsl" ""; show-text "Invert Shader"'';
"O" = ''no-osd cycle-values glsl-shaders "~~/shaders/invert.glsl" ""; show-text "Invert Shader"'';
# "tab" = ''script-binding uosc/toggle-ui'';
# "space" = ''cycle pause; script-binding uosc/flash-pause-indicator'';
# "right" = ''seek 5'';
# "left" = ''seek -5'';
# "shift+right" = ''seek 30; script-binding uosc/flash-timeline'';
# "shift+left" = ''seek -30; script-binding uosc/flash-timeline'';
# "m" = ''no-osd cycle mute; script-binding uosc/flash-volume'';
# "up" = ''no-osd add volume 10; script-binding uosc/flash-volume'';
# "down" = ''no-osd add volume -10; script-binding uosc/flash-volume'';
# "[" = ''no-osd add speed -0.25; script-binding uosc/flash-speed'';
# "]" = ''no-osd add speed 0.25; script-binding uosc/flash-speed'';
# "\\" = ''no-osd set speed 1; script-binding uosc/flash-speed'';
# ">" = ''script-binding uosc/next; script-message-to uosc flash-elements top_bar,timeline'';
# "<" = ''script-binding uosc/prev; script-message-to uosc flash-elements top_bar,timeline>'';
};
scriptOpts = {
thumbfast = {
@@ -29,7 +68,7 @@
};
};
};
xdg.configfile."mpv/shaders/invert.glsl".text = /* glsl */ ''
xdg.configFile."mpv/shaders/invert.glsl".text = /* glsl */ ''
//!HOOK LUMA
//!BIND HOOKED
vec4 hook()

View File

@@ -2,7 +2,6 @@
home.packages = with pkgs; [
chromium
element-desktop
mpv
qbittorrent
unstable.spotify
wl-clipboard

View File

@@ -20,7 +20,6 @@
lolcat
lynx
mediainfo
mpv
neofetch
pastel
pdfgrep