You are not logged in.

#1 2021-07-27 22:14:52

irb
Member
Registered: 2014-11-07
Posts: 17
Website

Alacritty / Kitty terminal geometry

Is there a way to specify startup geometry with these terminals? I'm used to being able to do things like "/usr/bin/urxvtc -geometry 198x53+0+35". I can't seem to figure out the alacritty/kitty way of doing this however. I can run alacritty with, e.g. "-o window.position.x".

Also, at least with Plasma, these terminal's size and positions aren't saved with the session. Wondering if I'm missing something obvious.

Thanks!

Offline

#2 2021-07-27 23:38:39

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: Alacritty / Kitty terminal geometry

If you figured out how to set window.position.x, how have you not seen window.position.y ... and window.dimensions?

alacritty -o "window.position: {0,35}" -o "window.dimensions: {198,53}"

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2021-07-27 23:48:19

irb
Member
Registered: 2014-11-07
Posts: 17
Website

Re: Alacritty / Kitty terminal geometry

No, I figured that out in alacritty, and wrote a script to handle that; the issue there is that the dimensions are cell-based and I was hoping for something more exact. Also, plasma will only run the startup script on the desktop on which the session was manually saved, and I'd much prefer not to have to script it at all and let the session manager save them to the desktops, and in the positions and sizes, I want. Otherwise I may as well go back to i3, which is an option. The -geometry option is simpler and more intuitive than window.position.x, window.position.y, window.dimensions.columns and window.dimensions.lines.

Offline

#4 2021-07-28 05:55:25

seth
Member
Registered: 2012-09-03
Posts: 51,229

Re: Alacritty / Kitty terminal geometry

the issue there is that the dimensions are cell-based and I was hoping for something more exact

That's pretty normal for VTEs (and what urxvt does

at least with Plasma, these terminal's size and positions aren't saved with the session.

That's a client thing, ie. alacritty would have to re/store its session parameters.

The -geometry option is simpler and more intuitive

So… I'm slightly confused…

The subject is about geometry and

the first line wrote:

Is there a way to specify startup geometry with these terminals?

Then we go off on a tangent about session management, WM_SIZE_HINTS, something about plasmas session management and manual storages, i3 ./. plasma and which syntax is scientifically the best for, I assume, principal reasons?

Smells like an xy-problem.
What do you *actually* want to achieve?
(Like "the final behavior", not some assumed path there)

Offline

#5 2021-07-28 12:35:00

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: Alacritty / Kitty terminal geometry

In addition to all the above, you said you wanted something functionally equivalent to "-geometry 198x53+0+35".  I'm pretty sure you weren't setting your urxvt wndows to be 198x53 pixels!  Those are reasonable character width / height values for a terminal.  So in what way is the same thing for alacritty not functionally equivalent?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2021-07-28 18:31:03

irb
Member
Registered: 2014-11-07
Posts: 17
Website

Re: Alacritty / Kitty terminal geometry

Then we go off on a tangent about session management, WM_SIZE_HINTS, something about plasmas session management and manual storages, i3 ./. plasma and which syntax is scientifically the best for, I assume, principal reasons?

Hmm. I had a bit of a retort but reading over it, I can see your confusion. I wasn't clear. Let me try again:

I would like for plasma to start up about 20 alacritty or kitty terminals across 12 desktops in specific sizes and places upon login. This seems to work fine with urxvt, rxvt, and xterm, relying on plasma's session management. plasma appears to ignore alacritty and kitty when saving the session so I end up having to manually start and resize all these terminals each time I log in. That gets to be a chore.

Scripting this is possible to an extent, but the script (placed in ~/.config/autostart-scripts/) will only run on the desktop that was active when the plasma session was saved.

Although I have some questions about the differences in how these terminals interpret geometry options, I'll hold off on that for now to simplify the matter.

Offline

#7 2021-07-28 21:24:32

seth
Member
Registered: 2012-09-03
Posts: 51,229

Re: Alacritty / Kitty terminal geometry

As for being restarted in general, see ~/.config/ksmserverrc on what is actually stored.
If KDE only restores kitty/alacritty from a manually saved session, this would suggest that they crash (or otherwise terminate early) during the logout process.

As for the virtual desktop selection, few client implementations allow you to set _NET_WM_DESKTOP (and I don't see such option for them), so you'd have to rely on kwin during the session restorage or add kwin rules for the initial placement if you can discriminate the windows by class or title.

Since you seem eager to switch to those VTEs, is this an X11 => wayland thing? (and the KDE session handling maybe broken on wayland…)

Offline

#8 2021-07-28 22:52:08

irb
Member
Registered: 2014-11-07
Posts: 17
Website

Re: Alacritty / Kitty terminal geometry

Thanks for the information. I didn't know about ksmserverrc. regardless neither terminal are present in that config.

KDE isn't restoring them at all, regardless of session saving. I am interested in moving to Wayland eventually but not yet. I like the font handling in these terminals and wanted to try each of them to see which might suit me better.

The documentation in alacritty's config file indicates that if window.dimensions and window.position aren't set, the WM will handle them; in my config they are unset, and even running with no options at all has no effect on plasma restoring them.

Offline

#9 2021-07-29 08:14:56

seth
Member
Registered: 2012-09-03
Posts: 51,229

Re: Alacritty / Kitty terminal geometry

The documentation in alacritty's config file indicates that if window.dimensions and window.position aren't set

This just means they don't request a position (the dimensions should™ not matter but resort to some default) and the WM is free to chose any position it deems suitable.
This has nothing to do w/ session restorage where the process commandline is stored along a session ID and kwin is supposed to store some data along that session ID (to restore postion, virtual desktop etc.)

The fundamental problem is that KDE isn't restoring them. Do they show up in the ksmserverrc if you explicitly save a session?
https://forum.kde.org/viewtopic.php?f=66&t=168803 seesm to suggest that clients need to explicitly register for session management, but idk how or why or why xterm/urxvt would (maybe plasma keeps a whitelist for known processes)

Edit:
https://develop.kde.org/docs/session-managment/
urxvt sets WM_COMMAND, kitty doesn't.
You'd have to file a bug against alacritty/kitty to do at least that.

Last edited by seth (2021-07-29 08:18:39)

Offline

#10 2021-07-29 17:06:59

irb
Member
Registered: 2014-11-07
Posts: 17
Website

Re: Alacritty / Kitty terminal geometry

seth wrote:

https://develop.kde.org/docs/session-managment/
urxvt sets WM_COMMAND, kitty doesn't.
You'd have to file a bug against alacritty/kitty to do at least that.

That makes sense to me. Thank you very much, I'll do that.

Offline

Board footer

Powered by FluxBB