{"id":13577668,"url":"https://github.com/mariusor/mpris-ctl","last_synced_at":"2025-07-16T16:33:56.334Z","repository":{"id":37978635,"uuid":"85731840","full_name":"mariusor/mpris-ctl","owner":"mariusor","description":"Basic mpris player control for linux command line","archived":false,"fork":false,"pushed_at":"2025-02-24T14:55:49.000Z","size":337,"stargazers_count":51,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-16T06:51:10.958Z","etag":null,"topics":["mpris","mpris-ctl","suckless"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mariusor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-21T17:17:11.000Z","updated_at":"2025-03-11T13:42:25.000Z","dependencies_parsed_at":"2022-09-06T19:52:49.071Z","dependency_job_id":"b0d7322b-dcaf-47cc-a863-2559c98c365d","html_url":"https://github.com/mariusor/mpris-ctl","commit_stats":null,"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariusor%2Fmpris-ctl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariusor%2Fmpris-ctl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariusor%2Fmpris-ctl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariusor%2Fmpris-ctl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mariusor","download_url":"https://codeload.github.com/mariusor/mpris-ctl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243958160,"owners_count":20374811,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mpris","mpris-ctl","suckless"],"created_at":"2024-08-01T15:01:23.411Z","updated_at":"2025-03-17T01:30:56.710Z","avatar_url":"https://github.com/mariusor.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# mpris-ctl \n[![MIT Licensed](https://img.shields.io/github/license/mariusor/mpris-ctl.svg)](https://git.sr.ht/~mariusor/mpris-ctl/blob/master/LICENSE)\n[![Build status](https://builds.sr.ht/~mariusor/mpris-ctl.svg)](https://builds.sr.ht/~mariusor/mpris-ctl)\n[![AUR package](https://img.shields.io/aur/version/mpris-ctl.svg)](https://aur.archlinux.org/packages/mpris-ctl/)\n[![Coverity Scan status](https://img.shields.io/coverity/scan/12309.svg)](https://scan.coverity.com/projects/12309)\n[![Latest build](https://img.shields.io/github/release/mariusor/mpris-ctl.svg)](https://github.com/mariusor/mpris-ctl/releases/latest)\n\n\nIs a minimalistic cli tool for controlling audio players exposing a MPRIS DBus interface, targeted at keyboard based WMs.\n\nIts only build/run dependency is on the [C dbus library](https://dbus.freedesktop.org/doc/api/html/index.html).\n\n## Build\n\nTo build from source just clone the repository and run make. \nBy default the binary is installed in **/usr/local/bin**, but you can provide your own DESTDIR and INSTALL_PREFIX.\n\n```sh\n$ git clone https://git.sr.ht/~mariusor/mpris-ctl\n$ cd mpris-ctl\n$ make release\n# make install\n```\n\n## Usage\n\nAn example of configuration for i3/sway:\n\n```\nbindsym XF86AudioPlay exec \"mpris-ctl --player active --player inactive pp\"\nbindsym XF86AudioStop exec \"mpris-ctl --player active stop\"\nbindsym XF86AudioNext exec \"mpris-ctl --player active next\"\nbindsym XF86AudioPrev exec \"mpris-ctl --player active prev\"\n```\n\nThe `--player` flag supports passing multiple player names, or the values `active` or `inactive`. \nThe active players are considered to be the ones which have the `play_status` be `Playing`, \nand the inactive ones are the ones with the `play_status` `Stopped` or `Paused`.\n\nEg:\n\n```\nmpris-ctl --player Rhythmbox play\nmpris-ctl --player active pp\nmpris-ctl --player inactive play\n```\n\nA more advanced example could be (this requires a notify daemon to be running):\n\n```\nset $mpris_notify notify-send \"$(mpris-ctl info \"%play_status\")\" \\\n    \"$(mpris-ctl info \"%artist_name: %track_name\\nOn album '%album_name'\")\"\nbindsym $mod+XF86AudioPlay exec $mpris_notify\n# or even:\nbindsym XF86AudioPlay exec mpris-ctl pp \u0026\u0026 $mpris_notify\n```\n\nSupported format specifiers for `mpris-ctl info` command:\n\n```\nFormat specifiers:\n    %player_name     prints the player name\n    %track_name      prints the track name\n    %track_number    prints the track number\n    %track_length    prints the track length (seconds)\n    %artist_name     prints the artist name\n    %album_name      prints the album name\n    %album_artist    prints the album artist\n    %play_status     prints the playback status\n    %shuffle         prints the shuffle mode\n    %volume          prints the volume\n    %loop_status     prints the loop status\n    %position        prints the song position (seconds)\n    %bitrate         prints the track's bitrate\n    %comment         prints the track's comment\n    %full            prints all available information\n\n```\n\nExample: \n\n```\n$ mpris-ctl info \"%track_name\"\nSong 42\n$ mpris-ctl info\nSong 42 - Bloor - The Best of Bloor\n\n```\n\n## Resources\n\nFor discussions related to the project without requiring a Github account please see our mailing list: [https://lists.sr.ht/~mariusor/mpris-tools](https://lists.sr.ht/~mariusor/mpris-tools).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmariusor%2Fmpris-ctl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmariusor%2Fmpris-ctl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmariusor%2Fmpris-ctl/lists"}