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:
parent
5d22e55d6b
commit
21d4ba3eb5
2 changed files with 69 additions and 8 deletions
|
|
@ -1,19 +1,30 @@
|
||||||
{ inputs, lib, os, ... }:
|
{
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
os,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
isDarwin = os == "darwin";
|
isDarwin = os == "darwin";
|
||||||
isLinux = os == "linux";
|
isLinux = os == "linux";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports =
|
imports =
|
||||||
lib.optional isDarwin inputs.home-manager.darwinModules.home-manager
|
lib.optional isDarwin inputs.home-manager.darwinModules.home-manager
|
||||||
++ lib.optional isLinux inputs.home-manager.nixosModules.home-manager;
|
++ lib.optional isLinux inputs.home-manager.nixosModules.home-manager;
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
backupFileExtension = lib.mkDefault "home.bak";
|
backupFileExtension = lib.mkDefault "home.bak";
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.sharedModules = [{
|
home-manager.sharedModules = [
|
||||||
programs.home-manager.enable = true;
|
{
|
||||||
}];
|
programs = {
|
||||||
|
home-manager.enable = true;
|
||||||
|
man.generateCaches = isLinux;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ let
|
||||||
is_keyboard = true;
|
is_keyboard = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Swap the G213's Windows/Alt modifiers.
|
# Swap the G213's Windows/Alt modifiers and map Application to Fn.
|
||||||
logitechG213SimpleModifications = [
|
logitechG213SimpleModifications = [
|
||||||
{
|
{
|
||||||
from.key_code = "left_command";
|
from.key_code = "left_command";
|
||||||
|
|
@ -96,6 +96,10 @@ let
|
||||||
from.key_code = "left_option";
|
from.key_code = "left_option";
|
||||||
to = [ { key_code = "left_command"; } ];
|
to = [ { key_code = "left_command"; } ];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
from.key_code = "application";
|
||||||
|
to = [ { apple_vendor_top_case_key_code = "keyboard_fn"; } ];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
logitechMouseIdentifiers = {
|
logitechMouseIdentifiers = {
|
||||||
|
|
@ -130,8 +134,35 @@ let
|
||||||
name = "Complex Modifications";
|
name = "Complex Modifications";
|
||||||
rules = [
|
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 = [
|
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 = {
|
from = {
|
||||||
pointing_button = "button3";
|
pointing_button = "button3";
|
||||||
|
|
@ -146,6 +177,25 @@ let
|
||||||
];
|
];
|
||||||
type = "basic";
|
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 = {
|
from = {
|
||||||
pointing_button = "button3";
|
pointing_button = "button3";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue