Comments (3)
workaround:
point .config/wezterm to the persists\wezterm folder, seems kludgy
PS C:\Users\gana\.config> cmd /c "mklink /J wezterm C:\vol\scoop_01\scoopg\persist\wezterm"
junctioning the wezterm config directory achieves the same effect as WEZTERM_CONFIG_FILE
environment variable.
The more I think about it, I wonder why, I had originally set up to use the WEZTERM_CONFIG_FILE
way of loading the wezterm lua in the first place.
The most plausible reason is that I have a dual boot machine windows linux, with admin and unprivileged user that is accounts, I think I was trying to avoid having to make and manage 4 configurations in 4 places, and sometimes I swap entire OS partitions placed in VHDX files. So I put the wezterm.lua in an accessible place outside of the private user folder and also outside the C:\
file system. C:\vol\scoop_01
is a mount point of a VHDX, the VHDX itself residing on a different partition
The config file can also be provided by the command line --config-file
argument. The docs say the command line take precedence over the environment variable. Maybe even for this case the config directory should be set similarly ?
Q) When would one prefer to use the environment variable method over a filesystem junction method?
A) maybe when (a) filesystem does not have junctions, (b) unprivileged user by OS group policy not allowed to create junctions.
from wezterm.
I'm not really clear on what you're doing, but I do want to note that you can put something like this at the top of your main wezterm.lua
file (the one that WEZTERM_CONFIG_FILE points to):
local wezterm = require 'wezterm'
package.path = package.path .. ";" .. wezterm.config_dir .. "/?.lua"
You can arbitrarily change package.path
to match your environment.
from wezterm.
Thanks for your reply and for wezterm
-
I'm not really clear on what you're doing
- Motivation for setting things up the way I did.
- My machine is setup to do dualboot, multiboot. There was a time when I was reinstalling/trying-out various WinOS and Linux Distributions on my laptop. Presently, I now have about 3 commonly used multi-boots: Win10, Win11, Linux. There are virtual machines also., and I can boot into liveiso-s using ventoy.
- At one time I wanted a zero-configuration way to use wezterm, so that I don't have to copy or setup up the config directory of various ephemeral newly setup operating systems. Doing otherwise is tedious.
- Copying the configuration to multiple places requires having a method to keep track of changes. You could say why not use a vcs like git, I hadn't thought of that, and still haven't got around to taking the initiative to do that.
- Setting a Environmental variable is easy, and can even be done by a ansible script.
- Saving things outside of the OS partition means not having to worry about backing things up when removing a OS, or setting things up after installing.
- The WEZTERM_CONFIG_FILE lends itself as a easy way to do the above.
- The reason I hadn't run into this earlier is because so far my wezterm config was self contained and had not modularized it to rely on files sourced from outside the main config file, as was recommended by reddit link I had included
- Motivation for setting things up the way I did.
-
package.path
- Okay, I hadn't thought about
package.path
- I am not proficient in a lua and it hadn't occurred to me that it was in-user-script modifiable.
- The 2 docs below use the phrase "The Lua package.path is configured with the following paths" , so that made me think it was a preset.
- This could be a sufficiently usable workaround.
- If this is the recommended way to do set the module search path, then one may close this bug.
- Okay, I hadn't thought about
Ref :
- https://wezfurlong.org/wezterm/config/files.html#configuration-file-structure
- https://wezfurlong.org/wezterm/config/files.html?h=package.path#making-your-own-lua-modules
from wezterm.
Related Issues (20)
- Allow for getting the window_id in `format-window-title` event HOT 1
- Search/Copy Mode enhancements
- start with `--class` and `--attach` cannot attach to same instance with different class names
- add_to_config_reload_watch_list not working for Windows WSL paths
- show_close_tab_button_in_tabs not work
- Invalid reported terminal size at startup
- Allow usage of `text_background_opacity` without `window_background_opacity`
- Executable File Existence Check HOT 2
- Remember selection mode
- macOS PATH instructions: Should PATH be a string? HOT 3
- After moving a tab to a new window, it is impossible to move it back to an existing window.
- ssh: Support ControlMaster/Match exec
- get_appearance does not converge to system dark mode in various situations
- add support for: `cmd+shift+left arrow|right arrow` -- to select text to left/right of cursor to end of line
- Bell event triggers too much
- 1337;SetUserVar is output each time a shell command runs in Neovim's builtin terminal launched from tmux HOT 1
- Fonts no longer render correctly on latest system update (NixOS master branch) HOT 19
- [windows] crash: wezterm_gui::termwindow > opengl context was lost; should reinit
- Mouse events show up as characters in the terminal instead of being handled
- Closing wezterm kills tmux window with nothing running
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wezterm.