#urwid — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #urwid, aggregated by home.social.
-
It basically redraws entire lines at a time, and a single character change invalidates the entire line that it is on.
-
It basically redraws entire lines at a time, and a single character change invalidates the entire line that it is on.
-
Youth of today, with your emulators! (-:
I simply have an actual serial port that I can set to 1200 BPS, and log in on.
From a quick perusal of its 'raw' driver's code, you probably do not want to know #urwid's drawing behaviour.
-
Youth of today, with your emulators! (-:
I simply have an actual serial port that I can set to 1200 BPS, and log in on.
From a quick perusal of its 'raw' driver's code, you probably do not want to know #urwid's drawing behaviour.
-
It would have to be more complex than that: a tool that sets cursor addressing mode and non-canonical input mode back up after nvi exits (which is when nvi tears down cursor addressing mode and all that stuff).
reset actually does the opposite of that.
Sadly, #ncurses, which #urwid can be layered on top of, is quite capable of switching between 'prog' and 'shell' modes; but this is simply not used by urwid and is not even the urwid underpinning that is chosen by #sncli anyway.
-
It would have to be more complex than that: a tool that sets cursor addressing mode and non-canonical input mode back up after nvi exits (which is when nvi tears down cursor addressing mode and all that stuff).
reset actually does the opposite of that.
Sadly, #ncurses, which #urwid can be layered on top of, is quite capable of switching between 'prog' and 'shell' modes; but this is simply not used by urwid and is not even the urwid underpinning that is chosen by #sncli anyway.
-
What are everybody's favourite simple #TUI libraries.
I've been looking at #npyscreen and #urwid or maybe #textual or #picotui ?
Basically, I want to design a #cyberdeck sort of thing, but I want the interface to be more like a Gameboy or an old fashioned purpose-built device.
-
What are everybody's favourite simple #TUI libraries.
I've been looking at #npyscreen and #urwid or maybe #textual or #picotui ?
Basically, I want to design a #cyberdeck sort of thing, but I want the interface to be more like a Gameboy or an old fashioned purpose-built device.
-
#urwid is really nice for fast hacking neat terminal interfaces. gave it a go, much fun :) you won't feel cursed. #python
https://urwid.org -
#urwid does support overriding each LineBox character. So I should be able to plug in the existing config I wrote at least.
Unfortunately it also suffers from width miscalculations when the label contains more complex emoji, especially for ones that aren't rendered properly by the terminal... I guess that'll end up being an issue that will depend on upstream fixes.
All I could perhaps do is offer a way to specify padding/width offsets for certain glyphs or buttons, but that might only work for my own box implementation rather than LineBox. -
That feeling when you find out that the function you've been #coding to add some functionality to a library, is actually already sort of implemented (and better?) in the library itself...
I guess I can simplify the box-drawing code for #TUILauncher as #urwid has
urwid.LineBox().
(Though I might miss out on the custom box-drawing glyphs (unless that's also implemented already)) -
@kelbot I think I actually have something working with #urwid too, though some terminals might have issues with mouse coords beyond a certain amount of columns.
What exactly do you want it to do after clicking on a button? Do you want it to end the button application and launch it in the same pane/window?
Open a new tmux/screen window and launch it in that? Switch to a specific tmux pane, and launch it in that? (And what happens then if that pane is already running an app? Should it SIGSUSPEND?) -
-
@kelbot alternatively you can probably write a simple #TUI in #Python with #Urwid, which seems to support mouse input: http://urwid.org/manual/userinput.html