{"id":21510194,"url":"https://github.com/itsshamed/spotify-dbus-enhancer","last_synced_at":"2025-03-17T15:17:57.470Z","repository":{"id":217572961,"uuid":"744020993","full_name":"ItsShamed/spotify-dbus-enhancer","owner":"ItsShamed","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-06T09:17:06.000Z","size":76,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T04:02:54.822Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Vala","has_issues":false,"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/ItsShamed.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":"2024-01-16T13:30:22.000Z","updated_at":"2025-01-06T09:17:10.000Z","dependencies_parsed_at":"2024-01-17T06:26:25.298Z","dependency_job_id":"9faaa675-90c0-4ca8-9746-e0f78513d44b","html_url":"https://github.com/ItsShamed/spotify-dbus-enhancer","commit_stats":null,"previous_names":["itsshamed/spotify-dbus-enhancer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsShamed%2Fspotify-dbus-enhancer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsShamed%2Fspotify-dbus-enhancer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsShamed%2Fspotify-dbus-enhancer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsShamed%2Fspotify-dbus-enhancer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ItsShamed","download_url":"https://codeload.github.com/ItsShamed/spotify-dbus-enhancer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244056427,"owners_count":20390720,"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":[],"created_at":"2024-11-23T21:47:27.163Z","updated_at":"2025-03-17T15:17:57.451Z","avatar_url":"https://github.com/ItsShamed.png","language":"Vala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spotify D-Bus notification Enhancer\n\nGoofy program to enhance the useless notifications sent by Spotify on Linux.\n\n## Dependencies\n\n### Building manually\n\nThis program is written in the Vala language, which makes interface with DBus\nmuch easier. This project uses Meson to compile the program.\n\nTo be able to compile, you need the dependencies listed in the `meson.build`\nfile, namely:\n- `glib-2.0` (base Vala requirement)\n- `gobject-2.0` (base Vala requirement)\n- `gio-2.0` (DBus interfacing)\n\nThen prepare the meson project:\n\n```sh\nmeson setup build\n```\n\n\u003e [!TIP]\n\u003e Use the `--buildtype=release` to build in release mode\n\nThen compile:\n\n```\nmeson compile -C build\n```\n\n### Nix / NixOS\n\nThis repo uses Nix flakes and has compatibility for non-flakes systems and\nexposes the script as a package as well as a systemd user service via an Home\nManager module.\n\n#### Flakes\n\nAdd this repo to your flake inputs and either add import the module or add\nthe program to your packages.\n\n\u003csub\u003e`flake.nix`\u003c/sub\u003e\n```nix\n{\n  inputs = {\n    nixpkgs.url = \"github:NixOS/nixpkgs/nixos-23.11\";\n    home-manager.url = \"github:nix-community/home-manager/release-23.11\";\n\n    spotify-notifyx = {\n      url = \"github:ItsShamed/spotify-dbus-enhancer/master\";\n      inputs.nixpkgs.follows = \"nixpkgs\";\n    };\n  };\n\n  outputs = { self, nixpkgs, home-manager, spotify-notifyx, ... } @ inputs:\n  {\n    homeConfigurations.user = home-manager.lib.homeManagerConfiguration {\n      pkgs = import nixpkgs {\n        system = \"x86_64-linux\"; # or aarch64-linux\n      };\n\n      extraSpecialArgs = { inherit inputs; };\n\n      modules = [\n        # Add the module or...\n        spotify-notifyx.homeManagerModules.default\n      ];\n    };\n  };\n}\n```\n\n\u003csub\u003e`home.nix`\u003c/sub\u003e\n```nix\n{ pkgs, inputs, ... }:\n\n{\n  # ... install the package\n  home.packages = [\n    inputs.spotify-notifyx.defaultPackage.${pkgs.system}\n  ];\n  # ...\n}\n```\n\n#### Without Flakes\n\n```nix\n{ pkgs, ... }:\n\nlet\n  spotify-notifix = import (builtins.fetchTarball \"https://github.com/ItsShamed/spotify-dbus-enhancer/archive/master.tar.gz\");\nin\n{\n  # Import module\n  imports = [\n    spotify-notifix.homeManagerModules.default\n  ];\n\n  # Or add package\n  home.packages = [\n    spotify-notifix.defaultPackage.${pkgs.system}\n  ];\n}\n```\n\n## How does it works?\n\nThe programs listens on a D-Bus Session Bus for method calls to\n`org.freedesktop.Notifications.Notify`, and only matches notifications which\nhave the appname \"Spotify\".\n\nOnce a notification is matched, the program will check on Spotify's MPris\ninstance to get all necessary metadata. It will then edit the matched\nnotification with better formatting, and resend the call with the same\n`replaces_id` parameter, which will flawlessly replace the notification.\n\n## History\n\nThis used to be a simple Python script that used the `dbus-python` and\n`PyGObject` librairies. But at that time I didn't knew much about how D-Bus\nworked and juste copy-pasted code from the Internet.\n\nOn top of that due to how poor it was written (and beacause it's Python),\nthe filter would take too long to process and resend the notification to the\npoint where you would actually see the notification being edited live.\n\nSince `27c1443c`, this has been rewritten in Vala, because it's a GLib and D-Bus\noriented language that fits much more for this purpose.\n\n## License\n\nThis software is licensed under the MIT license.\nSee the [LICENSE](/LICENSE) file to learn more.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsshamed%2Fspotify-dbus-enhancer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsshamed%2Fspotify-dbus-enhancer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsshamed%2Fspotify-dbus-enhancer/lists"}