Skip to content

Components

imsi32 edited this page Jan 2, 2025 · 5 revisions

String-based Components

These components automatically created by a function which takes the string from desired function.

Custom

A custom parameter lets you create components from the given string in name parameter.

e.g. A custom component

{type = "string", custom = true, name = "Hello World!"},

Default

Hovered Name

Create a component that has hovered file's or directory's name.

e.g.

{type = "string", custom = false, name = "hovered_name"},

e.g. With default config parameters

{type = "string", custom = false, name = "hovered_name", params = {{ trimed = false, show_symlink = false, max_length=24, trim_length=10 }},

Hovered Path

Create a component that has hovered file's or directory's path.

e.g.

{type = "string", custom = false, name = "hovered_path"},

e.g. With default config parameters

{type = "string", custom = false, name = "hovered_path", params = {{ trimed = false, max_length=24, trim_length=10 }},

Hovered Size

Create a component that has hovered file's or directory's size.

e.g.

{type = "string", custom = false, name = "hovered_size"},

Hovered Mime

Create a component that has hovered file's mime.

e.g.

{type = "string", custom = false, name = "hovered_mime"},

Hovered Ownership

Create a component that has hovered file's user and group ownership.

e.g.

{type = "string", custom = false, name = "hovered_ownership"},

Hovered File Extension

Create a component that has hovered file's or directory's extension.

e.g.

{type = "string", custom = false, name = "hovered_file_extension"},

Tab Path

Create a component that has current active tab's path.

e.g.

{type = "string", custom = false, name = "tab_path"},

e.g. With default config parameters.

{type = "string", custom = false, name = "tab_path", params = {{ trimed = false, max_length=24, trim_length=10 }},

Tab Mode

Create a component that has active tab's mode.

e.g.

{type = "string", custom = false, name = "tab_mode"},

Tab Mode

Create a component that has number of files in the current active tab.

e.g.

{type = "string", custom = false, name = "tab_num_files"},

Cursor Position

Create a component that has cursor's position in the current active tab.

e.g.

{type = "string", custom = false, name = "cursor_position"},

Cursor Percentage

Create a component that has cursor's percentage in the current active tab.

e.g.

{type = "string", custom = false, name = "cursor_percentage"},

Date

Create a component that has date according to the given format (See formats).

e.g.

{type = "string", custom = false, name = "date", params = {"%A, %d %B %Y"}},

Coloreds-based Components

Coloreds is an array of pair of string and color. These components used to multi-colorize single component but they can also used with single pair of string and color, too.

Custom

A custom parameter lets you create components from the given coloreds in name parameter.

e.g. A custom component

{type = "coloreds", custom = true, name = {{"Hello ", "red"}, {"World", "green"}}},

Default

Permissions

Create a component that has hovered file's or directory's permissions. Colors of these component can be configured in config.

e.g.

{type = "coloreds", custom = false, name = "permissions"},

permissions

Count

Create a component that has number of selected and yanked (copied or cut) files of the active tab. Colors of these component can be configured in config.

e.g.

{type = "coloreds", custom = false, name = "count"},

count_selected_and_copied
count_selected_and_cut

Task States

Create a component that has number of task states. Colors of these component can be configured in config.

e.g.

{type = "coloreds", custom = false, name = "task_states"},

task_states

Task Workload

Create a component that has number of task workloads. Colors of these component can be configured in config.

e.g.

{type = "coloreds", custom = false, name = "task_workload"},

task_workload

String-based Component

Create a component that has a colored string-based component.

e.g.

{type = "coloreds", custom = false, name = "string_based_component", params = {"date", "blue", {"%A, %d %B %Y"}}},

Line-based Components

These components are the most complex components type. They need to manually created and adjusted.

Custom

A custom parameter lets you create components from the given line in name parameter.

e.g. A custom component

{type = "line", custom = true, name = custom_line},

Default

Tabs

Create a component that shows tabs. The side which will be needs to be written again in params parameter.

e.g.

{type = "line", custom = false, name = "tabs", params = {"left"}},

tabs_normal
tabs_select
tabs_un_set