Drop down mode - #673
Conversation
|
Hang in there @timbz - the lack of a decent drop down terminal is one of the things preventing me switching my main development machine to cosmic, and I'm hopeful this will be accepted or at least spur development in this missing feature. It's discouraging to see that there has been no acknowledgement from the devs though :-( |
…d behavior if not used Behavior on first launch: create a surface, add a signal handler, render the terminal into that overlay surface Behavior on later launches: find the process that was launched with "--drop-down" and send a signal to it (currently via spawning a process) Handle USR1 signals for toggling dropdown Custom right click context menu in dropdown mode, as maximizing makes no sense Added setting: A secondary show-headers-dropdown that's only visible in drop down mode Added setting: The height of the dropdown in px, I'd like to do relative but to my understanding wayland doesn't trivially allow that Bug byepass in iced: When creating the overlay without any delay, the window is transparent but not "frosted" This is hugely based on pop-os#673 and just rebased and refactored, as various menu things were broken for me. I think this MR is relevant, because people are already vibe coding a non-working version of this: https://github.com/M0Rf30/cosmic-ext-quake-terminal This was partially created with the help of AI.
…d behavior if not used Behavior on first launch: create a surface, add a signal handler, render the terminal into that overlay surface Behavior on later launches: find the process that was launched with "--drop-down" and send a signal to it (currently via spawning a process) Handle USR1 signals for toggling dropdown Custom right click context menu in dropdown mode, as maximizing makes no sense Added setting: A secondary show-headers-dropdown that's only visible in drop down mode Added setting: The height of the dropdown in px, I'd like to do relative but to my understanding wayland doesn't trivially allow that Bug byepass in iced: When creating the overlay without any delay, the window is transparent but not "frosted" This is hugely based on pop-os#673 and just rebased and refactored, as various menu things were broken for me. I think this MR is relevant, because people are already vibe coding a non-working version of this: https://github.com/M0Rf30/cosmic-ext-quake-terminal This was partially created with the help of AI.
…d behavior if not used Behavior on first launch: create a surface, add a signal handler, render the terminal into that overlay surface Behavior on later launches: find the process that was launched with "--drop-down" and send a signal to it (currently via spawning a process) Handle USR1 signals for toggling dropdown Custom right click context menu in dropdown mode, as maximizing makes no sense Added setting: A secondary show-headers-dropdown that's only visible in drop down mode Added setting: The height of the dropdown in px, I'd like to do relative but to my understanding wayland doesn't trivially allow that Bug byepass in iced: When creating the overlay without any delay, the window is transparent but not "frosted" This is hugely based on pop-os#673 and just rebased and refactored, as various menu things were broken for me. I think this MR is relevant, because people are already vibe coding a non-working version of this: https://github.com/M0Rf30/cosmic-ext-quake-terminal This was partially created with the help of AI.
|
i rebased and refactored this, i'd be happy for any feedback, especially on the comments I put there |
Hello! I've tried this on Fedora 44, works for me, thanks for your efforts. Bug in find_existing_dropdown_pid – single-instance toggle always fails // After: |
|
I'm not sure i understand the feedback regarding the But my Is it possible you are on an old version? I have force push squashed the branch as there was some messy stuff inbetween.
I don't understand what you mean here, neither my nor timbz code interacts with fonts at all? (Even though a very strong font filtering currently seems to exist, i can confirm that but that's not related to this branch?
I'll quickly work that one out, i had that already working in the process but I think I broke it in some refactoring. For some reason, the mouse over effect of these buttons already works (see screenshot in my mr), they just don't seem to properly react any more |
|
i managed to fix the menu bar in a diff as minimal as possible (i think) as "Layer surface can't create popup submenus" is not fully correct for cosmic. Sadly, I can't screenshot it (with cosmic-screenshot, at least) because the screenshot tool overlay interfers with the surface menu overlay. Edit: I also rebased on the current master and it'd be ready to review/merge. |
…d behavior if not used Behavior on first launch: create a surface, add a signal handler, render the terminal into that overlay surface Behavior on later launches: find the process that was launched with "--drop-down" and send a signal to it (currently via spawning a process) Handle USR1 signals for toggling dropdown Custom right click context menu in dropdown mode, as maximizing makes no sense Added setting: A secondary show-headers-dropdown that's only visible in drop down mode Added setting: The height of the dropdown in px, I'd like to do relative but to my understanding wayland doesn't trivially allow that Bug byepass in iced: When creating the overlay without any delay, the window is transparent but not "frosted" This is hugely based on pop-os#673 and just rebased and refactored, as various menu things were broken for me. I think this MR is relevant, because people are already vibe coding a non-working version of this: https://github.com/M0Rf30/cosmic-ext-quake-terminal This was partially created with the help of AI.
Sorry for a confusion, probably I messed with git a bit, that's probably another PR not yours, sorry. |
|
no the menu bar was a real problem, because a regular responsive_menu_bar has the problems you described, but a menu::bar is fine, so that was a real issue / regression |
This PR adds a drop-down mode, similar to terminals like Guake or Tilda. This feature is substantial to my workflow and I thought others might find it useful as well.
To use it, create a custom shortcut in COSMIC Settings with the command
cosmic-term --drop-down.The first invocation launches the drop-down terminal, subsequent calls toggle it show/hide. Only one instance runs at a time.
I'm still learning Rust, so please be gentle with feedback. I'd love to hear if this is something you'd be interested in merging, or if you'd prefer a different approach for this functionality. Happy to iterate on any suggestions for improvement!