-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
Keybind to open an input box where user can change title of terminal window #296
Comments
I like the CLI extension proposal! With regards to setting title via popup, also possible, but what do you think about extending the CLI for that, too? such as: wrt popup, I think that could also go in hand with the command palette idea, so people do not need to remember yet another keybind but just trigger command palette, type in |
Alternative solution 2: 😄 profiles:
ncspot:
title: "ncspot"
app_trigger:
# pattern can be shell-like or regex
- { pattern: "ncspot", action: ChangeProfile, name: "ncspot" }
#- { pattern: "ncspot", action: SetTitle, name: "ncspot" }
Or via built-in (or in new our repository) TUI-based configuration editor. E.g. using https://github.com/ArthurSonzogni/FTXUI. |
wrt FTXUI, whenever I see the idea of having some TUI based feature, I feel like that's best of done as a (standalone) TUI executable. (I definitely do like that library's API design choice though) @whisperity what kind of use-cases do you have in mind. How much would the title differ from the command being executed? To be fair, I currently do not remember but it might make sense to default the title to the shell command (+ parameters), in case the executed command is not setting it explicitely, one at least has something descriptive. |
To be fair, the two ideas that came to my mind currently are Other use-cases would be tagging a terminal with things like "debug prompt" or "main editor", but these commands I usually start from a shell anyways so I can -- in theory, at least -- tinker with some escape sequences (or use |
Windows Terminal handles this by allowing users to click on the tab and type another name. You can also define it in the settings for a particular profile or disable the title entirely. This also includes using their cli to change it if a user wants when they launch a profile. Contour can probably do similar but from QT perspective. |
Exactly. Except that we do not have tabs YET. :) |
Sounds like tab support is needed first then with this issue as the follow-up. |
How do tabs work when there is only one tab? I'd prefer not to have the ugly tab selector bar or whatever that's always there in Konsole... A big upside of Contour for now is that the entire terminal is just one huge window with nothing taking up ugly additional space like menu bars (Gnome-Terminal, Konsole) or tab bars (Konsole, but at least Gnome-Terminal only shows that when there is multiple). The only ugly in Contour is the scrollbar but that seems to be more of a bug than a deliberately bad design choice. |
It will remain that way for single tab windows of course. At least it will be configurable |
There are ways to hide tabs altogether and simply use keybindings to switch between them. Not sure how that works in QT but I'm sure it's doable. |
We implemented tabs and user can set custom name to the tab using |
Abstract
Not every running binary care about setting up a proper terminal title. Especially when Contour is started directly with a TUI application as the inner process, bypassing a shell, such as with
contour
ncspot
orcontour aptitude
. The title of the window will be simply contour which is non-intuitive if you want to switch between windows on the taskbar or something.Motivation
The ability to open dialog boxes from Contour is already possible, given that we use Qt, and the permission system opens a dialog with some buttons. A similar dialog should be opened via a user-customisable keybind.
Specification
Add a new keybind action (and the related boilerplate and wiring) such as
ChangeTitleText
or something. When the user presses this, a dialogwindow with an inputbox (I'm going off of Visual Basic 5 terminology here, excuse me) opens, where the user might type in the new title. If clicking on "Okay" or "Save", the title of the window becomes what the user entered.Optional consideration: keep the user-entered title only until the underlying application (if any) decides to change the title.
In addition to this,
contour set
should be extended withcontour set title [string]
which achieves the same thing, in case the user is able to type directly into the terminal. (This can be the case if a stale application borked the title but we have an active shell, but isn't a case with full-size TUI programs likencspot
oraptitude
.)Alternative solutions
This solution is a quick fix to the issue at hand, but offers lesser functionality: in case contour is started directly with a TUI program, make sure the title of the running process matches the cmdline invocation verbatim, i.e. simply show
contour ncspot
.The text was updated successfully, but these errors were encountered: