mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-02-16 22:05:25 -05:00
break change: remove autostar.sh and MANGOCONFIG env
This commit is contained in:
parent
c89ad7e992
commit
f9fb00d6d2
3 changed files with 2 additions and 41 deletions
|
|
@ -26,29 +26,6 @@ int isdescprocess(pid_t p, pid_t c) {
|
|||
return (int)c;
|
||||
}
|
||||
|
||||
char *get_autostart_path(char *autostart_path, uint32_t buf_size) {
|
||||
const char *mangoconfig = getenv("MANGOCONFIG");
|
||||
|
||||
if (cli_config_path) {
|
||||
char *config_path = strdup(cli_config_path);
|
||||
char *config_dir = dirname(config_path);
|
||||
snprintf(autostart_path, buf_size, "%s/autostart.sh", config_dir);
|
||||
free(config_path);
|
||||
} else 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/mango/autostart.sh",
|
||||
homedir);
|
||||
}
|
||||
|
||||
return autostart_path;
|
||||
}
|
||||
|
||||
void get_layout_abbr(char *abbr, const char *full_name) {
|
||||
// 清空输出缓冲区
|
||||
abbr[0] = '\0';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue