feat: playing around with mpd and rmpc

This commit is contained in:
Nick 2025-11-25 03:10:38 -06:00
parent 8a06bb05fe
commit e63236cfcc
5 changed files with 101 additions and 122 deletions

17
modules/home/cli/fun/mpd/default.nix Normal file → Executable file
View file

@ -6,6 +6,10 @@
extraConfig = '' extraConfig = ''
audio_output { audio_output {
type "pulse" type "pulse"
name "PulseAudio"
}
audio_output {
type "fifo"
name "my_fifo" name "my_fifo"
path "/tmp/mpd.fifo" path "/tmp/mpd.fifo"
format "44100:16:2" format "44100:16:2"
@ -18,11 +22,20 @@
format = { format = {
hosts = [ "localhost:6600" ]; hosts = [ "localhost:6600" ];
details = "$title"; details = "$title";
state = "$artist"; state = "🥒💦$artist";
display_type = "state"; display_type = "state";
}; };
}; };
}; };
}; };
programs.cava.enable = true;
programs.cava = {
enable = true;
settings = {
input = {
method = "fifo";
source = "/tmp/mpd.fifo";
};
};
};
} }

168
modules/home/cli/fun/rmpc/config/catppuccin-macchiato.ron Normal file → Executable file
View file

@ -5,62 +5,62 @@
show_song_table_header: false, show_song_table_header: false,
draw_borders: true, draw_borders: true,
browser_column_widths: [20, 38, 42], browser_column_widths: [20, 38, 42],
background_color: "#2e3440", background_color: "#24273a",
modal_backdrop: true, modal_backdrop: true,
text_color: "#d8dee9", text_color: "#b7bdf8",
header_background_color: "#2e3440", header_background_color: "#24273a",
modal_background_color: "#2e3440", modal_background_color: "#24273a",
preview_label_style: (fg: "#b48ead"), preview_label_style: (fg: "#cba6f7"),
preview_metadata_group_style: (fg: "#81a1c1"), preview_metadata_group_style: (fg: "#8aadf4"),
song_table_album_separator: None, song_table_album_separator: None,
tab_bar: ( tab_bar: (
enabled: true, enabled: true,
active_style: (fg: "#2e3440", bg: "#81A1C1", modifiers: "Bold"), active_style: (fg: "#24273a", bg: "#8aadf4", modifiers: "Bold"),
inactive_style: (fg: "#d8dee9", bg: "#2e3440"), inactive_style: (fg: "#b7bdf8", bg: "#24273a"),
), ),
highlighted_item_style: (fg: "#a3be8c", modifiers: "Bold"), highlighted_item_style: (fg: "#a6e3a1", modifiers: "Bold"),
current_item_style: (fg: "#2e3440", bg: "#81a1c1", modifiers: "Bold"), current_item_style: (fg: "#24273a", bg: "#8aadf4", modifiers: "Bold"),
borders_style: (fg: "#81a1c1", modifiers: "Bold"), borders_style: (fg: "#8aadf4", modifiers: "Bold"),
highlight_border_style: (fg: "#81a1c1"), highlight_border_style: (fg: "#8aadf4"),
symbols: (song: "󰝚 ", dir: " ", playlist: "󰲸 ", marker: "* ", ellipsis: "...", symbols: (song: "󰝚 ", dir: " ", playlist: "󰲸 ", marker: "* ", ellipsis: "...",
song_style: (fg: "#81a1c1"), dir_style: (fg: "#81a1c1") song_style: (fg: "#8aadf4"), dir_style: (fg: "#8aadf4")
), ),
progress_bar: ( progress_bar: (
symbols: [" ", "█", "█", " ", " "], symbols: ["", "█", "", "█", ""],
track_style: (fg: "#1e2030"), track_style: (fg: "#24273a"),
elapsed_style: (fg: "blue"), elapsed_style: (fg: "#8aadf4"),
thumb_style: (fg: "blue"), thumb_style: (fg: "#8aadf4", bg: "#24273a"),
), ),
scrollbar: ( scrollbar: (
symbols: ["│", "█", "▲", "▼"], symbols: ["│", "█", "▲", "▼"],
track_style: (), track_style: (),
ends_style: (), ends_style: (),
thumb_style: (fg: "blue"), thumb_style: (fg: "#8aadf4"),
), ),
song_table_format: [ song_table_format: [
( (
prop: (kind: Property(Artist), prop: (kind: Property(Artist),
default: (kind: Text("Unknown")) default: (kind: Text("Unknown"))
), ),
width: "20%", width: "26%",
), ),
( (
prop: (kind: Property(Title), prop: (kind: Property(Title),
default: (kind: Text("Unknown")) default: (kind: Text("Unknown"))
), ),
width: "35%", width: "39%",
), ),
( (
prop: (kind: Property(Album), style: (fg: "white"), prop: (kind: Property(Album), style: (fg: "#b7bdf8"),
default: (kind: Text("Unknown Album"), style: (fg: "white")) default: (kind: Text("Unknown Album"), style: (fg: "#b7bdf8"))
), ),
width: "30%", width: "33%",
), ),
( (
prop: (kind: Property(Duration), prop: (kind: Property(Duration),
default: (kind: Text("-")) default: (kind: Text("-"))
), ),
width: "15%", width: "8%",
alignment: Right, alignment: Right,
), ),
], ],
@ -84,106 +84,102 @@
]), default: (kind: Property(Filename))) ]), default: (kind: Property(Filename)))
], ],
level_styles: ( level_styles: (
info: (fg: "#a3be8c", bg: "#2e3440"), info: (fg: "#a6e3a1", bg: "#24273a"),
warn: (fg: "#ebcb8b", bg: "#2e3440"), warn: (fg: "#f9e2af", bg: "#24273a"),
error: (fg: "#bf616a", bg: "#2e3440"), error: (fg: "#f38ba8", bg: "#24273a"),
debug: (fg: "#d08770", bg: "#2e3440"), debug: (fg: "#fab387", bg: "#24273a"),
trace: (fg: "#b48ead", bg: "#2e3440"), trace: (fg: "#cba6f7", bg: "#24273a"),
), ),
components: { components: {
"custom_song_table_header": Split(borders: "ALL", direction: Horizontal, panes: [ "custom_song_table_header": Split(borders: "ALL", direction: Horizontal, panes: [
(size: "5", pane: Pane(Property(content: [ (size: "27%", pane: Pane(Property(content: [
(kind: Text(" 󰩳"), style: (fg: "#81a1c1")), (kind: Text("  "), style: (fg: "#8aadf4")),
(kind: Text(" Artist "), style: (fg: "#b7bdf8"))
], align: Left)) ], align: Left))
), ),
(size: "21%", pane: Pane(Property(content: [ (size: "36%", pane: Pane(Property(content: [
(kind: Text("Artist "), style: (fg: "#d8dee9")), (kind: Text(" "), style: (fg: "#8aadf4")),
(kind: Text(""), style: (fg: "#81a1c1")) (kind: Text("Title "), style: (fg: "#b7bdf8"))
], align: Left))
),
(size: "39%", pane: Pane(Property(content: [
(kind: Text("Title "), style: (fg: "#d8dee9")),
(kind: Text(""), style: (fg: "#81a1c1"))
], align: Left)) ], align: Left))
), ),
(size: "33%", pane: Pane(Property(content: [ (size: "33%", pane: Pane(Property(content: [
(kind: Text("Album "), style: (fg: "#d8dee9")), (kind: Text("󰀥 "), style: (fg: "#8aadf4")),
(kind: Text("󰀥"), style: (fg: "#81a1c1")) (kind: Text("Album "), style: (fg: "#b7bdf8"))
], align: Left)) ], align: Left))
), ),
(size: "7%", pane: Pane(Property(content: [ (size: "9%", pane: Pane(Property(content: [
(kind: Text("Length "), style: (fg: "#d8dee9")), (kind: Text(" "), style: (fg: "#8aadf4")),
(kind: Text(" "), style: (fg: "#81a1c1")) (kind: Text("Length "), style: (fg: "#b7bdf8"))
], align: Right)) ], align: Right))
), ),
(size: "1", pane: Pane(Property(content: [ (size: "1", pane: Pane(Property(content: [
(kind: Text(" "), style: (fg: "#81a1c1")), (kind: Text(" "), style: (fg: "#8aadf4")),
], align: Left)) ], align: Left))
), ),
]), ]),
"custom-header": Split(direction: Horizontal, panes: [ "custom-header": Split(direction: Horizontal, panes: [
(size: "33%", pane: Split(direction: Vertical, panes: [ (size: "33%", pane: Split(direction: Vertical, panes: [
(size: "100%", pane: Pane(Property(content: [ (size: "100%", pane: Pane(Property(content: [
(kind: Text(""), style: (fg: "#81a1c1", modifiers: "Bold")), (kind: Text(""), style: (fg: "#8aadf4", modifiers: "Bold")),
(kind: Property(Status(StateV2(playing_label: "  ", paused_label: "  ", stopped_label: "  "))),style: (fg: "#d8dee9")), (kind: Property(Status(StateV2(playing_label: "  ", paused_label: "  ", stopped_label: "  "))),style: (fg: "#b7bdf8")),
(kind: Text(" "), style: (fg: "#81a1c1", modifiers: "Bold")), (kind: Text(" "), style: (fg: "#8aadf4", modifiers: "Bold")),
(kind: Property(Widget(ScanStatus)), style: (fg: "#d8dee9", modifiers: "Bold")) (kind: Property(Widget(ScanStatus)), style: (fg: "#b7bdf8", modifiers: "Bold"))
], align: Left)) ], align: Left))
), ),
(size: "100%", pane: Pane(Property(content: [ (size: "100%", pane: Pane(Property(content: [
(kind: Text("[ "),style: (fg: "#81a1c1", modifiers: "Bold")), (kind: Text("[ "),style: (fg: "#8aadf4", modifiers: "Bold")),
(kind: Property(Status(Elapsed)),style: (fg: "#d8dee9")), (kind: Property(Status(Elapsed)),style: (fg: "#b7bdf8")),
(kind: Text(" / "),style: (fg: "#81a1c1", modifiers: "Bold")), (kind: Text(" / "),style: (fg: "#8aadf4", modifiers: "Bold")),
(kind: Property(Status(Duration)),style: (fg: "#d8dee9")), (kind: Property(Status(Duration)),style: (fg: "#b7bdf8")),
(kind: Text(" | "),style: (fg: "#81a1c1", modifiers: "Bold")), (kind: Text(" | "),style: (fg: "#8aadf4", modifiers: "Bold")),
(kind: Property(Status(Bitrate)),default: (kind: Text(" ")),style: (fg: "#d8dee9")), (kind: Property(Status(Bitrate)),default: (kind: Text(" ")),style: (fg: "#b7bdf8")),
(kind: Text(" kbps"),style: (fg: "#81a1c1")), (kind: Text(" kbps"),style: (fg: "#8aadf4")),
(kind: Text(" ]"),style: (fg: "#81a1c1", modifiers: "Bold")) (kind: Text(" ]"),style: (fg: "#8aadf4", modifiers: "Bold"))
], align: Left)) ], align: Left))
), ),
]) ])
), ),
(size: "34%", pane: Split(direction: Vertical, panes: [ (size: "34%", pane: Split(direction: Vertical, panes: [
(size: "100%", pane: Pane(Property(content: [ (size: "100%", pane: Pane(Property(content: [
(kind: Property(Song(Title)), style: (fg: "#d8dee9",modifiers: "Bold"), (kind: Property(Song(Title)), style: (fg: "#b7bdf8",modifiers: "Bold"),
default: (kind: Property(Song(Filename)), style: (fg: "#d8dee9",modifiers: "Bold"))) default: (kind: Property(Song(Filename)), style: (fg: "#b7bdf8",modifiers: "Bold")))
], align: Center)) ], align: Center))
), ),
(size: "100%", pane: Pane(Property(content: [ (size: "100%", pane: Pane(Property(content: [
(kind: Property(Song(Artist)), style: (fg: "#88c0d0"), (kind: Property(Song(Artist)), style: (fg: "#7dc4e4"),
default: (kind: Text("Unknown Artist"), style: (fg: "#88c0d0"))), default: (kind: Text("Unknown Artist"), style: (fg: "#89dceb"))),
(kind: Text(" - "), style: (fg: "#d8dee9")), (kind: Text(" - "), style: (fg: "#b7bdf8")),
(kind: Property(Song(Album)),style: (fg: "#81a1c1" ), (kind: Property(Song(Album)),style: (fg: "#8aadf4" ),
default: (kind: Text("Unknown Album"), style: (fg: "#81a1c1"))) default: (kind: Text("Unknown Album"), style: (fg: "#8aadf4")))
], align: Center)) ], align: Center))
), ),
]) ])
), ),
(size: "33%", pane: Split(direction: Vertical, panes: [ (size: "33%", pane: Split(direction: Vertical, panes: [
(size: "100%", pane: Pane(Property(content: [ (size: "100%", pane: Pane(Property(content: [
(kind: Text(" 󱡬"), style: (fg: "#81a1c1", modifiers: "Bold")), (kind: Text(" 󰕾 "), style: (fg: "#8aadf4", modifiers: "Bold")),
(kind: Property(Status(Volume)), style: (fg: "#d8dee9")), (kind: Property(Status(Volume)), style: (fg: "#b7bdf8")),
(kind: Text("% "), style: (fg: "#81a1c1", modifiers: "Bold")) (kind: Text("%"), style: (fg: "#b7bdf8", modifiers: "Bold"))
], align: Right)) ], align: Right))
), ),
(size: "100%", pane: Pane(Property(content: [ (size: "100%", pane: Pane(Property(content: [
(kind: Text("[ "),style: (fg: "#81a1c1", modifiers: "Bold")), (kind: Text("[ "),style: (fg: "#8aadf4", modifiers: "Bold")),
(kind: Property(Status(QueueLength())),style: (fg: "#d8dee9")), (kind: Property(Status(QueueLength())),style: (fg: "#b7bdf8")),
(kind: Text(" 󰴍 | "),style: (fg: "#81a1c1", modifiers: "Bold")), (kind: Text(" 󰴍 | "),style: (fg: "#8aadf4", modifiers: "Bold")),
(kind: Property(Status(QueueTimeTotal(separator: " "))),style: (fg: "#d8dee9")), (kind: Property(Status(QueueTimeTotal(separator: " "))),style: (fg: "#b7bdf8")),
(kind: Text(" 󱎫 | "),style: (fg: "#81a1c1", modifiers: "Bold")), (kind: Text(" 󱎫 | "),style: (fg: "#8aadf4", modifiers: "Bold")),
(kind: Property(Status(RepeatV2(on_label: "", off_label: "", (kind: Property(Status(RepeatV2(on_label: "", off_label: "",
on_style: (fg: "#d8dee9", modifiers: "Bold"), off_style: (fg: "#4c566a", modifiers: "Bold"))))), on_style: (fg: "#b7bdf8", modifiers: "Bold"), off_style: (fg: "#45475a", modifiers: "Bold"))))),
(kind: Text(" | "),style: (fg: "#81a1c1", modifiers: "Bold")), (kind: Text(" | "),style: (fg: "#8aadf4", modifiers: "Bold")),
(kind: Property(Status(RandomV2(on_label: "", off_label: "", (kind: Property(Status(RandomV2(on_label: "", off_label: "",
on_style: (fg: "#d8dee9", modifiers: "Bold"), off_style: (fg: "#4c566a", modifiers: "Bold"))))), on_style: (fg: "#b7bdf8", modifiers: "Bold"), off_style: (fg: "#45475a", modifiers: "Bold"))))),
(kind: Text(" | "),style: (fg: "#81a1c1", modifiers: "Bold")), (kind: Text(" | "),style: (fg: "#8aadf4", modifiers: "Bold")),
(kind: Property(Status(ConsumeV2(on_label: "󰮯", off_label: "󰮯", oneshot_label: "󰮯󰇊", (kind: Property(Status(ConsumeV2(on_label: "󰮯", off_label: "󰮯", oneshot_label: "󰮯󰇊",
on_style: (fg: "#d8dee9", modifiers: "Bold"), off_style: (fg: "#4c566a", modifiers: "Bold"))))), on_style: (fg: "#b7bdf8", modifiers: "Bold"), off_style: (fg: "#45475a", modifiers: "Bold"))))),
(kind: Text(" | "),style: (fg: "#81a1c1", modifiers: "Bold")), (kind: Text(" | "),style: (fg: "#8aadf4", modifiers: "Bold")),
(kind: Property(Status(SingleV2(on_label: "󰎤", off_label: "󰎦", oneshot_label: "󰇊", off_oneshot_label: "󱅊", (kind: Property(Status(SingleV2(on_label: "󰎤", off_label: "󰎦", oneshot_label: "󰇊", off_oneshot_label: "󱅊",
on_style: (fg: "#d8dee9", modifiers: "Bold"), off_style: (fg: "#4c566a", modifiers: "Bold"))))), on_style: (fg: "#b7bdf8", modifiers: "Bold"), off_style: (fg: "#45475a", modifiers: "Bold"))))),
(kind: Text(" ]"),style: (fg: "#81a1c1", modifiers: "Bold")), (kind: Text(" ]"),style: (fg: "#8aadf4", modifiers: "Bold")),
], align: Right)) ], align: Right))
), ),
]) ])
@ -192,13 +188,13 @@
}, },
cava: ( cava: (
bar_symbols: ['▁', '▂', '▃', '▄', '▅', '▆', '▇', '█'], bar_symbols: ['▁', '▂', '▃', '▄', '▅', '▆', '▇', '█'],
bar_width: 1, bar_spacing: 1, bar_width: 1, bar_spacing: 0,
bg_color: "#2e3440", bg_color: "#24273a",
bar_color: Gradient({ bar_color: Gradient({
0: "#5e81ac", 0: "#8aadf4",
33: "#81a1c1", 33: "#89dceb",
67: "#88c0d0", 67: "#8aadf4",
100: "#8fbcbb", 100: "#91d7e3",
}) })
), ),
) )

38
modules/home/cli/fun/rmpc/config/config.ron Normal file → Executable file
View file

@ -129,12 +129,12 @@
), ),
(size: "30%", borders: "NONE", pane: Split(direction: Vertical, panes: [ (size: "30%", borders: "NONE", pane: Split(direction: Vertical, panes: [
(size: "0.45r", borders: "ALL", pane: Pane(AlbumArt)), (size: "0.45r", borders: "ALL", pane: Pane(AlbumArt)),
(size: "100%", borders: "NONE", pane: Pane(Lyrics)), (size: "100%", borders: "ALL", pane: Pane(Cava)),
]) ])
), ),
]) ])
), ),
(name: "Directories", pane: Split(direction: Horizontal,panes: [ (name: "Collection", pane: Split(direction: Horizontal,panes: [
(size: "100%", borders: "ALL", pane: Pane(Directories)), (size: "100%", borders: "ALL", pane: Pane(Directories)),
]) ])
), ),
@ -142,44 +142,14 @@
(size: "100%", borders: "ALL", pane: Pane(Playlists)), (size: "100%", borders: "ALL", pane: Pane(Playlists)),
]) ])
), ),
(name: "Artists", pane: Split(direction: Horizontal, panes: [
(size: "100%", borders: "ALL", pane: Pane(Artists)),
])
),
(name: "Albums", pane: Split(direction: Horizontal, panes: [
(size: "100%", borders: "ALL", pane: Pane(Albums)),
])
),
(name: "Album Artists", pane: Split(direction: Horizontal, panes: [
(size: "100%", borders: "ALL", pane: Pane(AlbumArtists)),
])
),
(name: "Genre", pane: Split(direction: Horizontal, panes: [
(size: "100%", borders: "ALL", pane: Pane(Browser(root_tag: "genre", separator: ";"))),
])
),
(name: "Queue", pane: Split(direction: Horizontal, panes: [
(size: "100%", borders: "ALL", pane: Pane(Queue))
])
),
(name: "Show",pane: Split(direction: Vertical, panes: [
(size: "50%", pane: Split(direction: Horizontal, panes: [
(size: "22%", borders: "ALL", pane: Pane(Queue)),
(size: "56%", borders: "ALL", pane: Pane(Lyrics)),
(size: "22%", borders: "ALL", pane: Pane(AlbumArt)),
])
),
(size: "50%", borders: "ALL", pane: Pane(Cava)),
])
),
(name: "Search", pane: Split(direction: Horizontal, panes: [ (name: "Search", pane: Split(direction: Horizontal, panes: [
(size: "100%", borders: "ALL", pane: Pane(Search)), (size: "100%", borders: "ALL", pane: Pane(Search)),
]) ])
), ),
], ],
cava: ( cava: (
framerate: 60, autosens: true, sensitivity: 100, framerate: 200, autosens: true, sensitivity: 100,
lower_cutoff_freq: 50, higher_cutoff_freq: 10000, lower_cutoff_freq: 50, higher_cutoff_freq: 15000,
input: ( input: (
method: Fifo, method: Fifo,
source: "/tmp/mpd.fifo", source: "/tmp/mpd.fifo",

0
modules/home/cli/fun/rmpc/default.nix Normal file → Executable file
View file

0
modules/home/gui/apps/test/default.nix Normal file → Executable file
View file