diff options
| -rw-r--r-- | .gitignore | 20 | ||||
| -rw-r--r-- | LICENSE | 21 | ||||
| -rw-r--r-- | README.md | 9 | ||||
| -rw-r--r-- | rebar.config | 7 | ||||
| -rw-r--r-- | rebar.lock | 1 | ||||
| -rw-r--r-- | src/er_xdg_pipe_menu.app.src | 14 | ||||
| -rw-r--r-- | src/er_xdg_pipe_menu_app.erl | 18 | ||||
| -rw-r--r-- | src/er_xdg_pipe_menu_sup.erl | 37 |
8 files changed, 127 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..df53f7d --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ +.rebar3 +_build +_checkouts +_vendor +.eunit +*.o +*.beam +*.plt +*.swp +*.swo +.erlang.cookie +ebin +log +erl_crash.dump +.rebar +logs +.idea +*.iml +rebar3.crashdump +*~ @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Christopher R. Nelson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..5a7da3b --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +er_xdg_pipe_menu +===== + +Openbox pipemenu generator from XDG .desktop files + +Build +----- + + $ rebar3 compile diff --git a/rebar.config b/rebar.config new file mode 100644 index 0000000..8053a64 --- /dev/null +++ b/rebar.config @@ -0,0 +1,7 @@ +{erl_opts, [debug_info]}. +{deps, []}. + +{shell, [ + %% {config, "config/sys.config"}, + {apps, [er_xdg_pipe_menu]} +]}. diff --git a/rebar.lock b/rebar.lock new file mode 100644 index 0000000..57afcca --- /dev/null +++ b/rebar.lock @@ -0,0 +1 @@ +[]. diff --git a/src/er_xdg_pipe_menu.app.src b/src/er_xdg_pipe_menu.app.src new file mode 100644 index 0000000..7013bc7 --- /dev/null +++ b/src/er_xdg_pipe_menu.app.src @@ -0,0 +1,14 @@ +{application, er_xdg_pipe_menu, [ + {description, "Openbox pipemenu generator from XDG .desktop files"}, + {vsn, "0.1.0"}, + {registered, []}, + {mod, {er_xdg_pipe_menu_app, []}}, + {applications, [ + kernel, + stdlib + ]}, + {env, []}, + {modules, []}, + {licenses, ["MIT"]}, + {links, []} + ]}. diff --git a/src/er_xdg_pipe_menu_app.erl b/src/er_xdg_pipe_menu_app.erl new file mode 100644 index 0000000..1880de8 --- /dev/null +++ b/src/er_xdg_pipe_menu_app.erl @@ -0,0 +1,18 @@ +%%%------------------------------------------------------------------- +%% @doc er_xdg_pipe_menu public API +%% @end +%%%------------------------------------------------------------------- + +-module(er_xdg_pipe_menu_app). + +-behaviour(application). + +-export([start/2, stop/1]). + +start(_StartType, _StartArgs) -> + er_xdg_pipe_menu_sup:start_link(). + +stop(_State) -> + ok. + +%% internal functions diff --git a/src/er_xdg_pipe_menu_sup.erl b/src/er_xdg_pipe_menu_sup.erl new file mode 100644 index 0000000..2e42081 --- /dev/null +++ b/src/er_xdg_pipe_menu_sup.erl @@ -0,0 +1,37 @@ +%%%------------------------------------------------------------------- +%% @doc er_xdg_pipe_menu top level supervisor. +%% @end +%%%------------------------------------------------------------------- + +-module(er_xdg_pipe_menu_sup). + +-behaviour(supervisor). + +-export([start_link/0]). + +-export([init/1]). + +-define(SERVER, ?MODULE). + +start_link() -> + supervisor:start_link({local, ?SERVER}, ?MODULE, []). + +%% sup_flags() = #{strategy => strategy(), % optional +%% intensity => non_neg_integer(), % optional +%% period => pos_integer()} % optional +%% child_spec() = #{id => child_id(), % mandatory +%% start => mfargs(), % mandatory +%% restart => restart(), % optional +%% shutdown => shutdown(), % optional +%% type => worker(), % optional +%% modules => modules()} % optional +init([]) -> + SupFlags = #{ + strategy => one_for_all, + intensity => 0, + period => 1 + }, + ChildSpecs = [], + {ok, {SupFlags, ChildSpecs}}. + +%% internal functions |
