Skip to content

Latest commit

 

History

History
81 lines (60 loc) · 2.71 KB

File metadata and controls

81 lines (60 loc) · 2.71 KB

RofiBeats Integration (Project-side only)

This project ships a local bridge for RofiBeats and Waybar style workflows without modifying your system configs automatically.

1) Bridge commands

Use these commands directly from the project root:

.venv/bin/python cli/musicctl.py bridge status
.venv/bin/python cli/musicctl.py bridge control --action play-pause
.venv/bin/python cli/musicctl.py bridge search --keyword "pushu" --limit 30
.venv/bin/python cli/musicctl.py bridge play --song-id 28815250
.venv/bin/python cli/musicctl.py bridge play-playlist --playlist-id 123456 --start-song-id 654321
  • bridge status prints JSON suitable for Waybar custom modules or other shell integrations.
  • bridge control sends play/pause/next/previous/stop to the current CloudMusic player.
  • bridge search prints song_id<TAB>title rows for rofi selection.
  • bridge play resolves a playable URL and starts one track.
  • bridge play-playlist starts playlist playback with loop support when mpv is available.

bridge status payload

Example output:

{
  "text": "布拉格广场 - 蔡依林, 周杰伦 [210049]",
  "tooltip": "State: Playing\nTrack: 布拉格广场 - 蔡依林, 周杰伦 [210049]\nSong ID: 210049\nPlayer: mpv",
  "alt": "Playing",
  "class": "Playing",
  "player": "mpv",
  "title": "布拉格广场 - 蔡依林, 周杰伦 [210049]",
  "song_id": 210049,
  "playing": true
}

Field notes:

  • text: short bar/menu text
  • tooltip: multiline tooltip text
  • alt / class: playback state (Playing, Paused, Stopped)
  • player: detected player name such as mpv
  • title: best-known track title from local state / metadata
  • song_id: current CloudMusic song id when known
  • playing: boolean convenience flag

2) Rofi launcher script

Included launcher script:

scripts/RofiBeats_CloudMusic.sh

Menu entries include:

  • CloudMusic Play My Playlist (Loop)
  • CloudMusic Search & Play
  • CloudMusic Full TUI
  • Player Play/Pause / Next / Previous / Stop

When a CloudMusic track or playlist starts from this helper, it also stops the legacy RofiBeats radio-mpv stream first so you do not hear two sources at once. If your original script uses a different mpv title, set ROFIBEATS_LEGACY_TITLE before launching the helper.

When already logged in, login options are hidden and the menu focuses on playlist/search/playback actions.

Run it directly:

/home/vimalinx/Projects/CloudMusic/scripts/RofiBeats_CloudMusic.sh

3) How to wire into your existing RofiBeats

In your existing ~/.config/hypr/UserScripts/RofiBeats.sh, add one entry that executes:

/home/vimalinx/Projects/CloudMusic/scripts/RofiBeats_CloudMusic.sh

No system file is modified by this project automatically.