UDLaunch is a tool for launching multiple programs from a single command with settings you define in a configuration file.
It is great for launching user-level daemons when you log in to your computer Some examples could be a program that sets your wallpaper, a status bar, a desktop notification program, a polkit service or a session manager, but it can run whatever you need it to.
UDLaunch allows you to configure:
- Command-line arguments passed to each program
- If the program should be killed/restarted when UDLaunch is invoked
- Any environment variables that need to be set or unset for your program to run properly
- Multiple groups of programs that can be run separately
- Absolute paths to the executables, such as programs that are not in your path
The only dependency needed to build UDLaunch is the V compiler. Once you have that, you can follow these steps:
git clone https://github.com/wreedb/udlaunch; cd udlaunch
v . -prod # for a release build
v . # for a debug build
The following software is needed at run-time, however it is highly unlikely that you do not have these already.
- procps: needed for the
pgrep
command - util-linux: needed for the
kill
command
Once built, you can copy the binary to your ~/.local/bin
directory, or
anywhere in your PATH
. Then you can copy the example configuration file
into your ~/.config
under a directory called udlaunch
, or write one
from scratch using the example as a reference for the syntax.
The configuration is written in TOML format, and their website has excellent
documentation for the specification.
Each entry in the configuration may have these fields
field | required | type | default |
---|---|---|---|
name | true | string | N/A, required |
restart | false | boolean | false |
args | false | [string] | [ ] |
setenvs | false | {string=string} | { } |
unsetenvs | false | [string] | [ ] |
restart | false | string | inferred |
- Types displayed in the format
[type]
refer to a list of the type specified, separated by commas. - Types displayed in the format
{type=type}
refer to a mapping oftype = type
, see the examples section for examples. - The
inferred
default value of the path field is done by UDLaunch, it will try to find the executable in yourPATH
Here are some examples for the configuration, using Mako, XFSettingsd and Waybar
[default]
[default.xfsettingsd]
name = "xfsettingsd"
args = ["--disable-wm-check", "--daemon"]
unsetenvs = ["WAYLAND_DISPLAY"]
path = "/usr/bin/xfsettingsd"
[default.mako]
name = "mako"
restart = true
setenvs = { "VAR_1" = "hello", "VAR_2" = "0" }
[default.waybar]
name = "waybar"
args = ["--log-level=critical"]
The included license is the BSD-2-Clause license. You can contact me by email at [email protected]