feat: Added autorandr support
This commit is contained in:
parent
5855252ff6
commit
eb5b3d52e4
59
users/common/autorandr.nix
Normal file
59
users/common/autorandr.nix
Normal file
|
@ -0,0 +1,59 @@
|
|||
{config,pkgs,...}:
|
||||
{
|
||||
programs.autorandr =
|
||||
let
|
||||
dpi_hd = 96;
|
||||
dpi_uhd = 192;
|
||||
set_dpi = dpi: "echo 'Xft.dpi: ${toString dpi}' | ${pkgs.xorg.xrdb}/bin/xrdb -merge";
|
||||
eDP-1 = "00ffffffffffff0006afeb3000000000251b0104a5221378020925a5564f9b270c50540000000101010101010101010101010101010152d000a0f0703e803020350058c11000001852d000a0f07095843020350025a51000001800000000000000000000000000000000000000000002001430ff123caa8f0e29aa202020003e";
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
profiles.AStA = {
|
||||
fingerprint = {
|
||||
inherit eDP-1;
|
||||
DP-1-1 = "00ffffffffffff000472ed0688687101111e010380351e782aa135a35b4fa327115054b30c00714f818081c081009500b300d1c001012a4480a070382740082098040f282100001a023a801871382d40582c45000f282100001e000000fd00304b1e5512000a202020202020000000fc00423234375920430a202020202001cf020327f14b9002030411121300001f01230907078301000065030c001000681a00000101304be6023a801871382d40582c45000f282100001e8c0ad08a20e02d10103e96000f2821000018011d007251d01e206e2855000f282100001e8c0ad090204031200c4055000f282100001800000000000000000000000000000000d0";
|
||||
DP-1-2 = "00ffffffffffff000472ed0682687101111e010380351e782aa135a35b4fa327115054b30c00714f818081c081009500b300d1c001012a4480a070382740082098040f282100001a023a801871382d40582c45000f282100001e000000fd00304b1e5512000a202020202020000000fc00423234375920430a202020202001d5020327f14b9002030411121300001f01230907078301000065030c001000681a00000101304be6023a801871382d40582c45000f282100001e8c0ad08a20e02d10103e96000f2821000018011d007251d01e206e2855000f282100001e8c0ad090204031200c4055000f282100001800000000000000000000000000000000d0";
|
||||
};
|
||||
config = {
|
||||
eDP-1 = {
|
||||
enable = true;
|
||||
primary = true;
|
||||
mode = "3840x2160";
|
||||
position = "0x0";
|
||||
gamma = "1";
|
||||
};
|
||||
DP-1-1 = {
|
||||
enable = true;
|
||||
mode = "1920x1080";
|
||||
position = "3840x0";
|
||||
rate = "60";
|
||||
gamma = "1";
|
||||
};
|
||||
DP-1-2 = {
|
||||
enable = true;
|
||||
mode = "1920x1080";
|
||||
position = "5760x0";
|
||||
rate = "60";
|
||||
gamma = "1";
|
||||
};
|
||||
};
|
||||
hooks.postswitch = set_dpi dpi_hd;
|
||||
};
|
||||
profiles.laptop = {
|
||||
fingerprint = {
|
||||
inherit eDP-1;
|
||||
};
|
||||
config = {
|
||||
eDP-1 = {
|
||||
enable = true;
|
||||
primary = true;
|
||||
mode = "3840x2160";
|
||||
position = "0x0";
|
||||
gamma = "1";
|
||||
};
|
||||
};
|
||||
hooks.postswitch = set_dpi dpi_uhd;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -70,6 +70,7 @@
|
|||
"shift+page_up" = "scroll_page_up";
|
||||
"shift+page_down" = "scroll_page_down";
|
||||
"ctrl+shift+." = "change_font_size all -2.0";
|
||||
"ctrl+shift+," = "change_font_size all +2.0";
|
||||
};
|
||||
extraConfig = ''
|
||||
# Use nvim as scrollback pager
|
||||
|
|
|
@ -3,6 +3,15 @@
|
|||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
common/kitty.nix
|
||||
common/herbstluftwm.nix
|
||||
common/autorandr.nix
|
||||
common/desktop.nix
|
||||
./common
|
||||
|
||||
];
|
||||
|
||||
home = {
|
||||
stateVersion = "23.05";
|
||||
packages = with pkgs; [
|
||||
|
@ -14,12 +23,6 @@
|
|||
spotify
|
||||
];
|
||||
};
|
||||
imports = [
|
||||
common/kitty.nix
|
||||
common/herbstluftwm.nix
|
||||
common/desktop.nix
|
||||
./common
|
||||
];
|
||||
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
|
|
Loading…
Reference in a new issue