mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-15 21:08:21 +00:00
Merge pull request #1130 from aschleck/fn-key
Allow configuring the fn key action
This commit is contained in:
commit
446e1ef8e1
5 changed files with 39 additions and 0 deletions
|
@ -21,6 +21,7 @@
|
||||||
./system/defaults/clock.nix
|
./system/defaults/clock.nix
|
||||||
./system/defaults/dock.nix
|
./system/defaults/dock.nix
|
||||||
./system/defaults/finder.nix
|
./system/defaults/finder.nix
|
||||||
|
./system/defaults/hitoolbox.nix
|
||||||
./system/defaults/screencapture.nix
|
./system/defaults/screencapture.nix
|
||||||
./system/defaults/screensaver.nix
|
./system/defaults/screensaver.nix
|
||||||
./system/defaults/alf.nix
|
./system/defaults/alf.nix
|
||||||
|
|
|
@ -23,6 +23,7 @@ let
|
||||||
menuExtraClock = defaultsToList "com.apple.menuextra.clock" cfg.menuExtraClock;
|
menuExtraClock = defaultsToList "com.apple.menuextra.clock" cfg.menuExtraClock;
|
||||||
dock = defaultsToList "com.apple.dock" cfg.dock;
|
dock = defaultsToList "com.apple.dock" cfg.dock;
|
||||||
finder = defaultsToList "com.apple.finder" cfg.finder;
|
finder = defaultsToList "com.apple.finder" cfg.finder;
|
||||||
|
hitoolbox = defaultsToList "com.apple.HIToolbox" cfg.hitoolbox;
|
||||||
magicmouse = defaultsToList "com.apple.AppleMultitouchMouse" cfg.magicmouse;
|
magicmouse = defaultsToList "com.apple.AppleMultitouchMouse" cfg.magicmouse;
|
||||||
magicmouseBluetooth = defaultsToList "com.apple.driver.AppleMultitouchMouse.mouse" cfg.magicmouse;
|
magicmouseBluetooth = defaultsToList "com.apple.driver.AppleMultitouchMouse.mouse" cfg.magicmouse;
|
||||||
screencapture = defaultsToList "com.apple.screencapture" cfg.screencapture;
|
screencapture = defaultsToList "com.apple.screencapture" cfg.screencapture;
|
||||||
|
@ -76,6 +77,7 @@ in
|
||||||
menuExtraClock
|
menuExtraClock
|
||||||
dock
|
dock
|
||||||
finder
|
finder
|
||||||
|
hitoolbox
|
||||||
magicmouse
|
magicmouse
|
||||||
magicmouseBluetooth
|
magicmouseBluetooth
|
||||||
screencapture
|
screencapture
|
||||||
|
@ -99,6 +101,7 @@ in
|
||||||
${concatStringsSep "\n" menuExtraClock}
|
${concatStringsSep "\n" menuExtraClock}
|
||||||
${concatStringsSep "\n" dock}
|
${concatStringsSep "\n" dock}
|
||||||
${concatStringsSep "\n" finder}
|
${concatStringsSep "\n" finder}
|
||||||
|
${concatStringsSep "\n" hitoolbox}
|
||||||
${concatStringsSep "\n" magicmouse}
|
${concatStringsSep "\n" magicmouse}
|
||||||
${concatStringsSep "\n" magicmouseBluetooth}
|
${concatStringsSep "\n" magicmouseBluetooth}
|
||||||
${concatStringsSep "\n" screencapture}
|
${concatStringsSep "\n" screencapture}
|
||||||
|
|
29
modules/system/defaults/hitoolbox.nix
Normal file
29
modules/system/defaults/hitoolbox.nix
Normal file
|
@ -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").
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
|
@ -354,6 +354,11 @@ defaults write com.apple.finder '_FXSortFoldersFirst' $'<?xml version="1.0" enco
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<true/>
|
<true/>
|
||||||
</plist>'
|
</plist>'
|
||||||
|
defaults write com.apple.HIToolbox 'AppleFnUsageType' $'<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<integer>2</integer>
|
||||||
|
</plist>'
|
||||||
|
|
||||||
|
|
||||||
defaults write com.apple.screencapture 'location' $'<?xml version="1.0" encoding="UTF-8"?>
|
defaults write com.apple.screencapture 'location' $'<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
|
@ -61,6 +61,7 @@
|
||||||
system.defaults.finder._FXShowPosixPathInTitle = true;
|
system.defaults.finder._FXShowPosixPathInTitle = true;
|
||||||
system.defaults.finder._FXSortFoldersFirst = true;
|
system.defaults.finder._FXSortFoldersFirst = true;
|
||||||
system.defaults.finder.FXEnableExtensionChangeWarning = false;
|
system.defaults.finder.FXEnableExtensionChangeWarning = false;
|
||||||
|
system.defaults.hitoolbox.AppleFnUsageType = "Show Emoji & Symbols";
|
||||||
system.defaults.screencapture.location = "/tmp";
|
system.defaults.screencapture.location = "/tmp";
|
||||||
system.defaults.screensaver.askForPassword = true;
|
system.defaults.screensaver.askForPassword = true;
|
||||||
system.defaults.screensaver.askForPasswordDelay = 5;
|
system.defaults.screensaver.askForPasswordDelay = 5;
|
||||||
|
|
Loading…
Add table
Reference in a new issue