When I right click on an app in the taskbar and select close all, I want the app to be killed rather than close windows individually, since that allows Zen Browser to restore all the windows properly. I made another post asking how to do this but didn’t get answers, so it looks like I’m gonna have to make edit the taskmanager plasmoid!
This is the context menu option code, found in /usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/:
PlasmaExtras.MenuItem {
id: closeWindowItem
visible: (visualParent && !get(atm.IsLauncher) && !get(atm.IsStartup))
enabled: visualParent && get(atm.IsClosable)
text: get(atm.IsGroupParent) ? i18nc("@item:inmenu", "&Close All") : i18n("&Close")
icon: "window-close"
onClicked: {
if (tasks.groupDialog !== null && tasks.groupDialog.visualParent === visualParent) {
tasks.groupDialog.visible = false;
}
tasksModel.requestClose(modelIndex);
}
}
I just tried asking LLMs how to do it and they gave wrong answers (obviously), and searched through the API documentation: https://api.kde.org/legacy/plasma/plasma-workspace/html/, but there doesn’t seem to be a way to do so.