small changes
This commit is contained in:
parent
d8a9db867c
commit
f7168c0b29
6 changed files with 351 additions and 310 deletions
|
|
@ -11,7 +11,7 @@
|
||||||
clearDefaultKeybinds = false;
|
clearDefaultKeybinds = false;
|
||||||
settings = {
|
settings = {
|
||||||
# theme = "tokyonight";
|
# theme = "tokyonight";
|
||||||
theme = "GruvboxDarkHard";
|
theme = "Gruvbox Dark Hard";
|
||||||
font-family = "Berkeley Mono";
|
font-family = "Berkeley Mono";
|
||||||
font-size = 16;
|
font-size = 16;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,9 @@
|
||||||
nixfmt-rfc-style
|
nixfmt-rfc-style
|
||||||
|
|
||||||
libiconv
|
libiconv
|
||||||
|
|
||||||
|
clang
|
||||||
|
clang-analyzer
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,31 @@
|
||||||
let
|
let
|
||||||
numbers = [
|
numbers = [
|
||||||
"1" "2" "3" "4" "5" "6" "7" "8" "9" "0"
|
"1"
|
||||||
|
"2"
|
||||||
|
"3"
|
||||||
|
"4"
|
||||||
|
"5"
|
||||||
|
"6"
|
||||||
|
"7"
|
||||||
|
"8"
|
||||||
|
"9"
|
||||||
|
"0"
|
||||||
];
|
];
|
||||||
|
|
||||||
number_to_symbol = num: {
|
number_to_symbol = num: {
|
||||||
type = "basic";
|
type = "basic";
|
||||||
from = {
|
from = {
|
||||||
key_code = num;
|
key_code = num;
|
||||||
modifiers = { optional = [ "caps_lock" ]; };
|
modifiers = {
|
||||||
|
optional = [ "caps_lock" ];
|
||||||
};
|
};
|
||||||
to = [{
|
};
|
||||||
|
to = [
|
||||||
|
{
|
||||||
key_code = num;
|
key_code = num;
|
||||||
modifiers = ["left_shift"];
|
modifiers = [ "left_shift" ];
|
||||||
}];
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
symbol_to_number = num: {
|
symbol_to_number = num: {
|
||||||
|
|
@ -24,55 +37,80 @@ let
|
||||||
optional = [ "caps_lock" ];
|
optional = [ "caps_lock" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
to = [{
|
to = [
|
||||||
|
{
|
||||||
key_code = num;
|
key_code = num;
|
||||||
}];
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
manipulators = builtins.concatLists (map (n: [
|
manipulators = builtins.concatLists (
|
||||||
|
map (n: [
|
||||||
(number_to_symbol n)
|
(number_to_symbol n)
|
||||||
(symbol_to_number n)
|
(symbol_to_number n)
|
||||||
]) numbers);
|
]) numbers
|
||||||
|
);
|
||||||
|
|
||||||
simple_modifications = [
|
simple_modifications = [
|
||||||
{
|
{
|
||||||
from.apple_vendor_top_case_key_code = "keyboard_fn";
|
from.apple_vendor_top_case_key_code = "keyboard_fn";
|
||||||
to = [{ key_code = "left_control"; }];
|
to = [ { key_code = "left_control"; } ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
from.key_code = "left_control";
|
from.key_code = "left_control";
|
||||||
to = [{ apple_vendor_top_case_key_code = "keyboard_fn"; }];
|
to = [ { apple_vendor_top_case_key_code = "keyboard_fn"; } ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
complex_modifications = {
|
complex_modifications = {
|
||||||
name = "Complex Modifications";
|
name = "Complex Modifications";
|
||||||
rules = [{
|
rules = [
|
||||||
description = "Change numbers to symbols and vice versa";
|
# {
|
||||||
manipulators = manipulators;
|
# description = "Change numbers to symbols and vice versa";
|
||||||
}];
|
# manipulators = manipulators;
|
||||||
|
# }
|
||||||
|
{
|
||||||
|
description = "Toggle Focus Mode with F6";
|
||||||
|
manipulators = [
|
||||||
|
{
|
||||||
|
from = {
|
||||||
|
"key_code" = "f6";
|
||||||
|
};
|
||||||
|
to = [ { "shell_command" = "shortcuts run 'Reduced Interruptions'"; } ];
|
||||||
|
type = "basic";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
config = builtins.toJSON {
|
config = builtins.toJSON {
|
||||||
global.show_in_menu_bar = false;
|
global.show_in_menu_bar = false;
|
||||||
|
|
||||||
profiles = [{
|
profiles = [
|
||||||
|
{
|
||||||
name = "default";
|
name = "default";
|
||||||
selected = true;
|
selected = true;
|
||||||
virtual_hid_keyboard.keyboard_type_v2 = "ansi";
|
virtual_hid_keyboard.keyboard_type_v2 = "ansi";
|
||||||
inherit simple_modifications;
|
inherit simple_modifications;
|
||||||
inherit complex_modifications;
|
inherit complex_modifications;
|
||||||
|
|
||||||
devices = [{
|
devices = [
|
||||||
|
{
|
||||||
identifiers.is_keyboard = true;
|
identifiers.is_keyboard = true;
|
||||||
}];
|
}
|
||||||
}];
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
home-manager.sharedModules = [{
|
{
|
||||||
|
home-manager.sharedModules = [
|
||||||
|
{
|
||||||
home.file.".config/karabiner/karabiner.json" = {
|
home.file.".config/karabiner/karabiner.json" = {
|
||||||
force = true;
|
force = true;
|
||||||
text = config;
|
text = config;
|
||||||
};
|
};
|
||||||
}];
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
homebrew.enable = true;
|
homebrew.enable = true;
|
||||||
homebrew.casks = [ "ungoogled-chromium" ];
|
homebrew.casks = [ "google-chrome" ];
|
||||||
environment.systemPackages = [ pkgs.iina ];
|
environment.systemPackages = [ pkgs.iina ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,6 @@ return {
|
||||||
-- See :h blink-cmp-config-keymap for defining your own keymap
|
-- See :h blink-cmp-config-keymap for defining your own keymap
|
||||||
keymap = {
|
keymap = {
|
||||||
preset = "default",
|
preset = "default",
|
||||||
["<Tab>"] = { "select_and_accept" },
|
|
||||||
["<S-Tab>"] = { "select_next", "fallback_to_mappings" },
|
|
||||||
},
|
},
|
||||||
|
|
||||||
appearance = {
|
appearance = {
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,8 @@ return {
|
||||||
|
|
||||||
local capabilities = require("blink.cmp").get_lsp_capabilities()
|
local capabilities = require("blink.cmp").get_lsp_capabilities()
|
||||||
vim.lsp.enable("nixd")
|
vim.lsp.enable("nixd")
|
||||||
|
vim.lsp.enable("clangd")
|
||||||
|
vim.lsp.enable("basedpyright")
|
||||||
require("mason-lspconfig").setup({
|
require("mason-lspconfig").setup({
|
||||||
automatic_enable = true,
|
automatic_enable = true,
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue