1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-28 15:32:50 -05:00

show a power profile OSD

This commit is contained in:
bbedward
2025-11-13 10:23:14 -05:00
parent 76a60df88b
commit cf75c1aad0
4 changed files with 73 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
pragma Singleton
import Quickshell
import QtQuick
Singleton {
id: osdManager
property var currentOSDsByScreen: ({})
function showOSD(osd) {
if (!osd || !osd.screen)
return
const screenName = osd.screen.name
const currentOSD = currentOSDsByScreen[screenName]
if (currentOSD && currentOSD !== osd) {
currentOSD.hide()
}
currentOSDsByScreen[screenName] = osd
}
}