-
-
Notifications
You must be signed in to change notification settings - Fork 797
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
Provide configuration examples #548
Comments
I spent a lot of time on the examples throughout the docs: https://wezfurlong.org/wezterm/ |
I saw the doc, and it's clear, though a configuration file filled would be more easy to access immediatly |
For config example, you could also find all configs on github: |
Sure, but it's not exactly the same :) |
Agree. Was looking for the same. A few pre-filled configuration for common common user personas would be helpful: E.g. Mac with retina display => Config file pre-configured with font ligatures + font settings that suit a high-DPI display. |
#628 is a discussion thread that was just started that shows screenshots and configs; it currently just has a single example, but I'll see if I can persuade some folks to share their configs there also. |
Great, @wez. Thanks! |
Could it be an option to provide a default configuration in the user directory? The content would be any config option with a description what it does, default is being shown, but the whole thing is commented. Other terminals do provide it like that and I find this very accessible. As the configs are commented out, it wouldn't interfere with updates - except if the user explicitely wants to have other settings. |
I agree with Trollwut, having wezterm create default configuration on first launch would be more "common" to how other apps like kitty, etc. handle the situation. The default cnfig files don't set anything, but have all the major options described in commented-out sections. I find that incredibly useful, versus having to dig around repeatedly as you work through "initial config". |
What do I need to put in my wezterm.lua to get a git bash experience on a windows computer? The clink is not working |
@azgarcia Please make your own separate issue! |
My thoughts on providing a config file with commented out stuff are:
I really don't want to have a mode that deposits a config file like that. I would much rather capture from those that are asking about this what the most common things are that they want to configure and see if we can have a better guided initial experience to help them configure those. |
If not providing a directly used config file, there could be something like a /usr/share/wezterm/example |
An alternative approach that might address some of the concerns raised could be:
Edit: Added link to defaults in code, which I couldn't find before. |
The documentation is very nice, just a small detail confused me: everything is inside a "return" statement. I don't know rust or lua, but I expected something like https://github.com/lefcha/imapfilter/blob/38f5f428c43df6e90b82e278e260bd8109443d30/samples/config.lua . The "return" statements puzzled me so I looked elsewhere for configuration examples, just to find the "return" was part of the configuration syntax. Perhaps it's obvious, but it took me a while, if a wezterm.lua was provided it would save me and other dummies a lot of time. |
Well, this also limits discovery (what if you have this great unique setting, but I just don't know about it yet since it's not present in other terminals?), though it's also fine if you don't want include everything in one file, you can have an "advanced" file with all the extra commented out commands, and instructions in the main config on how to load it Though in general it's easier to read through the properly commented "blob", where I can see the effects immediately:
rather than jumping back and forth between terminal/editor/browser copying&pasting to achieve the same So I'd also suggest creating a new config file with defaults uncommented and other options commented out. local wezterm = require 'wezterm';
return {
-- option = value , [default] comment
-- Fonts
font = wezterm.font("JetBrains Mono") , -- [JetBrains Mono]
-- font = wezterm.font("JetBrains Mono", {weight="Bold",italic=true}) , -- [JetBrains Mono] Name with parameters
font_size = 12.0 , -- [12.0]
-- Colors
color_scheme = "nord" , -- full list @ wezfurlong.org/wezterm/colorschemes/index.html
colors = { -- color_scheme takes precedence over these
foreground = "silver" , -- [silver] The default text color
background = "black" , -- [black] The default background color
cursor_bg = "#52ad70" , -- [#52ad70] Overrides the cell background color when the current cell is occupied by the cursor and the cursor style is set to Block
cursor_fg = "black" , -- [black] Overrides the text color when the current cell is occupied by the cursor
cursor_border = "#52ad70" , -- [#52ad70] Specifies the border color of the cursor when the cursor style is set to Block, of the color of the vertical or horizontal bar when the cursor style is set to Bar or Underline.
selection_fg = "black" , -- [black] The foreground color of selected text
selection_bg = "#fffacd" , -- [#fffacd] The background color of selected text
scrollbar_thumb = "#222222" , -- [#222222] The color of the scrollbar "thumb"; the portion that represents the current viewport
split = "#444444" , -- [#444444] The color of the split lines between panes
-- ansi = {"black", "maroon", "green", "olive", "navy", "purple", "teal", "silver"},
-- brights = {"grey", "red", "lime", "yellow", "blue", "fuchsia", "aqua", "white"},
-- indexed = {[136]="#af8700"} , -- Arbitrary colors of the palette in the range from 16 to 255
},
-- Appearance
window_background_opacity = 0.9 , -- [1.0] alpha channel value with floating point numbers in the range 0.0 (meaning completely translucent/transparent) through to 1.0 (meaning completely opaque)
enable_tab_bar = false , -- [true]
hide_tab_bar_if_only_one_tab = false , -- [false] hide the tab bar when there is only a single tab in the window
} |
I'm trying to setup |
Idea: To further avoid people from copy/pasting all default values of a given wezterm version (which is your main 'fear' @wez IIRC), we could make wezterm give a (friendly) warning when an option is set to its default value saying they should remove the option from their config. |
you start tinkering BY "copy/pasting everything in a file" and changing values to observe the effect The 'fear of defaults' is alleviated by commenting out all the values, not by making them uncopypasteable |
The doc is excellent, but it would be even nicer if it had a configuration (or maybe just the keybind) example that results in similar to the default of tmux / screen, since I think a lot of people tries to migrate from them and spend some time to figure out how to make muscle-memoried keybindings work. |
Honestly it could be testable and verifiable if during definition of done (or the release process) a working configuration with all working configurations was generated / used. The test case could be "Wexterm starts correctly with this config file". Then, Wezterm on initial startup could merely write a copy of this commented out file to the user's config directory. Sounds like a win / win. I will even volunteer to help maintain the file. |
Hi,
A configuration example would be nice, and maybe some other examples like scripts
Thanks
Raphael
The text was updated successfully, but these errors were encountered: