Setting config options inside wezterm.on()
does not apply settings
#6366
Labels
bug
Something isn't working
wezterm.on()
does not apply settings
#6366
What Operating System(s) are you seeing this problem on?
Linux Wayland
Which Wayland compositor or X11 Window manager(s) are you using?
Hyprland
WezTerm version
wezterm 20240203-110809-5046fc22
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
No, and I'll explain why below
Describe the bug
I am trying to change the default_prog from inside an event. Not sure this is the correct terms to use, I know a little bit of python and fish but am an not a developer.
I have tried other events instead of gui-startup, I have tried changing the setting from the global scope, just like any other setting, but mux.all_windows() always seems to report zero windows on the first loading of the config file. I've used wezterm.log_info() to check. This makes it useless since the default program will have been launched already by the time we get the correct number of windows reported.
The default_prog variable does get the correct value but it doesn't seem to be applied to the config. I am under the impression that gui-startup should run before the default program. Am I not understanding how Lua's scope rules work?
To Reproduce
No response
Configuration
Expected Behavior
For the default program of my choosing to be launched. Instead the default shell, bash, is launched.
Logs
Debug Overlay
wezterm version: 20240203-110809-5046fc22 x86_64-unknown-linux-gnu
Window Environment: Wayland
Lua Version: Lua 5.4
OpenGL: Mesa Intel(R) HD Graphics 520 (SKL GT2) 4.6 (Compatibility Profile) Mesa 24.2.6-arch1.1
Enter lua statements or expressions and hit Enter.
Press ESC or CTRL-D to exit
Anything else?
No response
The text was updated successfully, but these errors were encountered: