diff options
| author | Michael Hoang <Enzime@users.noreply.github.com> | 2024-11-03 10:17:21 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-03 10:17:21 +1100 |
| commit | 446e1ef8e17380b979b1337f82eae75cfa565c05 (patch) | |
| tree | 9b0d9e8315b92ad59e952c8b51c6006c5934052e /modules | |
| parent | f203352cc035dad4a49242d9296ce4272badcefa (diff) | |
| parent | 21809c4261a421eb06b2d7b3ccd18ebadd921f96 (diff) | |
Merge pull request #1130 from aschleck/fn-key
Allow configuring the fn key action
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/module-list.nix | 1 | ||||
| -rw-r--r-- | modules/system/defaults-write.nix | 3 | ||||
| -rw-r--r-- | modules/system/defaults/hitoolbox.nix | 29 |
3 files changed, 33 insertions, 0 deletions
diff --git a/modules/module-list.nix b/modules/module-list.nix index effdff7..5477fad 100644 --- a/modules/module-list.nix +++ b/modules/module-list.nix @@ -21,6 +21,7 @@ ./system/defaults/clock.nix ./system/defaults/dock.nix ./system/defaults/finder.nix + ./system/defaults/hitoolbox.nix ./system/defaults/screencapture.nix ./system/defaults/screensaver.nix ./system/defaults/alf.nix diff --git a/modules/system/defaults-write.nix b/modules/system/defaults-write.nix index e7f2c03..7af972d 100644 --- a/modules/system/defaults-write.nix +++ b/modules/system/defaults-write.nix @@ -23,6 +23,7 @@ let menuExtraClock = defaultsToList "com.apple.menuextra.clock" cfg.menuExtraClock; dock = defaultsToList "com.apple.dock" cfg.dock; finder = defaultsToList "com.apple.finder" cfg.finder; + hitoolbox = defaultsToList "com.apple.HIToolbox" cfg.hitoolbox; magicmouse = defaultsToList "com.apple.AppleMultitouchMouse" cfg.magicmouse; magicmouseBluetooth = defaultsToList "com.apple.driver.AppleMultitouchMouse.mouse" cfg.magicmouse; screencapture = defaultsToList "com.apple.screencapture" cfg.screencapture; @@ -76,6 +77,7 @@ in menuExtraClock dock finder + hitoolbox magicmouse magicmouseBluetooth screencapture @@ -99,6 +101,7 @@ in ${concatStringsSep "\n" menuExtraClock} ${concatStringsSep "\n" dock} ${concatStringsSep "\n" finder} + ${concatStringsSep "\n" hitoolbox} ${concatStringsSep "\n" magicmouse} ${concatStringsSep "\n" magicmouseBluetooth} ${concatStringsSep "\n" screencapture} diff --git a/modules/system/defaults/hitoolbox.nix b/modules/system/defaults/hitoolbox.nix new file mode 100644 index 0000000..c2e336b --- /dev/null +++ b/modules/system/defaults/hitoolbox.nix @@ -0,0 +1,29 @@ +{ lib, ... }: + +{ + options = { + + system.defaults.hitoolbox.AppleFnUsageType = lib.mkOption { + type = lib.types.nullOr (lib.types.enum [ + "Do Nothing" + "Change Input Source" + "Show Emoji & Symbols" + "Start Dictation" + ]); + apply = key: if key == null then null else { + "Do Nothing" = 0; + "Change Input Source" = 1; + "Show Emoji & Symbols" = 2; + "Start Dictation" = 3; + }.${key}; + default = null; + description = '' + Chooses what happens when you press the Fn key on the keyboard. A restart is required for + this setting to take effect. + + The default is unset ("Show Emoji & Symbols"). + ''; + }; + + }; +} |
