aboutsummaryrefslogtreecommitdiff
path: root/src/widget/augment/StatusLine.qml
blob: 56b0b31d55440d503c24b51e7365ccb3b3bba77e (plain)
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
import QtQuick 2.0
import QMLTermWidget 1.0
import QtQuick.Layouts 1.1

Item {
	id: item

	property QMLTermSession session : null

	function update() {
		var shellPID = session.getShellPID();

		pid.text              = shellPID;
		workingDirectory.text = cwd.currentOfPID(shellPID);
	}

	height: wrap.height

	RowLayout {
		id: wrap

		anchors.right: parent.right
		anchors.left:  parent.left

		Layout.alignment: Qt.AlignRight

		spacing: 5

		Rectangle {
			Layout.fillWidth: true

			anchors.fill: wrap

			color: settings.terminal.statusBackground
		}

		Text {
			id: pid

			Layout.rightMargin:  4
			Layout.bottomMargin: 2

			font {
				family:    settings.terminal.fontFamily
				pointSize: settings.terminal.fontSize
			}
			color: settings.terminal.statusFontColor
		}

		Text {
			Layout.rightMargin:  4
			Layout.bottomMargin: 2

			font {
				family:    settings.terminal.fontFamily
				pointSize: settings.terminal.fontSize
			}
			color: settings.terminal.statusFontColor

			text: "@"
		}

		Text {
			id: workingDirectory

			Layout.rightMargin:  4
			Layout.bottomMargin: 2

			font {
				family:    settings.terminal.fontFamily
				pointSize: settings.terminal.fontSize
			}
			color: settings.terminal.statusFontColor
		}
	}
}