mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-13 06:33:30 -04:00
feat(sessions): implement local user session switching functionality
- Core user is logged in tty1 while user two is in tty3, you can now seamlessly switch bewteen them New IPC options: - `dms ipc call sessions list` - `dms switch-user [target]` - New Powermenu switch users option
This commit is contained in:
@@ -81,6 +81,8 @@ DankModal {
|
||||
executeAction(action);
|
||||
}
|
||||
|
||||
signal switchUserRequested
|
||||
|
||||
function executeAction(action) {
|
||||
if (action === "lock") {
|
||||
close();
|
||||
@@ -92,6 +94,11 @@ DankModal {
|
||||
Quickshell.execDetached(["dms", "restart"]);
|
||||
return;
|
||||
}
|
||||
if (action === "switchuser") {
|
||||
close();
|
||||
switchUserRequested();
|
||||
return;
|
||||
}
|
||||
close();
|
||||
root.powerActionRequested(action, "", "");
|
||||
}
|
||||
@@ -216,6 +223,12 @@ DankModal {
|
||||
"label": I18n.tr("Restart DMS"),
|
||||
"key": "D"
|
||||
};
|
||||
case "switchuser":
|
||||
return {
|
||||
"icon": "switch_account",
|
||||
"label": I18n.tr("Switch User"),
|
||||
"key": "U"
|
||||
};
|
||||
default:
|
||||
return {
|
||||
"icon": "help",
|
||||
|
||||
Reference in New Issue
Block a user