Raxol.Terminal.Config.Profiles (Raxol v0.2.0)

View Source

Terminal configuration profile management.

Allows users to define, save, load, and switch between different terminal configuration profiles.

Summary

Functions

Creates a new profile with default settings.

Deletes a terminal configuration profile.

Duplicates an existing profile with a new name.

Lists all available terminal configuration profiles.

Loads a specific terminal configuration profile.

Saves the current configuration as a profile.

Updates an existing profile with new settings.

Types

animation_type()

@type animation_type() :: :gif | :video | :shader | :particle

background_type()

@type background_type() :: :solid | :transparent | :image | :animated

color_mode()

@type color_mode() :: :basic | :true_color | :palette

config()

@type config() :: map()

terminal_type()

@type terminal_type() ::
  :iterm2
  | :windows_terminal
  | :xterm
  | :screen
  | :kitty
  | :alacritty
  | :konsole
  | :gnome_terminal
  | :vscode
  | :unknown

theme_map()

@type theme_map() :: %{required(atom()) => String.t()}

Functions

create_default_profile(name)

Creates a new profile with default settings.

Parameters

  • name - The name of the new profile

Returns

{:ok, config} or {:error, reason}

delete_profile(name)

Deletes a terminal configuration profile.

Parameters

  • name - The name of the profile to delete

Returns

:ok or {:error, reason}

duplicate_profile(source_name, target_name)

Duplicates an existing profile with a new name.

Parameters

  • source_name - The name of the profile to duplicate
  • target_name - The name for the new profile

Returns

{:ok, config} or {:error, reason}

list_profiles()

Lists all available terminal configuration profiles.

Returns

A list of profile names.

load_profile(name)

Loads a specific terminal configuration profile.

Parameters

  • name - The name of the profile to load

Returns

{:ok, config} or {:error, reason}

save_profile(name, config)

Saves the current configuration as a profile.

Parameters

  • name - The name of the profile to save
  • config - The configuration to save

Returns

:ok or {:error, reason}

update_profile(name, config)

Updates an existing profile with new settings.

Parameters

  • name - The name of the profile to update
  • config - The new configuration

Returns

:ok or {:error, reason}