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

Merge pull request #251 from awseward/awseward/SwipeNavigateWithScrolls

Add options for MacOS swipe navigation
This commit is contained in:
Daiderd Jordan 2020-11-26 19:53:08 +01:00 committed by GitHub
commit e1064b0c69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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