Open formula-spectre opened 3 years ago
It looks like xterm
supports these arguments.
Here's a little more information about the arguments.
The xterm
man page has an explanation of -class
and -title
:
-class string
This option allows you to override xterm's resource class. Normally it is "XTerm", but can be set
to another class such as "UXTerm" to override selected resources.
X Toolkit sets the WM_CLASS property using the instance name and this class value.
-title string
This option specifies the window title string, which may be displayed by window managers if the
user so chooses. It is shorthand for specifying the "title" resource. The default title is the
command line specified after the -e option, if any, otherwise the application name.
X Toolkit sets the WM_NAME property using this value.
A couple points:
It is completely unrelated, but I actually have some Rust code that inspects the WM_NAME
and WM_CLASS
properties of all your currently open windows. I imagine this would be a good resource for someone trying to add functionality to Termonad for setting the WM_NAME
and WM_CLASS
: https://github.com/cdepillabout/break-time/blob/6c5e7d9a9d8b2213fbdde35edd9b65423e19470c/src/scheduler/plugins/window_titles.rs#L29-L37
Termonad currently sets the name (or maybe the class??) to Termonad
: https://github.com/cdepillabout/termonad/blob/cf40feca3a77bf0944aca86b91e43e3242542d49/src/Termonad/App.hs#L514
Ideally we wouldn't use XLib calls for this directly, since I want Termonad to work on both X11 and Wayland. We should try to use functionality exposed by GTK or GLib or whatever for this.
Here's the man page for xterm
for -e
:
-e program [ arguments ... ]
This option specifies the program (and its command line arguments) to be run in the
xterm window. It also sets the window title and icon name to be the basename of the
program being executed if neither -T nor -n are given on the command line.
NOTE: This must be the last option on the command line.
Termonad currently looks for the SHELL
environment variable to determine what to run in a newly opened window:
It would be nice to change this to be specified by the user in the Temonad Config.
Ideally we would add the above settings to the actual Termonad Config, and not just take them on the command line: https://hackage.haskell.org/package/termonad-4.2.0.0/docs/Termonad-Config.html. There is an issue open about taking argument on the command line: https://github.com/cdepillabout/termonad/issues/81
+1 for the -e
option please.
There is more specific information about this in https://github.com/cdepillabout/termonad/issues/81#issuecomment-721437644.
title. it would be handy to have them like every other terminal. -c and -t can be used to set a terminal class and name to facilitate finding, like making scratchpad sessions and make just them transparent with picom. -e is self explanatory, to have something executes as soon as termonad start.