mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-04 04:42:05 -04:00
process list: add all/user/system filters
This commit is contained in:
@@ -11,6 +11,7 @@ Item {
|
||||
property string searchText: ""
|
||||
property string expandedPid: ""
|
||||
property var contextMenu: null
|
||||
property string processFilter: "all" // "all", "user", "system"
|
||||
|
||||
property int selectedIndex: -1
|
||||
property bool keyboardNavigationActive: false
|
||||
@@ -41,6 +42,12 @@ Item {
|
||||
|
||||
let procs = DgopService.allProcesses.slice();
|
||||
|
||||
if (processFilter === "user") {
|
||||
procs = procs.filter(p => p.username === UserInfoService.username);
|
||||
} else if (processFilter === "system") {
|
||||
procs = procs.filter(p => p.username !== UserInfoService.username);
|
||||
}
|
||||
|
||||
if (searchText.length > 0) {
|
||||
const search = searchText.toLowerCase();
|
||||
procs = procs.filter(p => {
|
||||
|
||||
Reference in New Issue
Block a user