未找到 Ubersicht 小部件底层脚本似乎没有执行

问题描述

我是 ubersicht 和咖啡脚本的新手,想创建一个显示 2 个指标的小部件。 您可以在此处下载:https://wetransfer.com/downloads/f977bc1711cd4f3bce791c1e873b607e20210202143327/7cf740

运行小部件时,我想显示我的 macbook 连接的 ssid 和最大速度。 所以我调用这个命令

command: "wifi-ssid-test.widget/script.sh"

执行脚本

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | grep ' SSID' | cut -c 18-38
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | grep TxRate | cut -c 18-20

这个输出应该被这个代码块捕获

update: (out) ->
  [ssid,tx_speed] = out.split(/\r\n|\r|\n/g)
  #console.log(out)
    if(out)
    $('.ssid').html(ssid)
  else
    $('.ssid').html('No WiFi')

但是在检查控制台时我看到了这个错误

[Error] ReferenceError: Can't find variable: out
    (anonymous function) (wifi-ssid-test-widget-index-coffee:14)
    o (wifi-ssid-test-widget-index-coffee:1:278)
    r (wifi-ssid-test-widget-index-coffee:1:441)
    Global Code (wifi-ssid-test-widget-index-coffee:1:469)
[Error] Error: Cannot find module 'wifi-ssid-test-widget-index-coffee'
    o (client.js:1:229)
    o (NetworkInfo-widget-NetworkInfo-coffee:1:155)
    o (memory-bar-widget-index-coffee:1:155)
    o (swap-usage-widget-index-coffee:1:155)
    o (iostats-widget-index-coffee:1:155)
    o (battery_pro-widget-index-coffee:1:155)
    o (network-throughput-widget-index-coffee:1:155)
    o (diskusage-widget-index-coffee:1:155)
    o (cpu-bar-widget-index-coffee:1:155)
    o (load-avg-widget-index-coffee:1:155)
    o (timemachine-widget-index-coffee:1:155)
    o (public_ip2-widget-index-coffee:1:155)
    o (top-cpu-widget-index-coffee:1:155)
    o (top-mem-widget-index-coffee:1:155)
    o (os-version-uptime-widget-index-coffee:1:155)
    o (wifi-ssid-widget-index-coffee:1:155)
    o (wifi-tx-speed-widget-index-coffee:1:155)
    o (solar-system-widget-index-coffee:1:155)
    o (trash-size-widget-index-coffee:1:155)
    o (ubersicht-morning-widget-morning-widget-morning-coffee:1:155)
    o (uebersicht-yinyang-widget-yinyang-lavalamp-widget-index-coffee:1:155)
    o (Box-coffee:1:155)
    o (Box_2-coffee:1:155)
    o (fan-bar-widget-index-coffee:1:155)
    o (client.js:1:123)
    (anonymous function) (client.js:1:297)
    (anonymous function) (client.js:1:29767)

谁能帮我理解我在这里做错了什么?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)