old
1{pkgs, ...}: let
2 lyricbar = pkgs.stdenv.mkDerivation {
3 pname = "deadbeef-lyricbar-plugin-modified";
4 version = "unstable-2024-10-24";
5 src = pkgs.fetchFromGitHub {
6 owner = "wind-mask";
7 repo = "deadbeef-lyricbar";
8 rev = "b28f9c9cafd9200db8fb8f0639ab44d23042bc39";
9 sha256 = "Nho9aF6SiqtkdIgXQ0FCM89wGM9VFIA25sfIffHIoZ8=";
10 };
11 nativeBuildInputs = [pkgs.pkg-config];
12 buildInputs = with pkgs; [
13 deadbeef
14 gtkmm3
15 curl
16 taglib_1
17 ];
18 NIX_CFLAGS_COMPILE = "-Wno-incompatible-pointer-types";
19 buildFlags = ["gtk3"];
20 };
21in {
22 programs.deadbeef = {
23 enable = true;
24 package = pkgs.deadbeef-with-plugins;
25 plugins = with pkgs.deadbeefPlugins; [
26 mpris2
27 lyricbar
28 ];
29 settings = {
30 close_send_to_tray = 1;
31 "gtkui.override_bar_colors" = 1;
32 "lyricbar.backgroundcolor" = "#24273a";
33 "lyricbar.highlightcolor" = "#c6a0f6";
34 "lyricbar.regularcolor" = "#cad3f5";
35 "junk.enable_cp936_detection" = 1;
36 gtkui.layout = {
37 type = "hsplitter";
38 legacy_params = " locked=2 ratio=0.76 pos=0 size2=360";
39 children = [
40 {
41 type = "vbox";
42 legacy_params = " expand=\"1 0\" fill=\"1 1\" homogeneous=0";
43 children = [
44 {
45 type = "hsplitter";
46 legacy_params = " locked=0 ratio=0.25 pos=0 size2=0";
47 children = [
48 {
49 type = "vsplitter";
50 legacy_params = " locked=0 ratio=0.5 pos=0 size2=0";
51 children = [
52 {type = "medialibviewer";}
53 {type = "pltbrowser";}
54 ];
55 }
56 {
57 type = "playlist";
58 legacy_params = " hideheaders=0 width=604";
59 }
60 ];
61 }
62 {
63 type = "hbox";
64 legacy_params = " expand=\"0 1 0\" fill=\"0 1 0\" homogeneous=0";
65 children = [
66 {type = "playtb";}
67 {type = "seekbar";}
68 {
69 type = "volumebar";
70 settings = {
71 scale = "db";
72 };
73 }
74 ];
75 }
76 ];
77 }
78 {
79 type = "vsplitter";
80 legacy_params = " locked=2 ratio=0.9 pos=0 size2=90";
81 children = [
82 {
83 type = "vsplitter";
84 legacy_params = " locked=1 ratio=0.48 pos=360 size2=0";
85 children = [
86 {
87 type = "coverart";
88 settings.mode = "selected";
89 }
90 {type = "lyricbar";}
91 ];
92 }
93 {
94 type = "spectrum";
95 settings = {
96 renderMode = "bands";
97 distanceBetweenBars = "3";
98 barGranularity = "2";
99 };
100 }
101 ];
102 }
103 ];
104 };
105 gtkui.columns.playlist = [
106 {
107 title = "♫";
108 id = "1";
109 format = "%playstatus%";
110 sort_format = "";
111 size = "30";
112 align = "0";
113 color_override = "0";
114 color = "#ff000000";
115 }
116 {
117 title = "标题";
118 id = "-1";
119 format = "%title%";
120 sort_format = "";
121 size = "250";
122 align = "0";
123 color_override = "0";
124 color = "#ff000000";
125 }
126 {
127 title = "艺人";
128 id = "-1";
129 format = "$if(%artist%,%artist%,Unknown Artist)";
130 sort_format = "";
131 size = "200";
132 align = "0";
133 color_override = "0";
134 color = "#ff000000";
135 }
136 {
137 title = "专辑";
138 id = "-1";
139 format = "%album%";
140 sort_format = "";
141 size = "250";
142 align = "0";
143 color_override = "0";
144 color = "#ff000000";
145 }
146 ];
147 };
148 };
149}