-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invoke CmdArgs from Kwin script is ignored #2
Comments
Similar to #1, I'm suspecting the problem might be that second argument to Can you try passing a JavaScript array, something like this: callDBus(
"nl.dvdgiessen.dbusapplauncher",
"/nl/dvdgiessen/DBusAppLauncher",
"nl.dvdgiessen.dbusapplauncher.Exec",
"CmdArgs",
"/usr/bin/notify-send",
["test"]
); EDIT: And since |
Unfortunately, using an array does not seem to make a difference. Nothing happens. The journal logs are empty and adding a |
Hm, I was hoping that it would automatically convert it to a StringList correctly, but I think it's trying to transmit it as a VariantList instead. After digging a little bit I found the KWin function doesn't do any special conversion, nor does the QJSValue code. So the JS array is converted to a QVariantList instead of the QStringList we would need: Because when the time comes to convert this to a DBus type it must be specifically a QStringList to get converted to the correct StringList type. So it would seem there currently is no way to call a DBus function from KWin which requires a QStringList argument. For that to be possible someone would probably need to extend the KWin JS API with an explicit constructor for a QStringList. The |
Closing since this is not really a bug or something to fix in If the arguments you need to pass do not change, you could try to work around this by creating a simple script file that does not require any arguments and calling that from your KWin script. I've also opened #3 as a feature request that could perhaps provide an alternative way to mitigate this KWin JS API limitation by adding a new method that would employ shell-like command line parsing. |
When I run this in my terminal, the notification shows up as expected:
However, this call from a Kwin script does nothing:
Note: the kwin script itself works and the call is made. For example, when I use it with
Cmd
,/usr/bin/konsole
the konsole pops up. The logs (journalctl -b | grep dbus
) are completely empty.The text was updated successfully, but these errors were encountered: