mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 00:07:43 +00:00
KeyboardSettings+Kernel: Setting to enable Num Lock on login
This commit is contained in:
parent
7fdeb0ec74
commit
ce6658acc1
11 changed files with 58 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <LibCore/ConfigFile.h>
|
||||
#include <errno.h>
|
||||
#include <serenity.h>
|
||||
#include <spawn.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
@ -17,6 +18,8 @@ int main()
|
|||
return 1;
|
||||
}
|
||||
|
||||
auto keyboard_settings_config = Core::ConfigFile::get_for_app("KeyboardSettings");
|
||||
|
||||
if (unveil("/bin/keymap", "x") < 0) {
|
||||
perror("unveil /bin/keymap");
|
||||
return 1;
|
||||
|
@ -41,4 +44,7 @@ int main()
|
|||
perror("posix_spawn");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
bool enable_num_lock = keyboard_settings_config->read_bool_entry("StartupEnable", "NumLock", true);
|
||||
set_num_lock(enable_num_lock);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue