Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for --class, --title and -e #207

Open
formula-spectre opened this issue Nov 7, 2021 · 3 comments
Open

add support for --class, --title and -e #207

formula-spectre opened this issue Nov 7, 2021 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@formula-spectre
Copy link

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.

@cdepillabout
Copy link
Owner

cdepillabout commented Dec 24, 2021

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:

  • 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:

    -- Should probably use GI.Vte.Functions.getUserShell, but contrary to its
    -- documentation it raises an exception rather wrap in Maybe.
    mShell <- lookupEnv "SHELL"
    let argv = maybe ["/usr/bin/env", "bash"] pure mShell

    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: take arguments on the command line #81

@cdepillabout cdepillabout added the help wanted Extra attention is needed label Oct 16, 2022
@refaelsh
Copy link
Contributor

+1 for the -e option please.

@cdepillabout
Copy link
Owner

There is more specific information about this in #81 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants