A Discord Rich Presence for cmus player using rust ๐Ÿฆ€๐Ÿ’™

Overview

A Discord Rich Presence for cmus player with ๐Ÿฆ€

crates.io Codacy Badge CodeFactor

image 1

image 2

  • Require cmus

Install

  • from crates.io
    crago install cmus-rpc-rs 

Options:

Option Description Values
-h or --help Show the 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

Recourses

  • 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 useing rust ๐Ÿ˜† , support me with star yoo ๐Ÿ’™ ๐Ÿฆ€

License MIT

You might also like...
Thaler's Proofs, Args, and ZK Implemented in Rust using arkworks
Thaler's Proofs, Args, and ZK Implemented in Rust using arkworks

rthaler โ€ข Dr. Thaler's book Proofs, Args, and ZK implemented in rust using the arkworks cryptographic rust toolset. Various Zero Knowledge Protocols a

๐ŸนBranch and bound solution using Rust to calculate an optimal cocktail ingredient list of arbitrary length ๐Ÿธ

Calculating an Optimal Cocktail Ingredient List Tom Explains the Problem You have 100 different ingredients You have 20 cocktails, each of which use 2

Rust library for practical time-lock encryption using `drand` threshold network

tlock-rs: Practical Timelock Encryption/Decryption in Rust This repo contains pure Rust implementation of drand/tlock scheme. It provides time-based e

A simple and secure rust command-line tool to protect your text by encrypting and decrypting it using the robust AES-256 algorithm.

Secret Keeper A simple and secure command-line tool to protect your text by encrypting and decrypting it using the robust AES-256 algorithm. Built wit

An open source, high performance limit order book for the Seaport smart contracts. Implemented in Rust using ethers-rs, this offers a turnkey option for digital asset marketplaces.

Quay Quay is an open source, high performance backend for the Seaport smart contracts. The project is implemented in Rust, using Postgres as a storage

A Rust implementation of OpenAI's Whisper model using the burn framework

Whisper Burn: Rust Implementation of OpenAI's Whisper Transcription Model Whisper Burn is a Rust implementation of OpenAI's Whisper transcription mode

Initial project for using Rust on the Nintendo 64.

N64 Project Template for Rust This repo is intended to be a starting point for developing software for the Nintendo 64 console using Rust. Only the ba

Simple EVM implementation from scratch using Rust.

smol-evm-rs โ€ข smol-evm-rs is a Rust port of the smol-evm project, originally implemented in Python by karmacoma. This project aims to implement the Et

Prefix tree (ordered map and set) data structure using 100% safe Rust

PFX: A 100% safe, blob-oriented prefix tree This crate provides a prefix tree map and set data structure, implemented purely in safe Rust. The API is

Comments
  • The aur package dosn't work correctly with paru

    The aur package dosn't work correctly with paru

    Hi! Trying to build this package with paru and it seems to be failing with the error

    could not find Cargo.toml in /tmp/makepkg/cmus-rpc-rs/src or any parent directory

    When building directly from GitHub and cargo though it seems to be fine.

    • from @Fazzi in https://aur.archlinux.org/packages/cmus-rpc-rs#comment-882055
    opened by anas-elgarhy 1
  • [ImgBot] Optimize images

    [ImgBot] Optimize images

    Beep boop. Your images are optimized!

    Your image file size has been reduced ๐ŸŽ‰

    Details

    | File | Before | After | Percent reduction | |:--|:--|:--|:--| | /assets/play_icons/play_icon_4.png | 43.49kb | 36.80kb | 15.39% | | /assets/pause_icons/pause_icon_1.png | 117.45kb | 105.66kb | 10.04% | | /Screenshots/1_0.1.0.png | 15.55kb | 14.94kb | 3.89% | | /Screenshots/2_0.1.0.png | 15.18kb | 14.73kb | 2.95% | | /assets/cover/cmusNormalBink.jpg | 25.67kb | 24.98kb | 2.69% | | /assets/play_icons/play_icon_5.png | 373.54kb | 371.05kb | 0.66% | | | | | | | Total : | 590.88kb | 568.17kb | 3.84% |


    ๐Ÿ“ docs | :octocat: repo | ๐Ÿ™‹๐Ÿพ issues | ๐Ÿช marketplace

    ~Imgbot - Part of Optimole family

    opened by imgbot[bot] 1
  • Add ability to run commands in the place holder string

    Add ability to run commands in the place holder string

    • ุงุถุงูุฉ ุงู…ูƒุงู†ูŠุฉ ุงู†ูƒ ุชุฑู† ุงูˆุงู…ุฑ ู…ุนูŠู†ู‡ ูƒู„ ู…ุฏู‡ ุจุฏุงู„ ุงู„ string ุงู„ุซุงุจุช ุงู„ู…ู…ู„ ุงู„ู„ูŠ ู…ุด ุจูŠุชุบูŠุฑ ุบูŠุฑ ูƒู„ ุชุฑุงูƒ
    • ุฎู„ูŠ ููŠ ุงู…ูƒุงู†ูŠ ุงุญุท ุงูƒุชุฑ ู…ู† ู‚ูŠู…ุฉ ู„ูƒู„ ู…ุชุบูŠุฑ ูˆุงู‚ูˆู„ู‡ ูŠุจุฏู„ ุจูŠู† ุงู„ู‚ูŠู… ุฏูŠ ูƒู„ ูƒุงู… ุซุงู†ูŠ ุญุงุฌุฉ ุฒูŠ ุงู„ุงุฑูŠู‡ ูƒุฏู‡ ููŠู‡ุง ูƒู„ ุงู„ strings ุงู„ู„ูŠ ุนุงูŠุฒุฉ ูŠุจุฏู„ ุจูŠู†ู‡ู… ูˆููŠ ุงู„ุงุฎุฑ ูƒุฏุฉ ุงู„ู…ุฏุฉ ุงู„ู„ูŠ ู‡ุงูŠุธู‡ุฑ ูƒู„ ูˆุงุญุฏ ููŠู‡ุง
    • ex:
      part_one_format: [%artist% - %title%, listing to music yoo, $(cat /sys/class/thermal/thermal_zone8/temp)] 2
      
    enhancement 
    opened by anas-elgarhy 0
Releases(0.2.0)
  • 0.2.0(Oct 11, 2022)

    What's Changed

    • Fix typo #4 yay -S cmus-rpc-rs-rs -> yay -S cmus-rpc-rc by @YosefJoo in https://github.com/anas-elgarhy/cmus-rpc-rs/pull/5
    • Fix could not find Cargo.toml in /tmp/makepkg/cmus-rpc-rs/src or any parent directory issue #2 by @anas-elgarhy in https://github.com/anas-elgarhy/cmus-rpc-rs/pull/6
    • Upgrade the dependencies by @the-supernova in https://github.com/anas-elgarhy/cmus-rpc-rs/pull/13
    • New CMUS logo added. by @ashiskumarnaik in https://github.com/anas-elgarhy/cmus-rpc-rs/pull/15
    • Update README.md by @namit343 in https://github.com/anas-elgarhy/cmus-rpc-rs/pull/16
    • New translated README file is added. Main README file is modified with the link to translations. by @ashiskumarnaik in https://github.com/anas-elgarhy/cmus-rpc-rs/pull/17
    • Update README.md by @namit343 in https://github.com/anas-elgarhy/cmus-rpc-rs/pull/18
    • Create the contributing file by @PravinPadalkar78 in https://github.com/anas-elgarhy/cmus-rpc-rs/pull/14

    New Contributors

    • @YosefJoo made their first contribution in https://github.com/anas-elgarhy/cmus-rpc-rs/pull/5
    • @anas-elgarhy made their first contribution in https://github.com/anas-elgarhy/cmus-rpc-rs/pull/6
    • @the-supernova made their first contribution in https://github.com/anas-elgarhy/cmus-rpc-rs/pull/13
    • @ashiskumarnaik made their first contribution in https://github.com/anas-elgarhy/cmus-rpc-rs/pull/15
    • @namit343 made their first contribution in https://github.com/anas-elgarhy/cmus-rpc-rs/pull/16
    • @PravinPadalkar78 made their first contribution in https://github.com/anas-elgarhy/cmus-rpc-rs/pull/14

    Full Changelog: https://github.com/anas-elgarhy/cmus-rpc-rs/compare/0.1.3...0.2.0

    Source code(tar.gz)
    Source code(zip)
    cmus-rpc-rs(4.72 MB)
  • 0.1.3(Aug 1, 2022)

  • 0.1.2(Aug 1, 2022)

    What's Changed

    • [ImgBot] Optimize images by @imgbot in https://github.com/anas-elgarhy/cmus-rpc-rs/pull/1

    New Contributors

    • @imgbot made their first contribution in https://github.com/anas-elgarhy/cmus-rpc-rs/pull/1

    Full Changelog: https://github.com/anas-elgarhy/cmus-rpc-rs/compare/0.1.0...0.1.2

    Source code(tar.gz)
    Source code(zip)
  • 0.1.1(Aug 1, 2022)

    What's Changed

    • [ImgBot] Optimize images by @imgbot in https://github.com/anas-elgarhy/cmus-rpc-rs/pull/1

    New Contributors

    • @imgbot made their first contribution in https://github.com/anas-elgarhy/cmus-rpc-rs/pull/1

    Full Changelog: https://github.com/anas-elgarhy/cmus-rpc-rs/compare/0.1.0...0.1.1

    Source code(tar.gz)
    Source code(zip)
  • 0.1.0(Jul 31, 2022)

Owner
Anas Elgarhy
A computer is the person who understands me better than anyone else
Anas Elgarhy
Safe, fast, small crypto using Rust

THE SOFTWARE IS PROVIDED "AS IS" AND BRIAN SMITH AND THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES

Brian Smith 3k Jan 2, 2023
X25519 elliptic curve Diffie-Hellman key exchange in pure-Rust, using curve25519-dalek.

x25519-dalek A pure-Rust implementation of x25519 elliptic curve Diffie-Hellman key exchange, with curve operations provided by curve25519-dalek. This

dalek cryptography 252 Dec 26, 2022
Exploration of using Storage instead of Allocator to parameterize collections in Rust

storage-poc aims at exploring the usage of custom Storages, rather than custom Allocators. Goals This is a Proof-of-Concept aiming at: Demonstrating t

null 106 Dec 8, 2022
QuickDash A modern alternative to QuickSFV using Rust.

QuickDash A modern alternative to QuickSFV using Rust. It's supports BLAKE3 and BLAKE2 hashes, CRC32, MD5, SHA1, SHA2, SHA3, xxHash The docs for user

null 11 Nov 9, 2022
A prototype project integrating jni rust into Kotlin and using protobuf to make them work together

KotlinRustProto a prototype project integrating jni rust into Kotlin and using protobuf to make them work together How to start add a RPC call in Droi

woo 11 Sep 5, 2022
Port path module (and tests) of nodejs to rust using the same algorithms.

rusty_nodejs_path Port path module (and tests) of nodejs to rust using the same algorithms. crates.io Documents Progress posix path.basename(path[, ex

Yunfei He 10 Sep 25, 2022
A pure-Rust implementation of Bulletproofs using Ristretto.

Bulletproofs The fastest Bulletproofs implementation ever, featuring single and aggregated range proofs, strongly-typed multiparty computation, and a

dalek cryptography 832 Dec 28, 2022
Implementation of Proof of Existence consensus using Substrate Framework, Frame, Pallets, RUST

Substrate Node Template A fresh FRAME-based Substrate node, ready for hacking ?? Getting Started Follow the steps below to get started with the Node T

Vijayendra Gaur 1 Jun 8, 2022
A blazingly fast, ShareX uploader coded in Rust (using actix web) which utilizes AES-256-GCM-SIV to securely store uploaded content.

Magnesium Oxide โ” What is this? Magnesium-Oxide (MGO) is a secure file uploader with support for ShareX. ?? Features ?? Blazingly fast uploads and enc

Nitrogen Development 26 Nov 25, 2022
Galleries of NFTs using Solana and Rust for contracts

About this Package created to simplify the process of parsing NFTs on Solana. It consists of: Package basic things like fetch all NFTs for specific wa

Andrew Scott 1 Jan 28, 2022