summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorApril Schleck <april@exclusivelyducks.com>2024-10-27 23:37:08 -0700
committerApril Schleck <april@exclusivelyducks.com>2024-11-02 09:04:53 -0700
commit21809c4261a421eb06b2d7b3ccd18ebadd921f96 (patch)
tree651fedca10049b458822e1a2b5d5deec4b54bc69 /modules
parente56d80b28314643da5a0a27c6371c0682ab8389f (diff)
Allow configuring the fn key action
Diffstat (limited to 'modules')
-rw-r--r--modules/module-list.nix1
-rw-r--r--modules/system/defaults-write.nix3
-rw-r--r--modules/system/defaults/hitoolbox.nix29
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").
+ '';
+ };
+
+ };
+}