In the PyCharm CE 3.0 IDE I activated the option PyCharm Preferences/Editor/Show virtual space at file bottom.
Is it possible to set the virtual space to a different color than the normal background or to display an EOF indicator?
No, there's no way to do this. However, you should not need a EOF or a different color because you cannot scroll down to more than a certain length after your last statement in a file.
Related
I want to make a script to change my accent color to a random color every day, using a command line or whatever I can find.
I found that I can change the "AccentColorMenu" in Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent in the registry to immediately change the color of window title bars and borders (and thus use reg.exe on command line). But changing "StartColorMenu" does nothing.
And preferrably I would like to change the color the same way control panel does it so the same color conversions are done for start menu etc.
I found this program that can be used on the command line to do exactly what I want (in WSL because getting a random color was a lot easier):
'Windows 10 color control.exe' -accent_color $(openssl rand -hex 3)
While program is a few years out of date and some of its functionality doesn't seem to work anymore (Accent color always overrides DWM color and disabling new auto-color accent algorithm doesn't seem to do anything), it works perfectly to just set the system accent color just like if you were to set it in Settings.
In Ubuntu gnome-terminal it can be done by doing Ctrl + or Ctrl -
Is there a way to write a python script that when executed would resize the font size of the terminal it is executed from?
I need this in order to display images in terminal with high resolution using timg.
Checking the source (vte and gnome-terminal), looks like there's no way to do this. Other terminals (e.g., xterm) can do this using escape sequences. See XTerm Control Sequences:
OSC Ps ; Pt ST
Set Text Parameters. For colors and font, if Pt is a "?", the
control sequence elicits a response which consists of the con-
trol sequence which would set the corresponding value. The
dtterm control sequences allow you to determine the icon name
and window title.
...
Ps = 5 0 -> Set Font to Pt. These controls may be disabled
using the allowFontOps resource. If Pt begins with a "#",
index in the font menu, relative (if the next character is a
plus or minus sign) or absolute. A number is expected but not
required after the sign (the default is the current entry for
relative, zero for absolute indexing).
vte recognizes the 50, but that (like a lot of other xterm features) is just a stub that doesn't do anything. The xterm sources include a 20-year old script which demonstrates the feature (see fonts.sh).
Rather than using an escape sequence, you might be able to use the wmctrl tool (which could ask the window manager to negotiate with the terminal). Some have done that with other terminals, e.g, terminology (but ultimately using an escape sequence).
vte does have some code which might be accessible from a python script, using g_signal_connect to associate decrease-font-size and increase-font-size signal (see source code). The signal code is what you're using with the keyboard. But how you might determine the object pointer from a script starting outside the terminal emulator isn't clear.
There is no easy way to do this across terminals. Terminals support so called control sequences, which can set a bunch of options, like text color and others, but there is no control sequence for setting the font size. See for example https://en.wikipedia.org/wiki/ANSI_escape_code and https://invisible-island.net/xterm/ctlseqs/ctlseqs.html for what kind of actions are supported.
I have a Windows 7 laptop with the size of text and apps set to small. However, one program I use needs this setting to be set on medium. I'm sick of changing this setting every time I have to use the program.
How do I use a batch file to change the size and text of this program to medium without impacting other programs and keep the resolution at 1280x960?
I have no previous experience in writing batch files.
If the program is a batch file or its cmd.exe, you can just create a shortcut to that program, go into shortcut properties, go into the Layout tab and set the window size by changing Width to the width you want the window to be and the Height to the height you want to window to be. For the text go into the Font tab and set the text size to an option already there or input a custom one by clicking in the box that tells you the size selected and type in your own. Then press enter. This will close the properties. You must do this or it will go to the nearest option to your custom size. Now simply run the shortcut instead of running said program and it should have custom size and text.
Does Windows has environment variables to indicate the console size? Just like Unix has LINES and COLUMNS.
I just did a quick check with the set command, and no - there are no variables containing the window size, at least on Windows 7.
You can call GetConsoleScreenBufferInfo to get some information about the screen buffer including its size, but that won't be the physical size of the window due to scrolling.
Is there a way to set the mac terminal to output its lastest output in a different color?
I am tired of wasting time looking for the last command when the terminal gets filled.
No, but you could arrange for your prompt to be in a different color. You could also split the pane; the bottom will scroll with the output while the top stays wherever it was.