mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-21 20:34:19 +00:00
custom shader animation can be set to "always" to always remain active
Fixes #1225 The `custom-shader-animation` configuration can now be set to "always" which keeps animation active even if the terminal is unfocused.
This commit is contained in:
@@ -815,15 +815,21 @@ keybind: Keybinds = .{},
|
||||
/// If true (default), the focused terminal surface will run an animation
|
||||
/// loop when custom shaders are used. This uses slightly more CPU (generally
|
||||
/// less than 10%) but allows the shader to animate. This only runs if there
|
||||
/// are custom shaders.
|
||||
/// are custom shaders and the terminal is focused.
|
||||
///
|
||||
/// If this is set to false, the terminal and custom shader will only render
|
||||
/// when the terminal is updated. This is more efficient but the shader will
|
||||
/// not animate.
|
||||
///
|
||||
/// This can also be set to "always", which will always run the animation
|
||||
/// loop regardless of whether the terminal is focused or not. The animation
|
||||
/// loop will still only run when custom shaders are used. Note that this
|
||||
/// will use more CPU per terminal surface and can become quite expensive
|
||||
/// depending on the shader and your terminal usage.
|
||||
///
|
||||
/// This value can be changed at runtime and will affect all currently
|
||||
/// open terminals.
|
||||
@"custom-shader-animation": bool = true,
|
||||
@"custom-shader-animation": CustomShaderAnimation = .true,
|
||||
|
||||
/// If anything other than false, fullscreen mode on macOS will not use the
|
||||
/// native fullscreen, but make the window fullscreen without animations and
|
||||
@@ -2079,6 +2085,15 @@ fn equalField(comptime T: type, old: T, new: T) bool {
|
||||
}
|
||||
}
|
||||
|
||||
/// Valid values for custom-shader-animation
|
||||
/// c_int because it needs to be extern compatible
|
||||
/// If this is changed, you must also update ghostty.h
|
||||
pub const CustomShaderAnimation = enum(c_int) {
|
||||
false,
|
||||
true,
|
||||
always,
|
||||
};
|
||||
|
||||
/// Valid values for macos-non-native-fullscreen
|
||||
/// c_int because it needs to be extern compatible
|
||||
/// If this is changed, you must also update ghostty.h
|
||||
|
||||
Reference in New Issue
Block a user