Skip to content

Migrate music keybindings and scripts from xmms2 to mpv #35

@cwage

Description

@cwage

The awesomewm keybindings and helper scripts reference xmms2 commands that need to be updated for mpv with IPC socket control.

Keybindings (rc.lua:392-396)

Key Current (xmms2) New (mpv via socat)
mod+\ xmms2 toggle echo '{"command":["cycle","pause"]}' | socat - /tmp/mpv-socket
mod+' randomalbum.sh Already updated — works as-is
mod+; nowplaying.sh Needs rewrite to query mpv socket
mod+[ xmms2 prev echo '{"command":["playlist-prev"]}' | socat - /tmp/mpv-socket
mod+] xmms2 next echo '{"command":["playlist-next"]}' | socat - /tmp/mpv-socket

Scripts to update

  • ~/bin/randomalbum.sh — already updated to use mpv with IPC socket
  • ~/bin/nowplaying.sh — needs rewrite to query media-title from mpv socket
  • Consider small wrapper scripts (e.g. ~/bin/music-toggle.sh) instead of inline socat in rc.lua

Notes

  • mpv IPC socket at /tmp/mpv-socket (set by --input-ipc-server in randomalbum.sh)
  • socat is already installed on the system
  • Can also remove mpd config (~/.config/mpd) from Home Manager since we're not using it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions