Description
Currently, when viewing container logs in lazydocker, selecting text with the mouse is not as straightforward as it is in a normal terminal.
Because lazydocker captures mouse events for its TUI interactions, dragging the mouse over log output does not allow the terminal emulator to perform its normal text selection.
For example, if I want to copy a particular error from a container log, I cannot simply:
- Click at the beginning of the text.
- Drag the mouse over the lines I want.
- Copy the selected text.
Instead, I have to leave the normal lazydocker log view, use the m key to open the logs in the terminal, select the required text there, and then return to lazydocker.
This becomes particularly tedious when debugging containers and repeatedly copying small portions of logs.
Expected behavior
It would be useful if users could select text directly from the lazydocker logs view using the mouse, while still retaining the existing mouse interactions required by lazydocker.
Ideally, the interaction would be as simple as:
Mouse drag
↓
Select log text
↓
Copy selected text
without having to leave the lazydocker interface.
Possible approaches
I'm not sure what the best implementation would be, but a few possibilities could be considered:
- Allow native terminal text selection when dragging over log text. This would be the preferred behavior from a user perspective, as it would allow the terminal emulator to handle text selection using its existing functionality.
- Provide a configurable option to disable mouse capture for text selection. This could provide a fallback for users who prefer native terminal text selection over mouse-based interaction with lazydocker.
- Provide a dedicated "text selection mode" for the logs view. This could allow users to temporarily hand mouse interaction over to the terminal when they need to select and copy log output, while retaining normal mouse interactions otherwise.
The important part from a user perspective is being able to select and copy log output directly from the logs view without having to leave the lazydocker interface.
Environment
I encountered this while using lazydocker on Fedora Linux.
However, I suspect this may be related to how lazydocker handles mouse events in the terminal rather than being Fedora-specific.
Description
Currently, when viewing container logs in lazydocker, selecting text with the mouse is not as straightforward as it is in a normal terminal.
Because lazydocker captures mouse events for its TUI interactions, dragging the mouse over log output does not allow the terminal emulator to perform its normal text selection.
For example, if I want to copy a particular error from a container log, I cannot simply:
Instead, I have to leave the normal lazydocker log view, use the
mkey to open the logs in the terminal, select the required text there, and then return to lazydocker.This becomes particularly tedious when debugging containers and repeatedly copying small portions of logs.
Expected behavior
It would be useful if users could select text directly from the lazydocker logs view using the mouse, while still retaining the existing mouse interactions required by lazydocker.
Ideally, the interaction would be as simple as:
without having to leave the lazydocker interface.
Possible approaches
I'm not sure what the best implementation would be, but a few possibilities could be considered:
The important part from a user perspective is being able to select and copy log output directly from the logs view without having to leave the lazydocker interface.
Environment
I encountered this while using lazydocker on Fedora Linux.
However, I suspect this may be related to how lazydocker handles mouse events in the terminal rather than being Fedora-specific.