1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-07 03:22:33 +01:00

Add basic kde support

This commit is contained in:
Elias Steurer 2020-11-07 17:44:13 +01:00
parent 2d8c9f2af8
commit bf1fa16d88
5 changed files with 91 additions and 0 deletions

View File

@ -0,0 +1,13 @@
# ScreenPlay Wallpaper for KDE Plasma Desktop
One has to install it via the command below. Simply putting it into:
* ~/.local/share/plasma/wallpapers/
Will not work because KDE uses the kpluginindex.json (that is actually a bz2 file. Do not ask why...) to load all available wallpaper.
#### Installation
```
plasmapkg2 --install ScreenPlay
```
#### Application structure
Because Wallpaper and Widgets are already a different application we can extend the logic for KDE. For this we create a local websocket instance to communicate with our main ScreenPlay app.

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
<kcfgfile name=""/>
<group name="General">
<entry name="StopWallpaperIfHidden" type="Bool">
<label>Stop Wallpaper if not visible</label>
<default>false</default>
</entry>
</group>
</kcfg>

View File

@ -0,0 +1,32 @@
import QtQuick 2.11
import QtQuick.Controls 2.4 as QQC
import QtQuick.Window 2.0
import QtGraphicalEffects 1.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.wallpapers.image 2.0 as Wallpaper
import org.kde.kcm 1.1 as KCM
import org.kde.kirigami 2.4 as Kirigami
import org.kde.newstuff 1.1 as NewStuff
Column {
id: root
anchors.fill:parent
property alias cfg_StopWallpaperIfHidden: stopWallpaperIfHidden.checked
spacing: units.largeSpacing
Row {
anchors.horizontalCenter: parent.horizontalCenter
spacing: units.largeSpacing
QQC.CheckBox {
id: stopWallpaperIfHidden
text: i18nd("plasma_applet_org.kde.image","Stop animation when a window is maximized");
}
}
}

View File

@ -0,0 +1,12 @@
import QtQuick 2.11
import org.kde.plasma.core 2.0 as PlasmaCore
import QtGraphicalEffects 1.0
import QtQuick.Window 2.0
Rectangle {
id: root
color: "orange"
width: Screen.width
height: Screen.height
}

View File

@ -0,0 +1,19 @@
[Desktop Entry]
Encoding=UTF-8
Name=ScreenPlay
Keywords=ScreenPlay
Icon=preferences-desktop-wallpaper
Type=Service
X-KDE-ServiceTypes=Plasma/Wallpaper
X-KDE-ParentApp=
X-KDE-PluginInfo-Name=ScreenPlay
X-KDE-PluginInfo-EnabledByDefault=true
X-KDE-PluginInfo-Version=3
X-KDE-PluginInfo-Website=https://gitlab.com/kelteseth/screenplay
X-Plasma-MainScript=ui/main.qml
MimeType=image/gif;image/png;image/svg+xml;image/svg+xml-compressed;video/x-mng;
X-Plasma-DropMimeTypes=image/gif,image/png,image/svg+xml,image/svg+xml-compressed,video/x-mng