···11# nu_plugin_dbus
22-Nushell plugin for interacting with D-Bus
22+33+ Commands for interacting with D-Bus
44+55+ Search terms: dbus
66+77+ Usage:
88+ > dbus
99+1010+ Subcommands:
1111+ dbus call - Call a method and get its response
1212+ dbus get - Get a D-Bus property
1313+ dbus get-all - Get all D-Bus property for the given objects
1414+ dbus set - Get all D-Bus property for the given objects
1515+1616+ Flags:
1717+ -h, --help - Display the help message for this command
1818+1919+## `dbus call`
2020+2121+ Call a method and get its response
2222+2323+ Returns an array if the method call returns more than one value.
2424+2525+ Search terms: dbus
2626+2727+ Usage:
2828+ > dbus call {flags} <object> <interface> <method> ...(args)
2929+3030+ Flags:
3131+ -h, --help - Display the help message for this command
3232+ --session - Send to the session message bus (default)
3333+ --system - Send to the system message bus
3434+ --started - Send to the bus that started this process, if applicable
3535+ --bus <String> - Send to the bus server at the given address
3636+ --peer <String> - Send to a non-bus D-Bus server at the given address. Will not call the Hello method on initialization.
3737+ --timeout <Duration> - How long to wait for a response
3838+ --signature <String> - Signature of the arguments to send, in D-Bus format.
3939+ If not provided, they will be determined from introspection.
4040+ If --no-introspect is specified and this is not provided, they will be guessed (poorly)
4141+ --no-flatten - Always return a list of all return values
4242+ --no-introspect - Don't use introspection to determine the correct argument signature
4343+ --dest (required parameter) <String> - The name of the connection to send the method to
4444+4545+ Parameters:
4646+ object <string>: The path to the object to call the method on
4747+ interface <string>: The name of the interface the method belongs to
4848+ method <string>: The name of the method to send
4949+ ...args <any>: Arguments to send with the method call
5050+5151+ Examples:
5252+ Ping the D-Bus server itself
5353+ > dbus call --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.Peer Ping
5454+5555+ Show a notification on the desktop for 5 seconds
5656+ > 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
5757+5858+## `dbus get`
5959+6060+ Get a D-Bus property
6161+6262+ Search terms: dbus
6363+6464+ Usage:
6565+ > dbus get {flags} <object> <interface> <property>
6666+6767+ Flags:
6868+ -h, --help - Display the help message for this command
6969+ --session - Send to the session message bus (default)
7070+ --system - Send to the system message bus
7171+ --started - Send to the bus that started this process, if applicable
7272+ --bus <String> - Send to the bus server at the given address
7373+ --peer <String> - Send to a non-bus D-Bus server at the given address. Will not call the Hello method on initialization.
7474+ --timeout <Duration> - How long to wait for a response
7575+ --dest (required parameter) <String> - The name of the connection to read the property from
7676+7777+ Parameters:
7878+ object <string>: The path to the object to read the property from
7979+ interface <string>: The name of the interface the property belongs to
8080+ property <string>: The name of the property to read
8181+8282+ Examples:
8383+ Get the currently playing song in Spotify
8484+ > dbus get --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player Metadata
8585+ ╭──────────────┬───────────────────────────────────────────────────────╮
8686+ │ xesam:title │ Birdie │
8787+ │ xesam:artist │ [list 1 item] │
8888+ │ xesam:album │ Love Your Love │
8989+ │ xesam:url │ https://open.spotify.com/track/51748BvzeeMs4PIdPuyZmv │
9090+ ╰──────────────┴───────────────────────────────────────────────────────╯
9191+9292+## `dbus get-all`
9393+9494+ Get all D-Bus property for the given objects
9595+9696+ Search terms: dbus
9797+9898+ Usage:
9999+ > dbus get-all {flags} <object> <interface>
100100+101101+ Flags:
102102+ -h, --help - Display the help message for this command
103103+ --session - Send to the session message bus (default)
104104+ --system - Send to the system message bus
105105+ --started - Send to the bus that started this process, if applicable
106106+ --bus <String> - Send to the bus server at the given address
107107+ --peer <String> - Send to a non-bus D-Bus server at the given address. Will not call the Hello method on initialization.
108108+ --timeout <Duration> - How long to wait for a response
109109+ --dest (required parameter) <String> - The name of the connection to read the property from
110110+111111+ Parameters:
112112+ object <string>: The path to the object to read the property from
113113+ interface <string>: The name of the interface the property belongs to
114114+115115+ Examples:
116116+ Get the current player state of Spotify
117117+ > dbus get-all --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player
118118+ ╭────────────────┬────────╮
119119+ │ CanPlay │ true │
120120+ │ Volume │ 0.43 │
121121+ │ PlaybackStatus │ Paused │
122122+ ╰────────────────┴────────╯
123123+124124+## `dbus set`
125125+126126+ Get all D-Bus property for the given objects
127127+128128+ Search terms: dbus
129129+130130+ Usage:
131131+ > dbus set {flags} <object> <interface> <property> <value>
132132+133133+ Flags:
134134+ -h, --help - Display the help message for this command
135135+ --session - Send to the session message bus (default)
136136+ --system - Send to the system message bus
137137+ --started - Send to the bus that started this process, if applicable
138138+ --bus <String> - Send to the bus server at the given address
139139+ --peer <String> - Send to a non-bus D-Bus server at the given address. Will not call the Hello method on initialization.
140140+ --timeout <Duration> - How long to wait for a response
141141+ --signature <String> - Signature of the value to set, in D-Bus format.
142142+ If not provided, it will be determined from introspection.
143143+ If --no-introspect is specified and this is not provided, it will be guessed (poorly)
144144+ --dest (required parameter) <String> - The name of the connection to write the property on
145145+146146+ Parameters:
147147+ object <string>: The path to the object to write the property on
148148+ interface <string>: The name of the interface the property belongs to
149149+ property <string>: The name of the property to write
150150+ value <any>: The value to write to the property
151151+152152+ Examples:
153153+ Set the volume of Spotify to 50%
154154+ > dbus set --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player Volume 0.5
155155+