repositories / dotfiles
dotfiles
bugabingas dorkfiles
owned by bugabinga
hypr/modules/commands.lua
Rawlocal apps = require("modules.apps")
local M = {}
function M.to_dispatcher(action)
if type(action) == "string" then
return hl.dsp.exec_cmd(action)
end
return action
end
function M.exec(command)
return hl.dispatch(hl.dsp.exec_cmd(command))
end
function M.app(name)
return M.exec(assert(apps[name], name))
end
function M.workspace(id)
return hl.dispatch(hl.dsp.focus({ workspace = id }))
end
function M.move_to_workspace(id)
return hl.dispatch(hl.dsp.window.move({ workspace = id }))
end
return M