diff --git a/Source/RebootButtonController.m b/Source/RebootButtonController.m
index 8669ffc..0e7323a 100644
--- a/Source/RebootButtonController.m
+++ b/Source/RebootButtonController.m
@@ -41,11 +41,20 @@ -(void)reboot
}
else
{
- pid_t pid;
- int status;
- const char* args[] = {"mobileldrestart", NULL};
- posix_spawn(&pid, "/usr/bin/mobileldrestart", NULL, NULL, (char* const*)args, NULL);
- waitpid(pid, &status, WEXITED);
+ if ([[prefsDict objectForKey:@"rebootAction"] isEqualToString:@"userspace"])
+ {
+ pid_t pid;
+ int status;
+ const char* args[] = {"launchctl", "reboot", "userspace", NULL};
+ posix_spawn(&pid, "/bin/launchctl", NULL, NULL, (char* const*)args, NULL);
+ waitpid(pid, &status, WEXITED);
+ } else {
+ pid_t pid;
+ int status;
+ const char* args[] = {"mobileldrestart", NULL};
+ posix_spawn(&pid, "/usr/bin/mobileldrestart", NULL, NULL, (char* const*)args, NULL);
+ waitpid(pid, &status, WEXITED);
+ }
}
}
@end
diff --git a/Source/powermoduleprefs/Resources/Root.plist b/Source/powermoduleprefs/Resources/Root.plist
index a3c007d..618eb2f 100644
--- a/Source/powermoduleprefs/Resources/Root.plist
+++ b/Source/powermoduleprefs/Resources/Root.plist
@@ -13,24 +13,23 @@
cell
PSSegmentCell
+ default
+ 2x2
+ defaults
+ com.muirey03.powermoduleprefs
key
moduleSize
- validValues
+ validTitles
1x1
2x2
- validTitles
+ validValues
1x1
2x2
- default
- 2x2
- defaults
- com.muirey03.powermoduleprefs
-
cell
PSGroupCell
@@ -40,24 +39,25 @@
cell
PSSegmentCell
+ default
+ userspace
+ defaults
+ com.muirey03.powermoduleprefs
key
rebootAction
- validValues
+ validTitles
- reboot
+ Reboot
ldrestart
+ Userspace
- validTitles
+ validValues
- Reboot
+ reboot
ldrestart
+ userspace
- default
- ldrestart
- defaults
- com.muirey03.powermoduleprefs
-
cell
PSGroupCell
@@ -136,7 +136,6 @@
label
Power down confirmation
-
cell
PSGroupCell
@@ -144,10 +143,10 @@
Created By:
- cell
- PSButtonCell
action
creatorMethod
+ cell
+ PSButtonCell
label
Muirey03 (@Muirey03)
@@ -158,10 +157,10 @@
Icons Created By:
- cell
- PSButtonCell
action
creditsMethod
+ cell
+ PSButtonCell
label
Macs (u/thecoderkiller)