Add glassMxrph shell sources
Initial commit of the Quickshell desktop suite: bar, dock, launcher, settings, Control Center, dashboard, OSD, lock screen, desktop widgets, plugin host with the vendored Noctalia/Omarchy compatibility layer, helpers, packaging, tests and phase documentation. Includes the optimization work so far: usage widgets and dashboard gauges no longer animate continuously, desktop widgets pause while covered, system controls stop flickering on background polls, dock app matching uses an indexed catalog, and workspace ghosts are created only for occupied slots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
99e64a7713
433 files changed
+57792
No files matched your search
@@ -0,0 +1,24 @@
|
||||
const fs=require('node:fs'),vm=require('node:vm'),assert=require('node:assert/strict'),path=require('node:path');
|
||||
const root=path.join(__dirname,'..');
|
||||
function load(file){const context=vm.createContext({});vm.runInContext(fs.readFileSync(path.join(root,file),'utf8'),context);return context;}
|
||||
const app=load('quickshell/services/AppMatching.js'),geo=load('quickshell/dock/DockGeometry.js');
|
||||
const entries=[{id:'org.example.Editor',name:'Editor',startupClass:'editor'},{id:'browser',name:'Browser',startupClass:'web'},{id:'browser-beta',name:'Browser Beta',startupClass:'web'}];
|
||||
assert.equal(app.match('org.example.Editor.desktop','',entries,{}),entries[0]);
|
||||
assert.equal(app.match('EDITOR','',entries,{}),entries[0]);
|
||||
assert.equal(app.match('web','',entries,{}),null); // ambiguous StartupWMClass is not guessed
|
||||
assert.equal(app.match('browser-helper','',entries,{}),null);
|
||||
assert.equal(app.match('web','',entries,{web:'browser.desktop'}),entries[1]);
|
||||
const windows=[{address:'1',appId:'editor',active:false},{address:'2',appId:'editor',active:true},{address:'3',appId:'unknown',active:false}];
|
||||
const groups=app.group(entries,windows,['missing.desktop','org.example.Editor.desktop'],{},true);
|
||||
assert.equal(groups.length,3);assert.equal(groups[0].entry,null);assert.equal(groups[1].windows.length,2);assert.equal(groups[1].focused,true);assert.equal(groups[2].pinned,false);
|
||||
assert.equal(app.group(entries,windows,['org.example.Editor.desktop'],{},false).length,1);
|
||||
const pins=['a.desktop','b.desktop','c.desktop'];
|
||||
assert.equal(JSON.stringify(app.reorder(pins,'a','c')),JSON.stringify(['b.desktop','c.desktop','a.desktop']));assert.equal(pins[0],'a.desktop');
|
||||
const rect={x:100,y:900,width:200,height:80},window={x:90,y:800,width:200,height:150,monitor:'test',workspace:1};
|
||||
assert(geo.obstructed(rect,'test',[window],[1]));
|
||||
assert(!geo.obstructed(rect,'other',[window],[1]));
|
||||
assert(!geo.obstructed(rect,'test',[window],[2]));
|
||||
assert(!geo.obstructed(rect,'test',[{...window,hidden:true}],[1]));
|
||||
assert(!geo.intersects(rect,{x:100,y:820,width:200,height:80}));
|
||||
assert(geo.obstructed(rect,'test',[{...window,x:500,fullscreen:true}],[1]));
|
||||
console.log('Dock matching, ambiguity, pin preservation/reorder, grouping and monitor/workspace overlap tests passed.');
|
||||
Reference in new issue
Block a user