Commit Graph

37 Commits

Author SHA1 Message Date
Matan Ziv-Av
b69a2b88ef Add a menu option for monitors to only notify once.
When this option is enabled, the monitors (prompt, activity, silence,
process termination) are disabled automatically after one notification.
2023-05-14 14:15:19 +00:00
Matan Ziv-Av
542a04560d Add "Monitor for Prompt" action
When semantic shell integration is enabled, Konsole will generate a
notification when a shell prompt is displayed.
2023-05-14 14:15:19 +00:00
Magno Lomardo
d3fa26f65b Add the context menu options to split the view left-right and top-bottom
FEATURE: 415724
2023-03-06 22:41:41 +00:00
Matan Ziv-Av
0375b56d74 Allow pressing Esc to quit keyboard selection mode 2023-02-24 00:18:16 +00:00
Waqar Ahmed
0a78bfe4ac Fix inconsistent dll linkage errors and warnings on windows 2023-02-23 23:53:26 +00:00
Matan Ziv-Av
f26f71db01 Add keyboard selection mode
Similar to screen copy/scrollback mode it allows browsing the scrollback
and selecting text.

Selection is done either by standard GUI shift+arrows, or `vi` style with
`v` starting/ending selection.

BUG: 100317
2022-10-03 10:46:46 +00:00
Luis Javier Merino Morán
416941b714 Snapshot session on focus, key press and output
Before 3d6c839b, sessions were snapshotted every 2 seconds, and also
half a second after the associated view received focus or a key press.
This second timer could theoretically be postponed indefinitely.

Commit 3d6c839b tries to save energy by not taking a snapshot every 2
seconds, and instead has a timer that fires half a second after any
event received by the application.

This commit goes back to the old behavior, but still without the 2
second timer, and also sets the half second timer after receiving the
Emulation::outputChanged signal, which is sent at a maximum 40ms after
the emulation receives data.  It also copies the idea from commit
3d6c839b of not restarting the timer if it's already started, since
otherwise, continuous output could postpone the timer indefinitely.
2022-07-05 08:59:55 +00:00
Matan Ziv-Av
d67de797b6 Allow filtered copy to clipboard
This adds three copy actions:
- Copy only user input
- Copy only command output
- Copy both (filter out shell prompts).
2022-07-03 07:58:54 +00:00
Benoît DÉCHAMPS
3d6c839bcd Do not snapshot session when idle
There is no reason for a tab title to change if there is no QT event.
So, instead of snapshoting session regularly, we do it only if there is
some QT events. To catch all QT events an event handler is installed on the
QCoreApplication instance.
2022-05-30 07:13:57 +00:00
Ahmad Samir
33b3a1a7a7 Port away from using QObject::sender()
By passing the sender object as an arg to the signal/slot.
2022-05-24 13:02:59 +00:00
Tomaz Canabrava
b3eb91d3f7 Store the current hotspot under mouse
This is important if the actions need to access it later on
2022-02-05 15:13:58 +00:00
Luis Javier Merino Morán
5919c1fd0a Don't get the selection to check if it is empty
Every time the selection is changed, the selection text is retrieved to
check whether to enable or disable the copy actions. Besides that, the
selection text is also used for the web search context menu entries.

Better just check if the selection is empty and make a note that the
selection changed, so the next time the context menu is invoked it can
retrieve the current selection text, which should happen much less often
than selection changes.
2021-12-28 10:59:33 +00:00
Martin T. H. Sandsmark
fb35320cdc add action to disable/enable mouse tracking 2021-11-24 14:55:00 +00:00
Nathan Sprangers
29977a2364 Disconnect view/session after drag-and-drop
Adds a missing signal/slot connection for when a split-view is drag-and-
dropped to a new window. Use an existing method to handle it the same
way as drag-and-dropping or detaching a tab.

BUG: 442238
2021-11-15 14:02:05 +00:00
Fushan Wen
49ccf099c1 Make "Find Next/Previous" icons in Edit menu consistent with those in the search bar
There is an inconsistence in "Find Next/Previous" icons in Edit menu and
the search bar. Make sure they are consistent whenever "Search backwards"
is checked or not.

BUG: 443244
2021-10-07 14:33:08 +00:00
Ahmad Samir
97569b764c Run clang-format on the whole repo
Also install the relevant git hook.

GIT_SILENT
2021-09-06 12:51:39 +02:00
Ahmad Samir
40cf8519d7 For the fallback profile change the menu text to "Create New Profile"
This is less confusing; also matches what the code actually does.

BUG: 440885
FIXED-IN: 21.12
2021-08-31 23:47:11 +00:00
Jonah Brüchert
4a5e7a5644 Revert "TerminalDisplay: Move out common pasting related code"
This reverts commit 8e8b924353.
2021-07-06 21:15:06 +02:00
Jonah Brüchert
8e8b924353 TerminalDisplay: Move out common pasting related code 2021-06-24 08:39:46 +00:00
Ahmad Samir
94505d94d4 Make the "Edit Current Profile" dialog modal
This should prevent opening two instance of the EditProfileDialog in the
same process, i.e. if "run all konsole windows in a single process" option is:
- Enabled, then opening the dialog will block user interaction with all
  other konsole windows (including tabs).
- Disabled, then open the dialog will block user interactin with all
  other tabs in the same window

This simplifies the code since it checked if such a dialog was open
somewhere else to prevent crashes.
2021-03-23 16:55:35 +00:00
Christoph Cullmann
0bc553fd51 delete client builder before d-pointer of KXMLGUIClient is killed
BUG: 432421
2021-02-06 09:43:49 +00:00
Ahmad Samir
9eddcdb204 SessionController: use session() and view() member functions
They make reading the code easier than
_sessionDisplayConnection->view()/session().

GIT_SILENT
2020-12-13 14:08:52 +02:00
Ahmad Samir
11987c7ae4 Minor code optimisation
Pass Profile::Ptr by reference. Make some local vars const.
2020-12-02 04:05:31 +00:00
Gustavo Carneiro
be969f454b Add a new color filter to preview color in hotspot. 2020-11-21 20:18:46 +00:00
Kurt Hindenburg
62f091f0a3 Convert session to use SPDX license/copyright
https://community.kde.org/Policies/Licensing_Policy#SPDX_Statements
https://community.kde.org/Guidelines_and_HOWTOs/Licensing
2020-11-12 21:34:59 -05:00
Kurt Hindenburg
680e3dd13e Fix spelling issues 2020-10-25 20:38:28 -04:00
Gustavo Carneiro
81a3e4f77a Use SessionDisplayConnection. 2020-10-19 21:29:53 +00:00
Gustavo Carneiro
662d3ee947 Remove session folder in includes. 2020-09-28 02:01:03 +00:00
Gustavo Carneiro
1641d32cce Add konsole export session header. 2020-09-28 01:46:50 +00:00
Martin Hostettler
f4bc91f1f7 Match OSC reply sequence terminator to OSC request terminator.
Traditionally konsole only was able to parse OSC sequences terminated with
non-standard BEL. In 324d78c07f konsole was extended to parse sequences
terminated by 7-bit ST (ESC \) as well. But the OSC responses were still
hardcoded to reply only with sequences with BEL. But replying to 7-bit ST
terminated sequences with a reply terminated by a non-standard terminator
is wrong.

This commit passes the terminator along and changes the response to match
the original request.

printf "\033]10;?\a" replies with "^[]10;rgb:fcfc/fcfc/fcfc^G"
printf "\033]10;?\033\\" replies with "^[]10;rgb:fcfc/fcfc/fcfc^[\"
2020-09-26 14:11:11 +00:00
Tomaz Canabrava
faceafcc68 Extract URL from a Escape Sequence and provide a HotSpot for activation
This path adds a new feature for konsole, in the form of URL Escaped
Sequences. It allows programs to embbed URL's on texts much like
the anchor tag in html does

There's a allowed list of possible schemas for links, by default
it only accepts http://, https:// and file:// but the user can
add more if he wants.

The maximum amount of URL's accepted is 200, to prevent OOM

History is taken into account while scrooling
2020-08-12 08:20:58 +00:00
Tomaz Canabrava
12530124e8 Revert "Revert "Movo Session to a independent static library""
This reverts commit f4bf8a426b.
2020-08-09 15:27:18 +00:00
Tomaz Canabrava
f4bf8a426b Revert "Movo Session to a independent static library"
This reverts commit 4a0f1195b9.
2020-08-09 15:09:43 +00:00
Gustavo Carneiro
4a0f1195b9 Movo Session to a independent static library 2020-08-06 14:07:35 +00:00
Tomaz Canabrava
0478529c6f Move Profile related classes to it's own folder
This also allowed me to remove a few includes of Profile.h
around the codebase, that used Profile::Ptr. now the compilation
is a bit faster and also does not recompile things as often.
2020-07-27 19:14:53 +02:00
Gustavo Carneiro
07fa804a71 Separates the connection between session and display 2020-07-16 02:09:42 +00:00
Gustavo Carneiro
9b2e9731e0 move Session files to a new folder. 2020-07-15 09:30:42 +00:00