hl.dsp.exec_cmd

hl.dsp.exec_cmd(cmd: string, rules?: table)

Create a dispatcher.

Signature

hl.dsp.exec_cmd(cmd: string, rules?: table): HL.Dispatcher

Parameters

cmdstring

Command to execute. Must not be empty.

rulestable, optional

Window rules to apply to the spawned process.

Returns

dispatcherHL.Dispatcher

Dispatcher object returned by this function.

Examples

hl.bind("SUPER + Return", hl.dsp.exec_cmd("kitty"))

hl.bind("SUPER + F", hl.dsp.exec_cmd("firefox", { float = true }))

Notes

See also

HL.Dispatcher

Dispatcher object returned by this function.

hl.bind()

Bind a dispatcher to a key.

hl.dispatch()

Execute a dispatcher immediately.