tenchi2xh / scurses Goto Github PK
View Code? Open in Web Editor NEWScurses, terminal drawing API for Scala, and Onions, a Scurses framework for easy terminal UI
License: MIT License
Scurses, terminal drawing API for Scala, and Onions, a Scurses framework for easy terminal UI
License: MIT License
It would be nice to be able to either completely reset a frame panel or remove some of the widgets. As I understand they can only be added currently. I had to resort to modifying the internal state of FramePanel to achieve this. Can also contribute this if it is considered welcome feature.
Also great library, used it and loved it :)
Any chances to enable releases for Scala 3? I can use this as 2.13 library however, a few packages conflict like sourcecode
During the init the library creates a SIGWINCH to try and get the terminal size, but this signal does not work in Windows.
Could you update the documentation to explain how to include Scurses in another project using SBT?
Could you release the project so that it can be used as a dependency in other projects? For example on Bintray.
I was thinking that have a small window running along the bottom of the 'screen' that could expose a console prompt and accept custom commands to execute in the background.
Does scurses have the ability to integrate with a library like scala-jline to target stdin and stdout/stderr to a single "frame" within a scurses screen?
Any hint to use it inside Cats Effects?
Direct encapsulation (calling main example functions inside and IO block) does not work, maybe due to threads?
OS: MacOS BigSur 11.6
Terminal: iTerm/Kitty
steps to reproduce:
small terminal
git clone https://github.com/Tenchi2xh/Scurses && cd Scurses
sbt onions/run
after the sbt start the following is printed, but the process then hangs and I need to kill it by sending SIGTERM
╒═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════ ╕
│ Example Onions UI - Powered by Scurses │
├ [Labels]ns/run
[success] Total time: 10 s, comple(#0|83x727|→)^[[0n[success] Total time: 22 s, completed 19-Oct-2021 17:56:47
[error] at net.team2xh.scurses.Scurses.size(Scurses.scala:200)
[error] at net.team2xh.onions.components.Frame.<init>(Frame.scala:41)
[error] at net.team2xh.onions.examples.ExampleUI$.$anonfun$new$1(ExampleUI.scala:36)
[error] at net.team2xh.onions.examples.ExampleUI$.$anonfun$new$1$adapted(ExampleUI.scala:34)
[error] at net.team2xh.scurses.Scurses$.apply(Scurses.scala:27)
[error] at net.team2xh.onions.examples.ExampleUI$.delayedEndpoint$net$team2xh$onions$examples$ExampleUI$1(ExampleUI.scala:34)
[error] at net.team2xh.onions.examples.ExampleUI$delayedInit$body.apply(ExampleUI.scala:13)
[error] at scala.Function0.apply$mcV$sp(Function0.scala:39)
[error] at scala.Function0.apply$mcV$sp$(Function0.scala:39)
[error] at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)
[error] at scala.App.$anonfun$main$1(App.scala:76)
[error] at scala.App.$anonfun$main$1$adapted(App.scala:76)
[error] at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:563)
[error] at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:561)
[error] at scala.collection.AbstractIterable.foreach(Iterable.scala:919)
[error] at scala.App.main(App.scala:76)
[error] at scala.App.main$(App.scala:74)
[error] at net.team2xh.onions.examples.ExampleUI$.main(ExampleUI.scala:13)
[error] at net.team2xh.onions.examples.ExampleUI.main(ExampleUI.scala)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.lang.reflect.Method.invoke(Method.java:498)
[error] stack trace is suppressed; run last onions / Compile / bgRun for the full output
if I use a bigger terminal output is refreshing every second or so and wiping the screen blinking ocasionally
changing the terminal size crashes the application.
It would be really nice if Input supported non ASCII characters such as á ã お etc. Assuming the terminal is configured with a font that supports those characters.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.