简体   繁体   English

无法从 kwin 脚本中获取 output

[英]Can't get output from kwin script

I just installed kubuntu so that I could learn more about linux and I thought a kwin script would be a fun first project.我刚刚安装了 kubuntu,以便我可以了解更多关于 linux 的信息,我认为 kwin 脚本将是一个有趣的第一个项目。 Unfortunately, I got stuck immediately.不幸的是,我马上就卡住了。 I'm not actually able to see any output from my script and I'm not sure what I'm doing wrong.我实际上无法从我的脚本中看到任何 output,我不确定我做错了什么。 Here's all I did:这是我所做的一切:

print("hello world");

function hello() {
  print("hello world");
}

registerShortcut("Hello", "Print hello world.", "Meta+R", hello);

I set QT_LOGGING_RULES as mentioned here: https://develop.kde.org/docs/extend/plasma/kwin/ I also added it to.bash_profile and relogged.我按照此处所述设置 QT_LOGGING_RULES: https://develop.kde.org/docs/extend/plasma/kwin/我还将它添加到 .bash_profile 并重新登录。

I'm running journalctl -g "js:" -f but I'm not seeing any output. I also tried -g "hello".我正在运行 journalctl -g "js:" -f 但我没有看到任何 output。我也试过 -g "hello"。

I installed the script using kpackagetool5 --type=KWin/Script -i ~/.scripts/myscript and enabled it using the gui in settings.我使用 kpackagetool5 --type=KWin/Script -i ~/.scripts/myscript 安装脚本并使用设置中的 gui 启用它。 It shows up correctly there.它在那里正确显示。

Does anyone have an idea what I'm doing wrong?有谁知道我做错了什么?

My js file was in script/contents, it should've been in script/contents/code.我的 js 文件在脚本/内容中,它应该在脚本/内容/代码中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM