diff --git a/.config/ags/modules/indicators/indicatorvalues.js b/.config/ags/modules/indicators/indicatorvalues.js index 5d8c1e680..94b2d694b 100644 --- a/.config/ags/modules/indicators/indicatorvalues.js +++ b/.config/ags/modules/indicators/indicatorvalues.js @@ -59,6 +59,7 @@ export default (monitor = 0) => { }, 'notify::screen-value'), progressSetup: (self) => self.hook(Brightness[monitor], (progress) => { const updateValue = Brightness[monitor].screen_value; + if (updateValue !== progress.value) Indicator.popup(1); progress.value = updateValue; }, 'notify::screen-value'), }); @@ -67,7 +68,7 @@ export default (monitor = 0) => { name: 'Volume', extraClassName: 'osd-volume', extraProgressClassName: 'osd-volume-progress', - attribute: { headphones: undefined }, + attribute: { headphones: undefined , device: undefined}, nameSetup: (self) => Utils.timeout(1, () => { const updateAudioDevice = (self) => { const usingHeadphones = (Audio.speaker?.stream?.port)?.toLowerCase().includes('headphone'); @@ -86,7 +87,14 @@ export default (monitor = 0) => { }), progressSetup: (self) => self.hook(Audio, (progress) => { const updateValue = Audio.speaker?.volume; - if (!isNaN(updateValue)) progress.value = updateValue; + const newDevice = (Audio.speaker?.name); + if (!isNaN(updateValue)) { + if (newDevice === volumeIndicator.attribute.device && updateValue !== progress.value) { + Indicator.popup(1); + } + progress.value = updateValue; + } + volumeIndicator.attribute.device = newDevice; }), }); return MarginRevealer({