Add NeoNet Yabasic networking FFI library, fix fcitx5 service and WM context menus, install yabasic-doc and mandoc
This commit is contained in:
1 parent
fb3723fab4
commit
726500085a
33 files changed
+2617
-69
No files matched your search
@@ -322,6 +322,44 @@ static int list_plugins(void) {
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
if (!getenv("DISPLAY"))
|
||||
setenv("DISPLAY", ":0", 0);
|
||||
if (!getenv("XDG_RUNTIME_DIR"))
|
||||
setenv("XDG_RUNTIME_DIR", "/run/user/10000", 0);
|
||||
if (!getenv("SXMO_WM"))
|
||||
setenv("SXMO_WM", "dwm", 0);
|
||||
if (!getenv("SXMO_MENU"))
|
||||
setenv("SXMO_MENU", "dmenu", 0);
|
||||
if (!getenv("SXMO_TERMINAL"))
|
||||
setenv("SXMO_TERMINAL", "st", 0);
|
||||
setenv("LANG", "C.UTF-8", 1);
|
||||
setenv("LC_ALL", "C.UTF-8", 1);
|
||||
setenv("XMODIFIERS", "@im=fcitx", 1);
|
||||
setenv("GTK_IM_MODULE", "fcitx", 1);
|
||||
setenv("QT_IM_MODULE", "fcitx", 1);
|
||||
if (!getenv("FCITX_ADDON_DIRS")) {
|
||||
if (access("/home/user/.local/x11", F_OK) == 0)
|
||||
setenv("FCITX_ADDON_DIRS", "/home/user/.local/lib/fcitx5:/home/user/.local/x11:/usr/lib/fcitx5", 0);
|
||||
else
|
||||
setenv("FCITX_ADDON_DIRS", "/home/user/.local/lib/fcitx5:/usr/lib/fcitx5", 0);
|
||||
}
|
||||
if (!getenv("DBUS_SESSION_BUS_ADDRESS")) {
|
||||
const char *rdir = getenv("XDG_RUNTIME_DIR");
|
||||
char bpath[256], bbuf[256];
|
||||
snprintf(bpath, sizeof(bpath), "%s/dbus.bus",
|
||||
(rdir && rdir[0]) ? rdir : "/run/user/10000");
|
||||
FILE *bf = fopen(bpath, "r");
|
||||
if (bf) {
|
||||
if (fgets(bbuf, sizeof(bbuf), bf)) {
|
||||
char *nl = strpbrk(bbuf, "\r\n");
|
||||
if (nl)
|
||||
*nl = '\0';
|
||||
if (bbuf[0])
|
||||
setenv("DBUS_SESSION_BUS_ADDRESS", bbuf, 1);
|
||||
}
|
||||
fclose(bf);
|
||||
}
|
||||
}
|
||||
const char *plugin_name = resolve_plugin_name_from_argv0(argv[0]);
|
||||
int sub_argc = argc;
|
||||
char **sub_argv = argv;
|
||||
|
||||
Reference in new issue
Block a user