Change default XTerm font size in Cygwin - configuration

Anyone know how to change the default font size when you open a new XTERM windown in Cygwin?
I have found references of putting information into the ~/.Xresources file but that file doesn't exist for me...
Thanks

here is how I fixed it:
Make sure your are in your home directory, so "cd" and "pwd" to see that you are there
Create the .Xresources file, just like "touch .Xresources"
Edit it with your favourite editor ;)
Here is my set up, it is actually very useful, it includes a side bar, and removes the top bar:
Xft*antialias: true
Xft*autohint: true
XTerm*background: black
XTerm*foreground: grey
XTerm*cursorColor: grey
XTerm.vt100.geometry: 79x25
XTerm*scrollBar: true
XTerm*rightScrollBar: true
XTerm*saveLines: 10000
XTerm*faceName: BitStream Vera Sans Mono
XTerm*faceSize: 12
XTerm*toolBar: off
You can test this changes with "xrdb -merge .Xresources" and then opening another xterm
In order to save this changes you are going to have to create or modify another file, "touch .startxwinrc", open up your editor and include the following:
#!/bin/sh
xrdb -merge ~/.Xresources
Restart your XWin Server, and you will have a prettier cygwin terminal.

Gonzalo you made my day with your fix.
The font size can also be dynamically changed with the following keyboard shortcuts:
Shift+NumPadPlus = Increase font size
Shift+NumPadMinus = Decrease font size
Please take in account that the new font size is active for the current xterm window and that it is active for the current process session only. A new process will start with XTerm*faceSize sized fonts.

Around ~2015 XWin Server was overhauled and you no longer need to create .startxwinrc because it no longer exists. I found that the ~/.Xresources is read in automatically. Also I found that XTerm.vt100.geometry is not valid anymore.
This is my .Xresources:
Xft*antialias: true
Xft*autohint: true
XTerm*background: white <== These settings mimics
XTerm*foreground: black the default back, fore
XTerm*cursorColor: grey and cursor colors
XTerm*scrollBar: true
XTerm*rightScrollBar: false <== This causes the scroll bar to be
on the default left side
XTerm*saveLines: 10000
XTerm*faceName: BitStream Vera Sans Mono
XTerm*faceSize: 12
XTerm*toolBar: On <== This causes the menu bar to appear with
Main Options, VT Options, and VT Fonts

Related

How can I put an image on a Matlab uicontrol button?

I have Matlab 2019b, GUI Layout Toolbox 2.3.4 and t all runs on MacOs 14 Mojave.
I want to create button in in a UI that have icons/images instead of text. I have seen here:
https://undocumentedmatlab.com/blog/html-support-in-matlab-uicomponents/
that it is supposed to be possible to use HTML to render the button contents.
So - I try this sample code:
figure('MenuBar','none','Name','GUI-TEST','NumberTitle','off','Position',[200,200,140,90]);
push_btn = uicontrol('Style','PushButton','String','Push','Position',[30,60,80,20],...
'CallBack','disp(''You are pressed a push button'')');
close_btn = uicontrol('Style','PushButton','String','Close','Position',[30,5,80,50],...
'CallBack','close');
icon_file = fullfile(pwd, 'close.png')
str = ['<html><img src="file://' icon_file '"></html>']
set(close_btn,'String',str);
but it leaves me with an empty button.
If I deliberately use a filename that does not correspond to an existing file, I see a broken image icon:
So I am reasonably sure that the basic syntax and file path stuff is correct but the image does not get rendered in the button.
Is there something else I need to do to make this work or is it all just part of Matlab's overwhelming strangeness?
The easiest way to put an image on a uicontrol (and specifically a button), is to use the CData property,
im_orig = imread(icon_file); % Needs to be true color, i.e. MxNx3
im_sized = imresize(im_orig,[80,50]); % size of the button
% str = ['<html><img src="file://' icon_file '"></html>'];
% set(close_btn,'String',str);
set(close_btn,'CData',im_sized);

WTL CCommandBarCtrl imagelist (default and hot/disabled) ignored when set

I am trying to modify the images in a ribbon's Quick-Access-Toolbar but all my attempts seem to be in vain. I had the WTL-wizard create a simple ribbon-based application to start with. The wizard creates a CMainFrame with the a member var called 'm_CmdBar' of type 'CCommandBarCtrl'.
In 'CMainFrame::OnCreate()' the m_CmdBar is created with 'Create( m_hWnd, rcDefault, NULL, ATL_SIMPLE_CMDBAR_PANE_STYLE )' and the images are loaded with 'LoadImages(IDR_MAINFRAME)'. The images come from the default visual-studio provided 4-bit Bitmap toolbar-resource. If I leave 'LoadImages(IDR_MAINFRAME)' untouched, then the crappy 4bit icons are visible in the QAT.
Now, reading through the very sparsely only available WTL documentation (and Win32 API docu about about image lists) some people suggest to change the image list. I tried the following approaches (after commenting out 'LoadImages(IDR_MAINFRAME)' in order to start with a blank slate.).
1st attempt (load a 32Bit bitmap-strip with 5 16x15px consecutive icons):
CBitmap bmp;
bmp.LoadBitmap( IDB_TEST32BPP );
WTL::CImageList imgList = m_CmdBar.GetImageList();
imgList.Create( 16, 15, ILC_COLOR32, 8, 1 );
imgList.Add( bmp.m_hBitmap, RGB( 255, 255, 255 ) ); // also tried different masks
m_CmdBar.SetImageList( imgList );
imgList.Detach(); // also tried once without detaching
But to no avail. I tried to force the imagelist with:
m_CmdBar.SendMessage( TB_SETIMAGELIST, 0, (LPARAM)imgList.m_hImageList );
but it this did not work either.
2nd attempt is very much like the first, except that this time I changed the create call to:
imgList.Create( 16, 15, ILC_COLOR24 | ILC_MASK, 8, 1 );
in hope that maybe the loading code does not like 32bpp images... but again, no cigar (LoadBitmap was adjusted to load a 24bpp version of course). 3rd attempt was to simply reload the default images (4bit) so again I changed the create call to:
imgList.Create( 16, 15, ILC_COLOR4 | ILC_MASK, 8, 1 );
but you have guessed it... noting. And with nothing I actually mean, that the QuackAccess-Toolbar does reserve the space for the 5 buttons (as per the XAML ribbon config) but icons/images do not appear. The QAT-buttons are white but react to interaction. Trying to load the hot and disabled lists using the provided WTL-API also does nothing at all.
The only approach that worked somehow was to manually load every bitmap directly and linking it to its command with:
CBitmap bmp;
bmp.LoadBitmap( IDB_ICON1_32BPP );
m_CmdBar.AddBitmap( bmp.m_hBitmap, ID_TEST_BTN );
works as long as the XAML config correctly provides an entry in the QAT section for ID_TEST_BTN. AddIcon also works but introduces an artifact (a black vertical
1px-bar, as if a right-frame was drawn for every icon. I guess it's the 16x16 versus 16x15 pixel problem).
I might be inclined to give up and go with the AddBitmap-workaround, but I'd like the disabled and hot-version to work too, and there is no AddBitmap for that as it looks. Also, I guess there is no way to force an image to any of the QAT buttons via the XAML file???

How to remove colon in Emmet+Stylus in JetBrains IDE

How to remove colon in Emmet+Stylus in JetBrains IDE?
For example, I type mb10 + tab and get margin-bottom: 10px
but it mast be a margin-bottom 10px (without the colon :)
How to disable it?
Currently it is not possible unfortunately.
https://youtrack.jetbrains.com/issue/WEB-15575 -- watch this ticket (star/vote/comment) to be notified on any progress.
the auto-completes that emmet give's you for somethings like mb10 or ovh or bd10 are coming from a fuzzy search result, and I'm almost sure that It's not editable (at least in an easy way)
but you can change somethings about emmet, and in your case
It's done in this way
CTRL + ALT + S (open's up settings panel)
go to the path editor > CodeStyle > liveTemplates
expand Zen CSS
scroll down and find mb, click on it
at bottem of settings panel you should be able to see a field called Template text
change It to this margin-bottom $VALUE$;
click on ok and it's done
if you do mb + tab the output would be margin-bottom ; with the caret instead of $VALUE$ , so you can insert it then and get out of it easily by tab key
but as I said , its not responsible for something like mb10 , because it's referring to a fuzzy search

Sublime Text 2 - How to change the font size of the output panel?

When I change the font size in Sublime Text 2 (via shortcuts / config), the font size of text in output panel AKA Build Results is changed too.
It would be convenient to have these font sizes separated. I tried to follow & adapt Sublime Text 2 how to change the font size of the file sidebar? and edited <theme name>.sublime-theme:
{
"class": "output.exec",
//"class": "output",
//"class": "output_exec",
//"class": "exec",
//"parents": [{"class": "output"}],
"font.size": 7.0
},
Output panel is named output.exec, but it doesn't work. Some other options I tried are commented out.
Probably I just need correct class name. I'm unable to find class list which are used in ST2.
Is it possible and if yes - how to change the font size?
EDIT:
It's already on wishlist: http://sublimetext.userecho.com/topic/27388-set-font-size-per-pane/
Yes you can, this will however change the font-size for the console panel as well, so if that doesn't bother you then simply do this:
First create a file named Widget.sublime-settings under the Packages\User directory.
Second write the following in that file:
{
"font_size": 7
}
Now you're good to go!

Vim new tabbed pages don't match text

I use :match to highlight problems with my code that don't meet style guidelines. The following works great for the first window I open in Vim:
~/.vimrc:
hi ExtraWhitespace ctermbg=red guibg=red
hi NoFunctionSpace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$\| \+\ze\t/
2match NoFunctionSpace /\S(/
However, when I go to :tabedit a file, or if I open Vim with the -p option and multiple files, only the first window highlights matches. I want all of my open tabs to show matches.
The :match commands only apply to the current window. To automatically apply them to each new window, hook them into the WinEnter event:
autocmd WinEnter * match ExtraWhitespace /\s\+$\| \+\ze\t/
autocmd WinEnter * 2match NoFunctionSpace /\S(/
You still need the original :match commands, too, because the WinEnter event isn't fired for the initial window.