mirror of
https://github.com/pnx/dotfiles
synced 2026-10-17 21:56:49 +02:00
11 lines
287 B
Lua
11 lines
287 B
Lua
|
|
function FocusOrStart(command, classPrefix)
|
|
for _, window in ipairs(hl.get_windows()) do
|
|
if window.class:sub(1, #classPrefix) == classPrefix then
|
|
hl.dispatch(hl.dsp.focus({ window = window }))
|
|
return
|
|
end
|
|
end
|
|
|
|
hl.exec_cmd(command)
|
|
end
|