How can I print the gradated color stdout results to a terminal? - fish

OS - macOS High Sierra v10.13.1(17B48)
Terminal - iTerm2 (Build 3.1.5)
Shell - fish, version 2.6.0
My environments is like above,
and I wonder how to print a command results with gradation colors,
like asciinema demo?
(sorry for lack of a link, attaching a followed image rather than it)
screenshot:
enter image description here

Related

VS code markdown text wrapping issue

I am using using visual studio code on arch linux, with official compiled version download from arch linux aur source (https://aur.archlinux.org/packages/visual-studio-code-bin). However, I found that the text wrapping in markdown mode does not work well.
The under screenshot was taken from my linux desktop computer.
Linux Screenshot
As we can see that, in the last 2 line, part of words are hidden due to incorrect word wrapping.
This screenshot is taken from my windows desktop, which is what I want to have on linux desktop.
Windows Screenshot
Background information related to my Linux desktop:
System: Archlinux
System version: all of software are updated to latest version
VS Code Version: 1.75.1-1
Windows Manager: awesome wm(with Xorg)
What I have tried:
reinstall vs code, and removing all of add-on/extensions installed, does't work.
try to use code-oss, which is compiled by arch linux community, does't work.
clean all of user settings, does't work.

Libreoffice fails to display in openbox debian minimal desktop

When I launch libreoffice, either from the openbox applications menu or from the command line, it doesn't display. I only see the libreoffice picture with the loading bar, then it disappears, and that's it, no window at all is displayed. Only when I use the switch-beetween-window keybinding (Alt + Tab) can I see the thumbnails of libreoffice main and the tips windows along with my other open windows thumbnails in the windows-switch menu, but no windows on my desktop nor even any outline of them...
What's more, when I
ps -e | grep libreoffice
no process is returned.
Every other graphical application works well, only libreoffice has theis issue so far.
*I'm using
Debian 11 (5.10162-1) for x86_64
Kernel : 5.10.0-21-amd64
And a minimal desktop environment made of
Openbox 3.6.1 and Polybar 3.5.5*
I tried to run libreoffice in safe mode to override the .config file
libreoffice --safe-mode
Same result.
I tried to reinstall libreoffice, nothing changed.

Get Spyder IPython console dimensions

I want to build an interactive story with Python to be printable and runable in both the windows terminal and the Spyder control. To adjust and justify the text I need the dimensions (mainly the width) of the console in character lines.
I have tried using os.get_terminal_size() but that only works for the windows terminal, not the Spyder console.
Syper version = 5.4.0
Python version = 3.9

ANSI colors don't work in VSCode integrated terminal with PowerShell

I am using Visual Studio Code for my python project and I am also using flakeheaven (fork of the unmaintained flakehell package) to manage flake8 and other linters/plugins. When running flakeheaven lint, it tries to print the output nicely with colors. Here's how it looks on my terminal (Windows terminal using Powershell Core):
I like this feature. However, When I run the lint command in the integrated terminal in VSCode, it doesn't display the colors, and instead displays weird ANSI sequences:
It looks like VSCode can't display the ANSI colors correctly in the terminal. I'd like to know if there is a way to fix this to get the same colorful output as in the external terminal.
Is there a way to make VSCode terminal display colored ANSI output correctly?

Visual Studio Code can't run in Ubuntu 18.04

I have been using VSCode for a while and never had any big problem with it. Today I tried to start my VSCode from left taskbar on my Ubuntu 18.04 and it not showing up. Also, I tried to run in terminal as 'code .' again nothing.
VSCode version is latest 1.23.1 I tried few time today with install/remove and nothing. Somehow I am thinking maybe it something with permissions but not sure.
When click on task bar icon its shows like loading on top taskbar in ubuntu 18.04 for a few seconds and stops.
Also when tried to run in terminal as:
$ code . --verbose
[15027:0603/191139.702752:ERROR:browser_main_loop.cc(279)] Gtk: Locale not supported by C library.
Using the fallback 'C' locale.
[15027:0603/191139.809312:ERROR:browser_main_loop.cc(279)] Gtk: GModule (/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so) initialization check failed: GLib version too old (micro mismatch)
[15027:0603/191139.809326:ERROR:browser_main_loop.cc(279)] Gtk: Loading IM context type 'ibus' failed
pcilib: Cannot open /sys/bus/pci/devices/0000:07:00.0/resource: No such file or directory
just getting an error, but not sure is this error connected with problem I did some investigation and Gtk is already installed and works well on my OS.
Fixed it with "delete the /home/user/.config/Code folder"
https://github.com/Microsoft/vscode/issues/55774#issuecomment-412774473