mirror of
https://github.com/wez/wezterm.git
synced 2024-12-23 05:12:40 +03:00
add distro-defaults feature
The intent is that when set, it changes defaults to something more suitable for distributions. I've also added a readme for distro maintainers. refs: https://github.com/wez/wezterm/issues/1795
This commit is contained in:
parent
2dbdfbf124
commit
7a5440694d
70
README-DISTRO-MAINTAINER.md
Normal file
70
README-DISTRO-MAINTAINER.md
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
# Notes for distro maintainers
|
||||||
|
|
||||||
|
`ci/deploy.sh` is a script that is used to build packages in wezterm's CI.
|
||||||
|
It is likely a bit more coarse than most distros would want in their
|
||||||
|
official packages, but it should give a sense of what is intended to go where.
|
||||||
|
|
||||||
|
## Versioning
|
||||||
|
|
||||||
|
WezTerms version number is derived from the date of the commit from which it
|
||||||
|
was released:
|
||||||
|
|
||||||
|
```
|
||||||
|
git -c "core.abbrev=8" show -s "--format=%cd-%h" "--date=format:%Y%m%d-%H%M%S"
|
||||||
|
```
|
||||||
|
|
||||||
|
If you are not building wezterm from its git repo, wezterm will read a file named
|
||||||
|
`.tag` in the root of its source tree to determine the version.
|
||||||
|
|
||||||
|
Please package using the `wezterm-YYYYMMDD-HHMMSS-HASH-src.tar.gz` release
|
||||||
|
asset from the release, rather than the automatic GitHub source tarball.
|
||||||
|
Not only is it a smaller download, but it already contains an appropriate
|
||||||
|
`.tag` file with the release version baked into it.
|
||||||
|
|
||||||
|
If you must decorate wezterm's version, then it is recommend that you append
|
||||||
|
your supplemental extra version information on the end of the wezterm's
|
||||||
|
version.
|
||||||
|
|
||||||
|
For example: `YYYYMMDD-HHMMSS-HASH-EXTRA`.
|
||||||
|
|
||||||
|
If `-` is illegal in your package management system, then it is recommended
|
||||||
|
that you substitute either `.` or `_` to separate the portions of the version
|
||||||
|
string.
|
||||||
|
|
||||||
|
## Binaries
|
||||||
|
|
||||||
|
* `wezterm-mux-server` - multiplexer server. No gui required. Likely want this
|
||||||
|
in a separate package from `wezterm-gui` so it can run on a headless system.
|
||||||
|
* `wezterm-gui` - the GUI portion of the terminal
|
||||||
|
* `wezterm` - the CLI and frontend that knows how to launch the GUI. It is
|
||||||
|
desirable to have this available to both the multiplexer server and the gui.
|
||||||
|
* `strip-ansi-escapes` - a utility that can filter escapes out of stdin; useful
|
||||||
|
for de-fanging text when composing eg: OSC 0/1 title text.
|
||||||
|
|
||||||
|
## Additional Resources
|
||||||
|
|
||||||
|
* `assets/shell-integration`, `assets/shell-completion`: should be deployed along with the `wezterm` executable
|
||||||
|
* `assets/wezterm.desktop`, `assets/wezterm.appdata.xml`, `assets/wezterm-nautilus.py`: should be deployed along with `wezterm-gui`
|
||||||
|
|
||||||
|
## Building wezterm
|
||||||
|
|
||||||
|
It is recommended that you enable the `distro-defaults` rust feature
|
||||||
|
when building for a distro (`cargo build --release -p wezterm-gui --features distro-defaults`).
|
||||||
|
|
||||||
|
It has the following effects:
|
||||||
|
|
||||||
|
* `check_for_updates` will default to `false`
|
||||||
|
|
||||||
|
If there are other behaviors that you'd like to change from the default, please
|
||||||
|
raise issue(s) for them so that we can figure out how to make it easier for you
|
||||||
|
to maintain your wezterm package.
|
||||||
|
|
||||||
|
### Building without wayland support
|
||||||
|
|
||||||
|
If your distro doesn't include any support for Wayland, you will need to
|
||||||
|
disable that feature when you build wezterm:
|
||||||
|
|
||||||
|
```
|
||||||
|
cargo build --release -p wezterm-gui --no-default-features --features distro-defaults
|
||||||
|
```
|
||||||
|
|
@ -13,6 +13,9 @@ env_logger = "0.9"
|
|||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
git2 = { version = "0.14", default-features = false }
|
git2 = { version = "0.14", default-features = false }
|
||||||
|
|
||||||
|
[features]
|
||||||
|
distro-defaults = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
bitflags = "1.3"
|
bitflags = "1.3"
|
||||||
|
@ -539,7 +539,7 @@ pub struct Config {
|
|||||||
#[dynamic(default = "default_true")]
|
#[dynamic(default = "default_true")]
|
||||||
pub automatically_reload_config: bool,
|
pub automatically_reload_config: bool,
|
||||||
|
|
||||||
#[dynamic(default = "default_true")]
|
#[dynamic(default = "default_check_for_updates")]
|
||||||
pub check_for_updates: bool,
|
pub check_for_updates: bool,
|
||||||
#[dynamic(default)]
|
#[dynamic(default)]
|
||||||
pub show_update_window: bool,
|
pub show_update_window: bool,
|
||||||
@ -1188,6 +1188,10 @@ impl Config {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn default_check_for_updates() -> bool {
|
||||||
|
cfg!(not(feature = "distro-defaults"))
|
||||||
|
}
|
||||||
|
|
||||||
fn default_pane_select_fg_color() -> RgbaColor {
|
fn default_pane_select_fg_color() -> RgbaColor {
|
||||||
SrgbaTuple(0.75, 0.75, 0.75, 1.0).into()
|
SrgbaTuple(0.75, 0.75, 0.75, 1.0).into()
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ resolver = "2"
|
|||||||
[features]
|
[features]
|
||||||
default = ["wayland"]
|
default = ["wayland"]
|
||||||
wayland = ["window/wayland"]
|
wayland = ["window/wayland"]
|
||||||
|
distro-defaults = ["config/distro-defaults"]
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
|
Loading…
Reference in New Issue
Block a user