Advertisement
DOGGYWOOF

Untitled

Mar 16th, 2024
5
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.29 KB | None | 0 0
  1. -- Set up the screen
  2. local w, h = term.getSize()
  3. term.setBackgroundColor(colors.black)
  4. term.clear()
  5. term.setCursorPos(1, 1)
  6.  
  7. -- Display app icons
  8. local appIcons = {"App1", "App2", "App3", "App4", "App5"}
  9. local iconX, iconY = 2, 3
  10.  
  11. for i, app in ipairs(appIcons) do
  12. term.setCursorPos(iconX, iconY)
  13. term.setBackgroundColor(colors.blue)
  14. term.setTextColor(colors.white)
  15. term.write(" " .. app .. " ")
  16. iconX = iconX + 12 -- Adjust spacing for next icon
  17. end
  18.  
  19. -- Display widgets
  20. local widget1 = "Weather"
  21. local widget2 = "Clock"
  22. term.setCursorPos(2, 10)
  23. term.setBackgroundColor(colors.yellow)
  24. term.setTextColor(colors.black)
  25. term.write(" " .. widget1 .. " ")
  26.  
  27. term.setCursorPos(20, 10)
  28. term.setBackgroundColor(colors.green)
  29. term.setTextColor(colors.black)
  30. term.write(" " .. widget2 .. " ")
  31.  
  32. -- Display search bar
  33. term.setCursorPos(2, 15)
  34. term.setBackgroundColor(colors.lightGray)
  35. term.setTextColor(colors.black)
  36. term.write(" Search... ")
  37.  
  38. -- Display app drawer icon
  39. term.setCursorPos(w - 10, h)
  40. term.setBackgroundColor(colors.orange)
  41. term.setTextColor(colors.black)
  42. term.write(" App Drawer ")
  43.  
  44. -- Display navigation bar
  45. term.setCursorPos(2, h)
  46. term.setBackgroundColor(colors.gray)
  47. term.setTextColor(colors.white)
  48. term.write(" Back ")
  49.  
  50. term.setCursorPos(10, h)
  51. term.write(" Home ")
  52.  
  53. term.setCursorPos(20, h)
  54. term.write(" Recent Apps ")
  55.  
  56. -- Display notification bar
  57. term.setCursorPos(1, 1)
  58. term.setBackgroundColor(colors.gray)
  59. term.setTextColor(colors.white)
  60. term.write(" Notifications ")
  61.  
  62. -- Display quick settings panel
  63. term.setCursorPos(1, 2)
  64. term.setBackgroundColor(colors.gray)
  65. term.setTextColor(colors.white)
  66. term.write(" Quick Settings ")
  67.  
  68. -- Display wallpaper (optional)
  69. -- You can't directly set wallpaper in ComputerCraft, but you could simulate it with colors and shapes
  70.  
  71. -- Display folders (optional)
  72. -- You can simulate folders by grouping apps together visually
  73.  
  74. -- Display customization options (optional)
  75. -- Not feasible within the constraints of ComputerCraft Lua
  76.  
  77. -- Wait for user input
  78. while true do
  79. local event, key = os.pullEvent("key")
  80. if key == keys.q then
  81. break -- Quit if 'q' is pressed
  82. end
  83. end
  84.  
  85. -- Clear the screen when exiting
  86. term.setBackgroundColor(colors.black)
  87. term.clear()
  88. term.setCursorPos(1, 1)
  89.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement