Skip to content

Commit

Permalink
v3.2.0 rel
Browse files Browse the repository at this point in the history
  • Loading branch information
bouteillerAlan committed Oct 1, 2024
1 parent 661a067 commit 9889994
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## V3.2
- Unblur is now trigger when the user "unactive" a window

## V3
- Port to KDE 6 🚀

Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Blur the wallpaper if a windows is active.
- add color and blur option in function of the positioning
- give you the ability to deactivate the effect
- give you the ability to change the blur radius and the animation delay
- `new` the slideshow wallpaper type is available too
- `new` the slideshow wallpaper type is available too

### history

Expand Down Expand Up @@ -67,8 +67,7 @@ See the following file :

## Roadmap

- bug : the first time a user selects slideshow the wallpapers are not displayed
- related : make a kwin script to affect all types of wallpapers ([see that repo](https://github.com/bouteillerAlan/activeblur))
- bug : see issue #25 for the desync when user switch between img and slideshow

## Want to participate? Have a bug or a request feature?

Expand Down
38 changes: 38 additions & 0 deletions a2n.blur/contents/ui/TasksModel.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import QtQuick
import QtQml.Models
import org.kde.taskmanager as TaskManager

Item {
id: plasmaTasksItem

readonly property bool existsWindowActive: root.activeTaskItem && tasksRepeater.count > 0 && activeTaskItem.isActive
property Item activeTaskItem: null

TaskManager.TasksModel {
id: tasksModel
sortMode: TaskManager.TasksModel.SortVirtualDesktop
groupMode: TaskManager.TasksModel.GroupDisabled
activity: activityInfo.currentActivity
virtualDesktop: virtualDesktopInfo.currentDesktop
filterByVirtualDesktop: true
filterByActivity: true
}

Item {
id: taskList

Repeater {
id: tasksRepeater
model: tasksModel

Item {
id: task
readonly property bool isActive: IsActive === true ? true : false

onIsActiveChanged: {
if (isActive) plasmaTasksItem.activeTaskItem = task
}
}
}
}
}
19 changes: 17 additions & 2 deletions a2n.blur/contents/ui/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,30 @@ import QtQuick
import org.kde.plasma.core as PlasmaCore
import org.kde.plasma.wallpapers.image as Wallpaper
import org.kde.plasma.plasmoid

import org.kde.taskmanager as TaskManager
import org.kde.activities as Activities
// for FastBlur
import Qt5Compat.GraphicalEffects
import QtQml.Models

WallpaperItem {
id: root

property bool isAnyWindowActive: Application.active
//property bool isAnyWindowActive: Application.active
readonly property bool isAnyWindowActive: windowInfoLoader.item && !windowInfoLoader.item.existsWindowActive
property Item activeTaskItem: windowInfoLoader.item.activeTaskItem

TaskManager.ActivityInfo { id: activityInfo }
TaskManager.VirtualDesktopInfo { id: virtualDesktopInfo }

Loader {
id: windowInfoLoader
sourceComponent: tasksModel
Component {
id: tasksModel
TasksModel {}
}
}

// used by WallpaperInterface for drag and drop
onOpenUrlRequested: (url) => {
Expand Down

0 comments on commit 9889994

Please sign in to comment.