aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop-unified/extrafiles
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/core/lumina-desktop-unified/extrafiles')
-rw-r--r--src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Matrix.json25
-rw-r--r--src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Matrix.qml71
2 files changed, 96 insertions, 0 deletions
diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Matrix.json b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Matrix.json
new file mode 100644
index 00000000..52cd16ee
--- /dev/null
+++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Matrix.json
@@ -0,0 +1,25 @@
+{
+ "name" : {
+ "default" : "Matrix"
+ },
+ "description" : {
+ "default" : "Erratic falling columns of various characters with a set color"
+ },
+ "author" : {
+ "name" : "Zackary Welch",
+ "email" : "zwelch@ixsystems.com",
+ "website" : "https://github.com/ZackaryWelch",
+ "company" : "iXsystems",
+ "company_website" : "http://ixsystems.com"
+ },
+ "meta" : {
+ "license" : "3-clause BSD",
+ "license_url" : "https://github.com/trueos/lumina/blob/master/LICENSE",
+ "copyright" : "Copyright (c) 2017, Ken Moore (ken@ixsystems.com)",
+ "date_created" : "20180103",
+ "version" : "1.0"
+ },
+ "qml" : {
+ "exec" : "qml_scripts/Matrix.qml"
+ }
+}
diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Matrix.qml b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Matrix.qml
new file mode 100644
index 00000000..d4031201
--- /dev/null
+++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Matrix.qml
@@ -0,0 +1,71 @@
+import QtQuick 2.0
+import QtMultimedia 5.7
+import QtQuick.Window 2.2
+
+Rectangle {
+ width: Window.width
+ height: Window.height
+ color: "black"
+
+ Row{
+ id: masterRow
+ anchors.left: parent.left
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: parent.width
+ spacing: 5
+ Repeater {
+ id: cR
+ model: Window.width / 15 + 1
+ Column {
+ id: masterColumn
+ width: 10
+ Text {
+ id: column
+ color: "#ff4d4d"
+ font.pixelSize: 10
+ transform: Rotation { origin.x: 0; origin.y: 0; angle: 90 }
+ Timer {
+ interval: 50
+ repeat: true
+ running: true
+ onTriggered: {
+ if(Math.random() < 0.95) {
+ var bottom = column.text.charAt(column.text.length-1)
+ var newString = bottom+column.text.substring(0, column.text.length-1)
+ column.text = newString
+ interval = 50
+ }else{
+ interval = 1000
+ }
+ }
+ }
+ Component.onCompleted: {
+ var str = " "
+ var numberChar = Math.random() * 100 + (Window.height * 0.1);
+ if(Math.random() < 0.80) {
+ while(str.length < numberChar) {
+ if(Math.random() < 0.5) {
+ var charCount = Math.random() * 8 + 10
+ var segStr = ""
+ while(segStr.length < charCount) {
+ var randChar = String.fromCharCode(0x30A0 + Math.random() * (0x30FF-0x30A0+1));
+ segStr += randChar
+ }
+ str += segStr
+ }else{
+ var charCount = Math.random() * 6 + 14
+ var segStr = ""
+ while(segStr.length < charCount) {
+ segStr += " "
+ }
+ str += segStr
+ }
+ }
+ }
+ column.text = str
+ }
+ }
+ }
+ }
+ }
+}
bgstack15