color
argos
Our great sponsors
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
color
-
Cli colors disappear when piping into a text file
So i have a cli tool thats outputting some text to the cli stdout, i would like the output to be colored, so i used a library called color (github.com/fatih/color), basically the problem is when i output to stdout its fine but when i do something like ./tool | tee -a file.txt the colors disappear from terminal and also not in the output file, why is that and how do i prevent that ?
-
Snob - Dev Log (How it's done)
printer.go - Handles printing (showing) information to the user. This is where fatih/color is being used, so we can print pretty information with colors.
-
Simple CLI Colorizing in Go
Note, you also need to handle piping to other programs or sending output to a file. See the logic in https://github.com/fatih/color/blob/master/color.go, https://github.com/mattn/go-colorable and https://github.com/mattn/go-isatty.
-
Platform agnostic way to delete a line in the console?
The platform I'm using is Windows, and I found that prior to Win10 there was no support for ANSI escape codes in the command line, but I have Win10 and am pretty sure my version is up-to-date enough to have this support. I have also been successfully using Fatih's color package, so I had assumed that the escape codes were working. But they are not working when I do it manually, so fmt.Print("\033[F") does not work.
-
How to write idempotent Bash scripts
same person that wrote this module i use all the time. https://github.com/fatih/color ???
-
Go mod tidy problem.
I am using github.com/fatih/color as an example because it is a very simple library to test this problem out with.
-
First Go program - would love criticism: a small program that outputs VPN status, IP and emoji-flag
I would use bytes.Contains instead of string.Contains and I would use github.com/fatih/color for ansi colours rather than re-implienting it yourself. Best not to call log.Fatal in functions other than main - it makes testing hard. Instead they should return an error after their main return value.
-
ColorStyle is a library of styles for command-line text.
What’s the benefit over a well established library such as https://github.com/fatih/color ?
argos
-
Lobotomizing Gnome
Good observation.
Turning off extensions is where OP lost me. In the last year, the single biggest quality of life improvement for me has been discovering the Argos[0] extension, which basically lets you put whatever text/menus you want in the top bar by writing scripts that print to stdout. To save space, I hid the dock (I use [1] as a replacement alt-tab), so the top bar is the only piece of screen that isn't OS chrome.
On my top bar right now I have the time in four time zones (including the ever-important UTC to save a mental calculation when logging at logs), the name of the current Wifi access point, and some VPN details gleaned using a combination of ip r, ping, nc, and curl. Another extension shows free RAM. I look at them dozens of times a day.
[0] https://extensions.gnome.org/extension/1176/argos/
[1] https://gist.github.com/cbd32/cbec9a32b32bd9e93b0d2696c71b5f...
-
The curse of being good in IT
I’ve heard this called “the defaults lifestyle” on the Software Defined Talk podcast. I’m forever locked out of nirvana because I have an iPhone but not a Mac, but that’s fine.
Occasionally plugins are worth the expense though. I finally discovered Argos[0] and I’m using it to show time in UTC and a couple other time zones. Super handy.
But if I try some new software and find that I have to tweak it a bunch to make it usable, that means the devs have different aesthetics and I should probably try something else.
-
What are your must-have extensions?
I'm really surprised no one mentioned Argos
-
Extension download count is now available to the public
Currently, Argos extension (not developed since 3.32) holding the records for more than 13.8M downloads following by Dash to Dock extension with 6.2M downloads.
-
How would I go about creating my own title-bar app icon?
This is what I was referring to.
- Ask HN: Can I see your scripts?
-
Extension for focused window in top bar?
If you want, you could make the extension yourself via Argos https://github.com/p-e-w/argos using https://www.semicomplete.com/projects/xdotool/ or using one of these https://unix.stackexchange.com/questions/38867/is-it-possible-to-retrieve-the-active-window-process-title-in-gnome/122870
-
Kargos: Terminal Widget
Hey Recently I found this widget named Kargos that shows terminal command output as a widget it uses Gnome's argos and BitBar (Mac) This gives a very nice opportunity to make your own custom widget.
-
What extensions do you use?
Argos
-
Looking for an extension to run custom scripts
There is Argos. However, maintenance is unclear since the original developer steps down.
What are some alternatives?
chalk - Intuitive package for prettifying terminal/console output. http://godoc.org/github.com/ttacon/chalk
gnome-shell-wsmatrix - GNOME shell extension to arrange workspaces in a two-dimensional grid with workspace thumbnails
gocui - Minimalist Go package aimed at creating Console User Interfaces.
bitbar - Put the output from any script or program into your macOS Menu Bar (the BitBar reboot)
aurora - Golang ultimate ANSI-colors that supports Printf/Sprintf methods
gnome-shell-extension-freon - Shows CPU temperature, disk temperature, video card temperature (NVIDIA/Catalyst/Bumblebee&NVIDIA), voltage and fan RPM
termbox-go - Pure Go termbox implementation
emoji-selector-for-gnome - This extension provide a popup menu with some emojis ; clicking on an emoji copies it to the clipboard.
termui - Golang terminal dashboard
apple-music-mpris - Unofficial Electron wrapper for Apple Music that integrates with Mpris to provide external media playback controls.
tcell - Tcell is an alternate terminal package, similar in some ways to termbox, but better in others.
custom-hot-corners-extended - A GNOME Shell Extension that allows you to give a function to any corner or edge of your monitors and expand your keyboard capabilities.