In a fit of madness, I enabled X server in WSL ubuntu on my laptop.
As my laptop keeps changing quite frequently which means the screen
size keeps changing too and hence the xterm starts off at a different position in each laptop. Now, I do know how to set the dimensions in .[Xx]res* files but I do have to keep fiddling the numbers to get it
right so that it's offset by a few points from the top left.
Does anyone have a script or a function to compute the screen size and suggest a typical 'fullwidth' by 40 rows size for xterm starting at the
top left?
For some reason, I've got obsessed with xterm starting off at random positions on the screen and could only get part way to at least
iteratively, manually change the resource files repeatedly to get it
right.
!use xwininfo to get geometry
xterm*VT100.geometry: 172x39+0+23 !painfully identified as fullwidth
! was spilling over beyond screen dimensions. 39 because windows
taskbar overlays last row.
What do you do?
sivaram
If I want full-screen (with an xterm) I use option '-fullscreen'.
I also don't need offsets because the menu bar gets not convered.
And how many columns can be displayed depends also on font size.
Could it be that you see an issue where there is none?
On Sun, Aug 22 2021,Janis Papanagnou wrote:
[snipped 15 lines]
If I want full-screen (with an xterm) I use option '-fullscreen'.
I also don't need offsets because the menu bar gets not convered.
And how many columns can be displayed depends also on font size.
Could it be that you see an issue where there is none?
-fs is making xterm spill beyond the right screen frame and below the
windows taskbar which I don't know how to fix or resolve and hence
those magic fiddly numbers.
[snipped 17 lines]
sivaram
I cannot tell why the "fontsize" option (-fs) does that in your
environment, in mine there's no "spilling". (I mentioned -fs
only because the font size influences screen size if rows/columns
are defined; "172x39" might fit on screen with one font size and
not fit with another one.)
But as I understand you just wanted full-screen mode, i.e.
xterm -fullscreen
Or did I miss a requirement in your original post?
Janis
Net net, ignoring why fullscreen makes it overflow, is there any function/script that can generate a dimension set worth using?
Sivaram Neelakantan <nsivaram.net@gmail.com> wrote:
Net net, ignoring why fullscreen makes it overflow, is there any
function/script that can generate a dimension set worth using?
From xterm(1):
-maximized
This option indicates that xterm should ask the window manager
to maximize its layout on startup. This corresponds to the
maximized resource.
Maximizing is not the reverse of iconifying; it is possible to
do both with certain window managers.
It should work all right thing on any window manager, or at least in
those that are ICCCM compliant.
Javier <invalid@invalid.invalid> writes:
Sivaram Neelakantan <nsivaram.net@gmail.com> wrote:
Net net, ignoring why fullscreen makes it overflow, is there any
function/script that can generate a dimension set worth using?
From xterm(1):
-maximized
This option indicates that xterm should ask the window manager
to maximize its layout on startup. This corresponds to the >> maximized resource.
Maximizing is not the reverse of iconifying; it is possible to
do both with certain window managers.
It should work all right thing on any window manager, or at least in
those that are ICCCM compliant.
In the environments I use most often (Cygwin on Windows 10 and
Cinnamon on Ubuntu), `xterm -maximized` does *not* do the same
thing as launching an xterm and then maximizing it.
`xterm -maximized` creates an xterm window that's big enough to fill
(almost) the entire display, but it's still an ordinary window that I
can move around and resize. With or without the `-maximized` option, if
I click the maximize button (typically in the upper right next to the
close button) or double-click the title bar, or use an appropriate
keyboard shortcut, I get a full-screen window that still has a title
bar, but I can't move or resize it without un-maximizing it.
-fs is making xterm spill beyond the right screen frame and below the
windows taskbar which I don't know how to fix or resolve and hence
those magic fiddly numbers.
[snipped 17 lines]
sivaram
Javier <invalid@invalid.invalid> writes:
Sivaram Neelakantan <nsivaram.net@gmail.com> wrote:
Net net, ignoring why fullscreen makes it overflow, is there any
function/script that can generate a dimension set worth using?
From xterm(1):
-maximized
This option indicates that xterm should ask the window manager
to maximize its layout on startup. This corresponds to the >> maximized resource.
Maximizing is not the reverse of iconifying; it is possible to
do both with certain window managers.
It should work all right thing on any window manager, or at least in
those that are ICCCM compliant.
In the environments I use most often (Cygwin on Windows 10 and
Cinnamon on Ubuntu), `xterm -maximized` does *not* do the same
thing as launching an xterm and then maximizing it.
`xterm -maximized` creates an xterm window that's big enough to fill
(almost) the entire display, but it's still an ordinary window that I
can move around and resize. With or without the `-maximized` option, if
I click the maximize button (typically in the upper right next to the
close button) or double-click the title bar, or use an appropriate
keyboard shortcut, I get a full-screen window that still has a title
bar, but I can't move or resize it without un-maximizing it.
I don't know if that means these window managers are not
ICCCM compliant. I personally would find it more convenient if
`xterm -maximized` created a true full-screen window, which is
usually what I want. Instead, I generally just launch an xterm
and maximize it manually. It's mildly annoying, but not bad enough
so far to induce me to find a better solution.
#!/usr/bin/env bash
w=$(xwininfo -root | sed -n '/ Width: /s/ Width: //p')
h=$(xwininfo -root | sed -n '/ Height: /s/ Height: //p')
xterm -fn 10x20 -geometry $((w/10-12))x$((h/20-9))+0+0
There is also xprop which gives more complete information than xwininfo
In the environments I use most often (Cygwin on Windows 10 and
Cinnamon on Ubuntu), `xterm -maximized` does *not* do the same
thing as launching an xterm and then maximizing it.
`xterm -maximized` creates an xterm window that's big enough to fill
(almost) the entire display, but it's still an ordinary window that I
can move around and resize. With or without the `-maximized` option, if
I click the maximize button (typically in the upper right next to the
close button) or double-click the title bar, or use an appropriate
keyboard shortcut, I get a full-screen window that still has a title
bar, but I can't move or resize it without un-maximizing it.
I don't know if that means these window managers are not
ICCCM compliant. I personally would find it more convenient if
`xterm -maximized` created a true full-screen window, which is
usually what I want. Instead, I generally just launch an xterm
and maximize it manually. It's mildly annoying, but not bad enough
so far to induce me to find a better solution.
On 2021-08-25, Javier <invalid@invalid.invalid> wrote:
I don't find that a problem. In xterm you can switch between
full-screen and default size with Alt-Enter.
That's not a standard feature of xterm. Either your setup adds a
key-binding action, or it's a feature of your window manager.
I don't find that a problem. In xterm you can switch between
full-screen and default size with Alt-Enter.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 36:24:02 |
Calls: | 6,648 |
Calls today: | 3 |
Files: | 12,193 |
Messages: | 5,329,028 |