mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
Add wallpaper transition effects, courtesy of @Ly-Sec
- Just copied the shaders from noctalia since they're pretty awesome
This commit is contained in:
@@ -45,6 +45,7 @@ Singleton {
|
||||
property string wallpaperCyclingTime: "06:00" // HH:mm format
|
||||
property string lastBrightnessDevice: ""
|
||||
property string launchPrefix: ""
|
||||
property string wallpaperTransition: "fade"
|
||||
|
||||
// Power management settings - AC Power
|
||||
property int acMonitorTimeout: 0 // Never
|
||||
@@ -114,6 +115,7 @@ Singleton {
|
||||
wallpaperCyclingTime = settings.wallpaperCyclingTime !== undefined ? settings.wallpaperCyclingTime : "06:00"
|
||||
lastBrightnessDevice = settings.lastBrightnessDevice !== undefined ? settings.lastBrightnessDevice : ""
|
||||
launchPrefix = settings.launchPrefix !== undefined ? settings.launchPrefix : ""
|
||||
wallpaperTransition = settings.wallpaperTransition !== undefined ? settings.wallpaperTransition : "fade"
|
||||
|
||||
acMonitorTimeout = settings.acMonitorTimeout !== undefined ? settings.acMonitorTimeout : 0
|
||||
acLockTimeout = settings.acLockTimeout !== undefined ? settings.acLockTimeout : 0
|
||||
@@ -166,6 +168,7 @@ Singleton {
|
||||
"wallpaperCyclingTime": wallpaperCyclingTime,
|
||||
"lastBrightnessDevice": lastBrightnessDevice,
|
||||
"launchPrefix": launchPrefix,
|
||||
"wallpaperTransition": wallpaperTransition,
|
||||
"acMonitorTimeout": acMonitorTimeout,
|
||||
"acLockTimeout": acLockTimeout,
|
||||
"acSuspendTimeout": acSuspendTimeout,
|
||||
@@ -256,7 +259,6 @@ Singleton {
|
||||
saveSettings()
|
||||
|
||||
if (typeof Theme !== "undefined") {
|
||||
Theme.screenTransition()
|
||||
if (Theme.currentTheme === Theme.dynamic) {
|
||||
Theme.extractColors()
|
||||
}
|
||||
@@ -421,6 +423,11 @@ Singleton {
|
||||
saveSettings()
|
||||
}
|
||||
|
||||
function setWallpaperTransition(transition) {
|
||||
wallpaperTransition = transition
|
||||
saveSettings()
|
||||
}
|
||||
|
||||
function setAcMonitorTimeout(timeout) {
|
||||
acMonitorTimeout = timeout
|
||||
saveSettings()
|
||||
|
||||
@@ -218,8 +218,10 @@ Singleton {
|
||||
CompositorService.isNiri && NiriService.doScreenTransition()
|
||||
}
|
||||
|
||||
function switchTheme(themeName, savePrefs = true) {
|
||||
screenTransition()
|
||||
function switchTheme(themeName, savePrefs = true, enableTransition = true) {
|
||||
if (enableTransition) {
|
||||
screenTransition()
|
||||
}
|
||||
if (themeName === dynamic) {
|
||||
currentTheme = dynamic
|
||||
currentThemeCategory = dynamic
|
||||
@@ -287,7 +289,7 @@ Singleton {
|
||||
|
||||
function switchThemeCategory(category, defaultTheme) {
|
||||
currentThemeCategory = category
|
||||
switchTheme(defaultTheme)
|
||||
switchTheme(defaultTheme, true, false)
|
||||
}
|
||||
|
||||
function getCatppuccinColor(variantName) {
|
||||
@@ -511,6 +513,10 @@ Singleton {
|
||||
return
|
||||
}
|
||||
|
||||
if (typeof NiriService !== "undefined" && CompositorService.isNiri) {
|
||||
NiriService.suppressNextToast()
|
||||
}
|
||||
|
||||
const desired = {
|
||||
"kind": kind,
|
||||
"value": value,
|
||||
|
||||
Reference in New Issue
Block a user