This is really cool. Has anyone made a version for Windows?
yep, it's called linux! :)
Command Line Tools to Break Your Dependence on the GUI
21–30 of 79 posts
Re: Command Line Tools to Break Your Dependence on the GUI
#22A dictionary? I mean, that's neat and all, but not all that useful is it? I might check the weather once a day, tops. This is better solved by having a widget on my smartphone. Same for the dictionary, and same for short google searches too (Firefox Focus). I had a twinge of hope that this might have been more of an introduction to using the terminal effectively on Linux for diagnoses. I'm new to Linux, and every tim…
I interpreted the premise of the article as weaning people off of GUI with everyday trivial tasks that can be done via CLI. I myself do almost all my work from the CLI, but it was this blog post [0], specifically the open, pbpaste, and screenshot commands, that got me into dabbling with my shell, before I understood the power and convenience of shell scripting. I try to get novices interested in the shell via youtube…
Re: Command Line Tools to Break Your Dependence on the GUI
#23This is really cool. Has anyone made a version for Windows?
Line endings can become an issue, as can the various BOM characters.
Re: Command Line Tools to Break Your Dependence on the GUI
#24Work in progress, but sixel support may be coming to mainline tmux: git clone git://github.com/tmux/tmux git switch sixel git checkout b1904c9b8db514133d3372aac13b2ff0b2093cc3 This will give you the "placeholder" box for sixels in terminals that do not support sixel (but you should use mlterm on Linux or mintty on Windows) The upcoming feature is to replace this placeholder box by unicode art for the sixels, cf https…
Yes. This (image support in general in Terminal emulators and Terminal multiplexers) is currently being actively discussed here: https://gitlab.freedesktop.org/terminal-wg/specifications/is... Many important people are there, e.g. the Tmux maintainer/developer Nicholas Marriott, the Mintty developer, some Xterm.js developer, and others.
Anything that can already support sixels won't be too hard to change to support this new standard, unless it doesn't use pixels -- though it would be neat if this standard was vector based, like ReGIS: https://en.wikipedia.org/wiki/ReGIS - I want SVG in my terminal :-)
For now, sixels already work reliably for most of the things I do. So now, I concentrate on the applications, to make sure most of my workflow can be console based.
Re: Command Line Tools to Break Your Dependence on the GUI
#25Does anyone know of a similar tool to the weather api wttr.in for stock prices?
I've looked around for a freely-available source of raw stock quote data without success (though not invested too much time in it). I've written my own wrapper around Yahoo's stock quotes page (https://finance.yahoo.com/) which strips off everything but the prices themselves (see sample output: https://pastebin.com/gR2j3zB3)
However that's not something which will query for a specified portfolio.
It does feed xrootconsole nicely though.
Re: Command Line Tools to Break Your Dependence on the GUI
#26If you use Haskell, then I'd recommend just using ghci over bc because you can't do floating point stuff in bc: 1/3 0 Whereas ghci, or your language's REPL, will likely do better: > 1/3 0.3333333333333333
scale=INTEGER
for some reasonable INTEGER, say, 6, to your ~/.bc file (you need to also export BC_ENV_ARGS=~/.bc), or alias bc to bc -l). After having gp-pari fail after a brew upgrade I started using bc instead and have been relatively happy so far (although I miss isprime and factors which I used sparingly)Re: Command Line Tools to Break Your Dependence on the GUI
#27awful scroll-jacking on this site. I really hate that.
Re: Command Line Tools to Break Your Dependence on the GUI
#28A dictionary? I mean, that's neat and all, but not all that useful is it? I might check the weather once a day, tops. This is better solved by having a widget on my smartphone. Same for the dictionary, and same for short google searches too (Firefox Focus). I had a twinge of hope that this might have been more of an introduction to using the terminal effectively on Linux for diagnoses. I'm new to Linux, and every tim…
By default, that's tied to 'man', which lets you look up a particular command in the system manpages. Swap that to dict for text files (say, filetype markdown or HTML), and you've now got a dictionary lookup for any given word. Not sure of spelling or meaning? Position cursor on word and hit 'K', and you'll get the word's definition, or a match of near-spellings.
The dict database can also be extended to other datasets -- anything with a keyword-result relationship. On Debian, this includes the US Census "Tiger" files (thanks to Bruce Perens for buying a copy and sharing them to the project), which lets you look up any specific city or place name in the United States.
You can specify the dictionary you want to use on the commandline, or write a shell alias or function to query a specific database, say:
dictzip () { /usr/bin/dict -d gaz2k-zips "$*" | ${PAGER:-less}; }
dictplace () { /usr/bin/dict -d gaz2k-places "$*" | ${PAGER:-less}; }
Which allows you to query ZIP Codes or place names without otherwise mentioning the dictionary on the commandline.There are numerous other query tools bundled together in tools such as surfraw(1) (https://packages.debian.org/buster/surfraw), with 123 separate query targets.
Or you can write your own. I've got a wrapper around the NOAA's weather six-day forecast page which dumps a text-formatted version of just the forecast text (a lot of ugly sed and awk). Having to write programmes to remove the text other programmes lard onto a simple data request is Where We Are Now in Today's WWW.
Or a lookup for the Online Etymological Dictionary:
etym () { \w3m -T text/html "https://www.etymonline.com/word/${1}"; }
(w3m is escaped '\' to byapass the alias I've defined, 'alias w3m="w3m -B"', which defaults to opening my bookmarks file if no argument is given.)Learning what you're typing, and what it does, and what the underlying logic are, is much of the fun.
Re: Command Line Tools to Break Your Dependence on the GUI
#29If you use Haskell, then I'd recommend just using ghci over bc because you can't do floating point stuff in bc: 1/3 0 Whereas ghci, or your language's REPL, will likely do better: > 1/3 0.3333333333333333
You can set up bc to any scale by adding scale=INTEGER for some reasonable INTEGER, say, 6, to your ~/.bc file (you need to also export BC_ENV_ARGS=~/.bc), or alias bc to bc -l). After having gp-pari fail after a brew upgrade I started using bc instead and have been relatively happy so far (although I miss isprime and factors which I used sparingly)
Re: Command Line Tools to Break Your Dependence on the GUI
#30 calc () { awk "BEGIN { print "$*" }" }
$ calc "2^16"
65536
$ calc "2*16"
32
$ calc "2+16"
18