mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 07:08:12 +09:00
mac keyboard
This commit is contained in:
@@ -1,11 +1,14 @@
|
|||||||
{
|
{
|
||||||
inputs,
|
inputs,
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
isDarwin = pkgs.stdenv.hostPlatform.isDarwin;
|
||||||
|
isLinux = pkgs.stdenv.hostPlatform.isLinux;
|
||||||
package =
|
package =
|
||||||
if pkgs.stdenv.hostPlatform.isLinux then
|
if isLinux then
|
||||||
inputs.ghostty.packages.${pkgs.stdenv.hostPlatform.system}.ghostty-releasefast
|
inputs.ghostty.packages.${pkgs.stdenv.hostPlatform.system}.ghostty-releasefast
|
||||||
else
|
else
|
||||||
null;
|
null;
|
||||||
@@ -14,7 +17,7 @@ in
|
|||||||
programs.ghostty = {
|
programs.ghostty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
inherit package;
|
inherit package;
|
||||||
systemd.enable = pkgs.stdenv.hostPlatform.isLinux;
|
systemd.enable = isLinux;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
theme = "dracula";
|
theme = "dracula";
|
||||||
@@ -30,7 +33,9 @@ in
|
|||||||
"ctrl+shift+t=new_tab"
|
"ctrl+shift+t=new_tab"
|
||||||
"ctrl+alt+left_bracket=previous_tab"
|
"ctrl+alt+left_bracket=previous_tab"
|
||||||
"ctrl+alt+right_bracket=next_tab"
|
"ctrl+alt+right_bracket=next_tab"
|
||||||
"ctrl+alt+q=close_window"
|
"alt+q=close_window"
|
||||||
|
"global:alt+space=toggle_quick_terminal"
|
||||||
|
"global:alt+t=new_window"
|
||||||
"ctrl+shift+semicolon=increase_font_size:1"
|
"ctrl+shift+semicolon=increase_font_size:1"
|
||||||
"ctrl+shift+minus=decrease_font_size:1"
|
"ctrl+shift+minus=decrease_font_size:1"
|
||||||
];
|
];
|
||||||
@@ -45,5 +50,19 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Global Ghostty keybindings are handled by the running app. Start it hidden
|
||||||
|
# at login so Option+T and Option+Space work before opening a terminal.
|
||||||
|
launchd.agents.ghostty-global-keybindings = lib.mkIf isDarwin {
|
||||||
|
enable = true;
|
||||||
|
config = {
|
||||||
|
ProgramArguments = [
|
||||||
|
"/usr/bin/open"
|
||||||
|
"-gja"
|
||||||
|
"Ghostty"
|
||||||
|
];
|
||||||
|
RunAtLoad = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
xdg.configFile."ghostty/themes/dracula".source = ./dracula.theme;
|
xdg.configFile."ghostty/themes/dracula".source = ./dracula.theme;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ in
|
|||||||
pop_to_root_on_close = true;
|
pop_to_root_on_close = true;
|
||||||
favicon_service = "twenty";
|
favicon_service = "twenty";
|
||||||
search_files_in_root = true;
|
search_files_in_root = true;
|
||||||
|
global_shortcuts.toggle = "alt+d";
|
||||||
|
providers.clipboard.entrypoints.history.shortcut = "alt+v";
|
||||||
theme = {
|
theme = {
|
||||||
light = {
|
light = {
|
||||||
name = "dracula";
|
name = "dracula";
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
includes = [
|
includes = [
|
||||||
"profiles.interface.gui"
|
"profiles.interface.gui"
|
||||||
"systems.dock"
|
"systems.dock"
|
||||||
|
"systems.keyboard"
|
||||||
"systems.trackpad"
|
"systems.trackpad"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
system.keyboard = {
|
||||||
|
enableKeyMapping = true;
|
||||||
|
userKeyMapping = [
|
||||||
|
{
|
||||||
|
# Caps Lock → left Command
|
||||||
|
HIDKeyboardModifierMappingSrc = 30064771129;
|
||||||
|
HIDKeyboardModifierMappingDst = 30064771299;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
system.defaults = {
|
||||||
|
NSGlobalDomain."com.apple.keyboard.fnState" = true;
|
||||||
|
|
||||||
|
# These are the standard macOS App Shortcuts for all applications. Keep
|
||||||
|
# both English and Japanese menu titles so they work after changing the
|
||||||
|
# macOS display language.
|
||||||
|
CustomUserPreferences.NSGlobalDomain.NSUserKeyEquivalents = {
|
||||||
|
"Close" = "~q";
|
||||||
|
"Close Window" = "~q";
|
||||||
|
"閉じる" = "~q";
|
||||||
|
"ウインドウを閉じる" = "~q";
|
||||||
|
"Zoom" = "~f";
|
||||||
|
"拡大/縮小" = "~f";
|
||||||
|
"拡大/縮小" = "~f";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user