mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
brightness: fix ddc erasing devices, fix OSD behaviors
This commit is contained in:
@@ -74,6 +74,10 @@ Singleton {
|
||||
}
|
||||
|
||||
function updateSingleDevice(device) {
|
||||
if (device.class === "leds") {
|
||||
return;
|
||||
}
|
||||
|
||||
const isUserControlled = isDeviceUserControlled(device.id);
|
||||
if (isUserControlled) {
|
||||
return;
|
||||
@@ -267,9 +271,11 @@ Singleton {
|
||||
return;
|
||||
}
|
||||
|
||||
const isLedDevice = deviceInfo?.class === "leds";
|
||||
|
||||
if (suppressOsd) {
|
||||
markDeviceUserControlled(actualDevice);
|
||||
} else {
|
||||
} else if (!isLedDevice) {
|
||||
markDevicePendingOsd(actualDevice);
|
||||
}
|
||||
|
||||
@@ -278,6 +284,10 @@ Singleton {
|
||||
deviceBrightness = newBrightness;
|
||||
brightnessVersion++;
|
||||
|
||||
if (isLedDevice && !suppressOsd) {
|
||||
brightnessChanged(true);
|
||||
}
|
||||
|
||||
if (isExponential) {
|
||||
const newUserSet = Object.assign({}, deviceBrightnessUserSet);
|
||||
newUserSet[actualDevice] = clampedValue;
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
pragma Singleton
|
||||
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Services.Mpris
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
readonly property list<MprisPlayer> availablePlayers: Mpris.players.values
|
||||
|
||||
property MprisPlayer activePlayer: availablePlayers.find(p => p.isPlaying) ?? availablePlayers.find(p => p.canControl && p.canPlay) ?? null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user