mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-24 06:59:54 -05:00
change: change project name to mango
This commit is contained in:
parent
575e5d4a47
commit
b20b3ef9f6
17 changed files with 97 additions and 98 deletions
|
|
@ -2508,11 +2508,11 @@ void parse_config(void) {
|
|||
config.tag_rules_count = 0;
|
||||
config.cursor_theme = NULL;
|
||||
|
||||
// 获取 MAOMAOCONFIG 环境变量
|
||||
const char *maomaoconfig = getenv("MAOMAOCONFIG");
|
||||
// 获取 MANGOCONFIG 环境变量
|
||||
const char *mangoconfig = getenv("MANGOCONFIG");
|
||||
|
||||
// 如果 MAOMAOCONFIG 环境变量不存在或为空,则使用 HOME 环境变量
|
||||
if (!maomaoconfig || maomaoconfig[0] == '\0') {
|
||||
// 如果 MANGOCONFIG 环境变量不存在或为空,则使用 HOME 环境变量
|
||||
if (!mangoconfig || mangoconfig[0] == '\0') {
|
||||
// 获取当前用户家目录
|
||||
const char *homedir = getenv("HOME");
|
||||
if (!homedir) {
|
||||
|
|
@ -2520,18 +2520,18 @@ void parse_config(void) {
|
|||
return;
|
||||
}
|
||||
// 构建日志文件路径
|
||||
snprintf(filename, sizeof(filename), "%s/.config/maomao/config.conf",
|
||||
snprintf(filename, sizeof(filename), "%s/.config/mango/config.conf",
|
||||
homedir);
|
||||
|
||||
// 检查文件是否存在
|
||||
if (access(filename, F_OK) != 0) {
|
||||
// 如果文件不存在,则使用 /etc/maomao/config.conf
|
||||
snprintf(filename, sizeof(filename), "%s/maomao/config.conf",
|
||||
// 如果文件不存在,则使用 /etc/mango/config.conf
|
||||
snprintf(filename, sizeof(filename), "%s/mango/config.conf",
|
||||
SYSCONFDIR);
|
||||
}
|
||||
} else {
|
||||
// 使用 MAOMAOCONFIG 环境变量作为配置文件夹路径
|
||||
snprintf(filename, sizeof(filename), "%s/config.conf", maomaoconfig);
|
||||
// 使用 MANGOCONFIG 环境变量作为配置文件夹路径
|
||||
snprintf(filename, sizeof(filename), "%s/config.conf", mangoconfig);
|
||||
}
|
||||
|
||||
set_value_default();
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// TODO: remove this file in the future, replace all global variables with
|
||||
// config.xxx
|
||||
|
||||
/* speedie's maomao config */
|
||||
/* speedie's mango config */
|
||||
|
||||
#define COLOR(hex) \
|
||||
{((hex >> 24) & 0xFF) / 255.0f, ((hex >> 16) & 0xFF) / 255.0f, \
|
||||
|
|
|
|||
|
|
@ -27,17 +27,17 @@ int isdescprocess(pid_t p, pid_t c) {
|
|||
}
|
||||
|
||||
char *get_autostart_path(char *autostart_path, unsigned int buf_size) {
|
||||
const char *maomaoconfig = getenv("MAOMAOCONFIG");
|
||||
const char *mangoconfig = getenv("MANGOCONFIG");
|
||||
|
||||
if (maomaoconfig && maomaoconfig[0] != '\0') {
|
||||
snprintf(autostart_path, buf_size, "%s/autostart.sh", maomaoconfig);
|
||||
if (mangoconfig && mangoconfig[0] != '\0') {
|
||||
snprintf(autostart_path, buf_size, "%s/autostart.sh", mangoconfig);
|
||||
} else {
|
||||
const char *homedir = getenv("HOME");
|
||||
if (!homedir) {
|
||||
fprintf(stderr, "Error: HOME environment variable not set.\n");
|
||||
return NULL;
|
||||
}
|
||||
snprintf(autostart_path, buf_size, "%s/.config/maomao/autostart.sh",
|
||||
snprintf(autostart_path, buf_size, "%s/.config/mango/autostart.sh",
|
||||
homedir);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4282,7 +4282,7 @@ void create_output(struct wlr_backend *backend, void *data) {
|
|||
void setup(void) {
|
||||
|
||||
setenv("XCURSOR_SIZE", "24", 1);
|
||||
setenv("XDG_CURRENT_DESKTOP", "maomao", 1);
|
||||
setenv("XDG_CURRENT_DESKTOP", "mango", 1);
|
||||
|
||||
parse_config();
|
||||
init_baked_points();
|
||||
|
|
@ -5260,7 +5260,7 @@ int main(int argc, char *argv[]) {
|
|||
else if (c == 'd')
|
||||
log_level = WLR_DEBUG;
|
||||
else if (c == 'v')
|
||||
die("maomao " VERSION);
|
||||
die("mango " VERSION);
|
||||
else
|
||||
goto usage;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue