diff options
| author | adikro <adikro@disroot.org> | 2025-12-29 23:50:05 +0100 |
|---|---|---|
| committer | adikro <adikro@disroot.org> | 2025-12-29 23:50:05 +0100 |
| commit | 05ae56295ae0d7bf99d9580ef5ff1f209259733a (patch) | |
| tree | b8eefbd8d0315d51b53b24889dfdd6c6e3093a29 /hm | |
| parent | bd0047d2c4826214bcedf4c1a57d010bb407034d (diff) | |
added GLSL shaders and some shit i dont understand to mpv
Diffstat (limited to 'hm')
| -rw-r--r-- | hm/shell/fish.nix | 1 | ||||
| -rw-r--r-- | hm/shell/foot.nix | 19 | ||||
| -rw-r--r-- | hm/soft/mpv.nix | 143 | ||||
| -rw-r--r-- | hm/soft/nixcord.nix | 6 |
4 files changed, 144 insertions, 25 deletions
diff --git a/hm/shell/fish.nix b/hm/shell/fish.nix index 9fb6a29..88a4493 100644 --- a/hm/shell/fish.nix +++ b/hm/shell/fish.nix @@ -30,6 +30,7 @@ in ff = "fastfetch"; cat = "bat"; ls = "eza"; + yt = "yt-dlp"; }; plugins = [ diff --git a/hm/shell/foot.nix b/hm/shell/foot.nix index a9c3eac..c840b5e 100644 --- a/hm/shell/foot.nix +++ b/hm/shell/foot.nix @@ -1,11 +1,14 @@ { pkgs, lib, config, ... }: + let cfg = config.hm.shell.foot; - footTheme = pkgs.fetchurl { - url = "https://codeberg.org/dnkl/foot/src/branch/master/themes/gruvbox-dark"; - sha256 = ""; - }; + footTheme = pkgs.runCommand "gruvbox-dark" { } '' + sed 's/\[colors-dark\]/\[colors\]/g' ${pkgs.fetchurl { + url = "https://codeberg.org/dnkl/foot/raw/branch/master/themes/gruvbox-dark"; + sha256 = "sha256-hlmLklG/vAEDy8I+k13+o4ZR6Cq6lTxOconjf9M75eo="; + }} > $out + ''; in { options.hm.shell.foot = { @@ -16,21 +19,19 @@ in description = "Font size for the foot terminal"; }; }; + config = lib.mkIf cfg.enable { programs.foot = { enable = true; settings = { main = { font = "JetBrainsMonoNFM-Regular:size=${toString cfg.fontSize}"; - box-drawings-uses-font-glyphs = "yes"; - include = "${footTheme}"; + box-drawings-uses-font-glyphs = true; + include = "${footTheme}"; }; scrollback = { lines = 10000; }; - mouse = { - hide-when-typing = "yes"; - }; }; }; }; diff --git a/hm/soft/mpv.nix b/hm/soft/mpv.nix index 8df73e7..ec69c33 100644 --- a/hm/soft/mpv.nix +++ b/hm/soft/mpv.nix @@ -1,45 +1,160 @@ { config, lib, pkgs, ... }: let cfg = config.hm.soft.mpv; - shim_dir = "${pkgs.mpv-shim-default-shaders}/share/mpv-shim-default-shaders/shaders"; - anime4k_dir = "${pkgs.anime4k}" + s = "~~/shaders/shim"; in { options.hm.soft.mpv.enable = lib.mkEnableOption "mpv media player"; + config = lib.mkIf cfg.enable { home.packages = with pkgs; [ - anime4k mpv-shim-default-shaders ]; + + home.file = { + ".config/mpv/shaders/shim".source = "${pkgs.mpv-shim-default-shaders}/share/mpv-shim-default-shaders/shaders"; + }; + programs.mpv = { enable = true; + + bindings = { + "CTRL+1" = "apply-profile movie-ultra; show-text \"Movie Ultra Active\""; + "CTRL+2" = "apply-profile anime-mode-a; show-text \"Anime4K: Mode A (UL)\""; + "CTRL+3" = "apply-profile anime-mode-b; show-text \"Anime4K: Mode B (UL)\""; + "CTRL+4" = "apply-profile anime-mode-c; show-text \"Anime4K: Mode C (UL)\""; + "CTRL+5" = "apply-profile anime-mode-aa; show-text \"Anime4K: Mode A+A (UL)\""; + "CTRL+6" = "apply-profile anime-mode-bb; show-text \"Anime4K: Mode B+B (UL)\""; + "CTRL+7" = "apply-profile anime-mode-ca; show-text \"Anime4K: Mode C+A (UL)\""; + "CTRL+0" = "apply-profile restore; show-text \"Shaders Cleared / Defaults Restored\""; + + "s" = "screenshot"; + "WHEEL_UP" = "add volume 2"; + "WHEEL_DOWN" = "add volume -2"; + "Q" = "quit-watch-later"; + }; + config = { - # general stuff - save-position-on-quit = true; keep-open = "yes"; - - # video profile = "gpu-hq"; gpu-api = "vulkan"; vo = "gpu-next"; hwdec = "auto"; - # audio - ao = "pipewire"; + scale = "ewa_lanczossharp"; + cscale = "ewa_lanczos"; + dscale = "mitchell"; + scale-antiring = 0.6; + cscale-antiring = 0.6; + + deband = "yes"; + deband-iterations = 2; + deband-threshold = 35; + dither-depth = "auto"; + dither = "fruit"; + sub-auto = "fuzzy"; - volume-max = "200"; + sub-ass-override = "force"; + blend-subtitles = "no"; + slang = "enm,eng,en,enCA,enUS"; - # network streaming + ao = "pipewire"; + volume-max = "200"; demuxer-max-back-bytes = "50Mib"; demuxer-max-bytes = "600Mib"; demuxer-readahead-secs = 300; force-seekable = "yes"; - # screenshotting screenshot-format = "png"; - screenshot-directory = "~/${config.hm.conf.xdg-dirs.mediaPath}/pics/ss"; + screenshot-sw = "no"; + screenshot-directory = "${toString config.hm.conf.xdg-dirs.mediaPath}/pics/ss"; screenshot-template = "mpv-%f-%wH.%wM.%wS-#%#00n"; }; + + profiles = { + "movie-ultra" = { + glsl-shaders = lib.concatStringsSep ":" [ + "${s}/KrigBilateral.glsl" + "${s}/FSRCNNX_x2_16-0-4-1.glsl" + "${s}/SSimDownscaler.glsl" + "${s}/CAS-scaled.glsl" + ]; + scale = "ewa_lanczos"; + linear-upscaling = "yes"; + sigmoid-upscaling = "yes"; + }; + + "anime-mode-a" = { + glsl-shaders = lib.concatStringsSep ":" [ + "${s}/Anime4K_Clamp_Highlights.glsl" + "${s}/Anime4K_Restore_CNN_UL.glsl" + "${s}/Anime4K_Upscale_CNN_x2_UL.glsl" + "${s}/Anime4K_AutoDownscalePre_x2.glsl" + "${s}/Anime4K_AutoDownscalePre_x4.glsl" + "${s}/Anime4K_Upscale_CNN_x2_UL.glsl" + ]; + }; + + "anime-mode-b" = { + glsl-shaders = lib.concatStringsSep ":" [ + "${s}/Anime4K_Clamp_Highlights.glsl" + "${s}/Anime4K_Restore_CNN_Soft_UL.glsl" + "${s}/Anime4K_Upscale_CNN_x2_UL.glsl" + "${s}/Anime4K_AutoDownscalePre_x2.glsl" + "${s}/Anime4K_AutoDownscalePre_x4.glsl" + "${s}/Anime4K_Upscale_CNN_x2_UL.glsl" + ]; + }; + + "anime-mode-c" = { + glsl-shaders = lib.concatStringsSep ":" [ + "${s}/Anime4K_Clamp_Highlights.glsl" + "${s}/Anime4K_Upscale_Denoise_CNN_x2_UL.glsl" + "${s}/Anime4K_AutoDownscalePre_x2.glsl" + "${s}/Anime4K_AutoDownscalePre_x4.glsl" + "${s}/Anime4K_Upscale_CNN_x2_UL.glsl" + ]; + }; + + "anime-mode-aa" = { + glsl-shaders = lib.concatStringsSep ":" [ + "${s}/Anime4K_Clamp_Highlights.glsl" + "${s}/Anime4K_Restore_CNN_UL.glsl" + "${s}/Anime4K_Upscale_CNN_x2_UL.glsl" + "${s}/Anime4K_Restore_CNN_UL.glsl" + "${s}/Anime4K_Upscale_CNN_x2_UL.glsl" + ]; + }; + + "anime-mode-bb" = { + glsl-shaders = lib.concatStringsSep ":" [ + "${s}/Anime4K_Clamp_Highlights.glsl" + "${s}/Anime4K_Restore_CNN_Soft_UL.glsl" + "${s}/Anime4K_Upscale_CNN_x2_UL.glsl" + "${s}/Anime4K_AutoDownscalePre_x2.glsl" + "${s}/Anime4K_AutoDownscalePre_x4.glsl" + "${s}/Anime4K_Restore_CNN_Soft_UL.glsl" + "${s}/Anime4K_Upscale_CNN_x2_UL.glsl" + ]; + }; + + "anime-mode-ca" = { + glsl-shaders = lib.concatStringsSep ":" [ + "${s}/Anime4K_Clamp_Highlights.glsl" + "${s}/Anime4K_Upscale_Denoise_CNN_x2_UL.glsl" + "${s}/Anime4K_AutoDownscalePre_x2.glsl" + "${s}/Anime4K_AutoDownscalePre_x4.glsl" + "${s}/Anime4K_Restore_CNN_UL.glsl" + "${s}/Anime4K_Upscale_CNN_x2_UL.glsl" + ]; + }; + + "restore" = { + glsl-shaders = ""; + scale = "ewa_lanczossharp"; + }; + }; + scripts = with pkgs.mpvScripts; [ webtorrent-mpv-hook visualizer @@ -53,8 +168,10 @@ in memo autosubsync-mpv autosub + sponsorblock ]; }; + hm.soft = { media.enable = true; yt-dlp.enable = true; diff --git a/hm/soft/nixcord.nix b/hm/soft/nixcord.nix index c948a4d..4d87901 100644 --- a/hm/soft/nixcord.nix +++ b/hm/soft/nixcord.nix @@ -28,9 +28,9 @@ in ClearURLs.enable = true; CopyUserURLs.enable = true; NoRPC.enable = true; - OnePingPerDm.enable = true; + OnePingPerDM.enable = true; PinDMs = { enable = true; canCollapseDmSection = true; }; - SaveFavoriteGiFs.enable = true; + SaveFavoriteGIFs.enable = true; altKrispSwitch.enable = true; alwaysExpandRoles = { enable = true; hideArrow = true; }; alwaysTrust = { enable = true; domain = false; }; @@ -131,7 +131,7 @@ in stickerBlocker.enable = true; streamerModeOnStream.enable = true; streamingCodecDisabler = { enable = true; disableH264Codec = true; disableH265Codec = true; disableVP8Codec = true; disableVP9Codec = true; }; - superReactionTweaks = { enable = true; superReactionPlayingLimit = 0; }; + superReactionTweaks = { enable = true; superReactionPlayingLimit = 0.0; }; themeLibrary.enable = true; typingIndicator.enable = true; typingTweaks.enable = true; |
