Log In  

Some linux distros include code in the default .bashrc that chain loads files from ~/.bashrc.d. This is useful for keeping your config organized. (I like keeping my aliases in a separate file, for instance.)

I've made a snippet that does this for Picotron. Add this to your /appdata/system/startup.lua, and it will chain load any .lua files in the folder /appdata/system/startup.

startup_folder = "/appdata/system/startup"
if fstat(startup_folder) == "folder" then
    for file in all(ls(startup_folder)) do
        filename = startup_folder .. "/" .. file
        if fstat(filename) == "file" and file:find("%.lua$") then
            create_process(filename)
        end
    end
end
P#144150 2024-03-22 18:14

2

I love this idea! I'll be implementing this on my Picotron immediately. It would make it a lot easier for downloaded/installed software to offer to auto-start if it can just drop or un-drop a file into /appdata/system/startup :)

P#144156 2024-03-22 19:08 ( Edited 2024-03-22 19:08)

[Please log in to post a comment]