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.bind("SUPER + Return", launcher("kitty")) hl.define_submap("launch", function() -- Librewolf hl.bind("l", launcher("librewolf"), { description = "Launch Librewolf" }) -- Steam hl.bind("s", launcher("steam"), { description = "Launch Steam" }) -- Discord hl.bind("d", launcher("vesktop"), { description = "Launch Discord" }) -- Kitty hl.bind("k", launcher("kitty"), { description = "Launch kitty" }) hl.bind("Return", launcher("kitty"), { description = "Launch kitty" }) -- Filezilla hl.bind("f", launcher("filezilla"), { description = "Launch Filezilla" }) -- Thunderbird hl.bind("t", launcher("thunderbird"), { description = "Launch Thunderbird" }) -- Zathura hl.bind("z", launcher("zathura"), { description = "Launch Zathura (pdf)" }) -- Brave hl.bind("SHIFT + B", launcher("brave"), { description = "Launch Brave" }) -- bsmanager hl.bind("b", launcher("/opt/BSManager/bs-manager"), { description = "Launch BSManager" }) -- ALVR hl.bind("p", launcher("alvr_dashboard"), { description = "Launch ALVR" }) -- Qalculate hl.bind("c", launcher("qalculate-qt"), { description = "Launch Qalculate!" }) -- 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, { description = "Launch AirPlay server" }) -- Escape hl.bind("Escape", function() exit_submap() end) end)