Skip to main content

Options

Struct Options 

Source
pub struct Options {
Show 45 fields pub simplified_ui: Option<bool>, pub theme: Option<String>, pub default_mode: Option<InputMode>, pub default_shell: Option<PathBuf>, pub default_cwd: Option<PathBuf>, pub default_layout: Option<PathBuf>, pub layout_dir: Option<PathBuf>, pub theme_dir: Option<PathBuf>, pub mouse_mode: Option<bool>, pub pane_frames: Option<bool>, pub mirror_session: Option<bool>, pub on_force_close: Option<OnForceClose>, pub scroll_buffer_size: Option<usize>, pub copy_command: Option<String>, pub copy_clipboard: Option<Clipboard>, pub copy_on_select: Option<bool>, pub osc8_hyperlinks: Option<bool>, pub scrollback_editor: Option<PathBuf>, pub session_name: Option<String>, pub attach_to_session: Option<bool>, pub auto_layout: Option<bool>, pub session_serialization: Option<bool>, pub serialize_pane_viewport: Option<bool>, pub scrollback_lines_to_serialize: Option<usize>, pub styled_underlines: Option<bool>, pub serialization_interval: Option<u64>, pub disable_session_metadata: Option<bool>, pub support_kitty_keyboard_protocol: Option<bool>, pub web_server: Option<bool>, pub web_sharing: Option<WebSharing>, pub stacked_resize: Option<bool>, pub show_startup_tips: Option<bool>, pub show_release_notes: Option<bool>, pub advanced_mouse_actions: Option<bool>, pub mouse_hover_effects: Option<bool>, pub visual_bell: Option<bool>, pub focus_follows_mouse: Option<bool>, pub mouse_click_through: Option<bool>, pub web_server_ip: Option<IpAddr>, pub web_server_port: Option<u16>, pub web_server_cert: Option<PathBuf>, pub web_server_key: Option<PathBuf>, pub enforce_https_for_localhost: Option<bool>, pub post_command_discovery_hook: Option<String>, pub client_async_worker_tasks: Option<usize>,
}
Expand description

Options that can be set either through the config file, or cli flags - cli flags should take precedence over the config file TODO: In order to correctly parse boolean flags, this is currently split into Options and CliOptions, this could be a good canditate for a macro

Fields§

§simplified_ui: Option<bool>

Allow plugins to use a more simplified layout that is compatible with more fonts (true or false)

§theme: Option<String>

Set the default theme

§default_mode: Option<InputMode>

Set the default mode

§default_shell: Option<PathBuf>

Set the default shell

§default_cwd: Option<PathBuf>

Set the default cwd

§default_layout: Option<PathBuf>

Set the default layout

§layout_dir: Option<PathBuf>

Set the layout_dir, defaults to subdirectory of config dir

§theme_dir: Option<PathBuf>

Set the theme_dir, defaults to subdirectory of config dir

§mouse_mode: Option<bool>

Set the handling of mouse events (true or false) Can be temporarily bypassed by the [SHIFT] key

§pane_frames: Option<bool>

Set display of the pane frames (true or false)

§mirror_session: Option<bool>

Mirror session when multiple users are connected (true or false)

§on_force_close: Option<OnForceClose>

Set behaviour on force close (quit or detach)

§scroll_buffer_size: Option<usize>§copy_command: Option<String>

Switch to using a user supplied command for clipboard instead of OSC52

§copy_clipboard: Option<Clipboard>

OSC52 destination clipboard

§copy_on_select: Option<bool>

Automatically copy when selecting text (true or false)

§osc8_hyperlinks: Option<bool>

Enable OSC8 hyperlink output (true or false)

§scrollback_editor: Option<PathBuf>

Explicit full path to open the scrollback editor (default is $EDITOR or $VISUAL)

§session_name: Option<String>

The name of the session to create when starting Zellij

§attach_to_session: Option<bool>

Whether to attach to a session specified in “session-name” if it exists

§auto_layout: Option<bool>

Whether to lay out panes in a predefined set of layouts whenever possible

§session_serialization: Option<bool>

Whether sessions should be serialized to the HD so that they can be later resurrected, default is true

§serialize_pane_viewport: Option<bool>

Whether pane viewports are serialized along with the session, default is false

§scrollback_lines_to_serialize: Option<usize>

Scrollback lines to serialize along with the pane viewport when serializing sessions, 0 defaults to the scrollback size. If this number is higher than the scrollback size, it will also default to the scrollback size

§styled_underlines: Option<bool>

Whether to use ANSI styled underlines

§serialization_interval: Option<u64>

The interval at which to serialize sessions for resurrection (in seconds)

§disable_session_metadata: Option<bool>

If true, will disable writing session metadata to disk

§support_kitty_keyboard_protocol: Option<bool>

Whether to enable support for the Kitty keyboard protocol (must also be supported by the host terminal), defaults to true if the terminal supports it

§web_server: Option<bool>

Whether to make sure a local web server is running when a new Zellij session starts. This web server will allow creating new sessions and attaching to existing ones that have opted in to being shared in the browser.

Note: a local web server can still be manually started from within a Zellij session or from the CLI. If this is not desired, one can use a version of Zellij compiled without web_server_capability

Possible values:

  • true
  • false Default: false
§web_sharing: Option<WebSharing>

Whether to allow new sessions to be shared through a local web server, assuming one is running (see the web_server option for more details).

Note: if Zellij was compiled without web_server_capability, this option will be locked to “disabled”

Possible values:

  • “on” (new sessions will allow web sharing through the local web server if it is online)
  • “off” (new sessions will not allow web sharing unless they explicitly opt-in to it)
  • “disabled” (new sessions will not allow web sharing and will not be able to opt-in to it) Default: “off”
§stacked_resize: Option<bool>

Whether to stack panes when resizing beyond a certain size default is true

§show_startup_tips: Option<bool>

Whether to show startup tips when starting a new session default is true

§show_release_notes: Option<bool>

Whether to show release notes on first run of a new version default is true

§advanced_mouse_actions: Option<bool>

Whether to enable mouse hover effects and pane grouping functionality default is true

§mouse_hover_effects: Option<bool>

Whether to enable mouse hover visual effects (frame highlight and help text) default is true

§visual_bell: Option<bool>

Whether to show visual bell indicators (pane/tab frame flash and ! suffix) default is true

§focus_follows_mouse: Option<bool>

Whether to focus panes on mouse hover (true or false) default is false

§mouse_click_through: Option<bool>

Whether clicking a pane to focus it also sends the click into the pane (true or false) default is false

§web_server_ip: Option<IpAddr>§web_server_port: Option<u16>§web_server_cert: Option<PathBuf>§web_server_key: Option<PathBuf>§enforce_https_for_localhost: Option<bool>§post_command_discovery_hook: Option<String>

A command to run after the discovery of running commands when serializing, for the purpose of manipulating the command (eg. with a regex) before it gets serialized

§client_async_worker_tasks: Option<usize>

Number of async worker tasks to spawn per active client.

Allocating few tasks may result in resource contention and lags. Small values (around 4) should typically work best. Set to 0 to use the number of (physical) CPU cores. NOTE: This only applies to web clients at the moment.

Implementations§

Source§

impl Options

Source

pub fn from_yaml(from_yaml: Option<Options>) -> Options

Source

pub fn merge(&self, other: Options) -> Options

Merges two Options structs, a Some in other will supersede a Some in self

Source

pub fn merge_from_cli(&self, other: Options) -> Options

Merges two Options structs,

  • Some in other will supersede a Some in self
  • Some(bool) in other will toggle a Some(bool) in self
Source

pub fn from_cli(&self, other: Option<Command>) -> Options

Source§

impl Options

Source

pub fn from_kdl(kdl_options: &KdlDocument) -> Result<Self, ConfigError>

Source

pub fn from_string( stringified_keybindings: &String, ) -> Result<Self, ConfigError>

Source

pub fn to_kdl(&self, add_comments: bool) -> Vec<KdlNode>

Trait Implementations§

Source§

impl Args for Options

Source§

fn augment_args<'b>(__clap_app: Command<'b>) -> Command<'b>

Append to Command so it can instantiate Self. Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command<'b>) -> Command<'b>

Append to Command so it can update self. Read more
Source§

impl Clone for Options

Source§

fn clone(&self) -> Options

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Options

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Options

Source§

fn default() -> Options

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Options

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<Options> for Options

Source§

fn from(options: Options) -> Self

Converts to this type from the input type.
Source§

impl FromArgMatches for Options

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl PartialEq for Options

Source§

fn eq(&self, other: &Options) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Options

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<Options> for Options

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(options: Options) -> Result<Self>

Performs the conversion.
Source§

impl StructuralPartialEq for Options

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<D> OwoColorize for D

Source§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
Source§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
Source§

fn black<'a>(&'a self) -> FgColorDisplay<'a, Black, Self>

Change the foreground color to black
Source§

fn on_black<'a>(&'a self) -> BgColorDisplay<'a, Black, Self>

Change the background color to black
Source§

fn red<'a>(&'a self) -> FgColorDisplay<'a, Red, Self>

Change the foreground color to red
Source§

fn on_red<'a>(&'a self) -> BgColorDisplay<'a, Red, Self>

Change the background color to red
Source§

fn green<'a>(&'a self) -> FgColorDisplay<'a, Green, Self>

Change the foreground color to green
Source§

fn on_green<'a>(&'a self) -> BgColorDisplay<'a, Green, Self>

Change the background color to green
Source§

fn yellow<'a>(&'a self) -> FgColorDisplay<'a, Yellow, Self>

Change the foreground color to yellow
Source§

fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>

Change the background color to yellow
Source§

fn blue<'a>(&'a self) -> FgColorDisplay<'a, Blue, Self>

Change the foreground color to blue
Source§

fn on_blue<'a>(&'a self) -> BgColorDisplay<'a, Blue, Self>

Change the background color to blue
Source§

fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>

Change the foreground color to magenta
Source§

fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>

Change the background color to magenta
Source§

fn purple<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>

Change the foreground color to purple
Source§

fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>

Change the background color to purple
Source§

fn cyan<'a>(&'a self) -> FgColorDisplay<'a, Cyan, Self>

Change the foreground color to cyan
Source§

fn on_cyan<'a>(&'a self) -> BgColorDisplay<'a, Cyan, Self>

Change the background color to cyan
Source§

fn white<'a>(&'a self) -> FgColorDisplay<'a, White, Self>

Change the foreground color to white
Source§

fn on_white<'a>(&'a self) -> BgColorDisplay<'a, White, Self>

Change the background color to white
Source§

fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>

Change the foreground color to the terminal default
Source§

fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>

Change the background color to the terminal default
Source§

fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>

Change the foreground color to bright black
Source§

fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>

Change the background color to bright black
Source§

fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>

Change the foreground color to bright red
Source§

fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>

Change the background color to bright red
Source§

fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>

Change the foreground color to bright green
Source§

fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>

Change the background color to bright green
Source§

fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>

Change the foreground color to bright yellow
Source§

fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>

Change the background color to bright yellow
Source§

fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>

Change the foreground color to bright blue
Source§

fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>

Change the background color to bright blue
Source§

fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>

Change the foreground color to bright magenta
Source§

fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>

Change the background color to bright magenta
Source§

fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>

Change the foreground color to bright purple
Source§

fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>

Change the background color to bright purple
Source§

fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>

Change the foreground color to bright cyan
Source§

fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>

Change the background color to bright cyan
Source§

fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>

Change the foreground color to bright white
Source§

fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>

Change the background color to bright white
Source§

fn bold<'a>(&'a self) -> BoldDisplay<'a, Self>

Make the text bold
Source§

fn dimmed<'a>(&'a self) -> DimDisplay<'a, Self>

Make the text dim
Source§

fn italic<'a>(&'a self) -> ItalicDisplay<'a, Self>

Make the text italicized
Source§

fn underline<'a>(&'a self) -> UnderlineDisplay<'a, Self>

Make the text italicized
Make the text blink
Make the text blink (but fast!)
Source§

fn reversed<'a>(&'a self) -> ReversedDisplay<'a, Self>

Swap the foreground and background colors
Source§

fn hidden<'a>(&'a self) -> HiddenDisplay<'a, Self>

Hide the text
Source§

fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>

Cross out the text
Source§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more
Source§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more
Source§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
Source§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
Source§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
Source§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
Source§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> TryClone for T
where T: Clone,

Source§

fn try_clone(&self) -> Result<T, Error>

Clones self, possibly returning an error.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,