Skip to content

Commit

Permalink
misc: update README.md and Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Toni500github committed Sep 12, 2024
1 parent 8c4d958 commit 72bc096
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ MANPREFIX ?= $(PREFIX)/share/man
APPPREFIX ?= $(PREFIX)/share/applications
VARS ?=

DEBUG ?= 0
DEBUG ?= 1
GUI_MODE ?= 0
VENDOR_TEST ?= 0
DEVICE_TEST ?= 0
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[![GitHub commit activity (branch)](https://img.shields.io/github/commit-activity/m/Toni500github/customfetch)](https://github.com/Toni500github/customfetch/commits)
[![GitHub top language](https://img.shields.io/github/languages/top/Toni500github/customfetch?logo=cplusplusbuilder&label=)](https://github.com/Toni500github/customfetch/blob/main/src)
[![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/Toni500github/customfetch/makefile.yml)](https://github.com/Toni500github/customfetch/actions)\
[![forthebadge](https://forthebadge.com/images/badges/works-on-my-machine.svg)](https://forthebadge.com)
Expand Down Expand Up @@ -252,11 +251,12 @@ 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 4 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.
* `$[something,equalToSomethingElse,iftrue,ifalse]` - Conditional tag to display different outputs based on the comparison.
* `$%n1,n2%` - Used to print the percentage and print with colors

They can be used in the ascii art text file and layout, but how to use them?

Expand Down
8 changes: 4 additions & 4 deletions src/parse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,10 @@ std::string parse(const std::string_view input, systemInfo_t& systemInfo, std::s
if (true_comma == command.npos)
die("conditional tag {} doesn't have a comma for separiting the true statment", command);

const std::string& conditional = command.substr(0, conditional_comma);
const std::string& equalto = command.substr(conditional_comma + 1, equalto_comma - conditional_comma - 1);
const std::string& true_statment = command.substr(equalto_comma + 1, true_comma - equalto_comma - 1);
const std::string& false_statment = command.substr(true_comma + 1);
const std::string& conditional = command.substr(0, conditional_comma);
const std::string& equalto = command.substr(conditional_comma + 1, equalto_comma - conditional_comma - 1);
const std::string& true_statment = command.substr(equalto_comma + 1, true_comma - equalto_comma - 1);
const std::string& false_statment = command.substr(true_comma + 1);

std::string _;
const std::string& parsed_conditional = parse(conditional, systemInfo, _, config, colors, parsingLayout);
Expand Down

0 comments on commit 72bc096

Please sign in to comment.