mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-04 13:29:56 -05:00
opt: optimize get autostart path func name
This commit is contained in:
parent
73733fae86
commit
a587e9257c
1 changed files with 3 additions and 3 deletions
|
|
@ -421,7 +421,7 @@ arrange(Monitor *m,
|
||||||
static void arrangelayer(Monitor *m, struct wl_list *list,
|
static void arrangelayer(Monitor *m, struct wl_list *list,
|
||||||
struct wlr_box *usable_area, int exclusive);
|
struct wlr_box *usable_area, int exclusive);
|
||||||
static void arrangelayers(Monitor *m);
|
static void arrangelayers(Monitor *m);
|
||||||
static char* autostartexec(char*, size_t); // 自启动命令执行
|
static char* get_autostart_path(char*, size_t); // 自启动命令执行
|
||||||
static void axisnotify(struct wl_listener *listener,
|
static void axisnotify(struct wl_listener *listener,
|
||||||
void *data); // 滚轮事件处理
|
void *data); // 滚轮事件处理
|
||||||
static void buttonpress(struct wl_listener *listener,
|
static void buttonpress(struct wl_listener *listener,
|
||||||
|
|
@ -2298,7 +2298,7 @@ void arrangelayers(Monitor *m) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
char* autostartexec(char *autostart_path, size_t buf_size) {
|
char* get_autostart_path(char *autostart_path, size_t buf_size) {
|
||||||
const char *maomaoconfig = getenv("MAOMAOCONFIG");
|
const char *maomaoconfig = getenv("MAOMAOCONFIG");
|
||||||
|
|
||||||
if (maomaoconfig && maomaoconfig[0] != '\0') {
|
if (maomaoconfig && maomaoconfig[0] != '\0') {
|
||||||
|
|
@ -5151,7 +5151,7 @@ run(char *startup_cmd) {
|
||||||
/* Now that the socket exists and the backend is started, run the startup
|
/* Now that the socket exists and the backend is started, run the startup
|
||||||
* command */
|
* command */
|
||||||
if(!startup_cmd)
|
if(!startup_cmd)
|
||||||
startup_cmd = autostartexec(autostart_temp_path, sizeof(autostart_temp_path));
|
startup_cmd = get_autostart_path(autostart_temp_path, sizeof(autostart_temp_path));
|
||||||
if (startup_cmd) {
|
if (startup_cmd) {
|
||||||
int piperw[2];
|
int piperw[2];
|
||||||
if (pipe(piperw) < 0)
|
if (pipe(piperw) < 0)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue