Draft: Embedded terminal
It's been quite a while since it was possible to use the built-in terminal extension in Nautilus. For some people, including myself, using a file manager without an embedded terminal is not practical. The terminal remains hidden and doesn't bother anyone, but pressing F4 provides the convenience of a terminal that follows the file manager's current directory.
I tried making minimal changes to the Nautilus code, just enough to embed a terminal that is pleasant to use.
This commit introduces an embedded terminal feature into the Nautilus window slot using the VTE GTK4 library.
Key changes:
- Added vte as a dependency.
- Created a new NautilusTerminalWidget.
- Refactored NautilusWindowSlot layout to use a GtkPaned (vertical), placing the terminal in the bottom pane.
- Added a toggle-terminal stateful GAction, triggered by the F4 key, to show/hide the terminal.
- The terminal is lazily instantiated when first shown and starts in the slot current location.
- Implemented two-way directory synchronization:
- Changing directory via the terminal change-directory signal updates the Nautilus slots location.
- Changing the Nautilus slots location property updates the terminals current directory.
- Added focus handling:
- Terminal grabs focus when shown via F4.
- Content view regains focus when terminal is hidden.
- Focus is managed during directory changes initiated from either Nautilus or the terminal to provide a smooth user experience.
