diff options
| author | Christopher R. Nelson <christopher.nelson@languidnights.com> | 2026-07-21 11:18:56 -0400 |
|---|---|---|
| committer | Christopher R. Nelson <christopher.nelson@languidnights.com> | 2026-07-21 11:18:56 -0400 |
| commit | 7e8472e1e2a0b39746ef86c041d56b92bab5a6b7 (patch) | |
| tree | 4d37a36c945446b4bded6989a780abe4cd3f2f1e /bin | |
| parent | 46b72a375101b54819f8750750017bd71e7c3798 (diff) | |
Wire up cache, file watcher, and Unix socket daemon
Adds a gen_server cache holding the rendered menu, an fs/inotify-based
watcher that debounces changes and invalidates it, a Unix domain
socket serving the cached binary, and the escript client Openbox
invokes (with an inline render fallback if the daemon isn't running).
Also documents local deployment (systemd user unit, Openbox menu.xml
wiring) in the README.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/er_xdg_pipe_menu_menu | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/er_xdg_pipe_menu_menu b/bin/er_xdg_pipe_menu_menu new file mode 100755 index 0000000..32a9bd9 --- /dev/null +++ b/bin/er_xdg_pipe_menu_menu @@ -0,0 +1,17 @@ +#!/usr/bin/env escript +%%! -noshell + +%% Openbox pipe menu entry point. Tries the running daemon's Unix +%% socket first; falls back to an inline scan+parse+render if it +%% isn't reachable. See src/er_xdg_pipe_menu_cli.erl for the logic -- +%% this script only wires up the code path to the compiled app. + +main(Args) -> + add_code_paths(), + er_xdg_pipe_menu_cli:main(Args). + +add_code_paths() -> + ScriptDir = filename:dirname(filename:absname(escript:script_name())), + RepoRoot = filename:dirname(ScriptDir), + Pattern = filename:join([RepoRoot, "_build", "default", "lib", "*", "ebin"]), + code:add_pathsz(filelib:wildcard(Pattern)). |
