Repository navigation
Expand file tree
/
Copy pathMain.qml
More file actions
95 lines (84 loc) · 2.45 KB
/
Copy pathMain.qml
File metadata and controls
95 lines (84 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Layouts
import QMLTermWidget
import QtQuick.Controls.Universal
import UniQmlTk
BaseWindow {
id: root
width: 1280
height: 1280
visible: true
disableSystemThemeManager: true
Component.onCompleted: {
root.Universal.theme = Universal.Dark;
}
Action {
onTriggered: terminal.copyClipboard()
shortcut: "Ctrl+Shift+C"
}
Action {
onTriggered: terminal.pasteClipboard()
shortcut: "Ctrl+Shift+V"
}
Action {
onTriggered: searchButton.visible = !searchButton.visible
shortcut: "Ctrl+F"
}
Action {
onTriggered: {
console.log('open new terminal window in:' + mainsession.currentDir);
}
shortcut: "Ctrl+Shift+T"
}
mainContent: RowLayout {
anchors.fill: parent
Item {
width: 20
}
ColumnLayout {
Layout.fillWidth: true
Layout.fillHeight: true
QMLTermWidget {
id: terminal
Layout.fillWidth: true
Layout.fillHeight: true
font.family: "JetBrainsMono Nerd Font"
font.pointSize: 12
colorScheme: "cool-retro-term"
session: QMLTermSession {
id: mainsession
initialWorkingDirectory: "$HOME"
onMatchFound: {
console.log("found at: %1 %2 %3 %4".arg(startColumn).arg(startLine).arg(endColumn).arg(endLine));
}
onNoMatchFound: {
console.log("not found");
}
}
onTerminalUsesMouseChanged: console.log(terminalUsesMouse)
onTerminalSizeChanged: console.log(terminalSize)
Component.onCompleted: {
mainsession.startShellProgram();
forceActiveFocus();
}
QMLTermScrollbar {
terminal: terminal
width: 20
Rectangle {
opacity: 0.4
anchors.margins: 5
radius: width * 0.5
anchors.fill: parent
}
}
}
Item {
height: 20
}
}
Item {
width: 20
}
}
}