Skip to main content
Topic: Minimal Apps (Read 24159 times)

Re: Minimal Apps

Reply #50
The latest Manjaro iteration of bspwm promotes the 'micro' editor which basically works like 'nano' but with keybinds more inherited from MS Notepad https://micro-editor.github.io/

Edit: On Manjaro the package is micro-manjaro and it comes with (gasp!) dependencies, i.e. it is not really minimal. The dependencies are st (the suckless terminal emulator) and xclip. /edit

There is also 'mg', a tiny version of emacs http://man.openbsd.org/OpenBSD-current/man1/mg.1

 

Re: Minimal Apps

Reply #51
Interesting. It's true that Nano's keyboard shortcuts seem a bit odd. Perhaps they have something to do with use in screen/tmux? It dates back only to 2000 or so, so it's not like it predates more standard keyboard shortcuts.

Re: Minimal Apps

Reply #52
Yes, text editors are interesting. I have configured micro to be the text editor in my terminal browsers and I am trying it out right now.

For me it was instantly reminiscent of nano but this is a false impression. For example right now, typing a bit longer lines, I see that micro does not autowrap lines and I have no idea how to make it do it. I did Ctrl+e help wrap and got "Sorry, no help for wrap"

It features prominently some superfluous niceties like colour schemes and astonishingly convenient mousing support on terminal, evidently achieved with xclip and xsel. It also autocompletes parentheses and brackets and provides syntax highlighting, but at the same time there appears to be no thought given to spellcheck.

Whereas nano misses colour schemes (which is a good thing, because you mostly want your terminal apps look all the same) but there is some rudimentary way to plug in some spellcheck. And its quirky keybinds are not too much of a problem, because out of the box you get the helpful line with some commands that can be used in the given context. Then again, nano's so-called mouse support simply disables pointer access to the terminal emulator and its only function is to scroll big files. I mostly keep the so-called mouse support off to be able to select the way the terminal emulator lets me.

Re: Minimal Apps

Reply #53
For example right now, typing a bit longer lines, I see that micro does not autowrap lines and I have no idea how to make it do it. I did Ctrl+e help wrap and got "Sorry, no help for wrap"
Ha, found it. Out of the box it creates a config file at ~/.config/micro/settings.json and there's the line "softwrap": false,. So it does the config part conveniently too: Autocreate a human-readable config file at some sensible place and let people hack it.

Re: Minimal Apps

Reply #54
Nano supports syntax highlighting too, but possibly not with color schemes.

Re: Minimal Apps

Reply #55
Well, a colour scheme is how the editor looks. Syntax highlight is how the opened text looks, i.e. the specific language in the file should be recognised and colorised. The two (colour scheme and syntax highlight) should not really be related, even though they may mess with each other. Colour schemes are not available in nano, except by giving the whole terminal emulator an overhaul.

By the way, I am already getting fed up with micro. I am so much more used to with the cursor movements in nano and also to the way selection and pasting works in pure terminal emulator. Nice little program, but vim is more rewarding and nano does all I need anyway.

Edit: And I did not give enough credit to mouse support in nano: Mouse was useful to set mark (i.e. start selection). Now nano has an updated man page and the mouse support has been extended even further. Anyway, I don't use it.

These days the man page starts as follows:
Quote from: man nano
Starting  with version 4.0, nano no longer hard-wraps an overlong line by default, and no longer automatically adds a newline at the end of the text if one is missing.  Furthermore, it uses smooth scrolling by default and makes use of the line below the title bar.
These are all big changes over the past few years.

Re: Minimal Apps

Reply #56
More markdown fun: mdp does slideshows based on text written in markdown.

Install mdp, download the sample.md file and run it in mdp. The file is a tutorial. Not as instructive as vimtutorial but almost. And great to look at, even though I would like it to inherit my .Xresources colours out of the box.

Update:
patat is a markdown slideshower with great promises, allegedly employing pandoc. The input format is even slightly simpler - instead of requiring explicit rulers to divide the slides as in mdp, every new header starts a new slide. However, other styling requires some haskell hacking with its ridiculously strict indentation demands, so that it is not plain and simple markup anymore.

Moreover, patat absolutely fails at the number one basic premise of presentation slides: fit to centre. There is a bug report about it but it has not been touched for years. It seems that there is total indecision about centering in pandoc markdown language, but this should not prevent the maker of a presentation slide programme to do what a presentation slide programme should do.

And I found a serious bug in mdp too. As its colours are hardcoded with lack of forethought, its invert mode mdp -i sample.md produces crap on a dark terminal emulator. Luckily this is circumvented by mdp -ti sample.md. Make it mdp -fti sample.md (-f to remove the transition effect) and it becomes a more usable markdown slideshower that patat will never catch despite its initial great promises.

Update 2: Oops, mdp doesn't do markdown tables. What now?? Well, that's why the keynote speakers in hacker conferences use Emacs Org or some contraption script of their own making instead of terminal slideshow apps. These apps are just not quite there. I guess I must do more Emacs too.

Re: Minimal Apps

Reply #57
The last time I figured I could do a fancy presentation at a place where I couldn't use my own laptop I was forced to cobble together some quickly plain thing in PDF last minute.

I was doing something like this:
https://github.com/jgm/pandoc/wiki/Creating-impress.js-slide-shows-with-pandoc

I did two or three pretty nice presentations that way before I ran into that slight "oh btw you can't use HTML" issue over at a thing in Brussels. :)

Anyway, I think it's still a decent concept. For a presentation next week that I haven't really come up with a content concept yet :insane: But on the technical side, I think I'll use Pandoc → Beamer (PDF). But properly this time, not done during a ~30 minute lunch break panicking because it's the only time I have in a day that lasts from about 8:30 to 20:00, trying to figure out how to convert my Pandoc → Impress.js to Pandoc → Beamer (or at least some kind of PPT/PDF situation).

Re: Minimal Apps

Reply #58
Here's a tutorial how to run markdown to pdf with pandoc https://www.youtube.com/watch?v=dum7q6UXiCE (tutorial for me rather than you, because you certainly know it already) The one thing wrong in the tutorial is the title that that's the easiest way to do presentations. The easiest is actually suckless sent, which renders plain text. Markdown may seem easy, but plain text is still easier.

Re: Minimal Apps

Reply #59
That sounds like a false dichotomy. You can also use "full" plain text in Markdown; you just won't get any of the things you may very well want (e.g., headers/bold/italic/lists/links/images). :)


Re: Minimal Apps

Reply #61
That sounds like a false dichotomy. You can also use "full" plain text in Markdown; you just won't get any of the things you may very well want (e.g., headers/bold/italic/lists/links/images). :)
When you want things like headers, bold, italic, etc. then you are obviously not wanting plain text. And when you have to escape things like brackets, then you are obviously not having plain text.

The very idea of markup languages is to go beyond plain text and this has its immediate drawbacks. Markdown's drawbacks are slighter than the drawbacks of, say, HTML, but the drawbacks are there, such as having to escape some stuff or the fact that a minus versus a plus in the beginning of a line loses its meaning/rendering. So the dichotomy is real.

Also the distinction of mdp and sent is real. In the first you have the source text in markdown, by which you get headers and other formatting and you are supposed to distinguish slides by dash lines, while in the latter you just use paragraphs, you do not get headers, but it does not tie itself to the terminal and provides a sort-of opportunity for images (I wonder, since it does not use the terminal as its base, why not provide more formatting?). They are too different to use just one or the other rather than choosing one or the other to suit a current purpose.

Re: Minimal Apps

Reply #62
Markdown is an example of something that is far from perfect, but good enough to be successful.

Re: Minimal Apps

Reply #63
termpub to view epub files in a terminal emulator. Edit: Navigate with PgUp and PgDn /edit
Funny I do not remember having installed it, but it was present in my opsys (Manjaro Linux). Possibly an accidental inclusion by the distro maintainers.

Re: Minimal Apps

Reply #64
Curious concept but especially on lower-res LCD it just might work (because it's not like you can really do typography anyway).

Re: Minimal Apps

Reply #65
I've been using Qalculate as my preferred calculator for a while now...
Wow, this is instantly likeable indeed, now that I need calculators. Great that it works in command-line also, with qalc. It can even do moon phases :)

bc can do basic arithmetic, but it gets complicated when the calculation is more complicated. It supposedly can retain and revisit history with the help of history and readline, but I never figured out how that works. When I need history functions in the terminal, I use fc instead, because history redo and things like that somehow always failed for me.

Emacs has two calculators. The one is calculator that stays in one line, very good for basic arithmetic again.

The other is calc which is multi-line and collects numbers in a stack financial-style, which is the way I need it. It also keeps a visible trail of past numbers that are easy enough to reuse. Maybe I will some day find a separate graphical app that works similarly.



Re: Minimal Apps

Reply #67
Surely you know what lunar phases are, even in practice. In Qalculate they are under Functions > Date&Time.

Re: Minimal Apps

Reply #68
Obviously I know what lunar phases are, but what do you mean by calculating with them? Like "what was the lunar phase on 15 April 1820" or something?

Re: Minimal Apps

Reply #69
xmouseless is an instant solution for making mouse moves by keyboard. After installing and running the thing, it grabs control of the keyboard. The default features are sane enough:

 - Cursor moves are under i, j, k, and l
 - Clicks are under f, d, and s (left, middle and right respectively)
 - n and p or plus and minus to scroll down and up, h and g to scroll vertically
 - To accelerate mouse moves, there are left Control (slowest), a, left Alt, and left Super. 

For example, to drag to select text, move the cursor to the needed starting point (i, j, k, l), hold f and simultaneously press l or i, depending to which direction you need to select.

To drag and drop a link, move the cursor to the link, hold f and simultaneously do the cursor moves again. To drop, just let go. Amazing how it works.

To exit and get your normal keyboard back, press q or Escape.

To configure the defaults, read and modify config.h, recompile and reinstall.

https://github.com/jbensmann/xmouseless

Re: Minimal Apps

Reply #70
Did you know that console mouse exists?

Install gpm (general purpose mouse).

Issue
Code: [Select]
# gpm -m /dev/input/mice -t help

In the output, the asterisked things are available for trial (and error). In my case, sudo gpm -m /dev/input/mice -t imps2 makes the laptop touchpad work.

Learned here https://wiki.archlinux.org/index.php/General_purpose_mouse


Re: Minimal Apps

Reply #72
Your post is minimaler than mine.

Downgrade your web browsing with Edbrowse!

Reply #73
Edbrowse is a combination editor, browser, and mail client that is 100% text based. The interface is similar to /bin/ed, though there are many more features, such as editing multiple files simultaneously, and rendering html.

Edbrowse is built on the principles of the line-oriented editor ed. Going line by line, this is truly minimal!

Different from screen or display editors that display a buffer box for editing, a line-oriented editor displays the size of the file when opened with ed {filename} and then just sits there waiting for a further input to perform the next action. The input is a command + Enter. For viewing a file in ed, the main command is p for "print", which prints a line. Issuing ,p + Enter outputs the contents of the entire file.

In Edbrowse, the most important command is b for "browse", followed by the url (preferably the complete url with the http:// or https:// part), and Enter. This will display the size of the page and any possible errors, but we can still proceed with z1 (and Enter) which outputs one line. After this, following Enter-presses output one line each.

It is possible to output a number of lines with e.g. 0z24 (roughly, "start at the beginning of the page and output 24 lines" as far as I have understood), whereafter every consecutive z (and Enter) outputs the 24 following lines. ,p outputs the entire page, which is normally well beyond the limits of the terminal display.

To select a line with a link to go to, type ?somestuff, where the question mark means "search backwards" and "somestuff" is the text to search for that identifies the specific line. Then, pressing Enter, the output result is that specific line. To go to a link in that line, type g1 (and Enter) for "go to the first link on the line". The output will be the size of the webpage behind the link and incremental output and navigation of the page starts all over again.

Quit with q or qt.

Forms and logins and such are supposed to work with Edbrowse, but I am far from it at this stage.