63 lines
1.4 KiB
Lua
63 lines
1.4 KiB
Lua
local function exit_submap()
|
|
hl.dispatch(hl.dsp.submap("reset"))
|
|
end
|
|
|
|
local function launcher(program)
|
|
return function ()
|
|
hl.dispatch(hl.dsp.exec_cmd(program))
|
|
exit_submap()
|
|
end
|
|
end
|
|
|
|
hl.define_submap("launch", function()
|
|
-- Librewolf
|
|
hl.bind("l", launcher("librewolf"))
|
|
|
|
-- Steam
|
|
hl.bind("s", launcher("steam"))
|
|
|
|
-- Discord
|
|
hl.bind("d", launcher("vesktop"))
|
|
|
|
-- Kitty
|
|
hl.bind("k", launcher("kitty"))
|
|
hl.bind("Return", launcher("kitty"))
|
|
|
|
-- Filezilla
|
|
hl.bind("f", launcher("filezilla"))
|
|
|
|
-- Thunderbird
|
|
hl.bind("t", launcher("thunderbird"))
|
|
|
|
-- Zathura
|
|
hl.bind("z", launcher("zathura"))
|
|
|
|
-- Brave
|
|
hl.bind("Shift + B", launcher("brave"))
|
|
|
|
-- bsmanager
|
|
hl.bind("b", launcher("/opt/bs-manager/bs-manager"))
|
|
|
|
-- ALVR
|
|
hl.bind("p", launcher("alvr_dashboard"))
|
|
|
|
-- Qalculate
|
|
hl.bind("c", launcher("qalculate-qt"))
|
|
|
|
-- AirPlay
|
|
hl.bind("a", function()
|
|
hl.dispatch(hl.dsp.exec_cmd("notify-send 'AirPlay server is starting...' --app-name='AirPlay Video'"))
|
|
hl.dispatch(
|
|
hl.dsp.exec_cmd(
|
|
"terminator -T 'hiddent'terminator' -e 'systemctl start avahi-daemon' && sleep 5 && uxplay -n LinuxVideoplay -nh"
|
|
)
|
|
)
|
|
exit_submap()
|
|
end)
|
|
|
|
-- Escape
|
|
hl.bind("Escape", function()
|
|
exit_submap()
|
|
end)
|
|
end)
|