No Description

mergify[bot] 144d233e49 Merge pull request #28 from anas-stuff/renovate/actions-checkout-4.x 9 months ago
.github 1deb32acbb chore(deps): update actions/checkout action to v4 9 months ago
.idea efef4d6522 Down the clap creat versin 4.0.13 -> 3.2.22 🥲 1 year ago
Screenshots 7122f07e86 [ImgBot] Optimize images 1 year ago
archpackage 07739908e3 Upgrade the AUR package 🤍 1 year ago
assets c1e5333cfe New CMUS logo added. 1 year ago
src c70e8d7c9f Upgrade the version 0.1.3 -> 0.2.0 😆 1 year ago
translations 7fa65fd79d Fix the creats.io install command and fix the screenshots links 🥰 1 year ago
.gitignore f337bf08e0 Init and make the command line arguments 🥰 1 year ago
.gitmodules c77add0540 Add aur repo yoo 😆 1 year ago
.mergify.yml 4f7375637b ci(Mergify): configuration update 1 year ago
CONTRIBUTING.md af62af1488 Improve the CONTRIBUTING file 🥰 1 year ago
Cargo.lock feacb38db1 fix(deps): update rust crate dirs to v5 1 year ago
Cargo.toml feacb38db1 fix(deps): update rust crate dirs to v5 1 year ago
LICENSE.txt 01b525f5ea Add the MIT license 🥰 1 year ago
README.md 326540f5e5 Update README.md 1 year ago
cmus-rpc-rs.iml f337bf08e0 Init and make the command line arguments 🥰 1 year ago
renovate.json b1fe992cbc Add renovate.json 1 year ago
sonar-project.properties 2ea554565f Create sonarcloud action 😃 1 year ago

README.md

A Discord Rich Presence for cmus player with 🦀

crates.io Codacy Badge CodeFactor

image 1 image 2

Read this in other languages.

🇯🇵 japanese

  • Requires cmus

Install

  • from crates.io bash cargo install cmus-rpc-rs
  • From Arch User Repository(AUR): yay -S cmus-rpc-rs

Options:

Option Description Values
-h or --help Show help -
-V or --version Show the version -
-d or --debug Debug mode -
-l or --link Linking with cmus (close the program if cmus is not running) -
-c or --config Set custom path to config file Path to config file .json
-i or --interval Set interval between checks interval time (seconds)
-s or --sleep Set sleep when there is no activity sleep time (seconds)
--p1f or --partOneFormat Set the format for the first part Format for first part
--p2f or --partTowFormat Set the format for the second part Format for second part
--li or --largeImage Set custom large image(cover) for presence large imgae name Available images for defult app
--pi or --playingImage Set custom playing image for presence playing icon name Available playing images for defult app
--pai or --pausedImage Set custom paused image for presence paused icon name Available icons
--pt or --playingText Set custom playing icon alt for presence playing icon alt text
--pat or --pausedText Set custom paused icon altarnative for presence paused icon alt text
--b1t or --buttonOneText Set button one text(label) button one label (if empty and no has value in the config file the button will be hidden)
--b1u or --buttonOneUrl Set button one url Button one url (if empty and no has value in the config file the button will be hidden)
--b2t or --buttonTwoText Set button two text(label) button one label (if empty and no has value in the config file the button will be hidden)
--b2u or --buttonTwoUrl Set button two url Button one url (if empty and no has value in the config file the button will be hidden)

Examples:

cmus-rpc-rs --p1f %title%
cmus-rpc-rs --p1f "%artist% - %title%" --p2f "%album% - %date%"
cmus-rpc-rs --p1f "Anas listening to %title%" --p2f "From %artist%"

How to do auto run when you start the cmus

  • Put the following line in your shellrc file e.g. .bashrc or .zshrc
    alias cmus = 'cmus-rpc-rs --link &>/dev/null & cmus'

Available in

GitHub GitLab BitBucket Codeberg

Resources

  • cmus-remote tool to the make a query to the cmus
  • Discord Rich Presence A simple, cross-platform crate for interfacing with Discord's IPC.
  • dirs-rs a low-level library that provides config/cache/data paths, following the respective conventions on Linux, macOS and Windows.
  • clap A full featured, fast Command Line Argument Parser for Rust.

Quality gate

SonarCloud

This is my first project using rust 😆, support me with star yoo 💙🦀

License MIT