1
Fork 0
mirror of https://github.com/thegeneralist01/config.git synced 2026-07-21 19:05:19 +02:00

Gate man cache generation on Linux and extend Karabiner mappings

This commit is contained in:
TheGeneralist 2026-06-06 22:18:17 +02:00
parent 5d22e55d6b
commit 21d4ba3eb5
Signed by: thegeneralist01
SSH key fingerprint: SHA256:pp9qddbCNmVNoSjevdvQvM5z0DHN7LTa8qBMbcMq/R4
2 changed files with 69 additions and 8 deletions

View file

@ -1,19 +1,30 @@
{ inputs, lib, os, ... }:
{
inputs,
lib,
os,
...
}:
let
isDarwin = os == "darwin";
isLinux = os == "linux";
in {
in
{
imports =
lib.optional isDarwin inputs.home-manager.darwinModules.home-manager
++ lib.optional isLinux inputs.home-manager.nixosModules.home-manager;
home-manager = {
useGlobalPkgs = true;
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = lib.mkDefault "home.bak";
};
home-manager.sharedModules = [{
programs.home-manager.enable = true;
}];
home-manager.sharedModules = [
{
programs = {
home-manager.enable = true;
man.generateCaches = isLinux;
};
}
];
}

View file

@ -86,7 +86,7 @@ let
is_keyboard = true;
};
# Swap the G213's Windows/Alt modifiers.
# Swap the G213's Windows/Alt modifiers and map Application to Fn.
logitechG213SimpleModifications = [
{
from.key_code = "left_command";
@ -96,6 +96,10 @@ let
from.key_code = "left_option";
to = [ { key_code = "left_command"; } ];
}
{
from.key_code = "application";
to = [ { apple_vendor_top_case_key_code = "keyboard_fn"; } ];
}
];
logitechMouseIdentifiers = {
@ -130,8 +134,35 @@ let
name = "Complex Modifications";
rules = [
{
description = "Logitech mouse Button3 sends Fn, or middle click with Hyper";
description = "Logitech mouse Button3 sends Fn, or middle click with Hyper or Button2";
manipulators = [
{
from.pointing_button = "button2";
to = [
{ pointing_button = "button2"; }
{
set_variable = {
name = "logitech_mouse_button2_held";
value = 1;
};
}
];
to_after_key_up = [
{
set_variable = {
name = "logitech_mouse_button2_held";
value = 0;
};
}
];
conditions = [
{
type = "device_if";
identifiers = [ logitechMouseIdentifiers ];
}
];
type = "basic";
}
{
from = {
pointing_button = "button3";
@ -146,6 +177,25 @@ let
];
type = "basic";
}
{
from = {
pointing_button = "button3";
modifiers.optional = [ "any" ];
};
to = [ { pointing_button = "button3"; } ];
conditions = [
{
type = "device_if";
identifiers = [ logitechMouseIdentifiers ];
}
{
type = "variable_if";
name = "logitech_mouse_button2_held";
value = 1;
}
];
type = "basic";
}
{
from = {
pointing_button = "button3";