Display iTerm on screen with cursor [or Active Screen] - macos

I always have iTerm running in the background, and use a hotkey to show/hide it when needed, which works great when using only one screen.
Now, with two screens, I notice that with the option to have it appear with the "Screen with Cursor", the first time I press the hotkey, it appears on the screen with the cursor (first screen), but when I hide it, move the cursor to another screen (second screen) and press the hotkey again, it appears on the first screen and not the second one.
Is there another setting that I might be missing to have work properly?

Related

Maximize terminal in VSCode when in side panel

In previous versions of VSCode there was an arrow icon at the top of the panel that could be used to maximize the panel, for instance the terminal. I do not know exactly in which version but that button is now gone and I'm unable to find an equivalent.
My question is: how can I maximize the terminal so it takes the whole VSCode window? Is there any way to get the button back?
Which version of VSCode are you using, and in which OS?
On Mac, and with 1.65.2 (the most recent update by now), I have it in the right corner, near the X button:
Shortcuts
Now talking about shortcuts to make your life easier, there are 2 you should be aware of.
PS: Remember that to change any shortcuts, just go over VSCode Command Palette and type Keyboard Shortcuts to change them.
Maximise panel size
There are no default shortcuts for those, in both Windows and Mac.
If you want to set any, the name of the shortcut is View: Toggle Maximized Panel:
Increasing / decreasing terminal size
Now talking shortcuts, if you want to resize your terminal window, in Mac there's a native shortcut that allows to increase / decrease terminal size with Cmd + Ctrl + Arrow Up / Arrow Down.
There's no default for Windows.
If you want to set / change those shortcuts, they are called Terminal: Resize Terminal Down and Terminal: Resize Terminal Up:
Terminal panel on the side
If you added your panel to either left or right, then the mark to make it fullscreen changes.
After clicking on the arrow below, it'll hide all your files and make the terminal to run in the whole screen for VSCode:
I also got the arrow disappeared, but i manage to bring it back by with command:workbench.action.alignPanelCenter
But i don't know i un align it in the first place
So maybe it will work with you
To get the maximize arrow on the left panel...
Left-click the bottom panel, then choose Move Panel Left
To get the maximize arrow on the bottom panel...
First, press the Customize Layout button
And select Center Panel Alignment
Then move the panel back to the bottom.
Panel can be maximized when centered.
Example: If panel is not centered and the Maximize button is missing you also cannot use the command by hitting
Shift-Ctrl-P View: Toggle Maximize Panel
Fix: run these commands (press Shift-Ctrl-P then begin typing)
First command will enable the maximize button
View: Set Panel alignment to Center
Second command will now work to Maximize (or just press the button that shows up now)
View: Toggle Maximize Panel
Blue and skube have the right answer to the original question. I cannot comment so summarize an answer using commands that can be pasted to verify.

Stop XTerm from moving text upwards on window resize, when cursor is at last row?

In the Alternate Screen Buffer mode in XTerm-like terminal emulators, when the cursor is on the last row and the terminal window is resized so that it has less rows, all text in the terminal is shifted upwards.
Can anyone point me to what is going on here? I can't find any related escape sequences to turn this behavior off, or any way to intercept SIGWINCH to move the cursor before the shift happens. It seems like it may be related to scrolling to keep the cursor on the screen.
I'd really like the screen display to not change, even if the cursor is no longer on screen after a resize.
I'm not using ncurses or other libraries, just escape sequences and system calls.

How to right click screen coordinate with mouse from command line on OSX

Is there a built command line utility to right click a screen coordinate on OSX?
Is it possible to do so with a secondary cursory such that the main cursor is not re-positioned on the screen?
If you type the key combo of command-shift-4 the curser is turned into crosshairs and the cursor position is listed on the cusor itself. Shown below is a screen capture of an area of screen containing the cross-hairs.

Printed contents disappear in terminal

The thing is I have printed something in the terminal, but when I accidentally resize the terminal, the printed contents at the bottom of my terminal disappear. Why is that? Is there anyway to recover these printed messages since the program runs a long time each time.
When you resize a terminal window, the terminal has to paint or repaint part of the window. If you lost text at the bottom of the window, that sounds as if you shrank the window when using one of the terminals which leave the upper-left corner of the window in a fixed position, while adjusting the rest of the window. Offhand, that could be rxvt, putty, konsole. xterm (which is configurable) defaults to the other direction.
If the window shrinks, then the location of the "bottom" row of text should be moved up (to match user's expectations). But there is a complication: GNU screen will besides redrawing the window, attempt to wrap long lines so that they fit the new margins. Developers for a few terminals have imitated that in the past few years, and you may notice some bug reports when that new feature does not work well.
For instance, if you shrank the window vertically, but changed its width, then a miscalculation of the wrapped lines could cause text to vanish. Then again, resizing it again might get the text back into view. But if that does not work, then it's gone.

FocusIn/FocusOut not generated

Can someone please clarify the default focus handling of the X11 server? My understanding is that the focus 'follows the mouse' and sure enough if I move the mouse between separate terminals I can see the cursor changing as each window aquires/loses the focus.
But when I run two xev windows and move the pointer between them, I see plenty of MotionNotify/EnterNotify/LeaveNotify as the pointer moves from one window to another - but FocusIn and FocusOut are nowhere to be seen. Is this an oddity in xev? Is there some special mask or property which needs to be applied in order for these events to be generated?
Many thanks, R.
While I do not fully understand the answer(s), I am grateful to parkydr, minitech and any others who may have stopped by.
Thanks again, R.
Having focus refers to the window which receives keyboard input when you press a key.
The focus handling depends on your window manager. The most common mode is click to focus, which your window manager is set to, where you only get focus when you click on the window. An alternative is that the keyboard focus follows the mouse, which is what you are expecting.
There should be a setting to change this in your window manager settings.
The cursor changing does not indicate focus, just that the terminal has defined a different cursor.
To demonstrate, open a terminal and an xev window.
Click on the xev window and press a key, you will see key events.
Move the mouse to the terminal window, you'll see the motion and leave events
Press a key and you'll still see key events from xev
Click on the terminal window, xev will give a focus out event
Press a key, the characters will be displayed in the terminal window
Move the mouse over the xev window and press a key, the character will still come out in the terminal window

Resources