summaryrefslogtreecommitdiff
path: root/users/sigma
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-02-13 03:19:02 +1100
committerGitHub <noreply@github.com>2023-02-13 03:19:02 +1100
commitbbf7a20b33de2d203518687cb5cd1aa85005ea27 (patch)
treeee1a5c412a02021d085c81a26321c3424eca7022 /users/sigma
parentd10350cd2ceb2b9d80522cdec3ea908118f7fd35 (diff)
Refactor Leader key feature (#19632)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'users/sigma')
-rw-r--r--users/sigma/sigma.c33
1 files changed, 13 insertions, 20 deletions
diff --git a/users/sigma/sigma.c b/users/sigma/sigma.c
index 9a0786233b..bd66729bdc 100644
--- a/users/sigma/sigma.c
+++ b/users/sigma/sigma.c
@@ -90,26 +90,19 @@ void store_userspace_config(void) {
eeconfig_update_user(stored_userspace_config.raw);
}
-LEADER_EXTERNS();
-
-void matrix_scan_user(void) {
- LEADER_DICTIONARY() {
- leading = false;
- leader_end();
-
- SEQ_TWO_KEYS(KC_F1, KC_L) {
- set_os(_OS_LINUX);
- }
- SEQ_TWO_KEYS(KC_F1, KC_M) {
- set_os(_OS_MACOS);
- }
- SEQ_TWO_KEYS(KC_F1, KC_W) {
- set_os(_OS_WINDOWS);
- }
- SEQ_TWO_KEYS(KC_F1, KC_S) {
- stored_userspace_config.raw = runtime_userspace_config.raw;
- store_userspace_config();
- }
+void leader_end_user(void) {
+ if (leader_sequence_two_keys(KC_F1, KC_L)) {
+ set_os(_OS_LINUX);
+ }
+ if (leader_sequence_two_keys(KC_F1, KC_M)) {
+ set_os(_OS_MACOS);
+ }
+ if (leader_sequence_two_keys(KC_F1, KC_W)) {
+ set_os(_OS_WINDOWS);
+ }
+ if (leader_sequence_two_keys(KC_F1, KC_S)) {
+ stored_userspace_config.raw = runtime_userspace_config.raw;
+ store_userspace_config();
}
}