From 36a8b8ab96e17926ca10b6c93a6bad4aeabae223 Mon Sep 17 00:00:00 2001 From: Matt Nish-Lapidus Date: Wed, 14 May 2025 14:16:27 -0400 Subject: [PATCH] yazi --- modules/home/beets.nix | 135 ++--------------------------------- modules/home/niri.nix | 1 + modules/home/yazi.nix | 2 +- modules/home/yazi/theme.toml | 6 ++ 4 files changed, 14 insertions(+), 130 deletions(-) diff --git a/modules/home/beets.nix b/modules/home/beets.nix index 1899e88..9d71f9f 100644 --- a/modules/home/beets.nix +++ b/modules/home/beets.nix @@ -1,14 +1,9 @@ { config, lib, pkgs, ... }: { - # home.packages = with pkgs; [ - # beets - # ]; - # xdg.configFile."beets/config.yaml".source = ./beets/config.yaml; - - programs.beets = { - enable = true; - package = (pkgs.beets.override { + home.packages = with pkgs; [ + # beets + (beets.override { pluginOverrides = { fish.enable = true; discogs.enable = true; @@ -30,126 +25,8 @@ mpdupdate.enable = true; fuzzy.enable = true; }; - }); - mpdIntegration = { - enableUpdate = true; - }; - settings = { - directory = "/mnt/filez/media/Music"; - library = "~/.config/beets/library.db"; - asciify_paths = "yes"; - import = { - move = "yes"; - copy = "no"; - write = "yes"; - autotag = "yes"; - incremental = "yes"; - incremental_skip_later = "yes"; - resume = "ask"; - quiet_fallback = "asis"; - log = "~/beets.log"; - none_rec_action = "asis"; - duplicate_action = "merge"; - default_action = "asis"; - }; - # plugins = "fish discogs the duplicates embedart fetchart mbsync missing unimported inline lastgenre albumtypes ftintitle plexupdate importadded edit info mpdupdate"; - match = { - ignored_media = [ - "Data CD" - "DVD" - "DVD-Video" - "Blu-ray" - "HD-DVD" - "VCD" - "SVCD" - "UMD" - "VHS" - ]; - preferred = { - countries = [ - "US" - "CA" - "GB|UK" - ]; - original_year = "yes"; - }; - }; - item_fields = { - multidisc = "1 if disctotal > 1 else 0"; - }; - unimported = { - ignore_extensions = "jpg png"; - ignore_subdirectories = "NonMusic data temp"; - }; - discogs = { - user_token = "FhRYPcATYbmLajnzLMTqzwovNGFvZeMdVxIHsAAn"; - index_tracks = "yes"; - append_style_genre = "yes"; - separator = "; "; - }; - musicbrainz = { - extra_tags = [ - "year" - "catalognum" - "label" - ]; - genres = "yes"; - }; - aunique = { - keys = "albumartist album"; - disambiguators = "albumtype year label catalognum albumdisambig releasegroupdisambig"; - bracket = "[]"; - }; - per_disc_numbering = "yes"; - fetchart = { - cautious = "yes"; - }; - albumtypes = { - types = [ - { ep = "EP"; } - { single = "Single"; } - { soundtrack = "OST"; } - { live = "Live"; } - { compilation = "Compilation"; } - { remix = "Remix"; } - ]; - ignore_va = "compilation"; - bracket = "[]"; - }; - lastgenre = { - auto = "yes"; - prefer_specific = "no"; - count = 3; - separator = "; "; - force = "yes"; - source = "album"; - fallback = "Unclassified"; - whitelist = "yes"; - }; - plex = { - host = "media-server"; - port = 32400; - token = "DpUEsDtn43fiMEyzsTZ3"; - }; - paths = { - default = "%the{$albumartist}%ifdef{artistdisambig,(\${artistdisambig})}/$album%aunique{}/%if{$multidisc,$disc-}$track - $title"; - comp = "Various Artists/$album%aunique{}/$album%aunique{}/%if{$multidisc,$disc-}$track - $title"; - }; - importadded = { - preserve_mtimes = "yes"; - preserve_write_mtimes = "yes"; - }; - ui = { - color = "yes"; - }; - album_fields = { - format = ''formatList = [] -for item in items: - formatList.append(item.format) -return formatList -''; - }; - }; - }; + }) + ]; + xdg.configFile."beets/config.yaml".source = ./beets/config.yaml; } diff --git a/modules/home/niri.nix b/modules/home/niri.nix index 6bfd622..5b5372f 100644 --- a/modules/home/niri.nix +++ b/modules/home/niri.nix @@ -476,6 +476,7 @@ in "Mod+F".action = maximize-column; "Mod+Shift+F".action = fullscreen-window; "Mod+C".action = center-column; + "Mod+Alt+C".action = center-visible-columns; "Mod+Minus".action = set-column-width "-10%"; "Mod+Equal".action = set-column-width "+10%"; diff --git a/modules/home/yazi.nix b/modules/home/yazi.nix index 70f584b..9dc8cce 100644 --- a/modules/home/yazi.nix +++ b/modules/home/yazi.nix @@ -81,7 +81,7 @@ { on = ["g" "p"]; run = "cd ~/Projects"; desc = "Go to ~/Projects"; } { on = ""; run ="tab_create"; } - { on = ""; run ="tab_close"; } + { on = ""; run ="close"; } { on = ""; run ="tab_switch 1 --relative"; } { on = ""; run ="tab_switch -1 --relative"; } { on = ""; run ="tab_switch 0"; } diff --git a/modules/home/yazi/theme.toml b/modules/home/yazi/theme.toml index aaacbbb..b13b1d0 100644 --- a/modules/home/yazi/theme.toml +++ b/modules/home/yazi/theme.toml @@ -5,3 +5,9 @@ dark = "onedark" overall = { bg = "#282C34" } sep_left = { open = "", close = "" } sep_right = { open = "", close = "" } + +[tabs] +active = { bg = "blue", bold = true } +inactive = { fg = "blue", bg = "#282C34" } +sep_inner = { open = "", close = "" } +sep_outer = { open = "", close = "" }