6 ms·
If only there's a $PS1 version
by trinovantes 4y ago
If only there's a $PS1 version
- queuebert 4y agoThat would be cool, but how would you condense the information enough that it's both useful and doesn't take up 2/3 of a line?
- CrispinS 4y agoEmojis? For the current weather, a single emoji could convey quite a lot; e.g. a snowflake for sub-60 weather (I have a low tolerance for cold), a sun for 60-80, fire emoji for 80+... Now, I don't know if anyone truly needs the weather in their terminal prompt, but it is doable.
- behnamoh 4y agoperhaps the RPROMPT would be better. i usually use it to show time %T.
- Kim_Bruning 4y agocurl 'wttr.in/?format=%c' see the readme here for all options: https://github.com/chubin/wttr.in https://github.com/chubin/wttr.in
- dredmorbius 4y agoMicrocharts or sparklines are another option. I've seen a few implementations along these lines for shell prompts / shell use. This might be useful for temperature, humidity, wind, preciptitation, and similar measures, either as quantities or timelines. https://en.wikipedia.org/wiki/Sparkline https://en.wikipedia.org/wiki/Sparkline https://github.com/deeplook/sparklines https://github.com/deeplook/sparklines Similar: https://www.linux-magazine.com/Issues/2016/183/Calc-Conditional-Formatting https://www.linux-magazine.com/Issues/2016/183/Calc-Conditio...
- LeonB 4y agoIt’s provides different formats, I was using this one in the past from Powershell invoke-restmethod wttr.in/?format=4 …and I think it was quite compact
- derwiki 4y agoI might be a heathen, but my PS1 is as long as it wants to be, and ends with \n$
- Shared404 4y agoI feel like I should hate this... But I don't. I may steal this idea later, than there would be a whole 2 of us!
- queuebert 4y agoThat's a great old-school idea. I used to run it that way but forgot. I have also started adding a time stamp to the second, so that when I run long commands and come back later in a tmux session I can see when it finished.
- enriquto 4y ago> how would you condense the information enough that it's both useful and doesn't take up 2/3 of a line? There's a method that takes 0 space: just change the color of the prompt symbol depending on the weather status (sunny, cloudy, raining, snowing).
- behnamoh 4y agoi know you’re referring to the shell prompt, but it reminded me that PowerShell file extension is also *.ps1 (which I find strange as I’m not used to seeing numbers in file extensions). didn’t this really come up when MS was designing PowerShell?
- smegsicle 4y agoi think they count the namespace pollution as free advertising
- mrweasel 4y agoIt might just be me, but I never saw the usefulness in widgets that shows the current weather, at your current location. I mean can’t you just look out the window? Stuffing a three days weather report into $PS1 might be to much information for a prompt.
- teddyh 4y agoI’m reminded of the old discussion of which clock program for X11 consumed the least resources and screen size. It concluded with something like: “Of course, the clock which consumes no resources, and does not take any screen space, is the clock which hangs on your wall.”.
- jona-f 4y agoI have to get up and walk to the window, so looking it up in the terminal is much faster. But I agree that it feels somewhat detached from nature. Also the thermometer at the window varies a lot with direct sunlight or wind, so i find these weather services give a better estimate to what i should be wearing when i go outside.