Add native notifications with OSD-style banners and a Control Center module
glassMxrph now owns org.freedesktop.Notifications. Banners drop out of the bar like the OSD; Control Center stacks history per app like macOS Notification Center. Do Not Disturb lives in the shell and falls back to SwayNC while another daemon holds the bus name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d7f0498ba0
commit
395de70b26
17 files changed
+1132
-13
No files matched your search
@@ -25,6 +25,8 @@ assert.deepEqual(loaded.desktopWidgets.items,[]);
|
||||
assert.equal(loaded.lock.backdrop,'wallpaper');assert.equal(loaded.lock.pamService,'');assert.equal(api.update(loaded,'lock.pamService','hyprlock').lock.pamService,'hyprlock');
|
||||
for(const [k,v] of [['lock.backdrop','video'],['lock.pamService','../etc/shadow'],['lock.glass','yes']])assert.throws(()=>api.update(loaded,k,v),/lock screen/);assert.equal(api.update(loaded,'desktopWidgets.items',[widget,Object.assign({},widget,{id:'w-2',type:'future'})]).desktopWidgets.items.length,2);
|
||||
for(const bad of [[widget,widget],[Object.assign({},widget,{w:10})],[Object.assign({},widget,{opacity:2})],[Object.assign({},widget,{id:'Bad id'})],[Object.assign({},widget,{options:[]})]])assert.throws(()=>api.update(loaded,'desktopWidgets.items',bad),/desktop widget/);assert.equal(api.update(loaded, 'bar.workspaces.style', 'pacman').bar.workspaces.style, 'pacman');assert.throws(() => api.update(loaded, 'bar.workspaces.style', 'emoji'), /bar module options/);assert.throws(() => api.update(loaded, 'osd.position', 'left'), /OSD/);assert.throws(() => api.update(loaded, 'osd.timeout', 50), /OSD/);assert.throws(() => api.update(loaded, 'appearance.glassTint', 'grey'), /Glass tint/);
|
||||
assert.equal(loaded.notifications.enabled, true);assert.equal(loaded.notifications.doNotDisturb, false);assert.equal(api.update(loaded, 'notifications.doNotDisturb', true).notifications.doNotDisturb, true);
|
||||
for(const [k,v] of [['notifications.position','bottom-center'],['notifications.timeout',200],['notifications.maxPopups',0],['notifications.doNotDisturb','yes']])assert.throws(()=>api.update(loaded,k,v),/notification/);
|
||||
assert.throws(() => api.update(loaded, '__proto__.polluted', true));
|
||||
console.log('Configuration preservation, validation and update tests passed.');
|
||||
|
||||
|
||||
Reference in new issue
Block a user