2.1 KiB
2.1 KiB
Configuring Yafetch
Variables
yafetch.shell_base
-- if set to true, yafetch.shell() will return only the currently
-- used shell's name,
-- example: zsh
-- if set to false, yafetch.shell() will return the currently
-- used shell's full path,
-- example: /usr/bin/zsh
yafetch.shell_base = true -- false
yafetch.sep
-- separator used between the information and the identifier
-- can be any string, character, integer
yafetch.sep = " ~ "
yafetch.sep_color
Foreground color of yafetch.sep
yafetch.sep_color = "\27[31m" -- red
-- or
local red = "\27[31m"
yafetch.sep_color = red
yafetch.header_sep
Same as yafetch.sep, but in the header.
yafetch.header_sep_color
Same as yafetch.sep_color, but in the header.
yafetch.header_format
Extra formatting to the header.
Can be any string, character, escape sequence.
yafetch.header_format = ascii[1]
yafetch.header_format = "\27[1m"
yafetch_header_format = " "
Functions
yafetch.init()
The main function of the fetch, formatting goes in this function
yafetch.init = function()
end
-- example:
yafetch.init = function()
yafetch.format(red, "user", color2, yafetch.user())
end
yafetch.format()
Formats a line in the fetch, takes 4 arguments, optionally you can concat more.
local red = "\27[1m"
local reset = "\27[m"
yafetch.format(red, "user", reset, yafetch.user())