Skip to content

Commit b319669

Browse files
committed
feat(darwin): Add configs for keybindings and defaults
1 parent 3a52260 commit b319669

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

default.nix

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,47 @@
102102
(toString ./bin)
103103
];
104104

105+
targets.darwin = {
106+
keybindings = {
107+
"@^v" = "pasteAsPlainText:"; # cmd-ctrl-v
108+
"^u" = "deleteToBeginningOfParagraph:"; # ctrl-u
109+
110+
# https://gist.github.com/yujiod/9823541
111+
"¥" = ["insertText:" "\\\\" ];
112+
"~\\\\" = ["insertText:" "¥" ];
113+
};
114+
115+
currentHostDefaults = {
116+
"com.apple.controlcenter".BatteryShowPercentage = true;
117+
};
118+
119+
defaults = {
120+
NSGlobalDomain.ApplePressAndHoldEnabled = true;
121+
NSGlobalDomain.AppleShowAllExtensions = true;
122+
NSGlobalDomain.KeyRepeat = 10;
123+
NSGlobalDomain.NSAutomaticCapitalizationEnabled = false;
124+
NSGlobalDomain.NSAutomaticPeriodSubstitutionEnabled = false;
125+
NSGlobalDomain.NSAutomaticSpellingCorrectionEnabled = false;
126+
"com.apple.Safari".IncludeDevelopMenu = true;
127+
"com.apple.Safari".ShowOverlayStatusBar = true;
128+
"com.apple.desktopservices".DSDontWriteNetworkStores = true;
129+
"com.apple.desktopservices".DSDontWriteUSBStores = true;
130+
"com.apple.finder".AppleShowAllFiles = true;
131+
"com.apple.finder".FXRemoveOldTrashItems = true;
132+
"com.apple.finder".ShowPathBar = true;
133+
134+
# https://apple.stackexchange.com/a/462849
135+
NSGlobalDomain.NSInitialToolTipDelay = 800;
136+
137+
# tweaks
138+
"com.apple.finder".QuitMenuItem = true;
139+
"com.apple.finder".PathBarRootAtHome = true;
140+
"com.apple.finder".QLEnableTextSelection = true;
141+
"com.apple.finder".QLHidePanelOnDeactivate = true;
142+
"com.apple.CrashReporter".DialogType = "none";
143+
};
144+
};
145+
105146
programs.direnv = {
106147
enable = true;
107148
nix-direnv.enable = true;

0 commit comments

Comments
 (0)