▲ 112 ▼ Why I Prefer CLI and TUI over GUI - alavi.me (alavi.me) submitted 6 months ago by somegeek@programming.dev to c/linux@lemmy.ml 52 comments fedilink hide all child comments
[–] Levi@lemmy.ca 8 points 6 months ago (5 children) What is a TUI? I haven't heard that term before. permalink fedilink source hideshow 10 child comments replies: [–] thingsiplay@lemmy.ml 17 points 6 months ago* (last edited 6 months ago) (1 child) TUI: Terminal Text User Interface, something like htop in example. CLI: Command Line Interface, something like grep in example. Edit: "Text" is probably the correct word, not "Terminal". permalink fedilink source parent hideshow 2 child comments replies: [–] Ferk@lemmy.ml 3 points 6 months ago* (1 child) Isn't the T for "text"? (ie. "Text User Interface") I mean, in the context of Unix systems it's most likely gonna be within a terminal emulator, but in theory you can have a TUI inside an SDL window rendering the text there (specially when they are ports from other systems where they might be using different character sets than whats available in terminals.. or if they want to force a specific font). The only example that comes to my head right now is ZZT, but I believe there are many games on Steam that use a TUI rendered within their own program, not a terminal. permalink fedilink source parent hideshow 2 child comments replies: [–] thingsiplay@lemmy.ml 4 points 6 months ago Text makes sense. I mostly read it as "Terminal" and do not know what the original meaning is with a certainty. Looking at Wikipedia, the source of truth, it's https://en.wikipedia.org/wiki/Text-based_user_interface . You probably right about it. permalink fedilink source parent [–] pnelego@lemmy.world 6 points 6 months ago (1 child) It's a UI that sits in the terminal (thus TUI). Think htop, or btop; They are often ran from CLI, but offer more of a UI. permalink fedilink source parent hideshow 2 child comments replies: [–] Levi@lemmy.ca 6 points 6 months ago (2 children) Thanks! I guess something like vim would count as a TUI then. permalink fedilink source parent hideshow 4 child comments replies: [–] thingsiplay@lemmy.ml 4 points 6 months ago Yes. Think of any terminal application with an interactive user interface, that mimics a GUI. Something that is not just controlled by commandline options like grep and sed in example. permalink fedilink source parent [–] Hawke@lemmy.world 2 points 6 months ago (1 child) I’d say vi is in a fuzzy grey area below a tui. It’s more than a cli but shares a lot with cli programs; it pretty much has its own command line built in. At the same time it has nothing like dialog box or menus like normal tui programs. permalink fedilink source parent hideshow 2 child comments replies: [–] Ferk@lemmy.ml 5 points 6 months ago* (last edited 6 months ago) (1 child) Personally, I feel that if it uses control characters to update the screen in previous positions, altering the scroll buffer, moving beyond where the cursor is and redrawing the screen, then it's a TUI. CLI programs only output plain text in a stream, using just control characters for coloring and formatting, and if they do any re-drawing it's only for the current line (eg. progressbars and so). So.. even something like less is a TUI program.. but things like more or sed would be CLI programs. permalink fedilink source parent hideshow 2 child comments replies: [–] Hawke@lemmy.world 2 points 6 months ago Fair enough. I’d never consider less to be a TUI program. permalink fedilink source parent [–] HubertManne@piefed.social 4 points 6 months ago thanks. I was going to ask but figured someone else might and thanks @thingsiplay@lemmy.ml as the top example makes it I think clear I think. if im right then vi would be tui as well. permalink fedilink source parent [–] detonational_VuSE@lemmy.ml 3 points 6 months ago (2 children) ncurses and similar. Think 1980s word processor, emacs, vi, Slackware installer, etc. permalink fedilink source parent hideshow 4 child comments replies: [–] Obin@feddit.org 4 points 6 months ago* (1 child) Emacs is actually a real GUI application. It has font sizes, variable width fonts, image display, etc. and with the pGTK backend even native wayland support. It also has a rendering backend for the terminal, and some people have their reasons for using it, but the default and general advice is to use Emacs in GUI mode. permalink fedilink source parent hideshow 2 child comments replies: [+] umbrella@lemmy.ml 1 point 6 months ago* (last edited 6 months ago) [deleted] permalink fedilink source parent [–] Levi@lemmy.ca 1 point 6 months ago Slackware was my first linux back in the day. :) permalink fedilink source parent [–] Asfalttikyntaja@sopuli.xyz 2 points 6 months ago TUI permalink fedilink source parent
[–] thingsiplay@lemmy.ml 17 points 6 months ago* (last edited 6 months ago) (1 child) TUI: Terminal Text User Interface, something like htop in example. CLI: Command Line Interface, something like grep in example. Edit: "Text" is probably the correct word, not "Terminal". permalink fedilink source parent hideshow 2 child comments replies: [–] Ferk@lemmy.ml 3 points 6 months ago* (1 child) Isn't the T for "text"? (ie. "Text User Interface") I mean, in the context of Unix systems it's most likely gonna be within a terminal emulator, but in theory you can have a TUI inside an SDL window rendering the text there (specially when they are ports from other systems where they might be using different character sets than whats available in terminals.. or if they want to force a specific font). The only example that comes to my head right now is ZZT, but I believe there are many games on Steam that use a TUI rendered within their own program, not a terminal. permalink fedilink source parent hideshow 2 child comments replies: [–] thingsiplay@lemmy.ml 4 points 6 months ago Text makes sense. I mostly read it as "Terminal" and do not know what the original meaning is with a certainty. Looking at Wikipedia, the source of truth, it's https://en.wikipedia.org/wiki/Text-based_user_interface . You probably right about it. permalink fedilink source parent
[–] Ferk@lemmy.ml 3 points 6 months ago* (1 child) Isn't the T for "text"? (ie. "Text User Interface") I mean, in the context of Unix systems it's most likely gonna be within a terminal emulator, but in theory you can have a TUI inside an SDL window rendering the text there (specially when they are ports from other systems where they might be using different character sets than whats available in terminals.. or if they want to force a specific font). The only example that comes to my head right now is ZZT, but I believe there are many games on Steam that use a TUI rendered within their own program, not a terminal. permalink fedilink source parent hideshow 2 child comments replies: [–] thingsiplay@lemmy.ml 4 points 6 months ago Text makes sense. I mostly read it as "Terminal" and do not know what the original meaning is with a certainty. Looking at Wikipedia, the source of truth, it's https://en.wikipedia.org/wiki/Text-based_user_interface . You probably right about it. permalink fedilink source parent
[–] thingsiplay@lemmy.ml 4 points 6 months ago Text makes sense. I mostly read it as "Terminal" and do not know what the original meaning is with a certainty. Looking at Wikipedia, the source of truth, it's https://en.wikipedia.org/wiki/Text-based_user_interface . You probably right about it. permalink fedilink source parent
[–] pnelego@lemmy.world 6 points 6 months ago (1 child) It's a UI that sits in the terminal (thus TUI). Think htop, or btop; They are often ran from CLI, but offer more of a UI. permalink fedilink source parent hideshow 2 child comments replies: [–] Levi@lemmy.ca 6 points 6 months ago (2 children) Thanks! I guess something like vim would count as a TUI then. permalink fedilink source parent hideshow 4 child comments replies: [–] thingsiplay@lemmy.ml 4 points 6 months ago Yes. Think of any terminal application with an interactive user interface, that mimics a GUI. Something that is not just controlled by commandline options like grep and sed in example. permalink fedilink source parent [–] Hawke@lemmy.world 2 points 6 months ago (1 child) I’d say vi is in a fuzzy grey area below a tui. It’s more than a cli but shares a lot with cli programs; it pretty much has its own command line built in. At the same time it has nothing like dialog box or menus like normal tui programs. permalink fedilink source parent hideshow 2 child comments replies: [–] Ferk@lemmy.ml 5 points 6 months ago* (last edited 6 months ago) (1 child) Personally, I feel that if it uses control characters to update the screen in previous positions, altering the scroll buffer, moving beyond where the cursor is and redrawing the screen, then it's a TUI. CLI programs only output plain text in a stream, using just control characters for coloring and formatting, and if they do any re-drawing it's only for the current line (eg. progressbars and so). So.. even something like less is a TUI program.. but things like more or sed would be CLI programs. permalink fedilink source parent hideshow 2 child comments replies: [–] Hawke@lemmy.world 2 points 6 months ago Fair enough. I’d never consider less to be a TUI program. permalink fedilink source parent
[–] Levi@lemmy.ca 6 points 6 months ago (2 children) Thanks! I guess something like vim would count as a TUI then. permalink fedilink source parent hideshow 4 child comments replies: [–] thingsiplay@lemmy.ml 4 points 6 months ago Yes. Think of any terminal application with an interactive user interface, that mimics a GUI. Something that is not just controlled by commandline options like grep and sed in example. permalink fedilink source parent [–] Hawke@lemmy.world 2 points 6 months ago (1 child) I’d say vi is in a fuzzy grey area below a tui. It’s more than a cli but shares a lot with cli programs; it pretty much has its own command line built in. At the same time it has nothing like dialog box or menus like normal tui programs. permalink fedilink source parent hideshow 2 child comments replies: [–] Ferk@lemmy.ml 5 points 6 months ago* (last edited 6 months ago) (1 child) Personally, I feel that if it uses control characters to update the screen in previous positions, altering the scroll buffer, moving beyond where the cursor is and redrawing the screen, then it's a TUI. CLI programs only output plain text in a stream, using just control characters for coloring and formatting, and if they do any re-drawing it's only for the current line (eg. progressbars and so). So.. even something like less is a TUI program.. but things like more or sed would be CLI programs. permalink fedilink source parent hideshow 2 child comments replies: [–] Hawke@lemmy.world 2 points 6 months ago Fair enough. I’d never consider less to be a TUI program. permalink fedilink source parent
[–] thingsiplay@lemmy.ml 4 points 6 months ago Yes. Think of any terminal application with an interactive user interface, that mimics a GUI. Something that is not just controlled by commandline options like grep and sed in example. permalink fedilink source parent
[–] Hawke@lemmy.world 2 points 6 months ago (1 child) I’d say vi is in a fuzzy grey area below a tui. It’s more than a cli but shares a lot with cli programs; it pretty much has its own command line built in. At the same time it has nothing like dialog box or menus like normal tui programs. permalink fedilink source parent hideshow 2 child comments replies: [–] Ferk@lemmy.ml 5 points 6 months ago* (last edited 6 months ago) (1 child) Personally, I feel that if it uses control characters to update the screen in previous positions, altering the scroll buffer, moving beyond where the cursor is and redrawing the screen, then it's a TUI. CLI programs only output plain text in a stream, using just control characters for coloring and formatting, and if they do any re-drawing it's only for the current line (eg. progressbars and so). So.. even something like less is a TUI program.. but things like more or sed would be CLI programs. permalink fedilink source parent hideshow 2 child comments replies: [–] Hawke@lemmy.world 2 points 6 months ago Fair enough. I’d never consider less to be a TUI program. permalink fedilink source parent
[–] Ferk@lemmy.ml 5 points 6 months ago* (last edited 6 months ago) (1 child) Personally, I feel that if it uses control characters to update the screen in previous positions, altering the scroll buffer, moving beyond where the cursor is and redrawing the screen, then it's a TUI. CLI programs only output plain text in a stream, using just control characters for coloring and formatting, and if they do any re-drawing it's only for the current line (eg. progressbars and so). So.. even something like less is a TUI program.. but things like more or sed would be CLI programs. permalink fedilink source parent hideshow 2 child comments replies: [–] Hawke@lemmy.world 2 points 6 months ago Fair enough. I’d never consider less to be a TUI program. permalink fedilink source parent
[–] Hawke@lemmy.world 2 points 6 months ago Fair enough. I’d never consider less to be a TUI program. permalink fedilink source parent
[–] HubertManne@piefed.social 4 points 6 months ago thanks. I was going to ask but figured someone else might and thanks @thingsiplay@lemmy.ml as the top example makes it I think clear I think. if im right then vi would be tui as well. permalink fedilink source parent
[–] detonational_VuSE@lemmy.ml 3 points 6 months ago (2 children) ncurses and similar. Think 1980s word processor, emacs, vi, Slackware installer, etc. permalink fedilink source parent hideshow 4 child comments replies: [–] Obin@feddit.org 4 points 6 months ago* (1 child) Emacs is actually a real GUI application. It has font sizes, variable width fonts, image display, etc. and with the pGTK backend even native wayland support. It also has a rendering backend for the terminal, and some people have their reasons for using it, but the default and general advice is to use Emacs in GUI mode. permalink fedilink source parent hideshow 2 child comments replies: [+] umbrella@lemmy.ml 1 point 6 months ago* (last edited 6 months ago) [deleted] permalink fedilink source parent [–] Levi@lemmy.ca 1 point 6 months ago Slackware was my first linux back in the day. :) permalink fedilink source parent
[–] Obin@feddit.org 4 points 6 months ago* (1 child) Emacs is actually a real GUI application. It has font sizes, variable width fonts, image display, etc. and with the pGTK backend even native wayland support. It also has a rendering backend for the terminal, and some people have their reasons for using it, but the default and general advice is to use Emacs in GUI mode. permalink fedilink source parent hideshow 2 child comments replies: [+] umbrella@lemmy.ml 1 point 6 months ago* (last edited 6 months ago) [deleted] permalink fedilink source parent
[+] umbrella@lemmy.ml 1 point 6 months ago* (last edited 6 months ago) [deleted] permalink fedilink source parent
[–] Levi@lemmy.ca 1 point 6 months ago Slackware was my first linux back in the day. :) permalink fedilink source parent