Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Next Desktop --
- local function s(...) return sleep(...) end
- local function aw(...) return write(...) end
- local function p(...) return print(...) end
- local function tw(...) return term.write(...) end
- local function scp(...) return term.setCursorPos(...) end
- local function sbc(...) return term.setBackgroundColor(...) end
- local function stc(...) return term.setTextColor(...) end
- local function tc(...) return term.clear(...) end
- local function tcl(...) return term.clearLine(...) end
- local function r(...) return shell.run(...) end
- local function sp(...) return textutils.slowPrint(...) end
- local function sw(...) return textutils.slowWrite(...) end
- local function fse(...) return fs.exists(...) end
- local function pul(...) return paintutils.loadImage(...) end
- local function pud(...) return paintutils.drawImage(...) end
- local function pfb(...) return paintutils.drawFilledBox(...) end
- local function su(...) return os.shutdown(...) end
- local function re(...) return os.reboot(...) end
- local function pdp(...) return paintutils.drawPixel(...) end
- function wyswietl_foldery(sciezka, y)
- local files = fs.list(sciezka)
- for i,file in ipairs(files) do
- scp(2,y)
- if fs.isDir(fs.combine(sciezka,file)) then
- stc(colors.blue)
- term.write("[["..file.."]]")
- stc(colors.white)
- end
- y = y+1
- end
- end
- function desktop_folders()
- pfb(1,3,35,10,colors.white)
- pfb(2,4,34,9,colors.black)
- wyswietl_foldery("/os/desktop",4)
- end
- function main()
- sbc(colors.cyan)
- tc()
- sbc(colors.cyan)
- scp(1,1)
- pfb(1,1,w,1,colors.black)
- scp(1,1)
- stc(colors.white)
- p("NextFinder")
- pfb(6,h,w,h,colors.blue)
- pfb(1,h,6,h,colors.black)
- end
- function mysz()
- local event, button, x, y = os.pullEvent("mouse_click")
- klik = {x, y, button}
- return klik
- end
- sciezka = "/"
- while true do
- main()
- desktop_folders()
- mysz()
- end
Advertisement
Add Comment
Please, Sign In to add comment