1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-28 02:37:09 +00:00

Add options for swipe navigation

One for trackpad, one for mouse. I don't know much about the mouse side
of things, but thought I'd at least include it to be comprehensive.
This commit is contained in:
Andrew Seward 2020-11-14 22:51:54 -08:00
parent 56f01699fb
commit 5d0ed66ba9
2 changed files with 20 additions and 0 deletions

View file

@ -15,6 +15,22 @@ let
in {
options = {
system.defaults.NSGlobalDomain.AppleEnableMouseSwipeNavigateWithScrolls = mkOption {
type = types.nullOr types.bool;
default = null;
description = ''
Enables swiping left or right with two fingers to navigate backward or forward. The default is true.
'';
};
system.defaults.NSGlobalDomain.AppleEnableSwipeNavigateWithScrolls = mkOption {
type = types.nullOr types.bool;
default = null;
description = ''
Enables swiping left or right with two fingers to navigate backward or forward. The default is true.
'';
};
system.defaults.NSGlobalDomain.AppleFontSmoothing = mkOption {
type = types.nullOr (types.enum [ 0 1 2 ]);
default = null;

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
system.defaults.NSGlobalDomain.AppleEnableMouseSwipeNavigateWithScrolls = false;
system.defaults.NSGlobalDomain.AppleEnableSwipeNavigateWithScrolls = false;
system.defaults.NSGlobalDomain.AppleFontSmoothing = 1;
system.defaults.NSGlobalDomain.AppleKeyboardUIMode = 3;
system.defaults.NSGlobalDomain.ApplePressAndHoldEnabled = true;
@ -44,6 +46,8 @@
grep "defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server 'ServerDescription' -string 'Darwin.*s iMac'" ${config.out}/activate
echo >&2 "checking defaults write in /activate-user"
grep "defaults write -g 'AppleEnableMouseSwipeNavigateWithScrolls' -bool NO" ${config.out}/activate-user
grep "defaults write -g 'AppleEnableSwipeNavigateWithScrolls' -bool NO" ${config.out}/activate-user
grep "defaults write -g 'AppleFontSmoothing' -int 1" ${config.out}/activate-user
grep "defaults write -g 'AppleKeyboardUIMode' -int 3" ${config.out}/activate-user
grep "defaults write -g 'ApplePressAndHoldEnabled' -bool YES" ${config.out}/activate-user