multi monitor setup with autorandr
This commit is contained in:
parent
90532b9662
commit
2c8aeb0ce6
4 changed files with 63 additions and 2 deletions
19
flake.lock
19
flake.lock
|
@ -845,7 +845,8 @@
|
||||||
"private_assets": "private_assets",
|
"private_assets": "private_assets",
|
||||||
"retiolum": "retiolum",
|
"retiolum": "retiolum",
|
||||||
"secrets": "secrets",
|
"secrets": "secrets",
|
||||||
"sops-nix": "sops-nix"
|
"sops-nix": "sops-nix",
|
||||||
|
"thinkpad-dock": "thinkpad-dock"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rotate-text": {
|
"rotate-text": {
|
||||||
|
@ -949,6 +950,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"thinkpad-dock": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1617280004,
|
||||||
|
"narHash": "sha256-nhmYoiHNHk64CjgG7dutVpmrWpdwE3+4G8fGWNANTi8=",
|
||||||
|
"owner": "oxzi",
|
||||||
|
"repo": "nixos-thinkpad-dock",
|
||||||
|
"rev": "c18fe4116b20886c112acec19294e9b96e919526",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "oxzi",
|
||||||
|
"repo": "nixos-thinkpad-dock",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"ts-fold": {
|
"ts-fold": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
|
@ -59,7 +59,10 @@
|
||||||
url = "github:krebs/retiolum";
|
url = "github:krebs/retiolum";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
thinkpad-dock = {
|
||||||
|
url = "github:oxzi/nixos-thinkpad-dock";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
|
@ -80,6 +83,7 @@
|
||||||
, secrets
|
, secrets
|
||||||
, sops-nix
|
, sops-nix
|
||||||
, retiolum
|
, retiolum
|
||||||
|
, thinkpad-dock
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|
|
@ -26,6 +26,8 @@ in
|
||||||
};
|
};
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
autorandr
|
||||||
|
|
||||||
(nextcloudSync "InstantUpload")
|
(nextcloudSync "InstantUpload")
|
||||||
(nextcloudSync "Pictures")
|
(nextcloudSync "Pictures")
|
||||||
(nextcloudSync "Unterlagen")
|
(nextcloudSync "Unterlagen")
|
||||||
|
|
|
@ -268,6 +268,44 @@ in
|
||||||
|
|
||||||
"${cfg.config.modifier}+r" = "mode resize";
|
"${cfg.config.modifier}+r" = "mode resize";
|
||||||
|
|
||||||
|
# multiple monitors
|
||||||
|
# autorandr --save docked # to save setup
|
||||||
|
# autorandr --save undocked # to save setup
|
||||||
|
# autorandr --change # automatically detects the setup
|
||||||
|
"${cfg.config.modifier}+BackSpace" =
|
||||||
|
let
|
||||||
|
xmodmapConfig = pkgs.writeText "xmodmap" ''
|
||||||
|
!
|
||||||
|
! Swap Caps_Lock and Control_L
|
||||||
|
!
|
||||||
|
|
||||||
|
! replace capslock keys with Escape Keys
|
||||||
|
! remove Lock = Caps_Lock
|
||||||
|
clear Lock
|
||||||
|
add Lock = Scroll_Lock
|
||||||
|
|
||||||
|
keysym Caps_Lock = Escape
|
||||||
|
|
||||||
|
! Set Right function Key to Windows-key
|
||||||
|
keycode 135 = Super_R NoSymbol Super_R NoSymbol Super_R
|
||||||
|
|
||||||
|
! Map umlauts to RIGHT ALT + <key>
|
||||||
|
keycode 108 = Mode_switch
|
||||||
|
keysym e = e E EuroSign
|
||||||
|
keysym c = c C cent
|
||||||
|
keysym a = a A adiaeresis Adiaeresis
|
||||||
|
keysym o = o O odiaeresis Odiaeresis
|
||||||
|
keysym u = u U udiaeresis Udiaeresis
|
||||||
|
keysym s = s S ssharp
|
||||||
|
'';
|
||||||
|
script = pkgs.writers.writeBash "autorandr" ''
|
||||||
|
${pkgs.autorandr}/bin/autorandr --change
|
||||||
|
${pkgs.xorg.xmodmap}/bin/xmodmap ${xmodmapConfig}
|
||||||
|
${backgroundCommand}
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
"exec ${toString script}";
|
||||||
|
|
||||||
# like vimperator
|
# like vimperator
|
||||||
|
|
||||||
"${cfg.config.modifier}+a" = "exec ${pkgs.i3-easyfocus}/bin/i3-easyfocus";
|
"${cfg.config.modifier}+a" = "exec ${pkgs.i3-easyfocus}/bin/i3-easyfocus";
|
||||||
|
|
Loading…
Reference in a new issue