feat(settings): add grouped configuration hub, languages and tray controls
This commit is contained in:
1 parent
6f34fd080f
commit
cc3b6f903f
90 files changed
+3625
-408
No files matched your search
+12
-11
@@ -83,7 +83,7 @@ def environment():
|
||||
"IBUS_ADDRESS": "", "FERESE_SESSION_IMPORT_ENV": "0", "FERESE_ENABLE_INPUT_METHOD": "1",
|
||||
"FERESE_RIME_CONTROL": str(RUNTIME / "rime-control.sock"),
|
||||
"FERESE_ENABLE_TEST_POINTER": "1",
|
||||
"FERESE_ENABLE_SCREENCOPY": "1", "XDG_DATA_DIRS": f"{Path.home()}/.local/share:/usr/local/share:/usr/share"}
|
||||
"FERESE_ENABLE_SCREENCOPY": "1", "PATH": f"{ROOT}/target/debug:" + os.environ.get("PATH", "/usr/bin"), "XDG_DATA_DIRS": f"{Path.home()}/.local/share:/usr/local/share:/usr/share"}
|
||||
values.update({f"XDG_{kind.upper()}_HOME": str(DATA / "profile" / kind) for kind in ("config", "data", "cache", "state")})
|
||||
return values
|
||||
|
||||
@@ -131,15 +131,16 @@ def start():
|
||||
RUNTIME.mkdir(mode=0o700, exist_ok=True)
|
||||
if RUNTIME.stat().st_uid != os.getuid() or RUNTIME.stat().st_mode & 0o077:
|
||||
raise RuntimeError("Unexpected private runtime owner or permissions")
|
||||
(DATA / "profile/config/ferese/config.kdl").write_text('''
|
||||
xwayland { enabled #false; }
|
||||
status { keybinding-guide #false; }
|
||||
window-rule app-id="dev.ferese.RimeValidation" floating=#true width=880 height=560
|
||||
window-rule app-id="io.github.lgse.Strata" floating=#true width=1050 height=720
|
||||
window-rule app-id="QQ" floating=#true width=1000 height=720
|
||||
window-rule app-id="teams-for-linux" floating=#true width=1000 height=720
|
||||
theme { typography { font-family "MiSans"; }; }
|
||||
''')
|
||||
if not (DATA / "profile/config/ferese/config.kdl").exists():
|
||||
(DATA / "profile/config/ferese/config.kdl").write_text('''
|
||||
xwayland { enabled #false; }
|
||||
status { keybinding-guide #false; }
|
||||
window-rule app-id="dev.ferese.RimeValidation" floating=#true width=880 height=560
|
||||
window-rule app-id="io.github.lgse.Strata" floating=#true width=1050 height=720
|
||||
window-rule app-id="QQ" floating=#true width=1000 height=720
|
||||
window-rule app-id="teams-for-linux" floating=#true width=1000 height=720
|
||||
theme { typography { font-family "MiSans"; }; }
|
||||
''')
|
||||
host_runtime = Path(os.environ.get("XDG_RUNTIME_DIR", f"/run/user/{os.getuid()}"))
|
||||
host_display = Path(os.environ.get("WAYLAND_DISPLAY", "wayland-0"))
|
||||
if not host_display.is_absolute():
|
||||
@@ -148,7 +149,7 @@ theme { typography { font-family "MiSans"; }; }
|
||||
raise RuntimeError("Parent Wayland display is missing")
|
||||
env = {**environment(), "WAYLAND_DISPLAY": str(host_display), "RUST_LOG": "info"}
|
||||
start_unit(MAIN, ["/usr/bin/dbus-run-session", "--", str(ROOT / "target/debug/ferese"), "--backend", "nested",
|
||||
"--supervise-client", "--grant-effects", "--grant-shell-control", "--", "/usr/bin/ferese-shell"], env, "3G")
|
||||
"--supervise-client", "--grant-effects", "--grant-shell-control", "--", str(ROOT / "target/debug/ferese-shell")], env, "3G")
|
||||
c = wait_for(context, "Development compositor did not publish its private connection")
|
||||
(DATA / "context.json").write_text(json.dumps(c, indent=2) + "\n")
|
||||
start_ime()
|
||||
|
||||
Reference in new issue
Block a user