.
20 | */
21 | import QtQuick 2.0
22 | import org.kde.plasma.components 2.0 as PlasmaComponents
23 | import QtQuick.Controls 1.4
24 | import QtQuick.Layouts 1.1
25 | import org.kde.plasma.core 2.0 as PlasmaCore
26 |
27 | Item {
28 | id: fullRoot
29 |
30 | Layout.preferredWidth: plasmoid.configuration.width
31 | Layout.preferredHeight: plasmoid.configuration.height
32 |
33 | ListModel {
34 | id: kargosModel
35 | }
36 |
37 | Component.onCompleted: {
38 | //first update
39 | root.update();
40 | }
41 |
42 |
43 | // Info for submenus.
44 | // This structure has information of all submenus and their visibility status.
45 | // Since on each update the listview is regenerated, we use this structure to preserve the open/closed
46 | // status of submenus
47 | property var categories: ({});
48 |
49 | ListView {
50 | id: listView
51 | anchors.fill: parent
52 | model: kargosModel
53 | header: createHeader();
54 |
55 | function createHeader() {
56 | if (!root.isConstrained()) {
57 |
58 | return Qt.createComponent("FirstLinesRotator.qml");
59 | } else {
60 | return null;
61 | }
62 |
63 | }
64 |
65 | delegate: Row {
66 |
67 | id: row
68 | height: (typeof category === 'undefined' || (fullRoot.categories[category].visible)) ? row.visibleHeight: 0
69 | visible: (typeof category === 'undefined') ? true : (fullRoot.categories[category].visible)
70 | spacing: 2
71 |
72 | PlasmaCore.IconItem {
73 | id: icon
74 | source: (typeof iconName !== 'undefined')? iconName: ''
75 | anchors.verticalCenter: row.verticalCenter
76 |
77 | Component.onCompleted: {
78 | if (typeof iconName === 'undefined') {
79 | icon.width = 0
80 | }
81 | }
82 | }
83 |
84 | Image {
85 | id: image
86 | anchors.verticalCenter: row.verticalCenter
87 | fillMode: Image.PreserveAspectFit
88 |
89 | MouseArea {
90 | anchors.fill: parent
91 | cursorShape: root.isClickable(model) ? Qt.PointingHandCursor: Qt.ArrowCursor
92 | onClicked: {
93 | root.doItemClick(model);
94 | }
95 | }
96 | }
97 |
98 | Component.onCompleted: {
99 | if (typeof category !== 'undefined') {
100 | fullRoot.categories[category].rows.push(row);
101 | }
102 |
103 | if (typeof model.image !== 'undefined') {
104 | createImageFile(model.image, function(filename) {
105 | image.source = filename;
106 | });
107 | }
108 |
109 | if (typeof model.imageURL !== 'undefined') {
110 | image.source = model.imageURL;
111 | }
112 |
113 | if (typeof model.imageWidth !== 'undefined') {
114 | image.sourceSize.width = model.imageWidth
115 | }
116 |
117 | if (typeof model.imageHeight !== 'undefined') {
118 | image.sourceSize.height = model.imageHeight
119 | }
120 |
121 | if (typeof model.image !== 'undefined' && typeof model.imageURL !== 'undefined') {
122 | image.width = 0;
123 | }
124 | }
125 |
126 | Item {
127 | id: labelAndButtons
128 | width: fullRoot.width - icon.width - arrow_icon.width - image.width//some right margin
129 | height: itemLabel.implicitHeight + 10
130 | anchors.verticalCenter: row.verticalCenter
131 |
132 | PlasmaComponents.Label {
133 | id: itemLabel
134 | text: fullRoot.createTitleText(model);
135 | width: labelAndButtons.width - (mousearea.goButton.width) - (mousearea.runButton.width)
136 | anchors.verticalCenter: labelAndButtons.verticalCenter
137 | wrapMode: Text.WordWrap
138 | // elide: Text.ElideRight
139 | Component.onCompleted: {
140 | if (typeof model.font !== 'undefined') {
141 | font.family = model.font;
142 | }
143 | if (typeof model.size !== 'undefined') {
144 | font.pointSize = model.size;
145 | }
146 | if (typeof model.color !== 'undefined') {
147 | color = model.color;
148 | }
149 | }
150 | }
151 |
152 | ItemTextMouseArea {
153 | id: mousearea
154 | item: model
155 | }
156 | }
157 |
158 | // expand-collapse icon
159 | PlasmaCore.IconItem {
160 | id: arrow_icon
161 | source: (fullRoot.categories[model.title] !== undefined && fullRoot.categories[model.title].visible) ? 'arrow-down': 'arrow-up'
162 | visible: (typeof model.category === 'undefined' && fullRoot.categories[model.title] !== undefined && fullRoot.categories[model.title].items.length > 0) ? true:false
163 |
164 | width: (visible) ? units.iconSizes.smallMedium : 0
165 | height: units.iconSizes.smallMedium
166 |
167 | MouseArea {
168 | cursorShape: Qt.PointingHandCursor
169 | anchors.fill: parent
170 | onClicked: {
171 | // In order to notify binding of fullRoot.categories property, we clone it, and then reassign it.
172 | var newState = fullRoot.copyObject(fullRoot.categories);
173 | newState[model.title].visible = !newState[model.title].visible
174 |
175 | fullRoot.categories = newState;
176 | }
177 |
178 | hoverEnabled: true
179 |
180 | onEntered: {
181 | // avoid flikering on each update
182 | timer.running = false;
183 | }
184 |
185 | onExited: {
186 | // avoid flikering on each update
187 | timer.running = true;
188 | }
189 | }
190 | }
191 | }
192 | }
193 |
194 | Connections {
195 | target: commandResultsDS
196 | onExited: {
197 | update(stdout);
198 | }
199 | }
200 |
201 | function copyObject(object) {
202 | var copy = {};
203 |
204 | Object.keys(object).forEach(function(prop) {
205 | copy[prop] = object[prop];
206 |
207 | });
208 |
209 | return copy;
210 | }
211 |
212 | function createTitleText(item) {
213 | var titleText = ''+item.title.replace(/\\n/g, '
').replace(/ /g, ' ') + '
';
214 |
215 | return titleText;
216 |
217 | }
218 | function update(stdout) {
219 | kargosModel.clear();
220 |
221 | var items = parseItems(stdout);
222 |
223 | items.forEach(function(item) {
224 | if (item.dropdown === undefined || item.dropdown === 'true') {
225 | if (item.category !== undefined) {
226 | if (fullRoot.categories[item.category] === undefined) {
227 | fullRoot.categories[item.category] = {visible : false, items: [], rows: []};
228 | }
229 |
230 | if (item.category !== undefined) {
231 | fullRoot.categories[item.category].items.push(item);
232 | }
233 | }
234 | }
235 | });
236 |
237 | items.forEach(function(item) {
238 | if (item.dropdown === undefined || item.dropdown === true) {
239 | kargosModel.append(item);
240 | }
241 | });
242 | }
243 | }
244 |
245 |
--------------------------------------------------------------------------------
/plasmoid/contents/ui/IconifiableButton.qml:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * kargos
4 | *
5 | * Copyright (C) 2017 - 2020 Daniel Glez-Peña
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public
18 | * License along with this program. If not, see
19 | * .
20 | */
21 | import QtQuick 2.0
22 | import org.kde.plasma.components 2.0 as PlasmaComponents
23 | import QtQuick.Controls 1.4
24 | import QtQuick.Layouts 1.1
25 | import org.kde.plasma.core 2.0 as PlasmaCore
26 |
27 | Item {
28 | id: control
29 | property string text: ''
30 | property string iconName: ''
31 |
32 |
33 | width: iconMode ? controlInnerIcon.implicitWidth: controlInnerButton.implicitWidth
34 | height: iconMode ? controlInnerIcon.implicitHeight: controlInnerButton.implicitHeight
35 |
36 | property bool iconMode: true
37 |
38 | signal clicked()
39 |
40 | implicitWidth: iconMode ? controlInnerIcon.implicitWidth: controlInnerButton.implicitWidth
41 | implicitHeight: iconMode ? controlInnerIcon.implicitHeight: controlInnerButton.implicitHeight
42 |
43 |
44 | Button {
45 | id: controlInnerButton
46 | visible: !control.iconMode
47 | tooltip: control.text
48 | iconName: control.iconName
49 | anchors.fill: parent
50 |
51 | onClicked: control.clicked()
52 | }
53 |
54 | PlasmaCore.IconItem {
55 | id: controlInnerIcon
56 | visible: control.iconMode
57 | source: control.iconName
58 | //anchors.fill: parent
59 | anchors.topMargin: 5
60 | anchors.bottomMargin: 5
61 |
62 |
63 | width: controlInnerIcon.implicitWidth * 0.95
64 |
65 | // opacity: 0.5
66 | MouseArea {
67 |
68 | /*hoverEnabled: true
69 |
70 | onEntered: {
71 | controlInnerIcon.opacity = 1.0
72 | }
73 |
74 | onExited: {
75 | controlInnerIcon.opacity = 0.5
76 | }*/
77 |
78 | anchors.fill: parent
79 |
80 | onClicked: control.clicked()
81 | }
82 |
83 | }
84 | }
--------------------------------------------------------------------------------
/plasmoid/contents/ui/ItemTextMouseArea.qml:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * kargos
4 | *
5 | * Copyright (C) 2017 - 2020 Daniel Glez-Peña
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public
18 | * License along with this program. If not, see
19 | * .
20 | */
21 | import QtQuick 2.0
22 | import org.kde.plasma.components 2.0 as PlasmaComponents
23 | import QtQuick.Controls 1.4
24 | import QtQuick.Layouts 1.1
25 | import org.kde.plasma.core 2.0 as PlasmaCore
26 |
27 |
28 | MouseArea {
29 |
30 | id: mousearea
31 | anchors.fill: parent
32 | propagateComposedEvents: true
33 | hoverEnabled: true
34 |
35 | cursorShape: hasClickAction ? Qt.PointingHandCursor: Qt.ArrowCursor
36 |
37 | property bool hasClickAction: isClickable(item)
38 |
39 | property var item: null;
40 | property bool buttonHidingDelay: false
41 |
42 | property bool buttonsAlwaysVisible: false
43 | property bool buttonsShouldHide: true
44 |
45 | readonly property alias goButton: goButton
46 | readonly property alias runButton: runButton
47 |
48 | property bool iconMode: false
49 |
50 | onClicked: {
51 | root.doItemClick(item);
52 |
53 | mouse.accepted = false
54 | }
55 |
56 | onEntered: {
57 | if (buttonHidingDelay) buttonHidder.stop();
58 | buttonsShouldHide = false;
59 |
60 | if (goButton.visible || runButton.visible) {
61 | // avoid buttons to disappear on each update
62 | timer.running = false;
63 | }
64 | }
65 |
66 | onExited: {
67 | if (!buttonsAlwaysVisible) {
68 | if (buttonHidingDelay) buttonHidder.restart();
69 | else hideButtons();
70 | }
71 |
72 | timer.running = true;
73 | }
74 |
75 | function reset() {
76 | if (!buttonsAlwaysVisible) {
77 | buttonsShouldHide = true
78 | }
79 | }
80 |
81 | function hideButtons() {
82 | buttonsShouldHide = true
83 | }
84 |
85 |
86 | // workaround. When the compact representation is used (kargos in a panel)
87 | // the buttons disappear just before being clicked. This is caused by the
88 | // onExited event, which hiddes all butons, is being launched before the
89 | // click event on button (so, by hidding buttons, the click eventually does not
90 | // happen). So, we delay the button hidding in order to
91 | // capture the click event
92 | Timer {
93 | id: buttonHidder
94 | interval: 1000
95 | onTriggered: {
96 | buttonsShouldHide = true
97 | }
98 | }
99 |
100 | IconifiableButton {
101 | id: goButton
102 | iconMode: mousearea.iconMode
103 |
104 | text: visible? 'Go to: '+item.href : ''
105 | iconName: 'edit-link'
106 |
107 | anchors.right: parent.right
108 | anchors.verticalCenter: parent.verticalCenter
109 |
110 | visible: item !== null && (buttonsAlwaysVisible || !buttonsShouldHide) && (typeof item.href !== 'undefined') && (typeof item.onclick === 'undefined' || item.onclick !== 'href')
111 |
112 | onClicked: {
113 |
114 | if (item !== null && item.href !== undefined) {
115 | executable.exec('xdg-open '+item.href);
116 | }
117 | doRefreshIfNeeded(item);
118 |
119 | }
120 |
121 | }
122 |
123 | IconifiableButton {
124 | id: runButton
125 | iconMode: mousearea.iconMode
126 |
127 | text: visible? 'Run: '+item.bash : ''
128 | iconName: 'run-build'
129 |
130 | anchors.right: goButton.visible? goButton.left: parent.right
131 | anchors.rightMargin: goButton.visible? (mousearea.iconMode ? 0 : 2): 0
132 | anchors.verticalCenter: parent.verticalCenter
133 |
134 | visible: item!==null && (buttonsAlwaysVisible || !buttonsShouldHide) && (typeof item.bash !== 'undefined') && (typeof item.onclick === 'undefined' || item.onclick !== 'bash')
135 |
136 | onClicked: {
137 | if (item !== null && item.bash !== undefined) {
138 | if (item.terminal !== undefined && item.terminal === 'true') {
139 | executable.exec('konsole --noclose -e '+item.bash, function() {
140 | root.doRefreshIfNeeded(item);
141 |
142 | });
143 | } else {
144 | executable.exec(item.bash, function() {
145 | root.doRefreshIfNeeded(item);
146 | });
147 | }
148 | }
149 |
150 | }
151 | }
152 | }
--------------------------------------------------------------------------------
/plasmoid/contents/ui/config/ConfigAppearance.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.0
2 | import QtQuick.Controls 1.0
3 | import QtQuick.Layouts 1.0
4 | import org.kde.plasma.core 2.0 as PlasmaCore
5 | import org.kde.plasma.components 2.0 as PlasmaComponents
6 | import org.kde.plasma.extras 2.0 as PlasmaExtras
7 |
8 | ConfigPage {
9 | id: page
10 |
11 | property alias cfg_width: width.value
12 | property alias cfg_compactLabelMaxWidth: compactLabelMaxWidth.value
13 | property alias cfg_height: height.value
14 | property alias cfg_d_ArrowNeverVisible: d_ArrowNeverVisible.checked
15 | property alias cfg_d_ArrowAlwaysVisible: d_ArrowAlwaysVisible.checked
16 | property alias cfg_d_ArrowVisibleAsNeeded: d_ArrowVisibleAsNeeded.checked
17 |
18 |
19 | ConfigSection {
20 | label: i18n("Preferred width in px")
21 |
22 | SpinBox {
23 | id: width
24 | Layout.fillWidth: true
25 | maximumValue: 10000
26 | }
27 | }
28 |
29 | ConfigSection {
30 | label: i18n("Preferred height in px")
31 |
32 | SpinBox {
33 | id: height
34 | Layout.fillWidth: true
35 | maximumValue: 10000
36 | }
37 | }
38 |
39 | ConfigSection {
40 | label: i18n("Compact (on panel) fixed text width (0: unlimited)")
41 |
42 | SpinBox {
43 | id: compactLabelMaxWidth
44 | Layout.fillWidth: true
45 | maximumValue: 10000
46 | }
47 | }
48 |
49 | ConfigSection {
50 |
51 | GroupBox {
52 | title: i18n('Dropdown arrow visible option: ')
53 | anchors.left: parent.left
54 | Layout.columnSpan: 2
55 |
56 | ColumnLayout {
57 | ExclusiveGroup { id: dropdownArrowVisibleGroup }
58 | RadioButton {
59 | id: d_ArrowAlwaysVisible
60 | text: i18n('Always visible')
61 | exclusiveGroup: dropdownArrowVisibleGroup
62 | }
63 | RadioButton {
64 | id: d_ArrowVisibleAsNeeded
65 | text: i18n('Visible as needed')
66 | exclusiveGroup: dropdownArrowVisibleGroup
67 | }
68 | RadioButton {
69 | id: d_ArrowNeverVisible
70 | text: i18n('Never visible')
71 | exclusiveGroup: dropdownArrowVisibleGroup
72 | }
73 | }
74 | }
75 |
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/plasmoid/contents/ui/config/ConfigGeneral.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.0
2 | import QtQuick.Controls 1.0
3 | import QtQuick.Layouts 1.0
4 | import org.kde.plasma.core 2.0 as PlasmaCore
5 | import org.kde.plasma.components 2.0 as PlasmaComponents
6 | import org.kde.plasma.extras 2.0 as PlasmaExtras
7 |
8 | ConfigPage {
9 | id: page
10 |
11 | property alias cfg_command: command.text
12 | property alias cfg_interval: interval.value
13 | property alias cfg_rotation: rotation.value
14 |
15 | ConfigSection {
16 | label: i18n("Command line or executable path. The output of this command will be parsed following the Argos/Bitbar convention")
17 |
18 | TextField {
19 | id: command
20 | Layout.fillWidth: true
21 | }
22 | }
23 |
24 | ConfigSection {
25 | label: i18n("Interval in seconds (ignored if the previous property is an executable with the interval on its name. ex: myplugin.1s.sh)")
26 |
27 | SpinBox {
28 | id: interval
29 | Layout.fillWidth: true
30 | maximumValue: 99999
31 | }
32 | }
33 |
34 | ConfigSection {
35 | label: i18n("Rotation delay in seconds (rotation interval of the lines before the ---)")
36 |
37 | SpinBox {
38 | id: rotation
39 | Layout.fillWidth: true
40 | maximumValue: 60
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/plasmoid/contents/ui/config/ConfigPage.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.0
2 | import QtQuick.Layouts 1.0
3 |
4 | ColumnLayout {
5 | id: page
6 | Layout.fillWidth: true
7 | default property alias _contentChildren: content.data
8 |
9 |
10 | ColumnLayout {
11 | id: content
12 | Layout.fillWidth: true
13 | Layout.alignment: Qt.AlignTop
14 |
15 | // Workaround for crash when using default on a Layout.
16 | // https://bugreports.qt.io/browse/QTBUG-52490
17 | // Still affecting Qt 5.7.0
18 | Component.onDestruction: {
19 | while (children.length > 0) {
20 | children[children.length - 1].parent = page;
21 | }
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/plasmoid/contents/ui/config/ConfigSection.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.0
2 | import QtQuick.Controls 1.0
3 | import QtQuick.Layouts 1.0
4 |
5 | // Alternative to GroupBox for when we want the title to always be left aligned.
6 | Rectangle {
7 | id: control
8 | Layout.fillWidth: true
9 | default property alias _contentChildren: content.children
10 | property string label: ""
11 |
12 | color: "#0c000000"
13 | border.width: 2
14 | border.color: "#10000000"
15 | // radius: 5
16 | property int padding: 8
17 | height: childrenRect.height + padding + padding
18 | property alias spacing: content.spacing
19 |
20 | Label {
21 | id: title
22 | visible: control.label
23 | text: control.label
24 | anchors.leftMargin: padding
25 | // anchors.topMargin: padding
26 | anchors.left: parent.left
27 | anchors.top: parent.top
28 | anchors.right: parent.right
29 | height: visible ? implicitHeight : padding
30 | Layout.fillWidth: true
31 | wrapMode: Text.WordWrap
32 | width: control.width
33 |
34 | }
35 |
36 | ColumnLayout {
37 | id: content
38 | anchors.top: title.bottom
39 | anchors.left: parent.left
40 | anchors.right: parent.right
41 | anchors.margins: padding
42 | // spacing: 0
43 | // height: childrenRect.height
44 |
45 | // Workaround for crash when using default on a Layout.
46 | // https://bugreports.qt.io/browse/QTBUG-52490
47 | // Still affecting Qt 5.7.0
48 | Component.onDestruction: {
49 | while (children.length > 0) {
50 | children[children.length - 1].parent = control;
51 | }
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/plasmoid/contents/ui/main.qml:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * kargos
4 | *
5 | * Copyright (C) 2017 - 2020 Daniel Glez-Peña
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public
18 | * License along with this program. If not, see
19 | * .
20 | */
21 | import QtQuick 2.0
22 | import QtQuick.Layouts 1.1
23 | import QtQuick.Controls 1.4
24 |
25 | import org.kde.plasma.components 2.0 as PlasmaComponents
26 | import org.kde.plasma.core 2.0 as PlasmaCore
27 | import org.kde.plasma.plasmoid 2.0
28 | import org.kde.kquickcontrolsaddons 2.0
29 |
30 | Item {
31 | id: root
32 |
33 | // status bar only show icon, no words if constrained
34 | Plasmoid.preferredRepresentation: isConstrained() ? Plasmoid.compactRepresentation : Plasmoid.fullRepresentation
35 | //Plasmoid.preferredRepresentation: Plasmoid.compactRepresentation
36 |
37 | Plasmoid.compactRepresentation: CompactRepresentation {}
38 | Plasmoid.fullRepresentation: FullRepresentation {}
39 |
40 | property int interval;
41 | property int dropdownItemsCount: -1;
42 |
43 | function isConstrained() {
44 | return (plasmoid.formFactor == PlasmaCore.Types.Vertical || plasmoid.formFactor == PlasmaCore.Types.Horizontal);
45 | }
46 |
47 | property var command: plasmoid.configuration.command
48 |
49 | onCommandChanged: {
50 | update();
51 | }
52 |
53 | Component.onCompleted: {
54 | timer.running = true;
55 | }
56 |
57 | function update() {
58 | if (command === '') {
59 | plasmoid.setConfigurationRequired(true, 'You need to provide a command');
60 |
61 | } else {
62 | plasmoid.setConfigurationRequired(false);
63 | }
64 | //dropdownItemsCount = 0;
65 | commandResultsDS.exec(command);
66 | updateInterval();
67 | }
68 |
69 | function updateInterval() {
70 | var commandTokens = command.split('.');
71 |
72 | if (commandTokens.length >= 3) {
73 | var intervalToken = commandTokens[commandTokens.length - 2]; //ex: 1s
74 |
75 |
76 | if (/^[0-9]+[smhd]$/.test(intervalToken)) {
77 | var lastChar = intervalToken.charAt(intervalToken.length-1);
78 | switch (lastChar) {
79 | case 's': timer.interval = parseInt(intervalToken.slice(0, -1)) * 1000; break;
80 | case 'm': timer.interval = parseInt(intervalToken.slice(0, -1)) * 1000 * 60; break;
81 | case 'h': timer.interval = parseInt(intervalToken.slice(0, -1)) * 1000 * 3600; break;
82 | case 'd': timer.interval = parseInt(intervalToken.slice(0, -1)) * 1000 * 3600 * 24; break;
83 | }
84 | }
85 | } else {
86 | timer.interval = plasmoid.configuration.interval * 1000
87 | }
88 | }
89 |
90 |
91 | function parseLine(line, currentCategory) {
92 | var parsedObject = {title: line};
93 |
94 | if (line.indexOf('|') != -1) {
95 | parsedObject.title = line.split('|')[0].replace(/\s+$/, '');
96 |
97 | var attributesToken = line.split('|')[1].trim();
98 |
99 | // replace \' to string __ESCAPED_QUOTE__
100 | attributesToken = attributesToken.replace(/\\'/g, '__ESCAPED_QUOTE__');
101 | var tokens = attributesToken.match(/([^\s']+=[^\s']+|[^\s']+='[^']*')+/g)
102 | tokens.forEach(function(attribute_value) {
103 | if (attribute_value.indexOf('=')!=-1) {
104 | parsedObject[attribute_value.split('=')[0]] = attribute_value.substring(attribute_value.indexOf('=') + 1).replace(/'/g, '').replace(/__ESCAPED_QUOTE__/g, "'");
105 | }
106 | });
107 | }
108 |
109 | // submenus
110 | if (parsedObject.title.match(/^--/)) {
111 | parsedObject.title = parsedObject.title.substring(2).trim();
112 | if (currentCategory !== undefined) {
113 | parsedObject.category = currentCategory;
114 | }
115 | }
116 | return parsedObject;
117 | }
118 |
119 | function parseItems(stdout) {
120 | var items = [];
121 | var currentCategory = null;
122 |
123 | var menuGroupsStrings = stdout.split("---");
124 |
125 | var totalItems = 0;
126 | if (menuGroupsStrings.length > 1) {
127 |
128 | for (var i = 1; i < menuGroupsStrings.length; i++) {
129 | var groupString = menuGroupsStrings[i];
130 |
131 | var groupTokens = groupString.trim().split('\n');
132 | groupTokens.forEach(function (groupToken) {
133 | var parsedItem = root.parseLine(groupToken, currentCategory);
134 | if (parsedItem.category === undefined) {
135 | currentCategory = parsedItem.title;
136 | }
137 | items.push(parsedItem);
138 | totalItems ++;
139 |
140 | });
141 | }
142 | }
143 | return items;
144 | }
145 |
146 | function doRefreshIfNeeded(item) {
147 | if (item !== null && item.refresh == 'true') {
148 | root.update();
149 | }
150 | }
151 |
152 | function doItemClick(item) {
153 |
154 | if (item !== null && item.href !== undefined && item.onclick === 'href') {
155 | executable.exec('xdg-open '+item.href);
156 | }
157 |
158 | if (item !== null && item.bash !== undefined && item.onclick === 'bash') {
159 | if (item.terminal !== undefined && item.terminal === 'true') {
160 | executable.exec('konsole --noclose -e '+item.bash, function() {
161 | doRefreshIfNeeded(item);
162 | });
163 | } else {
164 | executable.exec(item.bash, function() {
165 | doRefreshIfNeeded(item);
166 | });
167 | }
168 | } else {
169 | doRefreshIfNeeded(item);
170 | }
171 | }
172 |
173 | function isClickable(item) {
174 | return item !==null && (item.refresh == 'true' || item.onclick == 'href' || item.onclick == 'bash');
175 | }
176 |
177 | // DataSource for the user command execution results
178 | PlasmaCore.DataSource {
179 | id: commandResultsDS
180 | engine: "executable"
181 | connectedSources: []
182 | onNewData: {
183 | var stdout = data["stdout"]
184 | exited(sourceName, stdout)
185 | disconnectSource(sourceName) // cmd finished
186 | }
187 |
188 | function exec(cmd) {
189 | connectSource(cmd)
190 | }
191 | signal exited(string sourceName, string stdout)
192 |
193 | }
194 |
195 | // Generic DataSource to execute internal kargo commands (like running bash
196 | // attribute or open the browser with href)
197 | PlasmaCore.DataSource {
198 | id: executable
199 | engine: "executable"
200 | connectedSources: []
201 | property var callbacks: ({})
202 | onNewData: {
203 | var stdout = data["stdout"]
204 |
205 | if (callbacks[sourceName] !== undefined) {
206 | callbacks[sourceName](stdout);
207 | }
208 |
209 | exited(sourceName, stdout)
210 | disconnectSource(sourceName) // cmd finished
211 | }
212 |
213 | function exec(cmd, onNewDataCallback) {
214 | if (onNewDataCallback !== undefined){
215 | callbacks[cmd] = onNewDataCallback
216 | }
217 | connectSource(cmd)
218 |
219 | }
220 | signal exited(string sourceName, string stdout)
221 |
222 | }
223 |
224 | property var imagesIndex: ({})
225 |
226 | function createImageFile(base64, callback) {
227 | var filename = imagesIndex[base64];
228 | if (filename === undefined) {
229 | executable.exec('/bin/bash -c \'file=$(mktemp /tmp/kargos.image.XXXXXX); echo "'+base64+'" | base64 -d > $file; echo -n $file\'', function(filename) {
230 | imagesIndex[base64] = filename;
231 | callback(filename);
232 | });
233 | } else {
234 | callback(filename);
235 | }
236 |
237 | }
238 |
239 | Connections {
240 | target: commandResultsDS
241 | onExited: {
242 | dropdownItemsCount = parseItems(stdout).filter(
243 | function(item) {
244 | return item.dropdown === undefined || item.dropdown !== 'false'
245 | }).length;
246 |
247 | if (stdout.indexOf('---') === -1) {
248 | plasmoid.expanded = false
249 | }
250 | }
251 | }
252 |
253 | Connections {
254 | target: plasmoid
255 | // `externalData` is emitted when the containment decides to send data to a plasmoid.
256 | // More usefully (for us at least), plasmoidviewer also sends its first argument this way.
257 | // So, for development we can do:
258 | // $ plasmoidviewer -a ./plasmoid "echo hello world"
259 | // and this will set the command as "echo hello world".
260 | onExternalData: function (mimeType, data) {
261 | console.debug("Got externalData: " + data);
262 | if (!command) {
263 | command = data;
264 | }
265 | }
266 | }
267 |
268 | Timer {
269 | id: timer
270 | interval: plasmoid.configuration.interval * 1000
271 | running: false
272 | repeat: true
273 | onTriggered: update()
274 | }
275 | }
276 |
--------------------------------------------------------------------------------
/plasmoid/contents/vendor/FontAwesome/FontAwesome.qml:
--------------------------------------------------------------------------------
1 | pragma Singleton
2 | import QtQuick 2.0
3 |
4 | Object {
5 |
6 | FontLoader {
7 | source: "./fontawesome-webfont.ttf"
8 | }
9 |
10 | property string fontFamily: "FontAwesome"
11 |
12 | // Icons
13 | property string addressBook : "\uf2b9"
14 | property string addressBookO : "\uf2ba"
15 | property string addressCard : "\uf2bb"
16 | property string addressCardO : "\uf2bc"
17 | property string adjust : "\uf042"
18 | property string adn : "\uf170"
19 | property string alignCenter : "\uf037"
20 | property string alignJustify : "\uf039"
21 | property string alignLeft : "\uf036"
22 | property string alignRight : "\uf038"
23 | property string amazon : "\uf270"
24 | property string ambulance : "\uf0f9"
25 | property string americanSignLanguageInterpreting : "\uf2a3"
26 | property string anchor : "\uf13d"
27 | property string android : "\uf17b"
28 | property string angellist : "\uf209"
29 | property string angleDoubleDown : "\uf103"
30 | property string angleDoubleLeft : "\uf100"
31 | property string angleDoubleRight : "\uf101"
32 | property string angleDoubleUp : "\uf102"
33 | property string angleDown : "\uf107"
34 | property string angleLeft : "\uf104"
35 | property string angleRight : "\uf105"
36 | property string angleUp : "\uf106"
37 | property string apple : "\uf179"
38 | property string archive : "\uf187"
39 | property string areaChart : "\uf1fe"
40 | property string arrowCircleDown : "\uf0ab"
41 | property string arrowCircleLeft : "\uf0a8"
42 | property string arrowCircleODown : "\uf01a"
43 | property string arrowCircleOLeft : "\uf190"
44 | property string arrowCircleORight : "\uf18e"
45 | property string arrowCircleOUp : "\uf01b"
46 | property string arrowCircleRight : "\uf0a9"
47 | property string arrowCircleUp : "\uf0aa"
48 | property string arrowDown : "\uf063"
49 | property string arrowLeft : "\uf060"
50 | property string arrowRight : "\uf061"
51 | property string arrowUp : "\uf062"
52 | property string arrows : "\uf047"
53 | property string arrowsAlt : "\uf0b2"
54 | property string arrowsH : "\uf07e"
55 | property string arrowsV : "\uf07d"
56 | property string aslInterpreting : "\uf2a3"
57 | property string assistiveListeningSystems : "\uf2a2"
58 | property string asterisk : "\uf069"
59 | property string at : "\uf1fa"
60 | property string audioDescription : "\uf29e"
61 | property string automobile : "\uf1b9"
62 | property string backward : "\uf04a"
63 | property string balanceScale : "\uf24e"
64 | property string ban : "\uf05e"
65 | property string bandcamp : "\uf2d5"
66 | property string bank : "\uf19c"
67 | property string barChart : "\uf080"
68 | property string barChartO : "\uf080"
69 | property string barcode : "\uf02a"
70 | property string bars : "\uf0c9"
71 | property string bath : "\uf2cd"
72 | property string bathtub : "\uf2cd"
73 | property string battery : "\uf240"
74 | property string battery0 : "\uf244"
75 | property string battery1 : "\uf243"
76 | property string battery2 : "\uf242"
77 | property string battery3 : "\uf241"
78 | property string battery4 : "\uf240"
79 | property string batteryEmpty : "\uf244"
80 | property string batteryFull : "\uf240"
81 | property string batteryHalf : "\uf242"
82 | property string batteryQuarter : "\uf243"
83 | property string batteryThreeQuarters : "\uf241"
84 | property string bed : "\uf236"
85 | property string beer : "\uf0fc"
86 | property string behance : "\uf1b4"
87 | property string behanceSquare : "\uf1b5"
88 | property string bell : "\uf0f3"
89 | property string bellO : "\uf0a2"
90 | property string bellSlash : "\uf1f6"
91 | property string bellSlashO : "\uf1f7"
92 | property string bicycle : "\uf206"
93 | property string binoculars : "\uf1e5"
94 | property string birthdayCake : "\uf1fd"
95 | property string bitbucket : "\uf171"
96 | property string bitbucketSquare : "\uf172"
97 | property string bitcoin : "\uf15a"
98 | property string blackTie : "\uf27e"
99 | property string blind : "\uf29d"
100 | property string bluetooth : "\uf293"
101 | property string bluetoothB : "\uf294"
102 | property string bold : "\uf032"
103 | property string bolt : "\uf0e7"
104 | property string bomb : "\uf1e2"
105 | property string book : "\uf02d"
106 | property string bookmark : "\uf02e"
107 | property string bookmarkO : "\uf097"
108 | property string braille : "\uf2a1"
109 | property string briefcase : "\uf0b1"
110 | property string btc : "\uf15a"
111 | property string bug : "\uf188"
112 | property string building : "\uf1ad"
113 | property string buildingO : "\uf0f7"
114 | property string bullhorn : "\uf0a1"
115 | property string bullseye : "\uf140"
116 | property string bus : "\uf207"
117 | property string buysellads : "\uf20d"
118 | property string cab : "\uf1ba"
119 | property string calculator : "\uf1ec"
120 | property string calendar : "\uf073"
121 | property string calendarCheckO : "\uf274"
122 | property string calendarMinusO : "\uf272"
123 | property string calendarO : "\uf133"
124 | property string calendarPlusO : "\uf271"
125 | property string calendarTimesO : "\uf273"
126 | property string camera : "\uf030"
127 | property string cameraRetro : "\uf083"
128 | property string car : "\uf1b9"
129 | property string caretDown : "\uf0d7"
130 | property string caretLeft : "\uf0d9"
131 | property string caretRight : "\uf0da"
132 | property string caretSquareODown : "\uf150"
133 | property string caretSquareOLeft : "\uf191"
134 | property string caretSquareORight : "\uf152"
135 | property string caretSquareOUp : "\uf151"
136 | property string caretUp : "\uf0d8"
137 | property string cartArrowDown : "\uf218"
138 | property string cartPlus : "\uf217"
139 | property string cc : "\uf20a"
140 | property string ccAmex : "\uf1f3"
141 | property string ccDinersClub : "\uf24c"
142 | property string ccDiscover : "\uf1f2"
143 | property string ccJcb : "\uf24b"
144 | property string ccMastercard : "\uf1f1"
145 | property string ccPaypal : "\uf1f4"
146 | property string ccStripe : "\uf1f5"
147 | property string ccVisa : "\uf1f0"
148 | property string certificate : "\uf0a3"
149 | property string chain : "\uf0c1"
150 | property string chainBroken : "\uf127"
151 | property string check : "\uf00c"
152 | property string checkCircle : "\uf058"
153 | property string checkCircleO : "\uf05d"
154 | property string checkSquare : "\uf14a"
155 | property string checkSquareO : "\uf046"
156 | property string chevronCircleDown : "\uf13a"
157 | property string chevronCircleLeft : "\uf137"
158 | property string chevronCircleRight : "\uf138"
159 | property string chevronCircleUp : "\uf139"
160 | property string chevronDown : "\uf078"
161 | property string chevronLeft : "\uf053"
162 | property string chevronRight : "\uf054"
163 | property string chevronUp : "\uf077"
164 | property string child : "\uf1ae"
165 | property string chrome : "\uf268"
166 | property string circle : "\uf111"
167 | property string circleO : "\uf10c"
168 | property string circleONotch : "\uf1ce"
169 | property string circleThin : "\uf1db"
170 | property string clipboard : "\uf0ea"
171 | property string clockO : "\uf017"
172 | property string clone : "\uf24d"
173 | property string close : "\uf00d"
174 | property string cloud : "\uf0c2"
175 | property string cloudDownload : "\uf0ed"
176 | property string cloudUpload : "\uf0ee"
177 | property string cny : "\uf157"
178 | property string code : "\uf121"
179 | property string codeFork : "\uf126"
180 | property string codepen : "\uf1cb"
181 | property string codiepie : "\uf284"
182 | property string coffee : "\uf0f4"
183 | property string cog : "\uf013"
184 | property string cogs : "\uf085"
185 | property string columns : "\uf0db"
186 | property string comment : "\uf075"
187 | property string commentO : "\uf0e5"
188 | property string commenting : "\uf27a"
189 | property string commentingO : "\uf27b"
190 | property string comments : "\uf086"
191 | property string commentsO : "\uf0e6"
192 | property string compass : "\uf14e"
193 | property string compress : "\uf066"
194 | property string connectdevelop : "\uf20e"
195 | property string contao : "\uf26d"
196 | property string copy : "\uf0c5"
197 | property string copyright : "\uf1f9"
198 | property string creativeCommons : "\uf25e"
199 | property string creditCard : "\uf09d"
200 | property string creditCardAlt : "\uf283"
201 | property string crop : "\uf125"
202 | property string crosshairs : "\uf05b"
203 | property string css3 : "\uf13c"
204 | property string cube : "\uf1b2"
205 | property string cubes : "\uf1b3"
206 | property string cut : "\uf0c4"
207 | property string cutlery : "\uf0f5"
208 | property string dashboard : "\uf0e4"
209 | property string dashcube : "\uf210"
210 | property string database : "\uf1c0"
211 | property string deaf : "\uf2a4"
212 | property string deafness : "\uf2a4"
213 | property string dedent : "\uf03b"
214 | property string delicious : "\uf1a5"
215 | property string desktop : "\uf108"
216 | property string deviantart : "\uf1bd"
217 | property string diamond : "\uf219"
218 | property string digg : "\uf1a6"
219 | property string dollar : "\uf155"
220 | property string dotCircleO : "\uf192"
221 | property string download : "\uf019"
222 | property string dribbble : "\uf17d"
223 | property string driversLicense : "\uf2c2"
224 | property string driversLicenseO : "\uf2c3"
225 | property string dropbox : "\uf16b"
226 | property string drupal : "\uf1a9"
227 | property string edge : "\uf282"
228 | property string edit : "\uf044"
229 | property string eercast : "\uf2da"
230 | property string eject : "\uf052"
231 | property string ellipsisH : "\uf141"
232 | property string ellipsisV : "\uf142"
233 | property string empire : "\uf1d1"
234 | property string envelope : "\uf0e0"
235 | property string envelopeO : "\uf003"
236 | property string envelopeOpen : "\uf2b6"
237 | property string envelopeOpenO : "\uf2b7"
238 | property string envelopeSquare : "\uf199"
239 | property string envira : "\uf299"
240 | property string eraser : "\uf12d"
241 | property string etsy : "\uf2d7"
242 | property string eur : "\uf153"
243 | property string euro : "\uf153"
244 | property string exchange : "\uf0ec"
245 | property string exclamation : "\uf12a"
246 | property string exclamationCircle : "\uf06a"
247 | property string exclamationTriangle : "\uf071"
248 | property string expand : "\uf065"
249 | property string expeditedssl : "\uf23e"
250 | property string externalLink : "\uf08e"
251 | property string externalLinkSquare : "\uf14c"
252 | property string eye : "\uf06e"
253 | property string eyeSlash : "\uf070"
254 | property string eyedropper : "\uf1fb"
255 | property string fa : "\uf2b4"
256 | property string facebook : "\uf09a"
257 | property string facebookF : "\uf09a"
258 | property string facebookOfficial : "\uf230"
259 | property string facebookSquare : "\uf082"
260 | property string fastBackward : "\uf049"
261 | property string fastForward : "\uf050"
262 | property string fax : "\uf1ac"
263 | property string feed : "\uf09e"
264 | property string female : "\uf182"
265 | property string fighterJet : "\uf0fb"
266 | property string file : "\uf15b"
267 | property string fileArchiveO : "\uf1c6"
268 | property string fileAudioO : "\uf1c7"
269 | property string fileCodeO : "\uf1c9"
270 | property string fileExcelO : "\uf1c3"
271 | property string fileImageO : "\uf1c5"
272 | property string fileMovieO : "\uf1c8"
273 | property string fileO : "\uf016"
274 | property string filePdfO : "\uf1c1"
275 | property string filePhotoO : "\uf1c5"
276 | property string filePictureO : "\uf1c5"
277 | property string filePowerpointO : "\uf1c4"
278 | property string fileSoundO : "\uf1c7"
279 | property string fileText : "\uf15c"
280 | property string fileTextO : "\uf0f6"
281 | property string fileVideoO : "\uf1c8"
282 | property string fileWordO : "\uf1c2"
283 | property string fileZipO : "\uf1c6"
284 | property string filesO : "\uf0c5"
285 | property string film : "\uf008"
286 | property string filter : "\uf0b0"
287 | property string fire : "\uf06d"
288 | property string fireExtinguisher : "\uf134"
289 | property string firefox : "\uf269"
290 | property string firstOrder : "\uf2b0"
291 | property string flag : "\uf024"
292 | property string flagCheckered : "\uf11e"
293 | property string flagO : "\uf11d"
294 | property string flash : "\uf0e7"
295 | property string flask : "\uf0c3"
296 | property string flickr : "\uf16e"
297 | property string floppyO : "\uf0c7"
298 | property string folder : "\uf07b"
299 | property string folderO : "\uf114"
300 | property string folderOpen : "\uf07c"
301 | property string folderOpenO : "\uf115"
302 | property string font : "\uf031"
303 | property string fontAwesome : "\uf2b4"
304 | property string fonticons : "\uf280"
305 | property string fortAwesome : "\uf286"
306 | property string forumbee : "\uf211"
307 | property string forward : "\uf04e"
308 | property string foursquare : "\uf180"
309 | property string freeCodeCamp : "\uf2c5"
310 | property string frownO : "\uf119"
311 | property string futbolO : "\uf1e3"
312 | property string gamepad : "\uf11b"
313 | property string gavel : "\uf0e3"
314 | property string gbp : "\uf154"
315 | property string ge : "\uf1d1"
316 | property string gear : "\uf013"
317 | property string gears : "\uf085"
318 | property string genderless : "\uf22d"
319 | property string getPocket : "\uf265"
320 | property string gg : "\uf260"
321 | property string ggCircle : "\uf261"
322 | property string gift : "\uf06b"
323 | property string git : "\uf1d3"
324 | property string gitSquare : "\uf1d2"
325 | property string github : "\uf09b"
326 | property string githubAlt : "\uf113"
327 | property string githubSquare : "\uf092"
328 | property string gitlab : "\uf296"
329 | property string gittip : "\uf184"
330 | property string glass : "\uf000"
331 | property string glide : "\uf2a5"
332 | property string glideG : "\uf2a6"
333 | property string globe : "\uf0ac"
334 | property string google : "\uf1a0"
335 | property string googlePlus : "\uf0d5"
336 | property string googlePlusCircle : "\uf2b3"
337 | property string googlePlusOfficial : "\uf2b3"
338 | property string googlePlusSquare : "\uf0d4"
339 | property string googleWallet : "\uf1ee"
340 | property string graduationCap : "\uf19d"
341 | property string gratipay : "\uf184"
342 | property string grav : "\uf2d6"
343 | property string group : "\uf0c0"
344 | property string hSquare : "\uf0fd"
345 | property string hackerNews : "\uf1d4"
346 | property string handGrabO : "\uf255"
347 | property string handLizardO : "\uf258"
348 | property string handODown : "\uf0a7"
349 | property string handOLeft : "\uf0a5"
350 | property string handORight : "\uf0a4"
351 | property string handOUp : "\uf0a6"
352 | property string handPaperO : "\uf256"
353 | property string handPeaceO : "\uf25b"
354 | property string handPointerO : "\uf25a"
355 | property string handRockO : "\uf255"
356 | property string handScissorsO : "\uf257"
357 | property string handSpockO : "\uf259"
358 | property string handStopO : "\uf256"
359 | property string handshakeO : "\uf2b5"
360 | property string hardOfHearing : "\uf2a4"
361 | property string hashtag : "\uf292"
362 | property string hddO : "\uf0a0"
363 | property string header : "\uf1dc"
364 | property string headphones : "\uf025"
365 | property string heart : "\uf004"
366 | property string heartO : "\uf08a"
367 | property string heartbeat : "\uf21e"
368 | property string history : "\uf1da"
369 | property string home : "\uf015"
370 | property string hospitalO : "\uf0f8"
371 | property string hotel : "\uf236"
372 | property string hourglass : "\uf254"
373 | property string hourglass1 : "\uf251"
374 | property string hourglass2 : "\uf252"
375 | property string hourglass3 : "\uf253"
376 | property string hourglassEnd : "\uf253"
377 | property string hourglassHalf : "\uf252"
378 | property string hourglassO : "\uf250"
379 | property string hourglassStart : "\uf251"
380 | property string houzz : "\uf27c"
381 | property string html5 : "\uf13b"
382 | property string iCursor : "\uf246"
383 | property string idBadge : "\uf2c1"
384 | property string idCard : "\uf2c2"
385 | property string idCardO : "\uf2c3"
386 | property string ils : "\uf20b"
387 | property string image : "\uf03e"
388 | property string imdb : "\uf2d8"
389 | property string inbox : "\uf01c"
390 | property string indent : "\uf03c"
391 | property string industry : "\uf275"
392 | property string info : "\uf129"
393 | property string infoCircle : "\uf05a"
394 | property string inr : "\uf156"
395 | property string instagram : "\uf16d"
396 | property string institution : "\uf19c"
397 | property string internetExplorer : "\uf26b"
398 | property string intersex : "\uf224"
399 | property string ioxhost : "\uf208"
400 | property string italic : "\uf033"
401 | property string joomla : "\uf1aa"
402 | property string jpy : "\uf157"
403 | property string jsfiddle : "\uf1cc"
404 | property string key : "\uf084"
405 | property string keyboardO : "\uf11c"
406 | property string krw : "\uf159"
407 | property string language : "\uf1ab"
408 | property string laptop : "\uf109"
409 | property string lastfm : "\uf202"
410 | property string lastfmSquare : "\uf203"
411 | property string leaf : "\uf06c"
412 | property string leanpub : "\uf212"
413 | property string legal : "\uf0e3"
414 | property string lemonO : "\uf094"
415 | property string levelDown : "\uf149"
416 | property string levelUp : "\uf148"
417 | property string lifeBouy : "\uf1cd"
418 | property string lifeBuoy : "\uf1cd"
419 | property string lifeRing : "\uf1cd"
420 | property string lifeSaver : "\uf1cd"
421 | property string lightbulbO : "\uf0eb"
422 | property string lineChart : "\uf201"
423 | property string link : "\uf0c1"
424 | property string linkedin : "\uf0e1"
425 | property string linkedinSquare : "\uf08c"
426 | property string linode : "\uf2b8"
427 | property string linux : "\uf17c"
428 | property string list : "\uf03a"
429 | property string listAlt : "\uf022"
430 | property string listOl : "\uf0cb"
431 | property string listUl : "\uf0ca"
432 | property string locationArrow : "\uf124"
433 | property string lock : "\uf023"
434 | property string longArrowDown : "\uf175"
435 | property string longArrowLeft : "\uf177"
436 | property string longArrowRight : "\uf178"
437 | property string longArrowUp : "\uf176"
438 | property string lowVision : "\uf2a8"
439 | property string magic : "\uf0d0"
440 | property string magnet : "\uf076"
441 | property string mailForward : "\uf064"
442 | property string mailReply : "\uf112"
443 | property string mailReplyAll : "\uf122"
444 | property string male : "\uf183"
445 | property string map : "\uf279"
446 | property string mapMarker : "\uf041"
447 | property string mapO : "\uf278"
448 | property string mapPin : "\uf276"
449 | property string mapSigns : "\uf277"
450 | property string mars : "\uf222"
451 | property string marsDouble : "\uf227"
452 | property string marsStroke : "\uf229"
453 | property string marsStrokeH : "\uf22b"
454 | property string marsStrokeV : "\uf22a"
455 | property string maxcdn : "\uf136"
456 | property string meanpath : "\uf20c"
457 | property string medium : "\uf23a"
458 | property string medkit : "\uf0fa"
459 | property string meetup : "\uf2e0"
460 | property string mehO : "\uf11a"
461 | property string mercury : "\uf223"
462 | property string microchip : "\uf2db"
463 | property string microphone : "\uf130"
464 | property string microphoneSlash : "\uf131"
465 | property string minus : "\uf068"
466 | property string minusCircle : "\uf056"
467 | property string minusSquare : "\uf146"
468 | property string minusSquareO : "\uf147"
469 | property string mixcloud : "\uf289"
470 | property string mobile : "\uf10b"
471 | property string mobilePhone : "\uf10b"
472 | property string modx : "\uf285"
473 | property string money : "\uf0d6"
474 | property string moonO : "\uf186"
475 | property string mortarBoard : "\uf19d"
476 | property string motorcycle : "\uf21c"
477 | property string mousePointer : "\uf245"
478 | property string music : "\uf001"
479 | property string navicon : "\uf0c9"
480 | property string neuter : "\uf22c"
481 | property string newspaperO : "\uf1ea"
482 | property string objectGroup : "\uf247"
483 | property string objectUngroup : "\uf248"
484 | property string odnoklassniki : "\uf263"
485 | property string odnoklassnikiSquare : "\uf264"
486 | property string opencart : "\uf23d"
487 | property string openid : "\uf19b"
488 | property string opera : "\uf26a"
489 | property string optinMonster : "\uf23c"
490 | property string outdent : "\uf03b"
491 | property string pagelines : "\uf18c"
492 | property string paintBrush : "\uf1fc"
493 | property string paperPlane : "\uf1d8"
494 | property string paperPlaneO : "\uf1d9"
495 | property string paperclip : "\uf0c6"
496 | property string paragraph : "\uf1dd"
497 | property string paste : "\uf0ea"
498 | property string pause : "\uf04c"
499 | property string pauseCircle : "\uf28b"
500 | property string pauseCircleO : "\uf28c"
501 | property string paw : "\uf1b0"
502 | property string paypal : "\uf1ed"
503 | property string pencil : "\uf040"
504 | property string pencilSquare : "\uf14b"
505 | property string pencilSquareO : "\uf044"
506 | property string percent : "\uf295"
507 | property string phone : "\uf095"
508 | property string phoneSquare : "\uf098"
509 | property string photo : "\uf03e"
510 | property string pictureO : "\uf03e"
511 | property string pieChart : "\uf200"
512 | property string piedPiper : "\uf2ae"
513 | property string piedPiperAlt : "\uf1a8"
514 | property string piedPiperPp : "\uf1a7"
515 | property string pinterest : "\uf0d2"
516 | property string pinterestP : "\uf231"
517 | property string pinterestSquare : "\uf0d3"
518 | property string plane : "\uf072"
519 | property string play : "\uf04b"
520 | property string playCircle : "\uf144"
521 | property string playCircleO : "\uf01d"
522 | property string plug : "\uf1e6"
523 | property string plus : "\uf067"
524 | property string plusCircle : "\uf055"
525 | property string plusSquare : "\uf0fe"
526 | property string plusSquareO : "\uf196"
527 | property string podcast : "\uf2ce"
528 | property string powerOff : "\uf011"
529 | property string printIcon : "\uf02f"
530 | property string productHunt : "\uf288"
531 | property string puzzlePiece : "\uf12e"
532 | property string qq : "\uf1d6"
533 | property string qrcode : "\uf029"
534 | property string question : "\uf128"
535 | property string questionCircle : "\uf059"
536 | property string questionCircleO : "\uf29c"
537 | property string quora : "\uf2c4"
538 | property string quoteLeft : "\uf10d"
539 | property string quoteRight : "\uf10e"
540 | property string ra : "\uf1d0"
541 | property string random : "\uf074"
542 | property string ravelry : "\uf2d9"
543 | property string rebel : "\uf1d0"
544 | property string recycle : "\uf1b8"
545 | property string reddit : "\uf1a1"
546 | property string redditAlien : "\uf281"
547 | property string redditSquare : "\uf1a2"
548 | property string refresh : "\uf021"
549 | property string registered : "\uf25d"
550 | property string remove : "\uf00d"
551 | property string renren : "\uf18b"
552 | property string reorder : "\uf0c9"
553 | property string repeat : "\uf01e"
554 | property string reply : "\uf112"
555 | property string replyAll : "\uf122"
556 | property string resistance : "\uf1d0"
557 | property string retweet : "\uf079"
558 | property string rmb : "\uf157"
559 | property string road : "\uf018"
560 | property string rocket : "\uf135"
561 | property string rotateLeft : "\uf0e2"
562 | property string rotateRight : "\uf01e"
563 | property string rouble : "\uf158"
564 | property string rss : "\uf09e"
565 | property string rssSquare : "\uf143"
566 | property string rub : "\uf158"
567 | property string ruble : "\uf158"
568 | property string rupee : "\uf156"
569 | property string s15 : "\uf2cd"
570 | property string safari : "\uf267"
571 | property string save : "\uf0c7"
572 | property string scissors : "\uf0c4"
573 | property string scribd : "\uf28a"
574 | property string search : "\uf002"
575 | property string searchMinus : "\uf010"
576 | property string searchPlus : "\uf00e"
577 | property string sellsy : "\uf213"
578 | property string send : "\uf1d8"
579 | property string sendO : "\uf1d9"
580 | property string server : "\uf233"
581 | property string share : "\uf064"
582 | property string shareAlt : "\uf1e0"
583 | property string shareAltSquare : "\uf1e1"
584 | property string shareSquare : "\uf14d"
585 | property string shareSquareO : "\uf045"
586 | property string shekel : "\uf20b"
587 | property string sheqel : "\uf20b"
588 | property string shield : "\uf132"
589 | property string ship : "\uf21a"
590 | property string shirtsinbulk : "\uf214"
591 | property string shoppingBag : "\uf290"
592 | property string shoppingBasket : "\uf291"
593 | property string shoppingCart : "\uf07a"
594 | property string shower : "\uf2cc"
595 | property string signIn : "\uf090"
596 | property string signLanguage : "\uf2a7"
597 | property string signOut : "\uf08b"
598 | property string signal : "\uf012"
599 | property string signing : "\uf2a7"
600 | property string simplybuilt : "\uf215"
601 | property string sitemap : "\uf0e8"
602 | property string skyatlas : "\uf216"
603 | property string skype : "\uf17e"
604 | property string slack : "\uf198"
605 | property string sliders : "\uf1de"
606 | property string slideshare : "\uf1e7"
607 | property string smileO : "\uf118"
608 | property string snapchat : "\uf2ab"
609 | property string snapchatGhost : "\uf2ac"
610 | property string snapchatSquare : "\uf2ad"
611 | property string snowflakeO : "\uf2dc"
612 | property string soccerBallO : "\uf1e3"
613 | property string sort : "\uf0dc"
614 | property string sortAlphaAsc : "\uf15d"
615 | property string sortAlphaDesc : "\uf15e"
616 | property string sortAmountAsc : "\uf160"
617 | property string sortAmountDesc : "\uf161"
618 | property string sortAsc : "\uf0de"
619 | property string sortDesc : "\uf0dd"
620 | property string sortDown : "\uf0dd"
621 | property string sortNumericAsc : "\uf162"
622 | property string sortNumericDesc : "\uf163"
623 | property string sortUp : "\uf0de"
624 | property string soundcloud : "\uf1be"
625 | property string spaceShuttle : "\uf197"
626 | property string spinner : "\uf110"
627 | property string spoon : "\uf1b1"
628 | property string spotify : "\uf1bc"
629 | property string square : "\uf0c8"
630 | property string squareO : "\uf096"
631 | property string stackExchange : "\uf18d"
632 | property string stackOverflow : "\uf16c"
633 | property string star : "\uf005"
634 | property string starHalf : "\uf089"
635 | property string starHalfEmpty : "\uf123"
636 | property string starHalfFull : "\uf123"
637 | property string starHalfO : "\uf123"
638 | property string starO : "\uf006"
639 | property string steam : "\uf1b6"
640 | property string steamSquare : "\uf1b7"
641 | property string stepBackward : "\uf048"
642 | property string stepForward : "\uf051"
643 | property string stethoscope : "\uf0f1"
644 | property string stickyNote : "\uf249"
645 | property string stickyNoteO : "\uf24a"
646 | property string stop : "\uf04d"
647 | property string stopCircle : "\uf28d"
648 | property string stopCircleO : "\uf28e"
649 | property string streetView : "\uf21d"
650 | property string strikethrough : "\uf0cc"
651 | property string stumbleupon : "\uf1a4"
652 | property string stumbleuponCircle : "\uf1a3"
653 | property string subscript : "\uf12c"
654 | property string subway : "\uf239"
655 | property string suitcase : "\uf0f2"
656 | property string sunO : "\uf185"
657 | property string superpowers : "\uf2dd"
658 | property string superscript : "\uf12b"
659 | property string support : "\uf1cd"
660 | property string table : "\uf0ce"
661 | property string tablet : "\uf10a"
662 | property string tachometer : "\uf0e4"
663 | property string tag : "\uf02b"
664 | property string tags : "\uf02c"
665 | property string tasks : "\uf0ae"
666 | property string taxi : "\uf1ba"
667 | property string telegram : "\uf2c6"
668 | property string television : "\uf26c"
669 | property string tencentWeibo : "\uf1d5"
670 | property string terminal : "\uf120"
671 | property string textHeight : "\uf034"
672 | property string textWidth : "\uf035"
673 | property string th : "\uf00a"
674 | property string thLarge : "\uf009"
675 | property string thList : "\uf00b"
676 | property string themeisle : "\uf2b2"
677 | property string thermometer : "\uf2c7"
678 | property string thermometer0 : "\uf2cb"
679 | property string thermometer1 : "\uf2ca"
680 | property string thermometer2 : "\uf2c9"
681 | property string thermometer3 : "\uf2c8"
682 | property string thermometer4 : "\uf2c7"
683 | property string thermometerEmpty : "\uf2cb"
684 | property string thermometerFull : "\uf2c7"
685 | property string thermometerHalf : "\uf2c9"
686 | property string thermometerQuarter : "\uf2ca"
687 | property string thermometerThreeQuarters : "\uf2c8"
688 | property string thumbTack : "\uf08d"
689 | property string thumbsDown : "\uf165"
690 | property string thumbsODown : "\uf088"
691 | property string thumbsOUp : "\uf087"
692 | property string thumbsUp : "\uf164"
693 | property string ticket : "\uf145"
694 | property string times : "\uf00d"
695 | property string timesCircle : "\uf057"
696 | property string timesCircleO : "\uf05c"
697 | property string timesRectangle : "\uf2d3"
698 | property string timesRectangleO : "\uf2d4"
699 | property string tint : "\uf043"
700 | property string toggleDown : "\uf150"
701 | property string toggleLeft : "\uf191"
702 | property string toggleOff : "\uf204"
703 | property string toggleOn : "\uf205"
704 | property string toggleRight : "\uf152"
705 | property string toggleUp : "\uf151"
706 | property string trademark : "\uf25c"
707 | property string train : "\uf238"
708 | property string transgender : "\uf224"
709 | property string transgenderAlt : "\uf225"
710 | property string trash : "\uf1f8"
711 | property string trashO : "\uf014"
712 | property string tree : "\uf1bb"
713 | property string trello : "\uf181"
714 | property string tripadvisor : "\uf262"
715 | property string trophy : "\uf091"
716 | property string truck : "\uf0d1"
717 | property string tryIcon : "\uf195"
718 | property string tty : "\uf1e4"
719 | property string tumblr : "\uf173"
720 | property string tumblrSquare : "\uf174"
721 | property string turkishLira : "\uf195"
722 | property string tv : "\uf26c"
723 | property string twitch : "\uf1e8"
724 | property string twitter : "\uf099"
725 | property string twitterSquare : "\uf081"
726 | property string umbrella : "\uf0e9"
727 | property string underline : "\uf0cd"
728 | property string undo : "\uf0e2"
729 | property string universalAccess : "\uf29a"
730 | property string university : "\uf19c"
731 | property string unlink : "\uf127"
732 | property string unlock : "\uf09c"
733 | property string unlockAlt : "\uf13e"
734 | property string unsorted : "\uf0dc"
735 | property string upload : "\uf093"
736 | property string usb : "\uf287"
737 | property string usd : "\uf155"
738 | property string user : "\uf007"
739 | property string userCircle : "\uf2bd"
740 | property string userCircleO : "\uf2be"
741 | property string userMd : "\uf0f0"
742 | property string userO : "\uf2c0"
743 | property string userPlus : "\uf234"
744 | property string userSecret : "\uf21b"
745 | property string userTimes : "\uf235"
746 | property string users : "\uf0c0"
747 | property string vcard : "\uf2bb"
748 | property string vcardO : "\uf2bc"
749 | property string venus : "\uf221"
750 | property string venusDouble : "\uf226"
751 | property string venusMars : "\uf228"
752 | property string viacoin : "\uf237"
753 | property string viadeo : "\uf2a9"
754 | property string viadeoSquare : "\uf2aa"
755 | property string videoCamera : "\uf03d"
756 | property string vimeo : "\uf27d"
757 | property string vimeoSquare : "\uf194"
758 | property string vine : "\uf1ca"
759 | property string vk : "\uf189"
760 | property string volumeControlPhone : "\uf2a0"
761 | property string volumeDown : "\uf027"
762 | property string volumeOff : "\uf026"
763 | property string volumeUp : "\uf028"
764 | property string warning : "\uf071"
765 | property string wechat : "\uf1d7"
766 | property string weibo : "\uf18a"
767 | property string weixin : "\uf1d7"
768 | property string whatsapp : "\uf232"
769 | property string wheelchair : "\uf193"
770 | property string wheelchairAlt : "\uf29b"
771 | property string wifi : "\uf1eb"
772 | property string wikipediaW : "\uf266"
773 | property string windowClose : "\uf2d3"
774 | property string windowCloseO : "\uf2d4"
775 | property string windowMaximize : "\uf2d0"
776 | property string windowMinimize : "\uf2d1"
777 | property string windowRestore : "\uf2d2"
778 | property string windows : "\uf17a"
779 | property string won : "\uf159"
780 | property string wordpress : "\uf19a"
781 | property string wpbeginner : "\uf297"
782 | property string wpexplorer : "\uf2de"
783 | property string wpforms : "\uf298"
784 | property string wrench : "\uf0ad"
785 | property string xing : "\uf168"
786 | property string xingSquare : "\uf169"
787 | property string yCombinator : "\uf23b"
788 | property string yCombinatorSquare : "\uf1d4"
789 | property string yahoo : "\uf19e"
790 | property string yc : "\uf23b"
791 | property string ycSquare : "\uf1d4"
792 | property string yelp : "\uf1e9"
793 | property string yen : "\uf157"
794 | property string yoast : "\uf2b1"
795 | property string youtube : "\uf167"
796 | property string youtubePlay : "\uf16a"
797 | property string youtubeSquare : "\uf166"
798 | }
799 |
--------------------------------------------------------------------------------
/plasmoid/contents/vendor/FontAwesome/Object.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.0
2 |
3 | QtObject {
4 | id: object
5 | default property alias children: object.__children
6 |
7 | property list __children: [QtObject {}]
8 | }
9 |
--------------------------------------------------------------------------------
/plasmoid/contents/vendor/FontAwesome/README.txt:
--------------------------------------------------------------------------------
1 | This was copy-pasted verbatim from:
2 | https://github.com/benlau/fontawesome.pri/tree/master/FontAwesome
3 |
4 | I wanted to consume it as a QPM package as the author intended, but
5 | there doesn't seem to be a sensible way of doing so in a project
6 | using CMake.
7 |
--------------------------------------------------------------------------------
/plasmoid/contents/vendor/FontAwesome/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lipido/kargos/b4670d0b8fea14087e01b1037fe6c5f892dacde7/plasmoid/contents/vendor/FontAwesome/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/plasmoid/contents/vendor/FontAwesome/qmldir:
--------------------------------------------------------------------------------
1 | module FontAwesome
2 | singleton FontAwesome 1.0 FontAwesome.qml
3 |
--------------------------------------------------------------------------------
/plasmoid/metadata.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Encoding=UTF-8
3 | Name=kargos
4 | Comment=Argos port to KDE Plasma
5 | Type=Service
6 |
7 | X-KDE-ParentApp=
8 | X-KDE-PluginInfo-Author=lipido
9 | X-KDE-PluginInfo-Email=lipido@gmail.com
10 | X-KDE-PluginInfo-License=GPL
11 | X-KDE-PluginInfo-Name=org.kde.kargos
12 | X-KDE-PluginInfo-Version=0.6.0
13 | X-KDE-PluginInfo-Website=https://github.com/lipido/kargos
14 | X-KDE-ServiceTypes=Plasma/Applet
15 | X-Plasma-API=declarativeappletscript
16 | X-Plasma-MainScript=ui/main.qml
17 | X-Plasma-RemoteLocation=
18 | X-KDE-PluginInfo-Category=Windows and Tasks
19 |
20 |
--------------------------------------------------------------------------------