ZSH agnoster Theme in VS-Code integrated terminal not displaying Symbols - zsh

I’m trying to pimp my VS Code integrated terminal with the agnoster theme and I ran into a small problem. It installed but the symbols are not shown correctly and the arrow at the end of the color bar is cut off. Also the text font is all stretched out too far. How do I fix this? I can't attach a screen shot illustrating the problem due to reputation points...
Cheers!

Try putting this line in your settings:
"terminal.integrated.fontFamily": "'Meslo LG S for Powerline'",
This will make vscode use the correct font family

I had the mentioned problem in the VS Code integrated terminal on MacOS:
I fixed it using Monaco, PowerlineSymbols in the user settings of VS Code.
You can fix this by either editing the
$HOME/Library/Application Support/Code/User/settings.json
by adding/setting "terminal.integrated.fontFamily": "Monaco, PowerlineSymbols"
or directly in the VS Code settings via Code -> Preferences -> Settings by searching there for terminal integrated font. Just add Monaco, PowerlineSymbols into the Terminal > Integrated: Font Family text input box.

What you need to do is set
"terminal.integrated.fontFamily": <YOUR_ZSH_FONT_NAME>
To whatever font you have in your zsh settings:
So, for my own settings I added:
"terminal.integrated.fontFamily": "MesloLGS NF"

Add this to your VSCode settings.json editor by pressing F1 and go to setting
"terminal.integrated.fontFamily": "'RobotoMono Nerd Font', 'PowerlineSymbols'"
Note: If you haven't installed one of the above fonts then this won't work.

Above answers works specially of #fose, adding up few more details so in case any newbie face this can easily solve the problem. for complete guide check this link
You need to download fonts first to solve this,
for Power Line fonts clone this fonts from github
git clone https://github.com/abertsch/Menlo-for-Powerline.git
after that you need to move this fonts to your Fonts folder that could be used globally.
sudo mv Menlo*.ttf /usr/share/fonts
if you face any error in this, you can manually type the name of Fonts, e.g
sudo mv 'Menlo Bold Italic for Powerline.ttf' /usr/share/fonts
after all this, open VS Code
VS Code Settings -> Preferences -> Settings
Search for terminal integrated font or Font Family and select Terminal.
Add Monaco, PowerlineSymbols into the Terminal > Integrated: Font Family in text input box.
END RESULT: including settings

this work for me on WSL 1 , windows 10
here it's before
open vs code you can press F1 and type setting.json
and add {
"terminal.integrated.fontFamily": "'RobotoMono Nerd Font', 'PowerlineSymbols' , 'Hack Nerd Font'"
}
here is a link for RobotoMono Nerd Font
here is a link for PowerlineSymbols
here is a link for Hack Nerd Font
then restart vs code and it will work just fine
here it's after

MesloLGS NF worked for me just you need to check terminal preferences font which is installed that you have to use.

None of these worked for me. What I ended up doing that worked (on the Mac)
Install the Powerline/Agnoster font that you want
In VSCode, open Terminal and list the fonts available by running:
$ system_profiler -json SPFontsDataType | grep "family | sort | uniq
Find the Powerline font (and copy exactly what the title of the font is). For me, this was: 'Meslo LG S for Powerline'.
Add the exact title (in single quotes) to the Terminal Fonts (or terminal.integrated.fontFamily in the settings.json)
And done! The terminal should change almost immediately.

Related

How can I use a proper arrow instead of a <- as an assignment operator in RStudio? [duplicate]

I looked at Fira Code and I wanted to try it out with one of the listed supported editors. So I launched RStudio (Version 0.99.491 on a Win box) and set the font to Fira Code but ... nothing. So how to enable font ligatures in RStudio?
EDIT: The trick in the accepted answer below still works for RStudio Version 1.0.44. I still wish there's a simple button to enable it.
I still wish there's a simple button to enable it.
Wish granted! We've just added this to RStudio 1.1.
You can try the preview release here:
https://www.rstudio.com/products/rstudio/download/preview/
RStudio now have a build in option for ligatures, you do not need these dirty hack any more, cheers!
[OLD CONTENTS]
Close RStudio
Open [RStudio dir]/www/index.htm (If you are using a Linux distribution, the dir may be /usr/lib/rstudio, thanks for the comment of #CosminSaveanu)
Add following code between <head> and </head>:
<style>*{text-rendering: optimizeLegibility;}</style>
Restart your RStudio.
dirty but works.
If you are using Linux then type in your Terminal,
sudo apt install fonts-firacode
Restart Rstudio then in Tools / Appearance / Editor Font: choose Fira Code and Apply.

How to set color of cell output of jupyter notebook (.ipynb) in VS Code editor?

Sometimes it is convenient to deal with jupyter notebooks from the VS Code editor (faster load, less latency and easier debugging).
Nonetheless, there is a problem that default theme colors are not contrast enough to distinguish between input and output cells.
I'm having a hard time to figure out which setting I should change, to, let us say, make the output cell background just "dark-grey" (I'm using default VS 2019 Dark theme but other options are also not contrast with .ipynb files).
Any help will be welcome.
(I've also come across other similar questions but did not find the turn key solution.)
Example:
In the settings.json -- can be found at File(Windows)/Code(Mac)>Preferences>Settings -- click on any link stated "Edit in settings.json"
Adding this into the json will work -- notebook's setting has to be put under the workbench.colorCustomizations.
"workbench.colorCustomizations": {
"notebook.outputContainerBackgroundColor": "#FFFFFF",
},
I'm not sure if this helps you, but you can try overriding VSCode's theme by adding this to your settings.json file:
{
"jupyter.ignoreVscodeTheme": true
}
If you prefer to use VSCode's gui to edit settings, you can go to your Jupyter extension (assuming you have it installed) => Extension settings => and check "Ignore Vscode Theme".
You need to restart or reload VSCode for this to take effect.

Change background color of selected code in IPython Notebook

I'm using the Base16 Ocean dark theme on IPython Notebook.
The background color of selected text doesn't contrast very well, making it difficult to tell if it's selected:
On the default settings, this does not occur:
Please let me know how to change the background color of selected code on IPython Notebook to a more clear one.
Run the following code in a notebook to find out the jupyter config folder on your system, if you don't know it yet:
from jupyter_core.paths import jupyter_config_dir
jupyter_dir = jupyter_config_dir()
print(jupyter_dir)
In the jupyter config folder, find /custom/custom.css, modify the following line:
.cm-s-ipython div.CodeMirror-selected {background: #384151 !important;}
I use '#3366ff' here, you may use whatever background color that suits your need.
All is well with jimmyazrael answer, but if you're using Jupyter 5.0 from within Anaconda3 you will find your css file at:
C:\Users\YourUsername\Anaconda3\Lib\site-packages\notebook\static\cutom\custom.css
Hope that helped
Mine was I bit more complicated. Couldn't find it in any mentioned folder, thus after searching my system for "custom.css", I have found many of this! It is likely because I had upgraded/downgraded my environment multiple times.
So, in the end, I open the file in:
C:\Users\username\AppData\Local\Continuum\anaconda3\pkgs\notebook-6.1.5-py37haa95532_0\Lib\site-packages\notebook\static\custom\custom.css
Pasted the line:
.cm-s-ipython div.CodeMirror-selected {background: #384151 !important;}
Saved and restarted Jupyter. It worked!

Ubunto12.04-Gnome3 -- Show icon in alt-tab menu using .desktop file

After Googling for hours, I didn't find any answer for the following issue and so glad if anyone could help.
I use Ubuntu 12.04 LTS with Gnome-shell 3.4.1. Consider the following simple program in file $HOME/a.py which I have made it executable:
#!/usr/bin/env python
import gtk
w = gtk.Window()
w.set_size_request(250, 150)
w.set_title("test program")
w.connect('destroy', lambda x: gtk.main_quit())
w.show_all()
gtk.main()
I've used MenuLibre to define a_run0.desktop in $HOME/.local/share/applications as below:
[Desktop Entry]
Version=1.0
Type=Application
Name=a_run
Comment=comm.
Icon=applications-development
Exec=/home/vsop/a.py
Path=
Terminal=false
StartupNotify=true
Categories=
Name[en_US]=a_run
Comment[en_US]=comm.
I made a_run0.desktop to be executable and I see a file named “a_run” in $HOME/.local/share/applications with proper icon (Icon=applications-development
). Running the program and using alt-tab, the icon is also shown in alt-tab menu quite well.
The question is, when I copy “a_run” file (actually a_run0.desktop) to $HOME/Desktop, the file is shown with correct icon in Desktop but after running it, the icon shown in alt-tab menu is changed to unknown-red-circle-icon with the name of original file “A.py” underneath.
What is made this problem and how can I see the defined-icon (in .desktop file) correctly in the alt-tab menu after running the program from $HOME/Desktop?
Try to add icon to your window using python and gtk. I think that icon in .desktop file only specify how .desktop file is shown in system not application.
Certainly in more recent versions of Gnome shell (I'm using 3.14.1) the entry Icon should point to the actual icon you want to use, e.g
Icon=/home/vsop/a_icon.xpm

How to change an initial size of qtcreator's qtcreator_process_stub window (on Ubuntu)?

I have an application being developed in QT Creator on Ubuntu. I need to run some tests and to see their results I use console — qtcreator_process_stub window is opened. And now comes my question: how to set its initial size? (especially the width to make results more readable). Setting the width by mouse each time I run my app is quite annoying.
I found a simple solution:
Go to Tools->Options->General->Environment: System->Terminal. There is a command used to invoke a terminal. In my case I needed to change the command to:
xterm -geometry 250 -e
That's all;)
Maybe it will be useful for Windows users:
You can right click on the console title bar (when running your program), select properties and change the font size (or other properties) in the font tab. It will be remembered for the future sessions.
For changing console size from command starts console use cmd.exe "/k mode con: cols=150 lines=50" (not working from Qt for me, changing COMSPEC do nothing).
In more recent versions of Qt Creator (2.6.2 and up) this can be changed in
Projects
Run (from the top of the window)
In the run environment edit the COMSPEC field
On Linux Mint you can do the following:
Open Terminal
Edit -> Profile Preferences -> General -> Use custom default terminal size
Set the Default size to a value which fit your needs.

Resources