{"id":26232553,"url":"https://github.com/bulletmark/dbus-action","last_synced_at":"2025-04-22T10:41:01.435Z","repository":{"id":137097626,"uuid":"255758813","full_name":"bulletmark/dbus-action","owner":"bulletmark","description":"Watch D-Bus to action configured commands on specific events","archived":false,"fork":false,"pushed_at":"2025-01-28T00:47:08.000Z","size":44,"stargazers_count":16,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-28T01:35:12.195Z","etag":null,"topics":["dbus","desktop","desktop-automation","python3"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bulletmark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-04-15T00:14:08.000Z","updated_at":"2025-01-28T00:47:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"541e2771-86f8-48cf-bff2-ff9b4c35c2d9","html_url":"https://github.com/bulletmark/dbus-action","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bulletmark%2Fdbus-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bulletmark%2Fdbus-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bulletmark%2Fdbus-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bulletmark%2Fdbus-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bulletmark","download_url":"https://codeload.github.com/bulletmark/dbus-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243318778,"owners_count":20272136,"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":["dbus","desktop","desktop-automation","python3"],"created_at":"2025-03-13T00:37:29.231Z","updated_at":"2025-03-13T00:37:29.766Z","avatar_url":"https://github.com/bulletmark.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"### DBUS-ACTION\n[![AUR](https://img.shields.io/aur/version/dbus-action)](https://aur.archlinux.org/packages/dbus-action/)\n\n[dbus-action][REPO] is a program which listens to D-Bus and actions\nconfigured commands on specified messages. A message is specifying using\nbus + interface + member + response value, and this can be mapped to\ntrigger any arbitrary command. You can choose to [automatically\nstart](https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html)\ndbus-action in your desktop environment to action commands in response\nto events in that environment.\n\nThe latest version and documentation is available at\nhttps://github.com/bulletmark/dbus-action.\n\n### INSTALLATION\n\nNOTE: Arch users can just install [_dbus-action from the\nAUR_][AUR]. Then skip to the next CONFIGURATION section.\n\nYou need python 3.6 or later, python2 is not supported. You also need\n[PyGObject](https://pypi.org/project/PyGObject/),\n[python3-dbus](https://pypi.org/project/dbus-python/),\nand [python3-ruamel-yaml](https://pypi.org/project/ruamel.yaml/)\npackages.\n\nInstall this software:\n\n    git clone https://github.com/bulletmark/dbus-action.git\n    cd dbus-action\n    sudo make install (or sudo ./dbus-action-setup install)\n\n### CONFIGURATION\n\nThe default configuration file is in `/etc/dbus-action.conf`. You will\nwant to create your own custom triggers and actions so copy that file to\n`~/.config/dbus-action.conf` and edit it. Options and an example are\ndescribed in comments within that file. The example shows how to action\na command when your machine suspends, and then another command when it\nresumes from suspend.\n\nFor other custom actions, most likely you will first need to determine\nthe interface, member, and responses you want to trigger on. To help\nwith this, you can run `dbus-action` in monitor mode to view all\nmessages. Run the following as your normal user in your normal session\n(DO NOT use root/sudo):\n\n    dbus-action -m all\n\nNote, instead of `-m all`, you can choose `-m session` or `-m system` to\nlimit listening to those specific buses only. You can also add `-i\ninterface` to further limit output to a specific interface.\n\nThen perform the action you would like to intercept and capture the\nD-Bus message. In your `~/.config/dbus-action.conf`, configure the bus,\ninterface, member, and response values to commands which you would like\nto trigger. Note that the response is a list of values (although often\nonly a list of 1) so you must set `value_index` in your configuration to\nthe index of the value in the returned list you want to compare. It\ndefaults to 0, i.e. the first value returned.\n\n### STARTING AND STOPPING\n\nYou must choose between starting the application as a [systemd user\nservice](https://wiki.archlinux.org/index.php/Systemd/User), or as a\n[desktop\napplication](https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html)\n(with an XDG compliant DE such as GNOME and KDE). The systemd user\nservice provides more robust management and better logging than the\ndesktop so is the preferred choice. Choose one of the two following\noptions:\n\n1. To set up the application as a [systemd user\n   service](https://wiki.archlinux.org/index.php/Systemd/User):\n\n````\ndbus-action-setup service\n````\n\n2. Or instead, to set up the application using your\n   [DE](https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html):\n\n````\ndbus-action-setup desktop\n````\n\nAfter *choosing one of the above*, you can use then run the following commands:\n\nEnable the app to start automatically in the background when you\nlog in with:\n\n    dbus-action-setup autostart\n\nDisable the app from starting automatically with:\n\n    dbus-action-setup autostop\n\nStart the app immediately in the background:\n\n    dbus-action-setup start\n\nStop the background app immediately with:\n\n    dbus-action-setup stop\n\nRestart the app, e.g. to reload the configuration file, with:\n\n    dbus-action-setup restart\n\nCheck the status of the app with:\n\n    dbus-action-setup status\n\nNote if you are starting using the DE option and you are using some\nuncommon systems then `dbus-action-setup start` may fail\nto start the application returning you a message _Don't know how to\ninvoke dbus-action.desktop_. If you get this error message,\ninstall the dex package, preferably from your system packages\nrepository, and try again.\n\n### UPGRADE\n\n    # cd to source dir, as above\n    git pull\n    sudo make install (or sudo ./dbus-action-setup install)\n    dbus-action-setup restart\n\n### REMOVAL\n\n    dbus-action-setup stop\n    dbus-action-setup autostop\n    sudo dbus-action-setup uninstall\n\n### COMMAND LINE USAGE\n\n```\nusage: dbus-action [-h] [-c CONFFILE] [-v] [-m MONITOR] [-i INTERFACE]\n\nWatch D-Bus to action configured commands on specific events.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -c CONFFILE, --conffile CONFFILE\n                        alternative configuration file\n  -v, --verbose         verbose output\n  -m MONITOR, --monitor MONITOR\n                        just monitor given bus, or \"all\" buses\n                        (session,system)\n  -i INTERFACE, --interface INTERFACE\n                        limit monitor output to specific interface\n```\n\n### LICENSE\n\nCopyright (C) 2020 Mark Blakeney. This program is distributed under the\nterms of the GNU General Public License.\nThis program is free software: you can redistribute it and/or modify it\nunder the terms of the GNU General Public License as published by the\nFree Software Foundation, either version 3 of the License, or any later\nversion.\nThis program is distributed in the hope that it will be useful, but\nWITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General\nPublic License at \u003chttps://www.gnu.org/licenses/\u003e for more details.\n\n[REPO]: https://github.com/bulletmark/dbus-action/\n[AUR]: https://aur.archlinux.org/packages/dbus-action/\n\n\u003c!-- vim: se ai syn=markdown: --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbulletmark%2Fdbus-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbulletmark%2Fdbus-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbulletmark%2Fdbus-action/lists"}