Skip to content

Mintty wish list #600

Closed
Closed

Description

@mintty

Yet again I'm reserving a "round" issue number for a general mintty discussion topic.
The "Mintty discussion" issue (#500) wasn't too successful after a while but let's try once more.

Activity

  1. pmopmo commented on Oct 21, 2016

    @pmopmo

    I would like to have an option to tell mintty to strip tailing whitespace (especially line-breaks) when pasting.

  2. mintty commented on Oct 21, 2016

    @mintty
    OwnerAuthor

    That's not transparent for all applications, some may expect pasted text verbatim. Also, stripping line breaks would smash words together, like:
    is
    this
    desired?
    -> "isthisdesired?"
    I think such a function would be in the scope of applications.

  3. pmopmo commented on Oct 21, 2016

    @pmopmo

    Only the last white-space of an input should be stripped. So in your example only white-space after the question mark would be removed.

    This request is mainly to stop accidentally running commands when copy/pasting

    If I for example copied this below in mintty and wasn't paying attention I might select the whole line (that would include a newline)

    for N in 1 2 3; do echo $N; done

    And then when I paste it it gets executed. If trailing white-space was stripped only the command would be pasted and I would have to execute it myself by pressing newline.

    I got used to this feature a few years ago when using iTerm2 on osx

  4. mintty commented on Oct 21, 2016

    @mintty
    OwnerAuthor

    So you only want to strip a final newline, not trailing space (which would not get copied in this case anyway). I think that's an option that can be introduced.

  5. kangjianbin commented on Oct 25, 2016

    @kangjianbin
    Contributor

    Seperate UI code to make it easy to port to other platform (GTK/QT et, al).

  6. mintty commented on Oct 25, 2016

    @mintty
    OwnerAuthor

    Actually, X11 backend code was deliberately stripped off from putty when mintty was once derived as a dedicated easy-to-configure terminal for cygwin.
    The platform-independent GUI framework is still largely intact, although later enhancements may break it sometimes because the abstraction was not verified anymore. Easy to repair, probably.
    A little bit harder to handle, there were other enhancements about window integration, font configuration, character layout, and the like, that include Windows specifics more entwined with the terminal code.

    However, I would be willing to support such a plan, especially if based on something portable already rather than X11 directly. But I'm not going to investigate that platform stuff myself. So my offer: if anyone familiar with, say, GTK, wants to craft a mintty backend for it, we can cooperate to port mintty to that backend.

  7. BrianInglis commented on Oct 28, 2016

    @BrianInglis

    Suggest ignoring case in X colours (as recommended in X docs) by changing the config.c(parse_colour) comparison about line 532 to use strcasecmp instead of strcmp?
    Suggest allowing American spelling Color as well as current Commonwealth English spelling Colour of config options in config.c(options[]) around lines 163-283 by duplicating options with variant spelling, as they (and I) are unused to colour being spelled properly in programs? ;^>
    I encountered these issues when creating aliases to spawn mintty windows with reversed fg/bg colours from my defaults, for weather displays using ASCII art ( @chubin/wttr.in) and UTF-8 ( @ways/pyyrascii/graph.sh) symbols.

  8. mintty commented on Oct 28, 2016

    @mintty
    OwnerAuthor

    ignoring case in X colours (as recommended in X docs)

    Please point out the respective clause, then I'll adapt to it.

    Colour: hesitating; this has been long tradition with mintty. I don't see what spelling has to do with weather reports; anyway, if you make scripts around tools, you'll always have to check the respective options precisely, nothing unusual here.

  9. BrianInglis commented on Oct 29, 2016

    @BrianInglis

    On 2016-10-28 15:29, mintty wrote:

    ignoring case in X colours (as recommended in X docs)
    

    Please point out the respective clause, then I'll adapt to it.

    TL;DR: X colour names may be specified at least in: lower case
    with or without spaces; and Title Case with or without spaces
    e.g. antique white, antiquewhite, AntiqueWhite, Antique White
    are all valid in most contexts; some may not allow for space
    separated colour names. Most implementations ignore case.

    My original O'Reilly X refs (with other historical reports
    including Algol 60, 66, 68 and Pascal) were donated by my wife
    or mother-law during basement cleanups, but the Internet Archive
    has them online (below), and they state the colour names may be
    used as given, or in mixed case with initial capitals, and spaces
    removed.

    In X11 R2 and R3 below, the names were given only in lower case
    English, with both spellings of gray/grey, the intent being that
    localized versions could be added or substituted; R4 added
    CamelCaps spellings:

    X11 Xlib Reference Manual Appendix D Color Database p537ff
    https://archive.org/stream/xlibretmanver1102nyemiss#page/536/mode/2up
    X11 Xlib Reference Manual 2nd ed. Vol 2 Appendix D The Color Database p589ff
    https://archive.org/stream/xlibrefmanv115ed02nyemiss#page/588/mode/2up

    The implementations however stored the names in dbm in lowercase,
    and converted the requests to lowercase, and later the requirement
    was added allowing the colour names to be given in ISO Latin1,
    requiring the lowercase conversion to also handle Latin1 accented
    characters, as can be seen in the logs for the following, which
    were converted from original X.org RCS to git:

    X11R6 oscolor.c
    https://cgit.freedesktop.org/~alanc/xc-historical/tree/xc/programs/Xserver/os/oscolor.c
    X11R6 rgb.c
    https://cgit.freedesktop.org/~alanc/xc-historical/tree/xc/programs/rgb/rgb.c
    X11R6 rgb.txt
    https://cgit.freedesktop.org/~alanc/xc-historical/tree/xc/programs/rgb/rgb.txt

    Solaris also documents this.

    X11 Solaris Color Name Database
    https://docs.oracle.com/cd/E19455-01/806-1363/serverintro-25/index.html

    Wikipedia also mentions this but fails to cite it, although
    demonstrates it by using the names in Title Case with spaces,
    where those names are supported by the colour names available,
    as it states:

    X11 Color Names
    https://en.wikipedia.org/wiki/X11_color_names

    I still have a couple of X references, Johnson/Reichard 1992 using
    only lower case in examples, with and without spaces, recommending
    that spaces not be used when specifying X resources; the other uses
    only Title Case with spaces in examples, as in Wikipedia.

    Modern X server implementations build in the colour names and use
    str[n]casecmp, as I suggested for mintty:

    X server oscolor.c
    https://cgit.freedesktop.org/xorg/xserver/tree/os/oscolor.c

    |Colour|: hesitating; this has been long tradition with mintty. I
    don't see what spelling has to do with weather reports; anyway, if
    you make scripts around tools, you'll always have to check the
    respective options precisely, nothing unusual here.

    As developers, we have become accustomed at the muscle memory level
    to typing words differently from our common cultural usage, and as
    our brains read words not letters, we may not pick up minor spelling
    differences, unless it jars our cultural sensibilities as it
    apparently does for some Americans and English.

    X consistently uses the American spelling "color" so it would
    accommodate those expecting X-like usage, like myself, and those
    who learned English from American sources, unlike most Europeans,
    similarly to supporting gray/grey in color names, which are both
    accepted in American English and allowedin British English.
    Consider it another addition to your interface I18N.

    The weather reports were mentioned as the application reason for
    spawning a mintty window, where both the resource name spelling
    and the colour name capitalisation were unexpected interface
    issues that could be ameliorated easily, with no downsides.

    Unless you would prefer to automatically add the config ...Color
    options from all existing ...Colour options as part of the build
    process by moving the options into a separate file to allow e.g.
    ADD_COLOR='s/^(\s_{\s_"[^"])Colour(.)$/&\n\1Color\2/'
    options.t: options.txt
    sed "$$ADD_COLOR" $^ > $@
    or something more elaborate to allow updating options in man pages,
    configs, and other docs as part of the process.

    This could be staged as three or more changesets: one to make
    colour name comparison case insensitive, one to add Color config
    options in config.c, another to split options into include file
    say options.t, more to generate include file options.t from
    options.txt, then also generate other related includes or files,
    depending on how you want to architect and design the sources and
    generated files.
    You could provide guidelines and/or I could generate pull requests
    and/or patches for changes and get your feedback.

    Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

  10. mintty commented on Oct 30, 2016

    @mintty
    OwnerAuthor

    Colour name casing: actually my request was to

    Please point out the respective clause, then I'll adapt to it.

    I've opened all your links but found nothing in an X spec except the Solaris one that states this. Anything in a common X spec would be convincing.

  11. BrianInglis commented on Oct 30, 2016

    @BrianInglis

    On 2016-10-30 09:50, mintty wrote:

    Colour name casing: actually my request was to

    Please point out the respective clause, then I'll adapt to it.
    

    I've opened all your links but found nothing in an X spec except the
    Solaris one that states this. Anything in a common X spec would be
    convincing.

    The first two links to the Internet Archive Xlib refs for X11R2-4
    Appendix D Color Names have the same statement in the last paragraph
    on the right hand page, mentioned in the summary:

    X11 Xlib Reference Manual Appendix D Color Database p537ff
    https://archive.org/stream/xlibretmanver1102nyemiss#page/536/mode/2up
    X11 Xlib Reference Manual 2nd ed. Vol 2 Appendix D The Color Database p589ff
    https://archive.org/stream/xlibrefmanv115ed02nyemiss#page/588/mode/2up

    The next three links demonstrate the original practice, and the last
    link in the post the current practice, in the reference implementations
    from X.org.

    X11R6 oscolor.c
    https://cgit.freedesktop.org/~alanc/xc-historical/tree/xc/programs/Xserver/os/oscolor.c
    X11R6 rgb.c
    https://cgit.freedesktop.org/~alanc/xc-historical/tree/xc/programs/rgb/rgb.c
    X11R6 rgb.txt
    https://cgit.freedesktop.org/~alanc/xc-historical/tree/xc/programs/rgb/rgb.txt

    X server oscolor.c
    https://cgit.freedesktop.org/xorg/xserver/tree/os/oscolor.c

    Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

  12. mintty commented on Oct 30, 2016

    @mintty
    OwnerAuthor

    Ah, thanks. I hadn't read the text but tried to search for "case" which doesn't work in that presentation.
    Two notes for the records:

    • The wording "form shown or in mixed case" is actually already reflected in the database (e.g. both "blue violet" and "BlueViolet" are listed explicitly) but not completely (e.g. "Aquamarine" is not listed).
    • Arbitrary or full upper-case (e.g. "BLUE") would strictly not be covered by the wording but that's a minor issue.

    Will change as requested.

  13. BrianInglis commented on Oct 31, 2016

    @BrianInglis

    On 2016-10-30 15:00, mintty wrote:

    Ah, thanks. I hadn't read the text but tried to search for "case"
    which doesn't work in that presentation.
    Two notes for the records:

    • The wording "form shown or in mixed case" is actually already
      reflected in the database (e.g. both "blue violet" and "BlueViolet"
      are listed explicitly) but not completely (e.g. "Aquamarine" is not
      listed).
    • Arbitrary or full upper-case (e.g. "BLUE") would strictly not be
      covered by the wording but that's a minor issue.

    Will change as requested.

    Cheers!

    Just managed to find the latest X.org docs, which have been reorganized
    to move the DocBook sources to the same modules as the source code,
    so colour name mapping is now documented with the functions:

    https://www.x.org/releases/X11R7.7/doc/libX11/libX11/libX11.html#Mapping_Color_Names_to_Values

    which all say "Use of uppercase or lowercase does not matter." following
    the caveat "If the color name is not in the Host Portable Character Encoding,
    the result is implementation-dependent." requiring ASCII names for consistency.

    Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

  14. mintty commented on Nov 12, 2016

    @mintty
    OwnerAuthor

    Released case-insensitive X11 color names in 2.7.0.

  15. 53 remaining items

  16. mintty commented on Feb 18, 2018

    @mintty
    OwnerAuthor

    each window's location and size are not maintained

    See my previous comment: If it doesn't for a specific situation, please describe it and I'll look into whether it can be improved.

    What both Jonathan and myself are looking for ...

    I know what you're looking for but consider the implications, see e.g. #8 (comment)

    I couldn't change each tab's content nicely without hacking around.

    That's the point. The issue is not just about creating multiple tabs but also maintaining each tab's integrity as a terminal.

    I'm sure someone with experience in that could achieve this in a couple of hours.

    Could be. So please hire someone with that experience. And experience with terminal code at the same time, for that matter.

  17. JonathanHolvey commented on Feb 19, 2018

    @JonathanHolvey

    @mintty I wasn't aware of the SessionGeomSync=4 option. You're right, it does virtually what I was asking for, albeit in a fairly clunky way. All the windows are moved to the same location after a mouse event on the window border (I assume).

    It does seem to have problems with keyboard shortcuts for multi-monitor setups; for example Win+Shift+→ (on Windows 7 at least) will split the location of two windows until one is focused using the mouse.

    Personally, I think you're right not to clutter the UI with actual tabs (this is what I meant by GUI complexity), since 99% of input is achieved using the keyboard when using a console program. However, it would be nice to have all the 'tabs' living in a single window.

    I understand there are restrictions that make this difficult to achieve, and I'm not pressuring for it to be implemented. I just wanted to get it down onto the wish list, and to find out if it would be easier than an actual tabbed interface.

    Cheers 😃

  18. JonathanHolvey commented on Feb 19, 2018

    @JonathanHolvey

    Incidentally, I've just discovered that it is actually possible to run Mintty inside ConEmu, as a ChildGUI. This means that ConEmu can be used to manage multiple Mintty windows as tabs, provided they are spawned using a command external to ConEmu and Mintty, or using ConEmu's context menus.

    Most of ConEmu's keybindings are overridden and passed directly to the child process (Mintty in this case) so Ctrl+T doesn't work to create a new tab. Alt+F2 results in a new Mintty window outside of ConEmu, so that can't be used either.

    Edit: The Ctrl+Tab keybinding is also consumed by Mintty, not ConEmu, so you can't actually use it to switch between tabs. An alternative using the Win key could potentially be set up, or AutoHotkey could be used to translate the keys, however this would be getting a bit messy.

  19. mkq commented on Mar 2, 2018

    @mkq

    I also gave ConEmu a (second) try a few months ago and am quite happy with it since. My workaround for tab switching is:

    • mintty: disable Ctrl+[Shift+]Tab
    • ConEmu: enable Main / Tab bar / Internal CtrlTab
    • ConEmu: under Keys & Macro, bind "Set focus to ConEmu" to Alt+Shift+Backspace
      and "Set focus to child GUI application" to Ctrl+Shift+Backspace
    • run the following Autohotkey script; I included three sets of hotkeys: [Ctrl+Tab] / [Ctrl + Shift + Tab], [Ctrl + PageDown] / [Ctrl + PageUp], [Ctrl + Period] / [Ctrl + Comma]. The latter are the ones I actually use; the others are barely tested but should work.
    #SingleInstance force
    
    #IfWinActive ahk_class VirtualConsoleClass ahk_exe ConEmu64.exe
    ^+Tab::
    ^PgUp::
    ^,::
    	BlockInput Send
    	Send !+{backspace}
    	Sleep 4
    	Send ^+{tab}^+{backspace}
    	BlockInput Default
    	return
    ^Tab::
    ^PgDn::
    ^.::
    	BlockInput Send
    	Send !+{backspace}
    	Sleep 4
    	Send ^{tab}^+{backspace}
    	BlockInput Default
    	return
    
    #IfWinActive
    

    I don't open new tabs often, so I don't mind using the mouse for it. But you could do [Alt+Shift+Backspace], [Alt + Space] to open ConEmu's system menu, and then hit [Down], [Enter].

  20. mintty commented on Mar 2, 2018

    @mintty
    OwnerAuthor

    I was struck back more than once already by ConEmu's unwieldy configuration. Also it has other drawbacks; mouse message handling is buggy (see #724), Alt+F2 does not behave well.
    If you have a working ConEmu configuration that's fine for you. I don't think it's in a state to be promoted in the mintty project, though.

  21. mintty commented on Apr 12, 2018

    @mintty
    OwnerAuthor

    Released 2.8.5 which supports emoji style precedence using text attribute SGR 51/52 and displays emoji sequence short names in Character Info mode.

  22. mintty commented on May 11, 2018

    @mintty
    OwnerAuthor

    @JonathanHolvey, I've tried to enable Win+Shift moving of tab sets (if SessionGeomSync ≥ 2); uploaded to repository. Please try if possible.

  23. mintty commented on Jun 12, 2018

    @mintty
    OwnerAuthor

    I'm closing this issue which has meanwhile become too long to keep an overview, in favour of a new general chat issue #777.
    Feel free to enter any remaining questions or proposals again there or in a new issue.

  24. mintty commented on Jul 1, 2018

    @mintty
    OwnerAuthor

    Released 2.9.0.

  25. silentbugs commented on Jul 1, 2018

    @silentbugs

    @mintty I'd like to let you all know that windows will be adding a feature called "Sets" which will allow for tabbing multiple applications and it's exactly what we were looking for with mintty's tabs. Here's an early preview video by Microsoft demonstrating Sets.

  26. silentbugs commented on Jul 2, 2018

    @silentbugs

    @Biswa96 It was only removed from the current release for further development, it wasn't cancelled, which means we can ignore tabs as Microsoft will be kind enough to provide it for us.

    Per the blog post you linked:

    Thank you for your continued support of testing Sets. We continue to receive valuable feedback from you as we develop this feature helping to ensure we deliver the best possible experience once it’s ready for release. Starting with this build, we’re taking Sets offline to continue making it great. Based on your feedback, some of the things we’re focusing on include improvements to the visual design and continuing to better integrate Office and Microsoft Edge into Sets to enhance workflow. If you have been testing Sets, you will no longer see it as of today’s build, however, Sets will return in a future WIP flight. Thanks again for your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions