-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
1,459 additions
and
615 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# These are supported funding model platforms | ||
|
||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] | ||
patreon: # Replace with a single Patreon username | ||
open_collective: # Replace with a single Open Collective username | ||
ko_fi: # Replace with a single Ko-fi username | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry | ||
liberapay: # Replace with a single Liberapay username | ||
issuehunt: # Replace with a single IssueHunt username | ||
otechie: # Replace with a single Otechie username | ||
custom: ["https://chaoses-ib.github.io/funding/微信赞赏码.png", "https://chaoses-ib.github.io/funding/支付宝收款码.png", "感谢捐赠,捐赠时请备注仓库名,便于记录。"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include "pch.h" | ||
#include "config.hpp" | ||
#include <fstream> | ||
#include <Shlwapi.h> | ||
#include <yaml-cpp/yaml.h> | ||
|
||
#pragma comment(lib, "Shlwapi.lib") | ||
|
||
Config config{}; | ||
|
||
void config_init() { | ||
wchar_t path[MAX_PATH]; | ||
GetModuleFileNameW(nullptr, path, std::size(path)); | ||
PathRemoveFileSpecW(path); | ||
PathAppendW(path, L"IbEverythingExt.yaml"); | ||
|
||
std::ifstream in(path); | ||
if (in) { | ||
YAML::Node root = YAML::Load(in); | ||
config.pinyin_search = root["pinyin_search"].as<bool>(); | ||
config.quick_select = root["quick_select"].as<bool>(); | ||
} | ||
} | ||
|
||
void config_destroy() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#pragma once | ||
|
||
struct Config { | ||
bool pinyin_search = true; | ||
bool quick_select = true; | ||
}; | ||
extern Config config; | ||
|
||
void config_init(); | ||
void config_destroy(); |
Oops, something went wrong.