From c389bcf371fdfe1f1c5d03d9397fe5f98c3089d1 Mon Sep 17 00:00:00 2001 From: Nikolai Papin Date: Sun, 5 Oct 2025 15:30:58 +0300 Subject: [PATCH] feat: rmpc cava --- rmpc/config.ron | 39 +++++++++++++++++++++++++++++++++------ rmpc/themes/kolinux.ron | 18 ++++++++++++++---- 2 files changed, 47 insertions(+), 10 deletions(-) diff --git a/rmpc/config.ron b/rmpc/config.ron index d1769d5..b721302 100644 --- a/rmpc/config.ron +++ b/rmpc/config.ron @@ -65,13 +65,13 @@ "": PaneRight, "": UpHalf, "N": PreviousResult, - "a": Add, - "A": AddAll, + "": Add, + "": AddAll, "r": Rename, "n": NextResult, "g": Top, - "": Select, - "": InvertSelection, + "m": Select, + "M": InvertSelection, "G": Bottom, "": Confirm, "i": FocusInput, @@ -115,8 +115,11 @@ ( name: "Queue", pane: Split( - direction: Horizontal, - panes: [(size: "100%", pane: Pane(Queue))], + direction: Vertical, + panes: [ + (size: "60%", pane: Pane(Queue)), + (size: "40%", pane: Pane(Cava)), + ], ), ), ( @@ -136,5 +139,29 @@ pane: Pane(Playlists), ), ], + cava: ( + framerate: 30, // default 60 + autosens: true, // default true + sensitivity: 100, // default 100 + bar_width: 1, + bar_spacing: 0, + lower_cutoff_freq: 50, // not passed to cava if not provided + higher_cutoff_freq: 10000, // not passed to cava if not provided + input: ( + method: Fifo, + source: "/tmp/mpd.fifo", + sample_rate: 44100, + channels: 2, + sample_bits: 16, + ), + smoothing: ( + noise_reduction: 77, // default 77 + monstercat: false, // default false + waves: false, // default false + ), + // this is a list of floating point numbers thats directly passed to cava + // they are passed in order that they are defined + eq: [] + ), ) diff --git a/rmpc/themes/kolinux.ron b/rmpc/themes/kolinux.ron index 09ae36f..e6569af 100644 --- a/rmpc/themes/kolinux.ron +++ b/rmpc/themes/kolinux.ron @@ -34,7 +34,7 @@ playlist_style: (fg: "magenta"), ), level_styles: ( - info: (fg: "blue", bg: "black"), + info: (fg: "cyan", bg: "blue"), warn: (fg: "yellow", bg: "black"), error: (fg: "red", bg: "black"), debug: (fg: "light_green", bg: "black"), @@ -42,12 +42,13 @@ ), progress_bar: ( symbols: ["🬋", "󰃚 ", "⠔"], - track_style: (), + track_style: (fg: "blue"), elapsed_style: (fg: "blue"), thumb_style: (fg: "blue"), ), scrollbar: ( - symbols: ["│", "█", "▲", "▼"], + symbols: ["", "█", "", ""], + // symbols: ["│", "█", "▲", "▼"], track_style: (fg: "black"), ends_style: (fg: "black"), thumb_style: (fg: "magenta"), @@ -201,5 +202,14 @@ ], lyrics: ( timestamp: false - ) + ), + cava: ( + bar_symbols: ['▁', '▂', '▃', '▄', '▅', '▆', '▇', '█'], + inverted_bar_symbols: ['▔', '🮂', '🮃', '▀', '🮄', '🮅', '🮆', '█'], + + bar_width: 1, // width of a single bar in columns + bar_spacing: 1, // free space between bars in columns + orientation: Bottom, + bar_color: Single("blue"), + ), )