{"id":13541148,"url":"https://github.com/devyn/nu_plugin_dbus","last_synced_at":"2025-04-02T08:30:58.388Z","repository":{"id":219867065,"uuid":"750012771","full_name":"devyn/nu_plugin_dbus","owner":"devyn","description":"Nushell plugin for interacting with D-Bus","archived":false,"fork":false,"pushed_at":"2025-01-08T14:51:47.000Z","size":126,"stargazers_count":16,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-08T15:58:20.803Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/devyn.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-29T20:27:03.000Z","updated_at":"2025-01-08T14:46:40.000Z","dependencies_parsed_at":"2024-07-24T04:27:53.073Z","dependency_job_id":"207043fc-8813-4260-b37e-adab51c317d8","html_url":"https://github.com/devyn/nu_plugin_dbus","commit_stats":null,"previous_names":["devyn/nu_plugin_dbus"],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devyn%2Fnu_plugin_dbus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devyn%2Fnu_plugin_dbus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devyn%2Fnu_plugin_dbus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devyn%2Fnu_plugin_dbus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devyn","download_url":"https://codeload.github.com/devyn/nu_plugin_dbus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246781937,"owners_count":20832937,"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-08-01T10:00:39.677Z","updated_at":"2025-04-02T08:30:58.114Z","avatar_url":"https://github.com/devyn.png","language":"Rust","readme":"# nu_plugin_dbus\n\n[Nushell](https://nushell.sh/) plugin for interacting with [D-Bus](https://dbus.freedesktop.org/)\n\nWith the commands provided by this plugin, you can interact with many of the desktop-oriented\nsystems on UNIX-like systems that use D-Bus, including Linux and FreeBSD. You can control media\nplayers, on-screen displays, power policies, and even administer services.\n\nNushell provides a particularly nice environment for interacting with D-Bus, as both support typed\nstructured data, and interacting with this on a traditional UNIX command line with tools like\n`dbus-send` and `busctl` is cumbersome and tricky to automate.\n\nThis plugin automatically determines the correct input types through D-Bus introspection when\navailable, unlike either of the aforementioned tools, making it easier to interact with objects on\nthe bus without having to implement boilerplate from documentation.\n\n## Install with Cargo\n\nFrom within nushell:\n\n```nushell\ncargo install --locked nu_plugin_dbus\nplugin add ~/.cargo/bin/nu_plugin_dbus\nplugin use dbus # or restart nu\n```\n\n## Usage\n\n    Commands for interacting with D-Bus\n\n    Search terms: dbus\n\n    Usage:\n      \u003e dbus \n\n    Subcommands:\n      dbus call - Call a method and get its response\n      dbus get - Get a D-Bus property\n      dbus get-all - Get all D-Bus properties for the given object\n      dbus introspect - Introspect a D-Bus object\n      dbus list - List all available connection names on the bus\n      dbus set - Set a D-Bus property\n\n    Flags:\n      -h, --help - Display the help message for this command\n\n# `dbus call`\n\n    Call a method and get its response\n\n    Returns an array if the method call returns more than one value.\n\n    Search terms: dbus\n\n    Usage:\n      \u003e dbus call {flags} \u003cobject\u003e \u003cinterface\u003e \u003cmethod\u003e ...(args) \n\n    Flags:\n      -h, --help - Display the help message for this command\n      --session - Send to the session message bus (default)\n      --system - Send to the system message bus\n      --started - Send to the bus that started this process, if applicable\n      --bus \u003cString\u003e - Send to the bus server at the given address\n      --peer \u003cString\u003e - Send to a non-bus D-Bus server at the given address. Will not call the Hello method on initialization.\n      --timeout \u003cDuration\u003e - How long to wait for a response\n      --signature \u003cString\u003e - Signature of the arguments to send, in D-Bus format.\n        If not provided, they will be determined from introspection.\n        If --no-introspect is specified and this is not provided, they will be guessed (poorly)\n      --no-flatten - Always return a list of all return values\n      --no-introspect - Don't use introspection to determine the correct argument signature\n      --dest (required parameter) \u003cString\u003e - The name of the connection to send the method to\n\n    Parameters:\n      object \u003cstring\u003e: The path to the object to call the method on\n      interface \u003cstring\u003e: The name of the interface the method belongs to\n      method \u003cstring\u003e: The name of the method to send\n      ...args \u003cany\u003e: Arguments to send with the method call\n\n    Input/output types:\n      ╭───┬─────────┬────────╮\n      │ # │  input  │ output │\n      ├───┼─────────┼────────┤\n      │ 0 │ nothing │ any    │\n      ╰───┴─────────┴────────╯\n\n    Examples:\n      Ping the D-Bus server itself\n      \u003e dbus call --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.Peer Ping\n\n      Show a notification on the desktop for 5 seconds\n      \u003e dbus call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications Notify \"Floppy disks\" 0 \"media-floppy\" \"Rarely seen\" \"But sometimes still used\" [] {} 5000\n\n# `dbus get`\n\n    Get a D-Bus property\n\n    Search terms: dbus\n\n    Usage:\n      \u003e dbus get {flags} \u003cobject\u003e \u003cinterface\u003e \u003cproperty\u003e \n\n    Flags:\n      -h, --help - Display the help message for this command\n      --session - Send to the session message bus (default)\n      --system - Send to the system message bus\n      --started - Send to the bus that started this process, if applicable\n      --bus \u003cString\u003e - Send to the bus server at the given address\n      --peer \u003cString\u003e - Send to a non-bus D-Bus server at the given address. Will not call the Hello method on initialization.\n      --timeout \u003cDuration\u003e - How long to wait for a response\n      --dest (required parameter) \u003cString\u003e - The name of the connection to read the property from\n\n    Parameters:\n      object \u003cstring\u003e: The path to the object to read the property from\n      interface \u003cstring\u003e: The name of the interface the property belongs to\n      property \u003cstring\u003e: The name of the property to read\n\n    Input/output types:\n      ╭───┬─────────┬────────╮\n      │ # │  input  │ output │\n      ├───┼─────────┼────────┤\n      │ 0 │ nothing │ any    │\n      ╰───┴─────────┴────────╯\n\n    Examples:\n      Get the currently playing song in Spotify\n      \u003e dbus get --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player Metadata\n      ╭──────────────┬───────────────────────────────────────────────────────╮\n      │ xesam:title  │ Birdie                                                │\n      │ xesam:artist │ [list 1 item]                                         │\n      │ xesam:album  │ Love Your Love                                        │\n      │ xesam:url    │ https://open.spotify.com/track/51748BvzeeMs4PIdPuyZmv │\n      ╰──────────────┴───────────────────────────────────────────────────────╯\n\n# `dbus get-all`\n\n    Get all D-Bus properties for the given object\n\n    Search terms: dbus\n\n    Usage:\n      \u003e dbus get-all {flags} \u003cobject\u003e \u003cinterface\u003e \n\n    Flags:\n      -h, --help - Display the help message for this command\n      --session - Send to the session message bus (default)\n      --system - Send to the system message bus\n      --started - Send to the bus that started this process, if applicable\n      --bus \u003cString\u003e - Send to the bus server at the given address\n      --peer \u003cString\u003e - Send to a non-bus D-Bus server at the given address. Will not call the Hello method on initialization.\n      --timeout \u003cDuration\u003e - How long to wait for a response\n      --dest (required parameter) \u003cString\u003e - The name of the connection to read the property from\n\n    Parameters:\n      object \u003cstring\u003e: The path to the object to read the property from\n      interface \u003cstring\u003e: The name of the interface the property belongs to\n\n    Input/output types:\n      ╭───┬─────────┬────────╮\n      │ # │  input  │ output │\n      ├───┼─────────┼────────┤\n      │ 0 │ nothing │ record │\n      ╰───┴─────────┴────────╯\n\n    Examples:\n      Get the current player state of Spotify\n      \u003e dbus get-all --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player\n      ╭────────────────┬────────╮\n      │ CanPlay        │ true   │\n      │ Volume         │ 0.43   │\n      │ PlaybackStatus │ Paused │\n      ╰────────────────┴────────╯\n\n# `dbus introspect`\n\n    Introspect a D-Bus object\n\n    Returns information about available nodes, interfaces, methods, signals, and properties on the given object path\n\n    Search terms: dbus\n\n    Usage:\n      \u003e dbus introspect {flags} \u003cobject\u003e \n\n    Flags:\n      -h, --help - Display the help message for this command\n      --session - Send to the session message bus (default)\n      --system - Send to the system message bus\n      --started - Send to the bus that started this process, if applicable\n      --bus \u003cString\u003e - Send to the bus server at the given address\n      --peer \u003cString\u003e - Send to a non-bus D-Bus server at the given address. Will not call the Hello method on initialization.\n      --timeout \u003cDuration\u003e - How long to wait for a response\n      --dest (required parameter) \u003cString\u003e - The name of the connection that owns the object\n\n    Parameters:\n      object \u003cstring\u003e: The path to the object to introspect\n\n    Input/output types:\n      ╭───┬─────────┬────────╮\n      │ # │  input  │ output │\n      ├───┼─────────┼────────┤\n      │ 0 │ nothing │ record │\n      ╰───┴─────────┴────────╯\n\n    Examples:\n      Look at the MPRIS2 interfaces exposed by Spotify\n      \u003e dbus introspect --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 | explore\n\n      Get methods exposed by KDE Plasma's on-screen display service\n      \u003e dbus introspect --dest=org.kde.plasmashell /org/kde/osdService | get interfaces | where name == org.kde.osdService | get 0.methods\n\n      List objects exposed by KWin\n      \u003e dbus introspect --dest=org.kde.KWin / | get children | select name\n\n# `dbus list`\n\n    List all available connection names on the bus\n\n    These can be used as arguments for --dest on any of the other commands.\n\n    Search terms: dbus\n\n    Usage:\n      \u003e dbus list {flags} (pattern) \n\n    Flags:\n      -h, --help - Display the help message for this command\n      --session - Send to the session message bus (default)\n      --system - Send to the system message bus\n      --started - Send to the bus that started this process, if applicable\n      --bus \u003cString\u003e - Send to the bus server at the given address\n      --peer \u003cString\u003e - Send to a non-bus D-Bus server at the given address. Will not call the Hello method on initialization.\n      --timeout \u003cDuration\u003e - How long to wait for a response\n\n    Parameters:\n      pattern \u003cstring\u003e: An optional glob-like pattern to filter the result by (optional)\n\n    Input/output types:\n      ╭───┬─────────┬──────────────╮\n      │ # │  input  │    output    │\n      ├───┼─────────┼──────────────┤\n      │ 0 │ nothing │ list\u003cstring\u003e │\n      ╰───┴─────────┴──────────────╯\n\n    Examples:\n      List all names available on the bus\n      \u003e dbus list\n\n      List top-level freedesktop.org names on the bus (e.g. matches `org.freedesktop.PowerManagement`, but not `org.freedesktop.Management.Inhibit`)\n      \u003e dbus list org.freedesktop.*\n      ╭───┬───────────────────────────────╮\n      │ 0 │ org.freedesktop.DBus          │\n      │ 1 │ org.freedesktop.Flatpak       │\n      │ 2 │ org.freedesktop.Notifications │\n      ╰───┴───────────────────────────────╯\n\n      List all MPRIS2 media players on the bus\n      \u003e dbus list org.mpris.MediaPlayer2.**\n      ╭───┬────────────────────────────────────────────────╮\n      │ 0 │ org.mpris.MediaPlayer2.spotify                 │\n      │ 1 │ org.mpris.MediaPlayer2.kdeconnect.mpris_000001 │\n      ╰───┴────────────────────────────────────────────────╯\n\n# `dbus set`\n\n    Set a D-Bus property\n\n    Search terms: dbus\n\n    Usage:\n      \u003e dbus set {flags} \u003cobject\u003e \u003cinterface\u003e \u003cproperty\u003e \u003cvalue\u003e \n\n    Flags:\n      -h, --help - Display the help message for this command\n      --session - Send to the session message bus (default)\n      --system - Send to the system message bus\n      --started - Send to the bus that started this process, if applicable\n      --bus \u003cString\u003e - Send to the bus server at the given address\n      --peer \u003cString\u003e - Send to a non-bus D-Bus server at the given address. Will not call the Hello method on initialization.\n      --timeout \u003cDuration\u003e - How long to wait for a response\n      --signature \u003cString\u003e - Signature of the value to set, in D-Bus format.\n        If not provided, it will be determined from introspection.\n        If --no-introspect is specified and this is not provided, it will be guessed (poorly)\n      --dest (required parameter) \u003cString\u003e - The name of the connection to write the property on\n\n    Parameters:\n      object \u003cstring\u003e: The path to the object to write the property on\n      interface \u003cstring\u003e: The name of the interface the property belongs to\n      property \u003cstring\u003e: The name of the property to write\n      value \u003cany\u003e: The value to write to the property\n\n    Input/output types:\n      ╭───┬─────────┬─────────╮\n      │ # │  input  │ output  │\n      ├───┼─────────┼─────────┤\n      │ 0 │ nothing │ nothing │\n      ╰───┴─────────┴─────────╯\n\n    Examples:\n      Set the volume of Spotify to 50%\n      \u003e dbus set --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player Volume 0.5\n\n","funding_links":[],"categories":["Plugins"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevyn%2Fnu_plugin_dbus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevyn%2Fnu_plugin_dbus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevyn%2Fnu_plugin_dbus/lists"}