aboutsummaryrefslogtreecommitdiff
path: root/bin/xdg_pipe_menu_menu
blob: a120a9f85e08ce8868ef8909ec20973ea2f3c3ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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/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(),
    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)).