Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making a command-line program "full screen"

I am wondering how to create the appearance of a "full-screen" window inside a shell, as in vim, emacs, etc. Is it possible to do this programmatically in Ruby? And how platform-dependent would that be?

Edit: I am not looking for how to make my shell go full-screen. I'm looking for a way to hide the previous commands entered and "fill" the shell screen with an app. It's for an installer.

like image 818
user2398029 Avatar asked Feb 21 '12 01:02

user2398029


2 Answers

What you're probably looking for is ncurses or S-Lang support to provide your full TUI experience.

Ruby's gem environment provides several gems that might be worth exploring:

$ gem list --remote | grep -i curses
cursesx (003)
ffi-ncurses (0.4.0)
ncurses (0.9.1)
ncurses-ruby (1.2.1)
ncursesw (1.2.4.3)
snowleopard-ncurses (1.2.4)

The author of the rbcurse package recommends using the ncurses-ruby gem. rbcurse provides some pre-written widgets and the ability to write new widgets in the same style -- it looks mighty useful.

I haven't yet found any S-Lang bindings for Ruby; based on the project's focus on providing a language interpreter, I just don't think it'll be easy to build Ruby bindings. Pity, because many application authors do prefer S-Lang over ncurses.

like image 132
sarnold Avatar answered Oct 05 '22 03:10

sarnold


You could use ncurses for things like that. It provides an abstraction layer to your terminal.

like image 26
mvds Avatar answered Oct 05 '22 02:10

mvds