added a keybind to the crash screen that reboots when the user presses enter/return
wow lazyvim likes reformatting everything
This commit is contained in:
@@ -52,6 +52,7 @@ local unicode = unicode
|
||||
local result, reason = xpcall(loadBoot, handleError)
|
||||
local lines = {}
|
||||
if not result then
|
||||
resX, resY = gpu.getResolution() -- doing it again because boot.lua changes the resolution
|
||||
local log
|
||||
local logSuccess, logError = false, nil
|
||||
if _G.require then
|
||||
@@ -93,13 +94,14 @@ if not result then
|
||||
gpu.fill(1, resY, resX, 1, " ")
|
||||
gpu.setForeground(bgColor)
|
||||
gpu.setBackground(0xFFFFFF)
|
||||
gpu.set(2, resY, "🠅 🠄 🠇 🠆")
|
||||
gpu.set(2, resY, "🠅 🠄 🠇 🠆 ⏎")
|
||||
gpu.setForeground(0xFFFFFF)
|
||||
gpu.setBackground(bgColor)
|
||||
gpu.set(4, resY, " / ")
|
||||
gpu.set(9, resY, " / ")
|
||||
gpu.set(14, resY, " / ")
|
||||
gpu.set(19, resY, " Scroll" .. string.rep(" ", resX - 21))
|
||||
gpu.set(19, resY, " Scroll ")
|
||||
gpu.set(29, resY, " Reboot")
|
||||
end
|
||||
local function cropset(x, y, txt)
|
||||
gpu.set(math.max(x, 1), y, unicode.sub(txt, math.max(2 - x, 1)))
|
||||
@@ -177,6 +179,9 @@ if not result then
|
||||
if ev[4] == 205 then
|
||||
scrollRight()
|
||||
end
|
||||
if ev[4] == 28 then
|
||||
computer.shutdown(true)
|
||||
end
|
||||
end
|
||||
if ev[1] == "scroll" then
|
||||
if ev[5] > 0 then
|
||||
|
||||
Reference in New Issue
Block a user