edit 2scan script and fix playlist-check script

This commit is contained in:
2026-10-02 18:05:07 +02:00
parent 12eacb13ad
commit cf2acc3517
6 changed files with 38 additions and 28 deletions
Generated
+18 -18
View File
@@ -197,11 +197,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1790779675, "lastModified": 1790365885,
"narHash": "sha256-wswYlVaovcex/IMSqGrN/GLlvHN29bgoIXMBoMyLmTI=", "narHash": "sha256-iQ0ebhiVo64NktTnwft9hNxlFu4j5cvljVxyJaEVIP4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "b75a0703c9ef757386ec3807a55106c2ca64f770", "rev": "7b4c5ec4bedaf1e062bbc1bcaeddbc6bd242aa1b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -608,11 +608,11 @@
}, },
"locked": { "locked": {
"dir": "packages/nix", "dir": "packages/nix",
"lastModified": 1790520975, "lastModified": 1790436482,
"narHash": "sha256-kk+bzZx7d+noy1YPrbt2Z0GBUzxKykU/+1clGCIPHQ8=", "narHash": "sha256-MoAzY+nzgUfUfjhQn6kSRUlu8lGw2t6zcWtAftT7WVU=",
"owner": "SteamClientHomebrew", "owner": "SteamClientHomebrew",
"repo": "Millennium", "repo": "Millennium",
"rev": "847e0dad6c33ab9f11bdd4e7ca2e90cd26aef416", "rev": "1e65b76114450a505905432bfeae0cf87b6d286e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -747,11 +747,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1790786871, "lastModified": 1790453618,
"narHash": "sha256-0TCFPiIKX8V5D/lgdPKy9AyiOpiv4gfV9PgnnFgvapo=", "narHash": "sha256-JHgWsw0YTbJ1uzXG+tyzXdpth2AzZ1NABlqzdXEiPws=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ab461358c67a43725fd6feabc5515adf1be38d81", "rev": "58350867fbd6c2568e9cba182d17ed47ac52af44",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -815,11 +815,11 @@
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1790541651, "lastModified": 1790359697,
"narHash": "sha256-/496IQz8qNWHHLnc3Zvr0l4uxJ34igNhJhn7ZKAefFk=", "narHash": "sha256-AIMlxsdXEAiv7KQQ/fcarzqe541iUrT+hCUVS71CrJI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "5980a626794486abad69fca7667f9c11dfbc3bd7", "rev": "4571c7a95787165cc7102d417a0fe4519bf6a995",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -898,11 +898,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1790498116, "lastModified": 1790247521,
"narHash": "sha256-rs9meAYxW3zzrh43yaW7htrqCD+X9+pupDPHN86fumI=", "narHash": "sha256-TNfgoHsqsYYvaJImlWctfRkh4PseTagzegU1Dgdbehw=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "5efb5a6f4f5ab192817d28557dd4d650fa14d866", "rev": "2bd00bd9bb35fe6d114888c8f1c2e946c541dd8f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1068,11 +1068,11 @@
"nixpkgs": "nixpkgs_7" "nixpkgs": "nixpkgs_7"
}, },
"locked": { "locked": {
"lastModified": 1790742031, "lastModified": 1790402100,
"narHash": "sha256-zno5kJyjkflDauJgy9NHyoHfhAr0S2kCCMEwaHJ0a6A=", "narHash": "sha256-f/tmhFat/UHra627JbVg6calQ3/ZkEydQZJR71BBX0M=",
"owner": "0xc000022070", "owner": "0xc000022070",
"repo": "zen-browser-flake", "repo": "zen-browser-flake",
"rev": "90424e159acc21e53ea76780a3ad9cb5acef7cba", "rev": "b851b56b787a61b900751aca2f17e4a5ca6c394a",
"type": "github" "type": "github"
}, },
"original": { "original": {
-2
View File
@@ -58,8 +58,6 @@
}; };
}; };
services.remmina.enable = true;
home.pointerCursor = { home.pointerCursor = {
enable = true; enable = true;
gtk.enable = true; gtk.enable = true;
+1
View File
@@ -35,5 +35,6 @@
udiskie.enable = true; udiskie.enable = true;
awww.enable = true; awww.enable = true;
mpdris2.enable = true; mpdris2.enable = true;
remmina.enable = true;
}; };
} }
+2
View File
@@ -78,6 +78,8 @@
yabridge yabridge
yabridgectl yabridgectl
wineWow64Packages.yabridge wineWow64Packages.yabridge
rsgain
flac
]; ];
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
+1
View File
@@ -25,6 +25,7 @@
# auto_update "yes" # auto_update "yes"
max_playlist_length "131072" max_playlist_length "131072"
max_output_buffer_size "32768" max_output_buffer_size "32768"
replaygain "track"
''; '';
}; };
+16 -8
View File
@@ -12,15 +12,23 @@
' _ {} | sort ' _ {} | sort
'') '')
# (pkgs.writeShellScriptBin "2scan" ''
# find . -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.m4a" -o -iname "*.ogg" -o -iname "*.wav" -o -iname "*.aiff" \) -print0 |
# xargs -0 -P"$(nproc)" -I{} sh -c '
# if ! ffprobe -v quiet -show_entries format_tags \
# -of default=nw=1:nk=1 "$1" 2>/dev/null |
# grep -q -E "Visit https?://[^ ]+"; then
# echo "Match found in: $1"
# fi
# ' _ {}
# '')
(pkgs.writeShellScriptBin "2scan" '' (pkgs.writeShellScriptBin "2scan" ''
find . -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.m4a" -o -iname "*.ogg" -o -iname "*.wav" -o -iname "*.aiff" \) -print0 | fd -e flac -e mp3 -e m4a -e aiff -x sh -c '
xargs -0 -P"$(nproc)" -I{} sh -c ' if ! strings "$1" | grep -qE "^COMMENT=Visit https?://[^ ]+"; then
if ! ffprobe -v quiet -show_entries format_tags \ echo "Match found in: $1"
-of default=nw=1:nk=1 "$1" 2>/dev/null |
grep -q -E "Visit https?://[^ ]+"; then
echo "Match found in: $1"
fi fi
' _ {} ' sh {}
'') '')
(pkgs.writeShellScriptBin "enable-hypervisor" '' (pkgs.writeShellScriptBin "enable-hypervisor" ''
@@ -38,7 +46,7 @@
BASENAME="/home/user/Music/$SELECTED_SONGS" BASENAME="/home/user/Music/$SELECTED_SONGS"
# echo $BASENAME | kitty +kitten clipboard # echo $BASENAME | kitty +kitten clipboard
shopt -s extglob shopt -s extglob
if grep -q "$BASENAME" "$PLAYLIST_DIR"/!(active\ -\ new|other\ -\ lostfrog).m3u if grep -qF "$BASENAME" "$PLAYLIST_DIR"/!(active\ -\ new|other\ -\ lostfrog).m3u
then then
notify-send "Song is in a playlist"; notify-send "Song is in a playlist";
else else