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

Bring tty version to functional parity with wx version as close as possible #1101

Open
unxed opened this issue Oct 10, 2021 · 12 comments
Open

Comments

@unxed
Copy link
Contributor

unxed commented Oct 10, 2021

Some users do not want to leave their preferred terminal apps. Making tty version better will bring greater experience for such users, spreading far2l usage wider. Most of this work is already done, but there are still some minor issues left.

  1. ✓ Complex hotkeys, like Ctrl+Shift+arrows. Already supported in terminal. Single ESC press — also supported.
    More complex hotkeys: needs terminals support
    ❗GNOME — GNOME Terminal, uses GNOME VTE, https://gitlab.gnome.org/GNOME/vte/-/issues/2601
    ❗KDE — Konsole, https://bugs.kde.org/show_bug.cgi?id=484044
    ❗XFCE — xfce4-terminal, uses GNOME VTE
    ❗LXDE — LXTerminal, uses GNOME VTE
    ❗LXQT — qterminal, ?
    keydown/keyup events — Isn't this functionality used in far2l for F* key suggestions only?
    Needs terminal support, see links above.
    ✓ Can be solved by capturing X input, see better keyboard support in ttyx mode #1126
    ✓ Possible in some terminals, see support "rich keyboard" protocols by iTerm2/kovidgoyal's kitty/Windows Terminal #1575
    ❗kitty users need some help on freeing some hotkeys:
    on first start of far2l in kitty display help on freeing some hotkeys  #2551
    Allow kitty users to enable handling of Ctrl + navigation keys by far2l in a single key press #2562
    ❗Help on kitty config should be in locale-specific language
    Detect language automatically on 1st run #2561
    ✓problems with putty4far2l under Wine, fixed in recent putty4far2l by unxed
    https://bugs.winehq.org/show_bug.cgi?id=57513

  2. ✓ Mouse. Also already works in terminal.

  3. ✓ Some terminal apps and DEs intercept some hotkeys used by far2l. It may be disabled in their settings (instructions on doing this may be added to far2l help optionally).
    See https://github.com/elfmz/far2l/pull/2291
    https://github.com/unxed/far2ltricks/tree/main/unbindkeys

  4. ✓ X clipboard access
    fallback to xclip as clipboard access method in TTY backend if far2l extensions are not available #810
    Fallback clipboard set method is OSC 52
    support OSC 52 clipboard access escape sequences #641
    ❗ttyx module replacement for Wayland API
    ttyx module replacement for Wayland API #2040

  5. ✓ Desktop notifications
    ✓ Fall back to notify-send if far2l extensions are not available
    ✓ Via ssh: connect by ssh inside locally started far2l
    ❗Also possible via ESC sequences in some terminals:
    use ESC sequences to send notifications in tty if notify-send is not available #2537
    ❗putty4far2l and KiTTY also need notifications support:
    Implement system tray notifications ivanshatsky/putty4far2l#8
    Implement system tray notifications unxed/putty4far2l#6
    Fixed cross-compilation on Linux; tray notifications support for far2l; fix far2l under Wine cyd01/KiTTY#536

  6. ✓ Cursor shape. There are escape seqs for modifying it:
    https://unix.stackexchange.com/questions/49485/escape-code-to-change-cursor-shape
    https://iterm2.com/documentation/2.1/documentation-escape-codes.html
    ❗Setting cursor type in Linux kernel console (and probably in iTerm2):
    better cursor shaping support #2572
    ❗Setting cursor type in FreeBSD kernel console:
    Support cursor shaping in FreeBSD kernel console #2571
    Maybe we should make default cursor size 2px or 3px as in wx version, not 1px. Possible in kernel consoles only

  7. ❌ BeginConsoleAdhocQuickEdit, GetLargestWindowSize, SetConsoleWindowMaximized
    ❌ BeginConsoleAdhocQuickEdit — can be done by terminal emulators theirselves
    ❌ GetLargestWindowSize, SetConsoleWindowMaximized —
    Possible in xterm:
    https://invisible-island.net/xterm/ctlseqs/ctlseqs.html (look for "Window manipulation" string)
    ❌ kitty issue: Support Window manipulation ESC sequences kovidgoyal/kitty#8107

  8. SetFKeyTitles
    implement "Set Touch Bar Key Labels" for iTerm2 #2549

@elfmz
Copy link
Owner

elfmz commented Oct 10, 2021

It will never be just like, and these small lacks there and here will kill all taste of FAR:) FAR is good not cuz to its FAR, but cuz has many little things that makes life easier - spirit of (old good) Windows apps that was lost sometime/sometime :( Just few examples:
1 Complex hotkeys are not distinguishing left and right Ctrl - this is must have to use bookmarks fluently, also not all terminals works same (good/bad) and from my experience no one terminal supports really all possible combinations.
4 Vertical text blocks copy-pasting will be lost (although may think about prefixing text with some magic pattern that would declare clipboard data format).
7 BeginConsoleAdhocQuickEdit is context dependent - if you click on command line or background you've getting auto-copy behaviour, if you're clicking inside editor or panels - you're will get some different functionality.
8/9 you wrote yourself

BTW far2l is TUI application regardless if it uses GUI(WX) or TTY backend.

@unxed
Copy link
Contributor Author

unxed commented Oct 11, 2021

Of course, it's best to keep maximum of the UX of Windows Far, and it makes sense to offer wx version by default in all cases then X is available.

At the same time, we already offer a tty mode, and if this mode spoils the impression of far2l, it will hardly spoil it more with xclip support for example :)

@Katarn
Copy link

Katarn commented Oct 18, 2021

I'm used FAR in drop-down, quake-style terminals - both on Windows and on Linux. The WX version cannot be integrated into such terminals in any way. Therefore, I fully support the author of the topic - it would be very good if the headlights for the terminal were as close as possible to the supported functions with the WX version.

@unxed unxed changed the title Bring TUI version to functional parity with GUI version as close as possible Bring tty version to functional parity with wx version as close as possible Oct 18, 2021
@unxed
Copy link
Contributor Author

unxed commented Dec 1, 2021

X interactions in TTY mode (clipboard, keyboard modifiers probing) are complete!
126a52b

elfmz added a commit that referenced this issue Dec 11, 2021
…rotocol improvements; classic TTY - shape of cursor (touch #1101)
@unxed
Copy link
Contributor Author

unxed commented Dec 12, 2021

window management (maximization, etc):
https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
look for "Window manipulation" string

@unxed
Copy link
Contributor Author

unxed commented Dec 28, 2021

Ctrl[+Shift]+digits now working in terminals in new ttyxi mode, great! NB, for slow/unstalbe connections it's better to run remote far2l inside local far2l to use far2l terminal extensions for smoother input.

@unxed
Copy link
Contributor Author

unxed commented Jan 2, 2022

some usage stats from far2l russian chat (~30 votes total)

Снимок экрана от 2022-01-02 03-53-57

@unxed
Copy link
Contributor Author

unxed commented Mar 30, 2023

keydown/keyup events — no alfernative for terminal, I afraid

Now possible at least for:
iTerm2
kovidgoyal's kitty
Windows Terminal

Details here: #1575

@unxed
Copy link
Contributor Author

unxed commented Nov 25, 2024

Desktop notifications. We may fall back to notify-send if far2l extensions are not available

Implemented in #2528

@unxed
Copy link
Contributor Author

unxed commented Nov 25, 2024

GNOME developers are open to add some advanced keyboard protocol in GNOME Terminal:
https://gitlab.gnome.org/GNOME/vte/-/issues/2601#note_2240554

@unxed
Copy link
Contributor Author

unxed commented Dec 7, 2024

First post updated. Actual Usage Stats (Multi-Choice Poll)
https://t.me/far2l_ru/35792

@unxed
Copy link
Contributor Author

unxed commented Dec 14, 2024

Ubuntu 24.04 LTS has two more terminal emulators with kitty keyboard protocol support:
https://packages.ubuntu.com/noble/alacritty
https://packages.ubuntu.com/noble/foot (Wayland only!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants