Process to be executed in full-screen mode
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I am trying to develop a chat application whose interface is terminal-based. For that, I've been playing around with both screen
and tmux
commands.
However, I found a similarity with both of them: my commands do not run in full-screen mode, as in if I scroll up enough in the frames/panels/pane/windows, I can still visualize the history and shell.
How could I make my program to run in full-screen mode just like vi, for instance?
Thanks!
tmux
add a comment |Â
up vote
0
down vote
favorite
I am trying to develop a chat application whose interface is terminal-based. For that, I've been playing around with both screen
and tmux
commands.
However, I found a similarity with both of them: my commands do not run in full-screen mode, as in if I scroll up enough in the frames/panels/pane/windows, I can still visualize the history and shell.
How could I make my program to run in full-screen mode just like vi, for instance?
Thanks!
tmux
2
You may possibly be looking for something like Curses (Wikipedia link).
â Kusalananda
Feb 15 at 21:30
@kusalanada it looks promising. That might be the answer after all!
â tehAnswer
Feb 15 at 22:27
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to develop a chat application whose interface is terminal-based. For that, I've been playing around with both screen
and tmux
commands.
However, I found a similarity with both of them: my commands do not run in full-screen mode, as in if I scroll up enough in the frames/panels/pane/windows, I can still visualize the history and shell.
How could I make my program to run in full-screen mode just like vi, for instance?
Thanks!
tmux
I am trying to develop a chat application whose interface is terminal-based. For that, I've been playing around with both screen
and tmux
commands.
However, I found a similarity with both of them: my commands do not run in full-screen mode, as in if I scroll up enough in the frames/panels/pane/windows, I can still visualize the history and shell.
How could I make my program to run in full-screen mode just like vi, for instance?
Thanks!
tmux
asked Feb 15 at 20:12
tehAnswer
1032
1032
2
You may possibly be looking for something like Curses (Wikipedia link).
â Kusalananda
Feb 15 at 21:30
@kusalanada it looks promising. That might be the answer after all!
â tehAnswer
Feb 15 at 22:27
add a comment |Â
2
You may possibly be looking for something like Curses (Wikipedia link).
â Kusalananda
Feb 15 at 21:30
@kusalanada it looks promising. That might be the answer after all!
â tehAnswer
Feb 15 at 22:27
2
2
You may possibly be looking for something like Curses (Wikipedia link).
â Kusalananda
Feb 15 at 21:30
You may possibly be looking for something like Curses (Wikipedia link).
â Kusalananda
Feb 15 at 21:30
@kusalanada it looks promising. That might be the answer after all!
â tehAnswer
Feb 15 at 22:27
@kusalanada it looks promising. That might be the answer after all!
â tehAnswer
Feb 15 at 22:27
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
So you want to create a TUI (text-based user interface) application? As the TUI Wikipedia page says:
In Unix-like operating systems, TUIs are often constructed using the
terminal control library curses, or ncurses, a mostly compatible
library.
An easy way to interact with ncurses is with the tput
command line tool. And with that we can address your specific question about a "full-screen mode". It is typically done by activating a secondary screen (which should be available in any decent terminal emulator):
tput smcup
The current screen will be hidden away (e.g. you won't be able to scroll up and see previous output) and in the new, "fresh" screen you'll render your application. When that exits revert back to the primary screen with:
tput rmcup
...and everything will be restored to as it was before.
Here is a sampling of other tput
capabilities
tput cup 23 4 # move the cursor to row 23, column 4 of your terminal
tput ed # clear to end of screen
tput setaf 2 # set foreground color to bright green
tput cubl # move cursor left one space
tput rev # turn on reverse video mode
tput sc # save the cursor position
tput rc # restore the cursor position
See man tput
and man 5 terminfo
. For the latter you'll want to scroll down to the Predefined Capabilities section in particular.
And there are plenty of nice resources online to learn more such as http://linuxcommand.org/lc3_adv_tput.php
(Note that none of the above is related to whether or not you are using tmux
or the like.)
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
So you want to create a TUI (text-based user interface) application? As the TUI Wikipedia page says:
In Unix-like operating systems, TUIs are often constructed using the
terminal control library curses, or ncurses, a mostly compatible
library.
An easy way to interact with ncurses is with the tput
command line tool. And with that we can address your specific question about a "full-screen mode". It is typically done by activating a secondary screen (which should be available in any decent terminal emulator):
tput smcup
The current screen will be hidden away (e.g. you won't be able to scroll up and see previous output) and in the new, "fresh" screen you'll render your application. When that exits revert back to the primary screen with:
tput rmcup
...and everything will be restored to as it was before.
Here is a sampling of other tput
capabilities
tput cup 23 4 # move the cursor to row 23, column 4 of your terminal
tput ed # clear to end of screen
tput setaf 2 # set foreground color to bright green
tput cubl # move cursor left one space
tput rev # turn on reverse video mode
tput sc # save the cursor position
tput rc # restore the cursor position
See man tput
and man 5 terminfo
. For the latter you'll want to scroll down to the Predefined Capabilities section in particular.
And there are plenty of nice resources online to learn more such as http://linuxcommand.org/lc3_adv_tput.php
(Note that none of the above is related to whether or not you are using tmux
or the like.)
add a comment |Â
up vote
1
down vote
accepted
So you want to create a TUI (text-based user interface) application? As the TUI Wikipedia page says:
In Unix-like operating systems, TUIs are often constructed using the
terminal control library curses, or ncurses, a mostly compatible
library.
An easy way to interact with ncurses is with the tput
command line tool. And with that we can address your specific question about a "full-screen mode". It is typically done by activating a secondary screen (which should be available in any decent terminal emulator):
tput smcup
The current screen will be hidden away (e.g. you won't be able to scroll up and see previous output) and in the new, "fresh" screen you'll render your application. When that exits revert back to the primary screen with:
tput rmcup
...and everything will be restored to as it was before.
Here is a sampling of other tput
capabilities
tput cup 23 4 # move the cursor to row 23, column 4 of your terminal
tput ed # clear to end of screen
tput setaf 2 # set foreground color to bright green
tput cubl # move cursor left one space
tput rev # turn on reverse video mode
tput sc # save the cursor position
tput rc # restore the cursor position
See man tput
and man 5 terminfo
. For the latter you'll want to scroll down to the Predefined Capabilities section in particular.
And there are plenty of nice resources online to learn more such as http://linuxcommand.org/lc3_adv_tput.php
(Note that none of the above is related to whether or not you are using tmux
or the like.)
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
So you want to create a TUI (text-based user interface) application? As the TUI Wikipedia page says:
In Unix-like operating systems, TUIs are often constructed using the
terminal control library curses, or ncurses, a mostly compatible
library.
An easy way to interact with ncurses is with the tput
command line tool. And with that we can address your specific question about a "full-screen mode". It is typically done by activating a secondary screen (which should be available in any decent terminal emulator):
tput smcup
The current screen will be hidden away (e.g. you won't be able to scroll up and see previous output) and in the new, "fresh" screen you'll render your application. When that exits revert back to the primary screen with:
tput rmcup
...and everything will be restored to as it was before.
Here is a sampling of other tput
capabilities
tput cup 23 4 # move the cursor to row 23, column 4 of your terminal
tput ed # clear to end of screen
tput setaf 2 # set foreground color to bright green
tput cubl # move cursor left one space
tput rev # turn on reverse video mode
tput sc # save the cursor position
tput rc # restore the cursor position
See man tput
and man 5 terminfo
. For the latter you'll want to scroll down to the Predefined Capabilities section in particular.
And there are plenty of nice resources online to learn more such as http://linuxcommand.org/lc3_adv_tput.php
(Note that none of the above is related to whether or not you are using tmux
or the like.)
So you want to create a TUI (text-based user interface) application? As the TUI Wikipedia page says:
In Unix-like operating systems, TUIs are often constructed using the
terminal control library curses, or ncurses, a mostly compatible
library.
An easy way to interact with ncurses is with the tput
command line tool. And with that we can address your specific question about a "full-screen mode". It is typically done by activating a secondary screen (which should be available in any decent terminal emulator):
tput smcup
The current screen will be hidden away (e.g. you won't be able to scroll up and see previous output) and in the new, "fresh" screen you'll render your application. When that exits revert back to the primary screen with:
tput rmcup
...and everything will be restored to as it was before.
Here is a sampling of other tput
capabilities
tput cup 23 4 # move the cursor to row 23, column 4 of your terminal
tput ed # clear to end of screen
tput setaf 2 # set foreground color to bright green
tput cubl # move cursor left one space
tput rev # turn on reverse video mode
tput sc # save the cursor position
tput rc # restore the cursor position
See man tput
and man 5 terminfo
. For the latter you'll want to scroll down to the Predefined Capabilities section in particular.
And there are plenty of nice resources online to learn more such as http://linuxcommand.org/lc3_adv_tput.php
(Note that none of the above is related to whether or not you are using tmux
or the like.)
edited Feb 17 at 12:28
answered Feb 17 at 11:58
B Layer
3,9001525
3,9001525
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f424459%2fprocess-to-be-executed-in-full-screen-mode%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
2
You may possibly be looking for something like Curses (Wikipedia link).
â Kusalananda
Feb 15 at 21:30
@kusalanada it looks promising. That might be the answer after all!
â tehAnswer
Feb 15 at 22:27