├── README.md ├── SmartVideoWallpaper ├── README.md ├── setImageWallpaper.sh ├── setSmartVideoWallpaper.sh └── smartvideowallpaper │ ├── contents │ ├── config │ │ └── main.xml │ └── ui │ │ ├── ReadMe.qml │ │ ├── config.qml │ │ ├── main.qml │ │ ├── mediaplayer │ │ ├── WindowModel.qml │ │ ├── loading.qml │ │ └── player.qml │ │ └── preview │ │ ├── Icon Licence.txt │ │ ├── QuickPreview.qml │ │ ├── media-playback-pause.svg │ │ └── media-playback-start.svg │ └── metadata.desktop ├── _config.yml └── images ├── menu_session.png ├── menu_splash.png ├── pear_dark_01.png ├── pear_dark_01b.png ├── pear_light_02.png └── pear_light_02b.png /README.md: -------------------------------------------------------------------------------- 1 | ## Welcome to my look and feel themes for Plasma 2 | 3 | 4 | 5 | --- 6 | 7 | ### Light and dark themes 8 | 9 | [![screen](https://raw.githubusercontent.com/adhec/plasma_tweaks/master/images/pear_light_02b.png)](https://raw.githubusercontent.com/adhec/plasma_tweaks/master/images/pear_light_02.png) 10 | 11 | [![screen](https://raw.githubusercontent.com/adhec/plasma_tweaks/master/images/pear_dark_01b.png)](https://raw.githubusercontent.com/adhec/plasma_tweaks/master/images/pear_dark_01.png) 12 | 13 | --- 14 | 15 | ### 1 Installation 16 | 17 | Install from Plasma SystemSettings: 18 | 19 | ```bash 20 | [ SystemSettings > Look and Feel > Get New Look and Feel > Search "Pear" > Click in install button ] 21 | ``` 22 | 23 | ### 2 Usage 24 | 25 | Select the theme from the SystemSettings > Look and Feel 26 | 27 | ### 3 Services menu for change animations 28 | 29 | #### Dependencies 30 | 31 | Most cases are already installed by default, but to confirm install: 32 | 33 | Arch 34 | - sudo pacman -S imagemagick 35 | - sudo pacman -S kdialog 36 | 37 | Ubuntu 38 | - sudo apt install imagemagick 39 | - sudo apt install kdialog 40 | 41 | #### 3.1 Change animation of the session 42 | 43 | [![screen](https://raw.githubusercontent.com/adhec/plasma_tweaks/master/images/menu_session.png)]() 44 | 45 | ```bash 46 | 1. Right click on your preferred animation to open the menu 47 | 2. Select "Actions" 48 | 3. Choose "Set as Session GIF" 49 | ``` 50 | The chosen animation is independent of the animation used by the SDDM login manager. 51 | 52 | ### 3.2 Change animation of the splashscreen 53 | 54 | [![screen](https://raw.githubusercontent.com/adhec/plasma_tweaks/master/images/menu_splash.png)]() 55 | 56 | ```bash 57 | 1. Right click on your preferred animation to open the menu 58 | 2. Select "Actions" 59 | 3. Choose "Set as Splashscreen GIF" 60 | ``` 61 | 62 | For test the splash screen, from terminal write: 63 | ```bash 64 | # replace "PearLight" with your current theme 65 | ksplashqml --test --window ~/.local/share/plasma/look-and-feel/PearLight 66 | ``` 67 | 68 | ## For animations in Login manager Plasma (SDDM) 69 | 70 | Visit [Ittu themes for SDDM](https://adhec.github.io/sddm_themes/) 71 | 72 | # Coffee 73 | 74 | ### Coffee 75 | 76 | Thanks for all the support. If you like what I do, 77 | Share your ❤️ Buy me a ☕ 78 | 79 | [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=V9Q8MK9CKSQW8&source=url) or [Donate using Liberapay](https://liberapay.com/_adhe_/donate) 80 | 81 | Have fun ;) 82 | 83 | -------------------------------------------------------------------------------- /SmartVideoWallpaper/README.md: -------------------------------------------------------------------------------- 1 | # Reddit/r/Unixporn description 2 | 3 | [https://www.reddit.com/r/unixporn/comments/cj4dfh/plasma_smart_video_wallpaper/](https://www.reddit.com/r/unixporn/comments/cj4dfh/plasma_smart_video_wallpaper/) 4 | 5 | 6 | 7 | Now you can use a video wallpaper using few resources, this plugin pauses the video when the background desktop is not visible ;). You can see this by monitoring the process "plasmashell". 8 | 9 | + **Installation**: 10 | Installation in the last plasma: 11 | Right click on the desktop > Configure Desktop > Get New Plugins > Search "Smart video wallpaper"> Install 12 | 13 | If you do not see the option "Get new plugins" visit this link [Smart video wallpaper](https://www.pling.com/p/1316299/) for more details. 14 | 15 | + **To use**: 16 | Right click on the desktop> Configure Desktop> in Wallpaper type select "Smart video wallpaper" and select some video. 17 | 18 | For video lock screen please use: 19 | + **For Video lockscreen**: [Video lockscreen](https://www.pling.com/p/1316300/) 20 | ---- 21 | 22 | Details theme: 23 | 24 | + **Dock**: LatteDock 25 | ditto menu - latte window buttons - icons task manager - title window applet - menu applet - pager - systemtray 26 | + **Plasma theme**: Pear Dark 27 | + **Look and feel**: Pear Dark [gif animation theme](https://www.reddit.com/r/unixporn/comments/cc2462/plasma_animations_for_plasma_look_and_feel/) 28 | + **Icons**: Aether icons 29 | + **Video wallpapers sites**: taken from [desktophut](https://www.desktophut.com/), [pexels](https://www.pexels.com/search/videos/free%20wallpaper/) and [komorebi](https://github.com/cheesecakeufo/komorebi). 30 | 31 | Some videos: 32 | [Seashore](https://www.pexels.com/video/waves-rushing-to-the-shore-1321208/), [waterfalls](https://www.pexels.com/video/amazing-shot-of-waterfalls-in-slow-motion-2039605/), [anime](https://www.desktophut.com/grace-lamp-anime-live-wallpaper/) and 33 | [dreams of the sea - i like this one, try it with sound -](https://www.desktophut.com/wake-up-anime-live-wallpaper/) 34 | 35 | ---- 36 | 37 | ## Scripts 38 | 39 | For use "Smart Video Wallpaper" when the charger is attached use the scripts in [https://github.com/adhec/plasma_tweaks/tree/master/SmartVideoWallpaper](https://github.com/adhec/plasma_tweaks/tree/master/SmartVideoWallpaper) 40 | 41 | #### Configuration 42 | 43 | First set execute permission for the scripts: 44 | 45 | ```bash 46 | chmod +x setSmartVideoWallpaper.sh 47 | chmod +x setImage.sh 48 | ``` 49 | 50 | **Pluggued** SystemSettings > Notifications > Power Management > Configure events > Ac Adaptor plugged in > Run command > Select path script "setSmartVideoWallpaper.sh" 51 | 52 | **Unpluggued** SystemSettings > Notifications > Power Management > Configure events > Ac Adaptor unplugged > Run command > Select path script "setImageWallpaper.sh" 53 | 54 | -------------------------------------------------------------------------------- /SmartVideoWallpaper/setImageWallpaper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | dbus-send --session --dest=org.kde.plasmashell --type=method_call /PlasmaShell org.kde.PlasmaShell.evaluateScript \ 3 | 'string: var Desktops = desktops(); for (i=0;i 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | black 16 | 17 | 18 | 19 | 2 20 | 21 | 22 | 23 | true 24 | 25 | 26 | 27 | true 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /SmartVideoWallpaper/smartvideowallpaper/contents/ui/ReadMe.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Rog131 3 | * Copyright 2019 adhe 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. 18 | */ 19 | 20 | import QtQuick 2.7 21 | import QtQuick.Controls 1.4 22 | 23 | ApplicationWindow { 24 | id: root 25 | width: 640 26 | height: 480 27 | 28 | TextArea { 29 | anchors.centerIn: parent 30 | width: parent.width 31 | height: parent.height 32 | text: "Description\n\nVideo wallpaper is a KDE plasma wallpaper / lock screen background plugin to play video files as background. The Video wallpaper plugin started as a KDE forums answer /1/. \n\nNotes\n\nThe Video wallpaper will need gstreamer plugins to play video/audio. To get possible error messages launch the plasmashell or the lockscreen from the terminal /2/.\n\nThe CPU load will decrease if you use less compressed video format and use smaller resolution videos.\n\nThe Qt is lacking gapless media player /3/. The realod of the media can be hide by using two media players /4/ - option 'Use double player'.\n\nWith the latest plasma (post 5.10) the lock screen doesn't have the audio with the video wallpaper /5/. \n\nLinks\n\n[1] https://forum.kde.org/viewtopic.php?f=289&t=131783\n[2] https://forum.kde.org/viewtopic.php?f=289&t=131783&start=45#p382975\n[3] https://bugreports.qt.io/browse/QTBUG-49446\n[4] https://forum.kde.org/viewtopic.php?f=289&t=131783&start=15#p365313\n[5] https://forum.kde.org/viewtopic.php?f=289&t=131783&start=45#p383041" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /SmartVideoWallpaper/smartvideowallpaper/contents/ui/config.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Rog131 3 | * Copyright 2019 adhe 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. 18 | */ 19 | 20 | import QtQuick 2.7 21 | import QtQuick.Controls 1.4 22 | import QtQuick.Controls.Styles 1.4 23 | import QtQuick.Dialogs 1.2 24 | import QtQuick.Layouts 1.2 25 | import QtMultimedia 5.8 26 | 27 | import org.kde.plasma.core 2.0 as PlasmaCore 28 | 29 | Item { 30 | id: root 31 | property string cfg_VideoWallpaperBackgroundVideo 32 | property string cfg_BackgroundColor: "black" 33 | property int cfg_FillMode: 2 34 | property bool cfg_MuteAudio: true 35 | property bool cfg_DoublePlayer: true 36 | //anchors.fill: parent 37 | 38 | RowLayout { 39 | id: videoPath 40 | anchors.top: parent.top 41 | anchors.horizontalCenter: parent.horizontalCenter 42 | Layout.fillWidth:true 43 | 44 | Label { 45 | text: "Video path: " 46 | } 47 | TextField { 48 | id: videoPathLine 49 | Layout.fillWidth:true 50 | Layout.maximumWidth: previewArea.width - 150 51 | Layout.minimumWidth: previewArea.width * 0.5 52 | placeholderText: "Video" 53 | text: cfg_VideoWallpaperBackgroundVideo 54 | readOnly : true 55 | } 56 | 57 | Button { 58 | id: imageButton 59 | implicitWidth: height 60 | PlasmaCore.IconItem { 61 | anchors.fill: parent 62 | source: "folder-videos-symbolic" 63 | PlasmaCore.ToolTipArea { 64 | anchors.fill: parent 65 | subText: "Pick video" 66 | } 67 | } 68 | MouseArea { 69 | anchors.fill: parent 70 | onClicked: {fileDialog.open() } 71 | } 72 | } 73 | } 74 | 75 | RowLayout { 76 | id: fillModeRow 77 | anchors.top: videoPath.bottom 78 | anchors.horizontalCenter: parent.horizontalCenter 79 | 80 | Label { 81 | text: "Video fill mode: " 82 | Layout.alignment: Qt.AlignLeft 83 | } 84 | ComboBox { 85 | id: videoFillMode 86 | model: [ 87 | { 88 | 'label': "Stretch", 89 | 'fillMode': VideoOutput.Stretch 90 | }, 91 | { 92 | 'label': "Scaled, Keep Proportions", 93 | 'fillMode': VideoOutput.PreserveAspectFit 94 | }, 95 | { 96 | 'label': "Scaled and Cropped", 97 | 'fillMode': VideoOutput.PreserveAspectCrop 98 | } 99 | ] 100 | textRole: "label" 101 | onCurrentIndexChanged: cfg_FillMode = model[currentIndex]["fillMode"] 102 | Component.onCompleted: setMethod(); 103 | 104 | function setMethod() { 105 | for (var i = 0; i < model.length; i++) { 106 | if (model[i]["fillMode"] == wallpaper.configuration.FillMode) { 107 | videoFillMode.currentIndex = i; 108 | } 109 | } 110 | } 111 | } 112 | Label { 113 | text: "Background Color: " 114 | Layout.alignment: Qt.AlignLeft 115 | } 116 | Button { 117 | id: colorButton 118 | implicitWidth: height 119 | Rectangle { 120 | id: colorRect 121 | anchors.fill: parent 122 | border.color: "lightgray" 123 | border.width: 1 124 | radius: 4 125 | color: cfg_BackgroundColor 126 | } 127 | MouseArea { 128 | anchors.fill: parent 129 | onClicked: colorDialog.open() 130 | } 131 | } 132 | } 133 | 134 | RowLayout { 135 | id: radioRow 136 | anchors.top: fillModeRow.bottom 137 | anchors.horizontalCenter: parent.horizontalCenter 138 | RadioButton { 139 | id: muteRadio 140 | text: "Mute audio" 141 | checked: cfg_MuteAudio 142 | onCheckedChanged: { 143 | if (checked) { 144 | cfg_MuteAudio = true 145 | } else { 146 | cfg_MuteAudio = false 147 | } 148 | } 149 | } 150 | RadioButton { 151 | id: doubleRadio 152 | text: "Use double player" 153 | checked: cfg_DoublePlayer 154 | onCheckedChanged: { 155 | if (checked) { 156 | cfg_DoublePlayer = true 157 | } else { 158 | cfg_DoublePlayer = false 159 | } 160 | } 161 | } 162 | Button { 163 | id: readmeButton 164 | text: "Read me" 165 | 166 | onClicked: { 167 | var component = Qt.createComponent("ReadMe.qml") 168 | var window = component.createObject(root) 169 | window.show() 170 | } 171 | } 172 | } 173 | 174 | Rectangle { 175 | id: previewArea 176 | width: parent.width 177 | height: width / 1.778 178 | anchors.top: radioRow.bottom 179 | //anchors.bottom: parent.bottom 180 | color: "transparent" 181 | border.color: "lightgray" 182 | border.width: 2 183 | Loader { 184 | id: videoPreviewLoader 185 | anchors.fill: parent 186 | } 187 | } 188 | 189 | ColorDialog { 190 | id: colorDialog 191 | title: "Select Background Color" 192 | onAccepted: { 193 | cfg_BackgroundColor = colorDialog.color 194 | } 195 | } 196 | 197 | FileDialog { 198 | id: fileDialog 199 | selectMultiple : false 200 | title: "Pick a video file" 201 | nameFilters: [ "Video files (*.mp4 *.mpg *.ogg *.mov *.webm *.flv *.matroska *.avi *wmv)", "All files (*)" ] 202 | onAccepted: { 203 | cfg_VideoWallpaperBackgroundVideo = fileDialog.fileUrls[0] 204 | videoPreviewLoader.source = "preview/QuickPreview.qml" 205 | } 206 | } 207 | 208 | onCfg_VideoWallpaperBackgroundVideoChanged: { 209 | videoPathLine.text = cfg_VideoWallpaperBackgroundVideo 210 | videoPreviewLoader.source = "preview/QuickPreview.qml" 211 | } 212 | } 213 | -------------------------------------------------------------------------------- /SmartVideoWallpaper/smartvideowallpaper/contents/ui/main.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Rog131 3 | * Copyright 2019 adhe 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. 18 | */ 19 | 20 | import QtQuick 2.7 21 | 22 | import org.kde.plasma.core 2.0 as Plasmacore 23 | 24 | Item { 25 | anchors.fill: parent 26 | 27 | /* Using loader as the plasma will crash if trying to change the video source on the fly. 28 | * Not crashing if setting the loader inactive and then again active */ 29 | 30 | Loader { 31 | id: mediaPlayerLoader 32 | anchors.fill: parent 33 | } 34 | 35 | Timer { 36 | id: smoother 37 | interval: 100 38 | onTriggered: mediaPlayerLoader.source = "mediaplayer/player.qml" 39 | } 40 | 41 | Component.onCompleted: { 42 | //mediaPlayerLoader.source = "mediaplayer/loading.qml" 43 | reLoad () 44 | smoother.start() 45 | } 46 | 47 | function reLoad() { 48 | mediaPlayerLoader.active = false 49 | mediaPlayerLoader.active = true 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /SmartVideoWallpaper/smartvideowallpaper/contents/ui/mediaplayer/WindowModel.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Rog131 3 | * Copyright 2019 adhe 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. 18 | */ 19 | 20 | import QtQuick 2.1 21 | import QtQuick.Controls 1.0 22 | import QtQuick.Layouts 1.3 23 | import QtQuick.Window 2.1 24 | import org.kde.plasma.core 2.0 as PlasmaCore 25 | 26 | import org.kde.taskmanager 0.1 as TaskManager 27 | 28 | Item { 29 | property alias screenGeometry: tasksModel.screenGeometry 30 | property bool playVideoWallpaper: true 31 | property bool currentWindowMaximized: false 32 | property bool isActiveWindowPinned: false 33 | 34 | TaskManager.VirtualDesktopInfo { id: virtualDesktopInfo } 35 | TaskManager.ActivityInfo { id: activityInfo } 36 | TaskManager.TasksModel { 37 | id: tasksModel 38 | sortMode: TaskManager.TasksModel.SortVirtualDesktop 39 | groupMode: TaskManager.TasksModel.GroupDisabled 40 | 41 | activity: activityInfo.currentActivity 42 | virtualDesktop: virtualDesktopInfo.currentDesktop 43 | screenGeometry: wallpaper.screenGeometry // Warns "Unable to assign [undefined] to QRect" during init, but works thereafter. 44 | 45 | filterByActivity: true 46 | filterByVirtualDesktop: true 47 | filterByScreen: true 48 | 49 | onActiveTaskChanged: { 50 | updateWindowsinfo() 51 | } 52 | onDataChanged: { 53 | updateWindowsinfo() 54 | } 55 | Component.onCompleted: { 56 | maximizedWindowModel.sourceModel = tasksModel 57 | fullScreenWindowModel.sourceModel = tasksModel 58 | } 59 | } 60 | PlasmaCore.SortFilterModel { 61 | id: maximizedWindowModel 62 | filterRole: 'IsMaximized' 63 | filterRegExp: 'true' 64 | onDataChanged: { 65 | updateWindowsinfo() 66 | } 67 | onCountChanged: { 68 | updateWindowsinfo() 69 | } 70 | } 71 | PlasmaCore.SortFilterModel { 72 | id: fullScreenWindowModel 73 | filterRole: 'IsFullScreen' 74 | filterRegExp: 'true' 75 | onDataChanged: { 76 | updateWindowsinfo() 77 | } 78 | onCountChanged: { 79 | updateWindowsinfo() 80 | } 81 | } 82 | 83 | function updateWindowsinfo() { 84 | // tasksModel.requestToggleMinimized(idx); FIXME: task with state maximized and minimized pause the video 85 | playVideoWallpaper = (fullScreenWindowModel.count + maximizedWindowModel.count) == 0 ? true : false 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /SmartVideoWallpaper/smartvideowallpaper/contents/ui/mediaplayer/loading.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Rog131 3 | * Copyright 2019 adhe 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. 18 | */ 19 | 20 | import QtQuick 2.7 21 | import QtQuick.Controls 1.4 22 | 23 | import org.kde.plasma.core 2.0 as PlasmaCore 24 | 25 | Rectangle { 26 | id: back 27 | anchors.fill: parent 28 | color: wallpaper.configuration.BackgroundColor 29 | 30 | BusyIndicator { 31 | anchors.verticalCenter: parent.verticalCenter; anchors.horizontalCenter: parent.horizontalCenter; 32 | running: true 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /SmartVideoWallpaper/smartvideowallpaper/contents/ui/mediaplayer/player.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Rog131 3 | * Copyright 2019 adhe 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. 18 | */ 19 | 20 | //http://doc.qt.io/qt-5/qml-qtmultimedia-video.html 21 | //https://doc.qt.io/qt-5/qml-qtmultimedia-playlist.html 22 | 23 | import QtQuick 2.7 24 | import QtMultimedia 5.8 25 | 26 | import org.kde.plasma.core 2.0 as PlasmaCore 27 | 28 | Rectangle { 29 | id: background 30 | anchors.fill: parent 31 | color: wallpaper.configuration.BackgroundColor 32 | 33 | property bool playing: windowModel.playVideoWallpaper 34 | 35 | onPlayingChanged: background.playing ? playlistplayer.play() : playlistplayer.pause() 36 | 37 | WindowModel { 38 | id: windowModel 39 | } 40 | 41 | // Double -> 42 | property var doublePlayerStatus: wallpaper.configuration.DoublePlayer 43 | onDoublePlayerStatusChanged: stopgap() 44 | 45 | MediaPlayer { 46 | id: playlistplayer2 47 | autoPlay: false 48 | muted: true 49 | playlist: Playlist { 50 | id: playlist2 51 | playbackMode: Playlist.Loop 52 | property var videoList2: addItem( wallpaper.configuration.VideoWallpaperBackgroundVideo ) 53 | } 54 | } 55 | 56 | VideoOutput { 57 | id: videoView2 58 | fillMode: wallpaper.configuration.FillMode 59 | anchors.fill: parent 60 | source: playlistplayer2 61 | Timer { 62 | id: videoGuard2 63 | interval: 1000; running: true; repeat: true 64 | onTriggered: { 65 | if ( wallpaper.configuration.DoublePlayer ) { 66 | if ( playlist2.itemCount > 1 ) { 67 | playlistplayer2.stop() 68 | playlist2.next() 69 | playlist2.removeItem(0) 70 | stopgap() 71 | } 72 | } 73 | } 74 | } 75 | } 76 | 77 | function stopgap() { 78 | if ( wallpaper.configuration.DoublePlayer ) { 79 | playlistplayer2.play() 80 | playlistplayer2.seek(0) 81 | playlistplayer2.pause() 82 | } else { 83 | playlistplayer2.stop() 84 | } 85 | } 86 | 87 | MediaPlayer { 88 | id: playlistplayer 89 | autoPlay: false 90 | muted: wallpaper.configuration.MuteAudio 91 | playlist: Playlist { 92 | id: playlist 93 | playbackMode: Playlist.Loop 94 | property var videoList: addItem( wallpaper.configuration.VideoWallpaperBackgroundVideo ) 95 | } 96 | } 97 | // <- Double 98 | 99 | VideoOutput { 100 | id: videoView 101 | //visible: false 102 | fillMode: wallpaper.configuration.FillMode 103 | anchors.fill: parent 104 | source: playlistplayer 105 | Timer { 106 | id: videoGuard 107 | interval: 1000; running: true; repeat: true 108 | onTriggered: { 109 | if ( playlist.itemCount > 1 ) { 110 | playlistplayer.stop() 111 | playlist.next() 112 | playlist.removeItem(0) 113 | playlistplayer.play() 114 | } 115 | } 116 | } 117 | } 118 | Component.onCompleted: { 119 | playlistplayer.play() 120 | if ( wallpaper.configuration.DoublePlayer ) { 121 | playlistplayer2.play() 122 | playlistplayer2.seek(0) 123 | playlistplayer2.pause() 124 | } 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /SmartVideoWallpaper/smartvideowallpaper/contents/ui/preview/Icon Licence.txt: -------------------------------------------------------------------------------- 1 | media-playback-pause.svg 2 | media-playback-start.svg 3 | 4 | Are part of the KDE Breeze icon theme. 5 | -------------------------------------------------------------------------------- /SmartVideoWallpaper/smartvideowallpaper/contents/ui/preview/QuickPreview.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Rog131 3 | * Copyright 2019 adhe 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. 18 | */ 19 | 20 | import QtQuick 2.7 21 | import QtMultimedia 5.8 22 | 23 | import org.kde.plasma.core 2.0 as PlasmaCore 24 | 25 | Rectangle { 26 | id: background 27 | anchors.fill: parent 28 | color: cfg_BackgroundColor 29 | 30 | property var playButtonPressed: 0 31 | 32 | MediaPlayer { 33 | id: mediaplayer 34 | autoPlay: false 35 | autoLoad: true 36 | loops: MediaPlayer.Infinite 37 | muted: cfg_MuteAudio 38 | source: cfg_VideoWallpaperBackgroundVideo 39 | 40 | onSourceChanged: { 41 | seeker() 42 | } 43 | } 44 | 45 | VideoOutput { 46 | id: videoView 47 | fillMode: cfg_FillMode 48 | anchors.fill: parent 49 | source: mediaplayer 50 | 51 | 52 | 53 | Rectangle { 54 | id: actionStripe 55 | color: actionArea.containsMouse ? "#4d000000" : "transparent" | buttonArea.containsMouse ? "#4d000000" : "transparent" 56 | width: parent.width 57 | height: Math.max(32, implicitHeight) 58 | anchors.left: videoView.left; 59 | anchors.top: videoView.top; 60 | 61 | MouseArea { 62 | id: actionArea 63 | hoverEnabled: true 64 | anchors.fill: parent 65 | PlasmaCore.ToolTipArea { 66 | anchors.fill: parent 67 | subText: "LMB: Seek" 68 | } 69 | onPressed: { 70 | mediaplayer.play() 71 | mediaplayer.seek( Math.floor ((mouse.x - actionStripe.height) / ( background.width - actionStripe.height ) * mediaplayer.duration )) 72 | if ( playButtonPressed == 0 ) { mediaplayer.pause() } 73 | } 74 | } 75 | } 76 | 77 | Rectangle { 78 | id: seekStripe 79 | color: actionArea.containsMouse ? "#3daee9" : "transparent" | buttonArea.containsMouse ? "#3daee9" : "transparent" 80 | width: ( parent.width - actionStripe.height ) * mediaplayer.position / mediaplayer.duration 81 | height: actionStripe.height / 5 82 | radius: height / 2 83 | anchors.left: playButton.right; 84 | anchors.verticalCenter: actionStripe.verticalCenter; 85 | } 86 | 87 | Image { 88 | id: playButton 89 | source: actionArea.containsMouse ? "media-playback-start.svg" : "media-playback-start.svg" | buttonArea.containsMouse ? "media-playback-start.svg" : "media-playback-start.svg" 90 | width: actionStripe.height 91 | height: width 92 | anchors.left: videoView.left; 93 | anchors.top: videoView.top; 94 | 95 | MouseArea { 96 | id: buttonArea 97 | acceptedButtons: Qt.LeftButton | Qt.RightButton 98 | hoverEnabled: true 99 | anchors.fill: parent 100 | PlasmaCore.ToolTipArea { 101 | anchors.fill: parent 102 | subText: "LMB: Play/Pause\nRMB: Jump to start" 103 | } 104 | onPressed: { 105 | if (mouse.button == Qt.LeftButton) { 106 | if ( playButtonPressed == 1 ) { 107 | mediaplayer.pause() 108 | playButtonPressed = 0 109 | playButton.source = "media-playback-start.svg" 110 | } else { 111 | mediaplayer.play() 112 | playButtonPressed = 1 113 | playButton.source = "media-playback-pause.svg" 114 | } 115 | } 116 | if (mouse.button == Qt.RightButton) { 117 | mediaplayer.seek(0) 118 | } 119 | } 120 | } 121 | } 122 | 123 | Rectangle { 124 | id: infoText 125 | color: "#4d000000" 126 | width: childrenRect.width 127 | height: childrenRect.height 128 | anchors.top: playButton.bottom 129 | anchors.right: videoView.right; 130 | 131 | Text { 132 | font.pointSize: 12 133 | color: "white" 134 | text: msToHMS(mediaplayer.position) + "/" + msToHMS(mediaplayer.duration) 135 | } 136 | } 137 | } 138 | 139 | function seeker () { 140 | mediaplayer.play() 141 | delay.start() 142 | } 143 | Timer { 144 | id: delay 145 | interval: 500; running: false 146 | onTriggered: { 147 | mediaplayer.seek(0) 148 | mediaplayer.pause() 149 | } 150 | } 151 | 152 | function msToHMS(ms) { 153 | var H = Math.floor(ms / 3600000); 154 | var M = Math.floor((ms - H * 3600000) / 60000); 155 | var S = ((ms % 60000) / 1000).toFixed(0); 156 | return H + ":" + M + ":" + (S < 10 ? '0' : '') + S; 157 | } 158 | } 159 | -------------------------------------------------------------------------------- /SmartVideoWallpaper/smartvideowallpaper/contents/ui/preview/media-playback-pause.svg: -------------------------------------------------------------------------------- 1 | 2 | 15 | 17 | 18 | 20 | image/svg+xml 21 | 23 | 24 | 25 | 26 | 46 | 48 | 55 | 56 | 61 | 62 | -------------------------------------------------------------------------------- /SmartVideoWallpaper/smartvideowallpaper/contents/ui/preview/media-playback-start.svg: -------------------------------------------------------------------------------- 1 | 2 | 15 | 17 | 18 | 20 | image/svg+xml 21 | 23 | 24 | 25 | 26 | 46 | 48 | 55 | 56 | 61 | 62 | -------------------------------------------------------------------------------- /SmartVideoWallpaper/smartvideowallpaper/metadata.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Name=Smart video wallpaper 4 | Name[x-test]=xxVideo wallpaperxx 5 | 6 | Type=Service 7 | ServiceTypes=Plasma/Wallpaper 8 | Icon=preferences-desktop-wallpaper 9 | X-Plasma-MainScript=ui/main.qml 10 | X-KDE-PluginInfo-Name=smartvideowallpaper 11 | X-KDE-PluginInfo-EnabledByDefault=true 12 | X-KDE-PluginInfo-Author=adhe 13 | X-KDE-PluginInfo-Email=adhemarks2[at]gmail[dot]com -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /images/menu_session.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adhec/plasma_tweaks/5042f736eade0b7155f4f10dd5ee30b7a6c4b841/images/menu_session.png -------------------------------------------------------------------------------- /images/menu_splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adhec/plasma_tweaks/5042f736eade0b7155f4f10dd5ee30b7a6c4b841/images/menu_splash.png -------------------------------------------------------------------------------- /images/pear_dark_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adhec/plasma_tweaks/5042f736eade0b7155f4f10dd5ee30b7a6c4b841/images/pear_dark_01.png -------------------------------------------------------------------------------- /images/pear_dark_01b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adhec/plasma_tweaks/5042f736eade0b7155f4f10dd5ee30b7a6c4b841/images/pear_dark_01b.png -------------------------------------------------------------------------------- /images/pear_light_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adhec/plasma_tweaks/5042f736eade0b7155f4f10dd5ee30b7a6c4b841/images/pear_light_02.png -------------------------------------------------------------------------------- /images/pear_light_02b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adhec/plasma_tweaks/5042f736eade0b7155f4f10dd5ee30b7a6c4b841/images/pear_light_02b.png --------------------------------------------------------------------------------