pub struct Profile {Show 31 fields
pub id: Uuid,
pub name: String,
pub working_directory: Option<String>,
pub shell: Option<String>,
pub login_shell: Option<bool>,
pub command: Option<String>,
pub command_args: Option<Vec<String>>,
pub tab_name: Option<String>,
pub icon: Option<String>,
pub order: usize,
pub tags: Vec<String>,
pub parent_id: Option<Uuid>,
pub keyboard_shortcut: Option<String>,
pub hostname_patterns: Vec<String>,
pub tmux_session_patterns: Vec<String>,
pub directory_patterns: Vec<String>,
pub badge_text: Option<String>,
pub badge_color: Option<[u8; 3]>,
pub badge_color_alpha: Option<f32>,
pub badge_font: Option<String>,
pub badge_font_bold: Option<bool>,
pub badge_top_margin: Option<f32>,
pub badge_right_margin: Option<f32>,
pub badge_max_width: Option<f32>,
pub badge_max_height: Option<f32>,
pub ssh_host: Option<String>,
pub ssh_user: Option<String>,
pub ssh_port: Option<u16>,
pub ssh_identity_file: Option<String>,
pub ssh_extra_args: Option<String>,
pub source: ProfileSource,
}Expand description
A terminal session profile containing configuration for how to start a session
Fields§
§id: UuidUnique identifier for this profile
name: StringDisplay name for the profile
working_directory: Option<String>Working directory for the session (if None, uses config default or inherits)
shell: Option<String>Shell to use for this profile (e.g. “/bin/zsh”, “/usr/bin/fish”)
When set, overrides the global custom_shell / $SHELL for this profile.
Takes precedence over global config but is overridden by command.
login_shell: Option<bool>Per-profile login shell override. None = inherit global config.login_shell, Some(true/false) = override.
command: Option<String>Command to run instead of the default shell
command_args: Option<Vec<String>>Arguments for the command
tab_name: Option<String>Custom tab name (if None, uses default naming)
icon: Option<String>Icon identifier for the profile (emoji or icon name)
order: usizeDisplay order in the profile list
Searchable tags to organize and filter profiles
parent_id: Option<Uuid>Parent profile ID for inheritance (child overrides parent settings)
keyboard_shortcut: Option<String>Keyboard shortcut for quick launch (e.g., “Cmd+1”, “Ctrl+Shift+1”)
hostname_patterns: Vec<String>Hostname patterns for automatic profile switching when SSH connects Supports glob patterns (e.g., “.example.com”, “server-”)
tmux_session_patterns: Vec<String>Tmux session name patterns for automatic profile switching when connecting via tmux control mode Supports glob patterns (e.g., “work-”, “dev-session”, “-production”)
directory_patterns: Vec<String>Directory patterns for automatic profile switching based on CWD Supports glob patterns (e.g., “/Users//projects/work-”, “/home/user/dev/*”)
badge_text: Option<String>Per-profile badge text (overrides global badge_format when this profile is active)
badge_color: Option<[u8; 3]>Per-profile badge color [R, G, B] (overrides global badge_color)
badge_color_alpha: Option<f32>Per-profile badge opacity 0.0-1.0 (overrides global badge_color_alpha)
badge_font: Option<String>Per-profile badge font family (overrides global badge_font)
badge_font_bold: Option<bool>Per-profile badge font bold (overrides global badge_font_bold)
badge_top_margin: Option<f32>Per-profile badge top margin in pixels (overrides global badge_top_margin)
badge_right_margin: Option<f32>Per-profile badge right margin in pixels (overrides global badge_right_margin)
badge_max_width: Option<f32>Per-profile badge max width as fraction 0.0-1.0 (overrides global badge_max_width)
badge_max_height: Option<f32>Per-profile badge max height as fraction 0.0-1.0 (overrides global badge_max_height)
ssh_host: Option<String>SSH hostname for direct connection (profile acts as SSH bookmark)
ssh_user: Option<String>SSH user for direct connection
ssh_port: Option<u16>SSH port for direct connection
ssh_identity_file: Option<String>SSH identity file path for direct connection
ssh_extra_args: Option<String>Extra SSH arguments (e.g., “-o StrictHostKeyChecking=no”)
source: ProfileSourceWhere this profile was loaded from (runtime-only, not persisted to YAML)
Implementations§
Source§impl Profile
impl Profile
Sourcepub fn with_id(id: Uuid, name: impl Into<String>) -> Profile
pub fn with_id(id: Uuid, name: impl Into<String>) -> Profile
Create a profile with a specific ID (for testing or deserialization)
Sourcepub fn working_directory(self, dir: impl Into<String>) -> Profile
pub fn working_directory(self, dir: impl Into<String>) -> Profile
Builder method to set working directory
Sourcepub fn login_shell(self, login: bool) -> Profile
pub fn login_shell(self, login: bool) -> Profile
Builder method to set per-profile login shell
Sourcepub fn command_args(self, args: Vec<String>) -> Profile
pub fn command_args(self, args: Vec<String>) -> Profile
Builder method to set command arguments
Builder method to set tags
Sourcepub fn keyboard_shortcut(self, shortcut: impl Into<String>) -> Profile
pub fn keyboard_shortcut(self, shortcut: impl Into<String>) -> Profile
Builder method to set keyboard shortcut
Sourcepub fn hostname_patterns(self, patterns: Vec<String>) -> Profile
pub fn hostname_patterns(self, patterns: Vec<String>) -> Profile
Builder method to set hostname patterns
Sourcepub fn tmux_session_patterns(self, patterns: Vec<String>) -> Profile
pub fn tmux_session_patterns(self, patterns: Vec<String>) -> Profile
Builder method to set tmux session patterns
Sourcepub fn directory_patterns(self, patterns: Vec<String>) -> Profile
pub fn directory_patterns(self, patterns: Vec<String>) -> Profile
Builder method to set directory patterns
Sourcepub fn badge_text(self, text: impl Into<String>) -> Profile
pub fn badge_text(self, text: impl Into<String>) -> Profile
Builder method to set badge text
Sourcepub fn badge_color(self, color: [u8; 3]) -> Profile
pub fn badge_color(self, color: [u8; 3]) -> Profile
Builder method to set badge color
Sourcepub fn badge_color_alpha(self, alpha: f32) -> Profile
pub fn badge_color_alpha(self, alpha: f32) -> Profile
Builder method to set badge color alpha
Sourcepub fn badge_font(self, font: impl Into<String>) -> Profile
pub fn badge_font(self, font: impl Into<String>) -> Profile
Builder method to set badge font
Sourcepub fn badge_font_bold(self, bold: bool) -> Profile
pub fn badge_font_bold(self, bold: bool) -> Profile
Builder method to set badge font bold
Sourcepub fn badge_top_margin(self, margin: f32) -> Profile
pub fn badge_top_margin(self, margin: f32) -> Profile
Builder method to set badge top margin
Sourcepub fn badge_right_margin(self, margin: f32) -> Profile
pub fn badge_right_margin(self, margin: f32) -> Profile
Builder method to set badge right margin
Sourcepub fn badge_max_width(self, width: f32) -> Profile
pub fn badge_max_width(self, width: f32) -> Profile
Builder method to set badge max width
Sourcepub fn badge_max_height(self, height: f32) -> Profile
pub fn badge_max_height(self, height: f32) -> Profile
Builder method to set badge max height
Sourcepub fn ssh_command_args(&self) -> Option<Vec<String>>
pub fn ssh_command_args(&self) -> Option<Vec<String>>
Build the SSH command arguments for this profile’s SSH connection. Returns None if ssh_host is not set.
Sourcepub fn display_label(&self) -> String
pub fn display_label(&self) -> String
Get the display label (icon + name if icon exists)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Profile
impl<'de> Deserialize<'de> for Profile
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Profile, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Profile, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for Profile
impl Serialize for Profile
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for Profile
impl RefUnwindSafe for Profile
impl Send for Profile
impl Sync for Profile
impl Unpin for Profile
impl UnsafeUnpin for Profile
impl UnwindSafe for Profile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().