Fix stray dock items and orphaned Cava
Windows whose class is a respelling of their desktop entry's StartupWMClass (YouTube Music: "youtube-music-desktop-app" vs "YouTube Music Desktop App") showed as separate unknown dock items. Matching now falls back to comparing names with case and space, dash and underscore runs normalized; ambiguous or partial names still never match. Quickshell fills a toplevel's IPC data only at startup, so windows opened later lacked their initial class, mapped/hidden state and floating flag. HyprlandService now runs one `hyprctl -j clients` query per burst of window open/close/move/float/fullscreen/group events (none for title changes, none while idle). Windows with neither IPC data nor a foreign-toplevel handle are treated as unmapped. dock status reports each item's window classes for diagnosis. The Cava helper sets a parent-death signal before exec: Cava writes nothing during silence, so it outlived a killed or crashed shell. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
508b18c7de
commit
9aa61559eb
5 files changed
+75
-4
No files matched your search
@@ -8,6 +8,12 @@ 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]);
|
||||
// The same name spelled differently matches; substrings and ambiguous spellings do not.
|
||||
const ytm=[{id:'ytmdesktop',name:'YouTube Music Desktop App',startupClass:'YouTube Music Desktop App'},{id:'player_one',name:'One'},{id:'player-one',name:'One Dash'}];
|
||||
assert.equal(app.match('youtube-music-desktop-app','',ytm,{}),ytm[0]);
|
||||
assert.equal(app.match('youtube_music_desktop_app','',ytm,{}),ytm[0]);
|
||||
assert.equal(app.match('youtube-music','',ytm,{}),null);
|
||||
assert.equal(app.match('Player One','',ytm,{}),null);
|
||||
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);
|
||||
|
||||
Reference in new issue
Block a user