Saltar al contenido principal

rmpc

mpd

MPD es un demonio/servidor de audio: escanea la música, mantiene una base de datos, playlists, etc., y reproduce audio. Para controlarlo se utiliza un cliente como mpc o rmpc.

  1. Instalar
sudo pacman -S mpd
  1. Crear carpeta y archivo de configuración para el usuario
mkdir -p ~/.config/mpd
  1. Editar archivo de configuración nano ~/.config/mpd/mpd.conf Opcional. Copiar el archivo de configuración de ejemplo
cp /usr/share/doc/mpd/mpdconf.example ~/.config/mpd/mpd.conf
~/.config/mpd/mdp.conf
music_directory     "~/Música"
playlist_directory "~/.config/mpd/playlists"
db_file "~/.config/mpd/database"
state_file "~/.local/state/mpd/state"
log_file "~/.local/state/mpd/log"
#log_file "syslog"

audio_output {
type "pipewire"
name "PipeWire Sound Server"
}
  • music_directory → dónde están los archivos de música.
  • playlist_directory → dónde se guardarán las playlists.
  • db_file → la base de datos de MPD.
  • state_file → estado actual (track, posición).
  • log_file → archivo de logs o usar syslog.
  1. Crear directorios de configuración
mkdir -p ~/.config/mpd/playlists
mkdir -p ~/.local/state/mpd
  1. Habilitar inicio automático, e iniciarlo ahora mismo
systemctl --user enable mpd  # Inicio automático en cada sesión
systemctl --user start mpd # Iniciar ahora

systemctl --user status mpd # Verificar estado
systemctl --user restart mpd # Reiniciar si se actualió la configuración

rmpc

# Instalar
sudo pacman -S rmpc

# Generar archivo de configuración
mkdir -p ~/.config/rmpc/ # Crear carpeta
rmpc config > ~/.config/rmpc/config.ron # Copiar configuracion
#rmpc --generate-config # Automatico

# Ejecutar rmpc
rmpc

Tema

  1. Generar archivo de tema
rmpc theme > ~/.config/rmpc/themes/<theme_name>.ron
  1. Aplicar el tema en el archivo de configuración ~/.config/rmpc/config.ron
~/.config/rmpc/config.ron
theme: Some("<theme_name>")
  1. Reiniciar rmpc

Resumen comandos

config.ron
# Global
~ # Ayuda
/ # Abrir barra de busqueda
n # Siguiente resultado
N # Resultado anterior
Espacio # Seleccionar elementos
Esc # Cancelar acción
q # Salir
u # Actualizar
U # Reescanear

# Global. Paneles
Tab # Siguiente panel
Alt + Tab # Panel anterior

# Directorios
a # Agregar a la cola (item/s o carpeta/s)
A # Agregar todo a la cola

# Global. Reproductor
I # Información de la canción actual
z # Repetir
x # Aleatorio
c # Borrar de la cola despues de reproducir
v # Repetir canción/playlist ("Repetir" deve estar activo)
p # Pausa o Reproducir
s # Detener
. # Subir volumen
, # Bajar volumen
f # Adelantar
b # Retroceder
> # Siguiente canción
< # Anterior canción

# Queue
d # Borrar item
D # Borrar todo
C # Ir hacia la cancion en curso
a # Agregar item a una playlist
Ctrl + s # Guardar cola como playlist
K # Mover arriba los elementos seleccionados
J # Mover abajo los elementos seleccionados

# Playlist
r # Renombrar playlist

Ejemplos

config

~/.config/rmpc/config.ron
#![enable(implicit_some)]
#![enable(unwrap_newtypes)]
#![enable(unwrap_variant_newtypes)]
(
address: "127.0.0.1:6600",
password: None,
theme: Some("custom"),
cache_dir: None,
on_song_change: None,
volume_step: 1,
max_fps: 30,
scrolloff: 0,
wrap_navigation: false,
enable_mouse: true,
enable_config_hot_reload: true,
status_update_interval_ms: 1000,
rewind_to_start_sec: None,
reflect_changes_to_playlist: false,
select_current_song_on_change: false,
browser_song_sort: [Disc, Track, Artist, Title],
directories_sort: SortFormat(group_by_type: true, reverse: false),
album_art: (
method: Auto,
max_size_px: (width: 1200, height: 1200),
disabled_protocols: ["http://", "https://"],
vertical_align: Center,
horizontal_align: Center,
),
keybinds: (
global: {
":": CommandMode,
",": VolumeDown,
"s": Stop,
".": VolumeUp,
"<Tab>": NextTab,
"<S-Tab>": PreviousTab,
"1": SwitchToTab("Queue"),
"2": SwitchToTab("Directories"),
"3": SwitchToTab("Playlists"),
"4": SwitchToTab("Search"),
"q": Quit,
">": NextTrack,
"p": TogglePause,
"<": PreviousTrack,
"f": SeekForward,
"z": ToggleRepeat,
"x": ToggleRandom,
"c": ToggleConsume,
"v": ToggleSingle,
"b": SeekBack,
"~": ShowHelp,
"u": Update,
"U": Rescan,
"I": ShowCurrentSongInfo,
"O": ShowOutputs,
"P": ShowDecoders,
"R": AddRandom,
},
navigation: {
"k": Up,
"j": Down,
"h": Left,
"l": Right,
"<Up>": Up,
"<Down>": Down,
"<Left>": Left,
"<Right>": Right,
"<C-k>": PaneUp,
"<C-j>": PaneDown,
"<C-h>": PaneLeft,
"<C-l>": PaneRight,
"<C-u>": UpHalf,
"N": PreviousResult,
"a": Add,
"A": AddAll,
"r": Rename,
"n": NextResult,
"g": Top,
"<Space>": Select,
"<C-Space>": InvertSelection,
"G": Bottom,
"<CR>": Confirm,
"i": FocusInput,
"J": MoveDown,
"<C-d>": DownHalf,
"/": EnterSearch,
"<C-c>": Close,
"<Esc>": Close,
"K": MoveUp,
"D": Delete,
"B": ShowInfo,
},
queue: {
"D": DeleteAll,
"<CR>": Play,
"<C-s>": Save,
"a": AddToPlaylist,
"d": Delete,
"C": JumpToCurrent,
"X": Shuffle,
},
),
search: (
case_sensitive: false,
mode: Contains,
tags: [
(value: "filename", label: "Filename"),
(value: "any", label: "Any Tag"),
(value: "title", label: "Title"),
(value: "artist", label: "Artist"),
(value: "album", label: "Album"),
(value: "genre", label: "Genre"),
],
),
artists: (
album_display_mode: SplitByDate,
album_sort_by: Date,
),
tabs: [
(
name: "Queue",
pane: Split(
direction: Horizontal,
panes: [
(size: "40%", pane: Pane(AlbumArt)),
(size: "60%", pane: Pane(Queue))
],
),
),
(
name: "Directories",
pane: Pane(Directories),
),
(
name: "Playlists",
pane: Pane(Playlists),
),
(
name: "Search",
pane: Pane(Search),
),
],
)

theme

~/.config/rmpc/themes/custom.ron
#![enable(implicit_some)]
#![enable(unwrap_newtypes)]
#![enable(unwrap_variant_newtypes)]
(
default_album_art_path: None,
show_song_table_header: true,
draw_borders: true,
format_tag_separator: " | ",
browser_column_widths: [20, 38, 42],
background_color: None,
text_color: None,
header_background_color: None,
modal_background_color: None,
modal_backdrop: false,
preview_label_style: (fg: "yellow"),
preview_metadata_group_style: (fg: "yellow", modifiers: "Bold"),
tab_bar: (
enabled: true,
active_style: (fg: "black", bg: "blue", modifiers: "Bold"),
inactive_style: (),
),
highlighted_item_style: (fg: "blue", modifiers: "Bold"),
current_item_style: (fg: "black", bg: "blue", modifiers: "Bold"),
borders_style: (fg: "blue"),
highlight_border_style: (fg: "blue"),
symbols: (
song: "",
dir: "",
playlist: "󰲸",
marker: " ",
ellipsis: "...",
song_style: None,
dir_style: None,
playlist_style: None,
),
level_styles: (
info: (fg: "blue", bg: "black"),
warn: (fg: "yellow", bg: "black"),
error: (fg: "red", bg: "black"),
debug: (fg: "light_green", bg: "black"),
trace: (fg: "magenta", bg: "black"),
),
progress_bar: (
symbols: ["[", "=", ">", " ", "]"],
track_style: (fg: "#1e2030"),
elapsed_style: (fg: "blue"),
thumb_style: (fg: "blue", bg: "#1e2030"),
),
scrollbar: (
symbols: ["│", "█", "▲", "▼"],
track_style: (),
ends_style: (),
thumb_style: (fg: "blue"),
),
song_table_format: [
(
prop: (
kind: Property(Title),
default: (kind: Text("Unknown"))
),
width: "50%",
),
(
prop: (
kind: Property(Artist),
default: (kind: Text("Unknown"))
),
width: "35%",
),
(
prop: (
kind: Property(Duration),
default: (kind: Text("-"))
),
width: "15%",
alignment: Right,
),
],
components: {},
layout: Split(
direction: Vertical,
panes: [
(
pane: Pane(Tabs),
size: "3",
),
(
pane: Pane(TabContent),
size: "100%",
),
(
pane: Pane(Header),
size: "2",
),
(
pane: Pane(ProgressBar),
size: "1",
),
],
),
header: (
rows: [
(
left: [
(kind: Property(Widget(ScanStatus)), style: (fg: "blue")),
(kind: Text("["), style: (fg: "#81a1c1")),
(kind: Text("  ")),
(kind: Property(Status(Volume))),
(kind: Text("% ")),
(kind: Text("]"), style: (fg: "#81a1c1")),
],
center: [
(
kind: Property(Song(Title)), style: (modifiers: "Bold"),
default: (kind: Text("No Song"), style: (modifiers: "Bold"))
)
],
right: [
(kind: Text("[ "), style: (fg: "#81a1c1")),
(kind:
Property(Status(StateV2(
playing_label: "",
paused_label: "",
stopped_label: ""
))), style: (fg: "yellow", modifiers: "Bold")
),
(kind: Text(" ]"), style: (fg: "#81a1c1")),
]
),
(
left: [
(kind: Text("[ "), style: (fg: "#81a1c1")),
(kind: Property(Status(RepeatV2(
on_label: "", off_label: "",
on_style: (fg: "yellow"),
)))),
(kind: Text(" | "), style: (fg: "#81a1c1")),
(kind: Property(Status(RandomV2(
on_label: "", off_label: "",
on_style: (fg: "yellow")
)))),
(kind: Text(" | "), style: (fg: "#81a1c1")),
(kind: Property(Status(ConsumeV2(
on_label: "󰮯",
off_label: "󰮯",
oneshot_label: "󰮯󰇊",
on_style: (fg: "yellow")
)))),
(kind: Text(" | "), style: (fg: "#81a1c1")),
(kind: Property(Status(SingleV2(
on_label: "󰎤",
off_label: "󰎦",
oneshot_label: "󰇊",
off_oneshot_label: "󱅊",
on_style: (fg: "yellow")
)))),
(kind: Text(" ]"), style: (fg: "#81a1c1")),
],
center: [
(
kind: Property(Song(Artist)), style: (fg: "yellow", modifiers: "Bold"),
default: (kind: Text("Unknown"), style: (fg: "yellow", modifiers: "Bold"))
)
],
right: [
(kind: Text("[ "), style: (fg: "#81a1c1")),
(kind: Property(Status(Elapsed))),
(kind: Text(" / "), style: (fg: "#81a1c1")),
(kind: Property(Status(Duration))),
(kind: Text(" | "), style: (fg: "#81a1c1")),
(kind: Property(Status(Bitrate))),
(kind: Text(" kbps")),
(kind: Text(" ]"), style: (fg: "#81a1c1")),
]
),
],
),
browser_song_format: [
(
kind: Group([
(kind: Property(Track)),
(kind: Text(" ")),
])
),
(
kind: Group([
(kind: Property(Title)),
(kind: Text(" - ")),
(kind: Property(Artist)),
]),
default: (kind: Property(Filename))
),
],
lyrics: (
timestamp: false
)
)