waveterm
waveterm copied to clipboard
[Feature]: Custom widget commands should read RC files
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
- Macbook Air M2
- Use ZSH
- 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
- [X] I don't have time to fix this right now, but maybe later
To confirm, is ZSH your primary shell? Is this a custom script you've written or something you've installed?
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
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.
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.
You shouldn't need to do that, we source it for the terminal blocks, we don't for the command widget config though
Hi everyone, I have the same behavior. I already tried to run "source ~/.zshrc && custom command" but it doesn't work. (command not found) At this point I paste the full path of the binary I want to start, but the binary runs another one and waveterm says not found.
I'm on macOS with zsh.
Hi ! Same here in Ubuntu 24.04 snap version