Can ink be used as a "full" screen application?
See original GitHub issueHey; I love the concept of this library. Just wondering if it’s possible to make a “full” screen application using ink? By that I mean, something like htop
which takes over the full screen, and when you quit - it leaves your original terminal completely in tact.
This is something that can be done with python’s curses library, or when using blesses:
var blessed = require('blessed');
// Create a screen object.
var screen = blessed.screen({
smartCSR: true
});
var box = blessed.box({
top: 'center',
left: 'center',
width: '50%',
height: '50%',
content: 'Hello {bold}world{/bold}!',
tags: true,
border: {
type: 'line'
},
style: {
fg: 'white',
bg: 'magenta',
border: {
fg: '#f0f0f0'
},
hover: {
bg: 'green'
}
}
});
screen.append(box);
screen.key(['escape', 'q', 'C-c'], function(ch, key) {
return process.exit(0);
});
screen.render()
Which opens the “full” screen application, and leaves the original terminal intact after quitting it. Any pointers/direction would be appreciated 👍
Issue Analytics
- State:
- Created 4 years ago
- Reactions:11
- Comments:17 (4 by maintainers)
Top Results From Across the Web
Ink view in OneNote full screen - Reddit
New full screen ink view is available in Version 2211 (German) DEMO: ... The most powerful update from my use case view.
Read more >Microsoft's new Ink Workspace is less than you'd think from the ...
All three of these new Microsoft pen apps also aren't really full applications. They come up full screen, and not only can't be...
Read more >How do I get Snip and Sketch to go fullscreen like ...
I want to know if there is a way to make snip and sketch go full screen like screensketch used to, or if...
Read more >Reference handbook for using Ink v3.2.0 components (w
The useApp() hook supplies an exit() function which can be used to do this. Example 3 - full screen app #. This large...
Read more >Using Windows 10 | Microsoft Press Store
Using the Windows Ink workspace ... Whiteboard provides a canvas on which you and teammates can share text, drawings, graphics, and imported PDFs ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@taras I learnt more about curses/ncurses and terminfo, via
man terminfo
.I found out you can use ansi escape codes to swap to an alternate screen buffer for ‘full screen’ applications, and once you’re done you can toggle back to the main buffer:
Therefore as a full example:
Working example that doesn’t conflict with the existing buffer:
That seems to be what I was after - I’m not sure if that’s something that should be baked into
ink
or not.Just wanted to add a bit in here, kinda an old thread but…
This is my fullscreen (typescript) component, it tracks the process.stdout resize event and updates a box on resize, works nicely