Skip to content
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

[Feature]: Custom widget commands should read RC files #1511

Open
1 of 3 tasks
JameInw opened this issue Dec 13, 2024 · 5 comments
Open
1 of 3 tasks

[Feature]: Custom widget commands should read RC files #1511

JameInw opened this issue Dec 13, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@JameInw
Copy link

JameInw commented Dec 13, 2024

Current Behavior

I tried writing Custom Widgets that are CLI Widgets

"WakeOnLan-XXXXX": {
    "icon": "power-off",
    "label": "WoL-HA",
    "color": "#F72C5B",
    "blockdef": {
      "meta": {
        "view": "term",
        "controller": "cmd",
        "cmd": "wakeonlan FF:FF:FF:FF:FF:FF",
        "cmd:closeonexit" : 0
      }
    }
  }

But when I tried it, the result was

zsh:1: command not found: wakeonlan
process finished with exit code = 127

Even though I tried the command myself, it worked.
Note: I tested it on Macbook Air M2

Expected Behavior

I hope it will work in the future.

Steps To Reproduce

  1. Macbook Air M2
  2. Use ZSH
  3. Use Script
"WakeOnLan-XXXX": {
    "icon": "power-off",
    "label": "WoL",
    "color": "#F72C5B",
    "blockdef": {
      "meta": {
        "view": "term",
        "controller": "cmd",
        "cmd": "wakeonlan",
        "cmd:closeonexit" : 0
      }
    }
  }

Wave Version

Client Version 0.10.1 (202412130327)

Platform

macOS

OS Version/Distribution

MacOS 15.1.1

Architecture

arm64

Anything else?

No response

Questionnaire

  • I'm interested in fixing this myself but don't know where to start
  • I would like to fix and I have a solution
  • I don't have time to fix this right now, but maybe later
@JameInw JameInw added bug Something isn't working triage Needs triage labels Dec 13, 2024
@esimkowitz
Copy link
Member

esimkowitz commented Dec 13, 2024

To confirm, is ZSH your primary shell? Is this a custom script you've written or something you've installed?

@esimkowitz esimkowitz changed the title [Bug]: zsh command not found [Bug]: custom widget cannot find command Dec 13, 2024
@esimkowitz
Copy link
Member

Ah ok we run custom widgets in the login shell to reduce overhead. This likely doesn't have your RC files loaded. As a workaround can you try the following:

source ~/.zshrc && wakeonlan

@esimkowitz esimkowitz removed the triage Needs triage label Dec 13, 2024
@esimkowitz esimkowitz changed the title [Bug]: custom widget cannot find command [Feature]: Custom widget commands should read RC files Dec 13, 2024
@esimkowitz esimkowitz added enhancement New feature or request and removed bug Something isn't working labels Dec 13, 2024
@JameInw
Copy link
Author

JameInw commented Dec 14, 2024

To confirm, is ZSH your primary shell? Is this a custom script you've written or something you've installed?

Yes, I mainly use ZSH shell, and yes, this is a script I wrote myself.

@JameInw
Copy link
Author

JameInw commented Dec 14, 2024

Ah ok we run custom widgets in the login shell to reduce overhead. This likely doesn't have your RC files loaded. As a workaround can you try the following:

source ~/.zshrc && wakeonlan

I was using the source ~/.zshrc command before using wavetrem.

@esimkowitz
Copy link
Member

esimkowitz commented Dec 14, 2024

You shouldn't need to do that, we source it for the terminal blocks, we don't for the command widget config though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants