Skip to content

Commit

Permalink
Add my-htop; ncmpcpp: remove obsolete parts from patch
Browse files Browse the repository at this point in the history
  • Loading branch information
42LoCo42 committed Feb 27, 2024
1 parent ce0fb20 commit 8ea0099
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 29 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- m9u: A 9P music server - https://sqweek.net/code/m9u/
- msp-cgt: MSP430 code generation tools - https://www.ti.com/tool/MSP-CGT
- mspgcc-ti: Open Source Compiler for MSP Microcontrollers - https://www.ti.com/tool/MSP430-GCC-OPENSOURCE
- my-htop: htop with sorting in tree mode fixed - https://htop.dev
- my-ncmpcpp: ncmpcpp except the media library always shows Albums - Songs - https://rybczak.net/ncmpcpp/
- nixci: Define and build CI for Nix projects anywhere - https://github.com/srid/nixci
- prettier-plugin-go-template: Fixes prettier formatting for go templates - https://github.com/NiklasPor/prettier-plugin-go-template
Expand Down
21 changes: 18 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,24 @@
samloader = pkgs.callPackage ./packages/samloader.nix { };
wayland-shell = pkgs.callPackage ./packages/wayland-shell.nix { inherit gtk4-layer-shell; };

my-ncmpcpp = pkgs.ncmpcpp.overrideAttrs {
my-ncmpcpp = pkgs.ncmpcpp.overrideAttrs (old: {
patches = [ ./packages/my-ncmpcpp.patch ];
};
meta = old.meta // {
description = "ncmpcpp except the media library always shows Albums - Songs";
};
});

my-htop = pkgs.htop.overrideAttrs (old: rec {
version = "5d778ea";
src = pkgs.fetchFromGitHub {
inherit (old.src) owner repo;
rev = version;
hash = "sha256-EAqirkDle0VbG4VEaiWwIAgISP8JsUAkgfkGQWAAXkc=";
};
meta = old.meta // {
description = "htop with sorting in tree mode fixed";
};
});
};

nixosModules = {
Expand All @@ -72,7 +87,7 @@
(nixpkgs.lib.mapAttrsToList (name: p:
"- ${name}: ${p.meta.description or "no description"} - ${p.meta.homepage or "no homepage"}"))
(builtins.concatStringsSep "\n")
(s: "# Packages\n" + s)
(s: "# Packages\n" + s + "\n")
];
};
}
26 changes: 0 additions & 26 deletions packages/my-ncmpcpp.patch
Original file line number Diff line number Diff line change
Expand Up @@ -51,29 +51,3 @@ index 558458d..f873704 100644

Tags.clear();
Albums.clear();
diff --git a/src/settings.cpp b/src/settings.cpp
index 80a2b4e..d86e26e 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -444,9 +444,11 @@ bool Configuration::read(const std::vector<std::string> &config_paths, bool igno
p.add("user_interface", &design, "classic");
p.add("data_fetching_delay", &data_fetching_delay, "yes", yes_no);
p.add("media_library_hide_album_dates", &media_lib_hide_album_dates, "no", yes_no);
- p.add("media_library_primary_tag", &media_lib_primary_tag, "artist", [](std::string v) {
+ p.add("media_library_primary_tag", &media_lib_primary_tag, "album", [](std::string v) {
if (v == "artist")
return MPD_TAG_ARTIST;
+ else if (v == "album")
+ return MPD_TAG_ALBUM;
else if (v == "album_artist")
return MPD_TAG_ALBUM_ARTIST;
else if (v == "date")
@@ -507,7 +509,7 @@ bool Configuration::read(const std::vector<std::string> &config_paths, bool igno
});
}
});
- p.add("startup_screen", &startup_screen_type, "playlist", [](std::string v) {
+ p.add("startup_screen", &startup_screen_type, "media_library", [](std::string v) {
auto screen = stringtoStartupScreenType(v);
if (screen == ScreenType::Unknown)
invalid_value(v);

0 comments on commit 8ea0099

Please sign in to comment.