Jump to content




LyqydOS Beta/Development



189 replies to this topic

#1 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 23 October 2012 - 02:16 AM

LyqydOS is a windowing operating system for ComputerCraft. You can move, resize, minimize and maximize your windows! LyqydOS will remember the size you changed a window to, so when you start up that program again, the window will be exactly where it was when you closed it. With mouse and color support as well, LyqydOS is one of the most feature-rich systems on the forums. Here are a couple of screenshots:

Spoiler

LyqydOS is meant to be used primarily with the new advanced computers, but is compatible with the non-advanced computers as well. Most of the window controls are very intuitive, so click around a little. To start a new program, right-click on LyqydOS up on the titlebar, or hit F1. To switch windows, you can click on the window you want to switch to, you can click on the window's name on the taskbar, or you can hit F3 to get a list of all current windows. Right-click on a window's titlebar or hit F4 to get a window options menu to move, resize, minimize, maximize, etc.

To install LyqydOS, simply run the installer (pastebin ID: WmFHmuZq). The installer will automatically fetch the latest version of the files from the github repository. Manual setup instructions can be found in the README on github. LyqydOS is only for ComputerCraft 1.45 or newer.

Please be sure to let me know of any bugs you find! Bear in mind that this is still in active development.

#2 PixelToast

  • Signature Abuser
  • 2,265 posts
  • Location3232235883

Posted 23 October 2012 - 02:18 AM

:3 gona try it, i saw you on le IRC

EDIT:
AWESOME!!!!
although it needs an installer :3

#3 Watcher7

  • Members
  • 25 posts
  • LocationEquestria, TX

Posted 23 October 2012 - 02:21 AM

Massively hawt.

#4 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 28 October 2012 - 10:18 PM

Added automatic installer program, fetchable from github. See first post for details.

#5 inventor2514

  • Members
  • 63 posts

Posted 29 October 2012 - 01:20 AM

Excellent OS! I did notice that the mouse_scroll event x and y values are not adjusted like they are with mouse_click when I was messing around with events.

#6 stilldabomb

  • New Members
  • 110 posts

Posted 29 October 2012 - 01:30 AM

Woah... This is just epic! Great job Lyqyd!

#7 anonimo182

  • Members
  • 252 posts
  • LocationIn the universe

Posted 29 October 2012 - 02:06 AM

Summarizing this in a few words: Epic job!

#8 BigSHinyToys

  • Members
  • 1,001 posts

Posted 29 October 2012 - 02:23 AM

This is very well done. I have found one bug.
upon attempting to resize the Run Program box
procman:217: attempt to index ? (a boolean value)
Also can I have permission to start new windows and processes from [Advanced Computer] Mouse File Browser

And one idea maybe unbordered window.

Spoiler

My program currently is not expecting the value from term.getSize to change so doesn't resize very well maximize then restart it fixes this until I fix that.

[Edit]
found another bug the paint program crashes I think it is because of a too long without yield caused by the extra time in changing values in a table as compared to just directly printing to screen.
[/Edit]

#9 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 29 October 2012 - 02:36 AM

View Postinventor2514, on 29 October 2012 - 01:20 AM, said:

Excellent OS! I did notice that the mouse_scroll event x and y values are not adjusted like they are with mouse_click when I was messing around with events.

Thanks! You are correct; mouse_scroll and mouse_drag have yet to be accounted for. This is at the top of my to-do list at this point.

View PostBigSHinyToys, on 29 October 2012 - 02:23 AM, said:

This is very well done. I have found one bug.
upon attempting to resize the Run Program box
procman:217: attempt to index ? (a boolean value)
Also can I have permission to start new windows and processes from [Advanced Computer] Mouse File Browser

And one idea maybe unbordered window.

Spoiler

My program currently is not expecting the value from term.getSize to change so doesn't resize very well maximize then restart it fixes this until I fix that.

Ah, I need to disable that menu from popping up under certain conditions. Windows like the run program box are closed automatically if they lose focus, which is what happens when you attempt to resize it. So, when you select the resize (or any other option), that window has already been closed, so it cannot do anything to it.

I have an API planned for allowing programs to access their containing window's properties, so you would be able to code in a special case for when running in a window, allowing you to set a custom window title, etc. I hope to have this out soon, as it will make compatibility much better. Borderless windows are not currently planned (for a consistent user interface/user experience); this API should make that mostly unnecessary.

The resizing issues you were having could be dealt with (as long as your program can draw to an arbitrarily-sized window without too much issue) by handling the window_resize event. When your program receives that event, simply get the new size from term.getSize() and redraw the program interface. For example, the default edit program can be made compatible by adding this code to the appropriate place in its event handling loop:

elseif sEvent == "window_resize" then
  w, h = term.getSize()
  redrawText()
  redrawMenu()


#10 BigSHinyToys

  • Members
  • 1,001 posts

Posted 29 October 2012 - 07:56 AM

I have modified Mouse File Browser to be compatible with LyqydOS so no more flickering wildly and resize no longer crashes lol.
This can run stand alone or from LyqydOS still as well. [Advanced Computer] Mouse File Browser


@Lyqyd

have you found a way to make paint run without cashing ?

also will the API have access to a function for creating a new process and window if so can I integrate it into Mouse file browser ?

#11 Exerro

  • Members
  • 801 posts

Posted 29 October 2012 - 09:59 AM

wow this looks really good, i'm jealous :P/>. does it support multi-tasking and a suggestion: instead of using ascii characters to border the windows, have the window a certain background colour so it doesnt need a border at all

#12 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 29 October 2012 - 04:50 PM

View PostBigSHinyToys, on 29 October 2012 - 07:56 AM, said:

I have modified Mouse File Browser to be compatible with LyqydOS so no more flickering wildly and resize no longer crashes lol.
This can run stand alone or from LyqydOS still as well. [Advanced Computer] Mouse File Browser


@Lyqyd

have you found a way to make paint run without cashing ?

also will the API have access to a function for creating a new process and window if so can I integrate it into Mouse file browser ?

Nice! It's cool to see stuff being worked on specifically for LyqydOS. I haven't tried the paint program yet, but I'll take a look at it and see what the issue might be.

As for starting new windows, check out the 'start' program that comes with LyqydOS. The installer automatically puts this in the root folder of the computer. If you're just looking to run other programs in their own window, try using it:

shell.run("start", "programName", "arguments", "if", "any")

View Postawsumben13, on 29 October 2012 - 09:59 AM, said:

wow this looks really good, i'm jealous :P/>. does it support multi-tasking and a suggestion: instead of using ascii characters to border the windows, have the window a certain background colour so it doesnt need a border at all

It does support multitasking, though not perfectly yet. The borders are the way they are to prevent ambiguities in window borders. There are some cases where it might be difficult to tell where one window begins and another ends without them.

#13 ElvishJerricco

  • Members
  • 803 posts

Posted 29 October 2012 - 09:52 PM

Very cool OS. You might consider making use of the mouse_drag even to allow people to drag windows to move them or drag their corners to resize. Also it'd be nice if windows stayed open until you closed them even if the process finished. That way if i, for example, misstype a pastebin command i can still see the errors.

#14 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 30 October 2012 - 12:24 AM

View PostElvishJerricco, on 29 October 2012 - 09:52 PM, said:

Very cool OS. You might consider making use of the mouse_drag even to allow people to drag windows to move them or drag their corners to resize. Also it'd be nice if windows stayed open until you closed them even if the process finished. That way if i, for example, misstype a pastebin command i can still see the errors.

Mouse drag for window movement and resizing is planned.

I don't think leaving windows of dead processes open would be a good thing overall. There are certain cases (like your example) where it would be nice to see the output after the program ends, but I think that the annoyance of other programs not closing when they should outweighs it. For instance, it would be very annoying to exit the edit program using its internal menu and then also have to close the window manually. It would also be a departure from the way most window managers work, in my experience.

Edit: I know it is a bit more typing, but I think it would make sense to run that command in a shell window rather than directly. I know I usually do something else with the file after I've fetched something from pastebin, so having the shell already open would be more convenient in that case.

Second edit:

View Postinventor2514, on 29 October 2012 - 01:20 AM, said:

I did notice that the mouse_scroll event x and y values are not adjusted like they are with mouse_click when I was messing around with events.

This should be fixed. Re-run the installer and you should receive the update. Let me know if it gives you any trouble.

View PostElvishJerricco, on 29 October 2012 - 09:52 PM, said:

You might consider making use of the mouse_drag even to allow people to drag windows to move them or drag their corners to resize.

Implemented. Drag the title bar of a window (except the _MX controls) to move it, drag the lower-right corner to resize. Re-run the installer to receive the updated version with these changes.

#15 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 30 October 2012 - 04:00 AM

Apologies for the double-post. The installer has been updated (still at the same pastebin location) to include a preset for the paint program's window. The interface for the paint program requires a certain amount of space or it will crash, causing it to not work in LyqydOS. It now functions, but the color palette (showing currently chosen colors) is cut off, unfortunately. I believe all colors are still visible for choosing, however.

After updating to the new installer, if you do not wish to keep your other window settings, simply run this command outside of LyqydOS before running the installer:

rm .lyqwin

If you do wish to keep your window settings, you will need to edit the .lyqwin file outside of LyqydOS and add the following line:

1,1,19,9,true,rom/programs/color/paint

When using the paint program, do not un-maximize it, as it may crash if you do so.

#16 BigSHinyToys

  • Members
  • 1,001 posts

Posted 30 October 2012 - 09:33 AM

Found another bug

sending a number with decimal to a term.setCursorPos() causes program and window to crash took me ages to find this little bug.

example on normal computer
term.setCursorPos(1.1,1.1) will work fine
do the same in your OS and it crashes

I have added math.ceil() to My program as a work around for this It is probably better programing anyway to round it.

was a real pain in the *** as it ran fine on my computer then crashes in the OS then ran fine after i resizes and after placing 20 ish prints I tracked it down to a term.setCurosrPos() is a draw function.

[EDIT] another bug

scrolling causes crash when no windows are open

Started with a clean install and it gives error

procman:541: attempt to index ? (a nil value)

relevant section of code
540 elseif event[1] == "mouse_scroll" then
541  event[3] = event[3] - processTable[process.focusWindow].window.x
542  event[4] = event[4] - processTable[process.focusWindow].window.y
543  if event[3] > 0 and event[3] < processTable[process.focusWindow].window.w - 1 and event[4] > 0 and event[4] < processTable[process.focusWindow].window.h - 1 then
544   resumeProcess(process.focusWindow, event)
545  end
546 else

I think it is because there is no focused window at the time causing the request from processTable[] to fail

#17 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 30 October 2012 - 02:52 PM

Thanks for the reports! I'll make sure to match the actual behavior for setCursorPos when I fix that one to prevent surprising cursor placements. The scrolling bug is why I shouldn't implement new features late in the evening! I'll roll out a quick fix for that tonight. Thanks again!

#18 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 31 October 2012 - 05:04 AM

Turns out, the actual setCursorPos function floors it (rather than cieling-ing it), so the windowing stuff has been updated to reflect that, as well as to not allow cursor position changes to non-number values. I also added a couple of checks to fix the scrolling (and probably dragging was also affected, fixed it as well if it was) bug when no windows were open. Update from the installer to receive these bug fixes. Thanks again for the bug reports!

#19 Kilobyte

  • Members
  • 122 posts

Posted 16 November 2012 - 02:58 AM

nice work, dude, really!
even if its more a window anager than an OS :P/> still nice

#20 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 16 November 2012 - 04:59 AM

True, at this stage, it is more of a window manager than anything else. The set of planned features (including better event filtering) will push it further into the realm of a full-fledged operating system.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users