Skip to content

Commit

Permalink
chore: modify error for image backend
Browse files Browse the repository at this point in the history
  • Loading branch information
Toni500github committed Sep 18, 2024
1 parent 9de6850 commit fbce768
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ bg-image = "/tmp/idk.png"
```

We use the `config.toml` file, in there we got an array variable called "layout". That's the variable where you customize how the infos should be displayed.\
You have 5 tags:
You have 5 tags:
* `$<module.member>` - Used for printing the value of a member of a module.
* `${color}` - Used for displaying text in a specific color.
* `$(bash command)` - Used to execute bash commands and print the output.
Expand Down Expand Up @@ -301,7 +301,7 @@ Any `$` or brackets can be escaped with a backslash `\`

# TODOs
* Color all ASCII arts (101/262) will take long ahh time
* Support images on terminal as logo (currently only available in GUI mode)
* Support images on terminal as logo (currently only in kitty)
* idk

# Thanks
Expand Down
8 changes: 4 additions & 4 deletions src/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ static std::vector<std::string> render_with_image(const Config& config, const co
// this is just for parse() to auto add the distro colors
std::ifstream file(distro_path, std::ios::binary);
std::string line, _;

while (std::getline(file, line))
parse(line, systemInfo, _, config, colors, false);

Expand Down Expand Up @@ -191,9 +191,9 @@ std::vector<std::string> Display::render(const Config& config, const colors_t& c
if (config.m_image_backend == "kitty")
taur_exec({ "kitty", "+kitten", "icat", "--align", "left", path.data() });
else
die("The source file '{}' is a binary file.\n"
die("The image backend '{}' isn't supported, only kitty.\n"
"Please currently use the GUI mode for rendering the image/gif (use -h for more details)",
path);
config.m_image_backend);

const std::uint16_t font_width = win.ws_xpixel / win.ws_col;

Expand All @@ -211,7 +211,7 @@ std::vector<std::string> Display::render(const Config& config, const colors_t& c
{
layout.insert(layout.begin(), "");
}

std::string line;
while (std::getline(file, line))
{
Expand Down

0 comments on commit fbce768

Please sign in to comment.